bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #4415] base: mingw unicode filesystemRep


From: Jeremy Bettis
Subject: [patch #4415] base: mingw unicode filesystemRep
Date: Tue, 13 Sep 2005 18:38:26 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)

URL:
  <http://savannah.gnu.org/patch/?func=detailitem&item_id=4415>

                 Summary: base: mingw unicode filesystemRep
                 Project: GNUstep
            Submitted by: jeremybettis
            Submitted on: Tue 09/13/05 at 18:38
                Category: Foundation
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open

    _______________________________________________________

Details:

The filesystemRepresentation returns unicode, but doesn't declare the
function that way.  This patch resolvs that and fixes some usages that were
treating it as a char*.

Index: Headers/Foundation/NSFileManager.h
===================================================================
RCS file:
/cvsroot/gnustep/gnustep/core/base/Headers/Foundation/NSFileManager.h,v
retrieving revision 1.6
diff -u -r1.6 NSFileManager.h
--- Headers/Foundation/NSFileManager.h  4 Jun 2005 07:22:50 -0000       1.6
+++ Headers/Foundation/NSFileManager.h  27 Jul 2005 18:08:46 -0000
@@ -216,7 +216,11 @@
 - (BOOL) fileExistsAtPath: (NSString*)path;
 - (BOOL) fileExistsAtPath: (NSString*)path isDirectory: (BOOL*)isDirectory;
 - (NSDictionary*) fileSystemAttributesAtPath: (NSString*)path;
+#ifdef __MINGW__
+- (const unichar*) fileSystemRepresentationWithPath: (NSString*)path;
+#else
 - (const char*) fileSystemRepresentationWithPath: (NSString*)path;
+#endif
 #ifndef NO_GNUSTEP
 - (NSString*) localFromOpenStepPath:(NSString*)path;
 - (NSString*) openStepPathFromLocal:(NSString*)localPath;
Index: Headers/Foundation/NSString.h
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/base/Headers/Foundation/NSString.h,v
retrieving revision 1.22
diff -u -r1.22 NSString.h
--- Headers/Foundation/NSString.h       4 Jun 2005 10:55:38 -0000       1.22
+++ Headers/Foundation/NSString.h       27 Jul 2005 18:04:30 -0000
@@ -355,7 +355,11 @@
  * automatically freed soon after it is returned, so copy it if you need it
  * for long.
  */
+#ifdef __MINGW__
+- (const unichar*) fileSystemRepresentation;
+#else
 - (const char*) fileSystemRepresentation;
+#endif
 
 /**
  * Converts the receiver to a C string path using the character encoding
Index: Source/NSPathUtilities.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/base/Source/NSPathUtilities.m,v
retrieving revision 1.13
diff -u -r1.13 NSPathUtilities.m
--- Source/NSPathUtilities.m    31 Jul 2005 08:18:19 -0000      1.13
+++ Source/NSPathUtilities.m    1 Aug 2005 15:07:37 -0000
@@ -350,7 +350,7 @@
       dict = GSReadStepConfFile(steprcFile);
       if (dict != nil)
        {
-         PrintOnce("Warning: Configuration: The file %s has been "
+         PrintOnce("Warning: Configuration: The file %S has been "
            "deprecated.  Please use the configuration file %s to "
            "set standard paths.\n",
            [steprcFile fileSystemRepresentation],
@@ -627,13 +627,14 @@
     }
 
   attributes = [MGR() fileAttributesAtPath: fileName traverseLink: YES];
+#if    !defined(__MINGW__)
   if (([attributes filePosixPermissions] & 022) != 0)
     {
-      fprintf(stderr, "The file '%s' is writable by someone other than"
+      fprintf(stderr, "The file '%S' is writable by someone other than"
        " its owner.\nIgnoring it.\n", [fileName fileSystemRepresentation]);
       return nil;
     }
-
+#endif
   dict = [NSMutableDictionary dictionaryWithCapacity: 16];
   if (dict == nil)
     {







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?func=detailitem&item_id=4415>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]