Index: open.c
===================================================================
RCS file: /home/cvspublic/apr/file_io/win32/open.c,v
retrieving revision 1.90
diff -u -r1.90 open.c
--- open.c  9 Jan 2002 22:05:09 -0000   1.90
+++ open.c  28 Jan 2002 12:14:40 -0000
@@ -168,7 +168,7 @@
 void *res_name_from_filename(const char *file, int global, apr_pool_t *pool)
 {
 #if APR_HAS_UNICODE_FS
-    if (apr_os_level >= APR_WIN_NT) {
+    APR_OS_IS_UNICODE(apr_os_level) {
         apr_wchar_t *wpre, *wfile, *ch;
         apr_size_t n = strlen(file) + 1;
         apr_size_t r, d;
@@ -205,8 +205,9 @@
         }
         return wfile;
     }
-    else
 #endif
+#if APR_HAS_ANSI_FS
+    APR_OS_SUPPORT_ANSI
     {
         char *nfile, *ch;
         apr_size_t n = strlen(file) + 1;
@@ -247,6 +248,7 @@
         }
         return nfile;
     }
+#endif
 }
 
 
@@ -333,7 +335,7 @@
     }
 
 #if APR_HAS_UNICODE_FS
-    if (apr_os_level >= APR_WIN_NT) {
+    APR_OS_IS_UNICODE(apr_os_level) {
         apr_wchar_t wfname[APR_PATH_MAX];
         if (rv = utf8_to_unicode_path(wfname, sizeof(wfname) 
                                                / sizeof(apr_wchar_t), fname))
@@ -341,11 +343,12 @@
         handle = CreateFileW(wfname, oflags, sharemode,
                              NULL, createflags, attributes, 0);
     }
-    else
 #endif
+#if APR_HAS_ANSI_FS
+    APR_OS_SUPPORT_ANSI
         handle = CreateFileA(fname, oflags, sharemode,
                              NULL, createflags, attributes, 0);
-
+#endif
     if (handle == INVALID_HANDLE_VALUE) {
         return apr_get_os_error();
     }
@@ -424,7 +427,7 @@
 APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *cont)
 {
 #if APR_HAS_UNICODE_FS
-    if (apr_os_level >= APR_WIN_NT) 
+    APR_OS_IS_UNICODE(apr_os_level) 
     {
         apr_wchar_t wpath[APR_PATH_MAX];
         apr_status_t rv;
@@ -435,10 +438,12 @@
         if (DeleteFileW(wpath))
             return APR_SUCCESS;
     }
-    else
 #endif
+#if APR_HAS_ANSI_FS
+    APR_OS_SUPPORT_ANSI
         if (DeleteFile(path))
             return APR_SUCCESS;
+#endif
     return apr_get_os_error();
 }
 
@@ -446,7 +451,7 @@
                                           const char *topath,
                                           apr_pool_t *cont)
 {
-    if (apr_os_level >= APR_WIN_NT) 
+    APR_OS_IS_UNICODE(apr_os_level)
     {
 #if APR_HAS_UNICODE_FS
         apr_wchar_t wfrompath[APR_PATH_MAX], wtopath[APR_PATH_MAX];
@@ -468,7 +473,8 @@
             return APR_SUCCESS;
 #endif
     }
-    else
+#if APR_HAS_ANSI_FS
+    APR_OS_SUPPORT_ANSI
     {
         /* Windows 95 and 98 do not support MoveFileEx, so we'll use
          * the old MoveFile function.  However, MoveFile requires that
@@ -488,6 +494,7 @@
         if (MoveFile(frompath, topath))
             return APR_SUCCESS;
     }        
+#endif
     return apr_get_os_error();
 }
