]> git.saurik.com Git - wxWidgets.git/commitdiff
Thinking about it, this is a bad idea as MW CRT's struct tm is two
authorDavid Elliott <dfe@tgwbd.org>
Sun, 27 Mar 2005 08:56:27 +0000 (08:56 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Sun, 27 Mar 2005 08:56:27 +0000 (08:56 +0000)
fields shorter than BSD's as MW's lacks TZ fields.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/datetime.cpp

index 929490153187d29c7957d96e5faa9152664046c4..a042dd5947079c60ebd1195f8f005a958ec808b9 100644 (file)
@@ -130,7 +130,13 @@ wxCUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter<wxDateTime> , wxFromStringCon
 #if defined(HAVE_STRPTIME) && defined(__DARWIN__) && defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS
     // configure detects strptime as linkable because it's in the OS X
     // System library but MSL headers don't declare it.
-    char *strptime(const char *, const char *, struct tm *);
+
+//    char *strptime(const char *, const char *, struct tm *);
+    // However, we DON'T want to just provide it here because we would
+    // crash and/or overwrite data when strptime from OS X tries
+    // to fill in MW's struct tm which is two fields shorter (no TZ stuff)
+    // So for now let's just say we don't have strptime
+    #undef HAVE_STRPTIME
 #endif
 
 #if defined(__MWERKS__) && wxUSE_UNICODE