]> git.saurik.com Git - wxWidgets.git/commitdiff
mingw32 doesn't define _tsystem so provide one ourselves (bug 1726904)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 3 Jun 2007 23:00:41 +0000 (23:00 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 3 Jun 2007 23:00:41 +0000 (23:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/wxcrt.h
src/common/wxcrt.cpp

index 31bf3ceb70ae5e89c24765f91856411d115a7c7b..fd4a6ec96ca2360e60bc8e7bc2709c05f56f6af5 100644 (file)
@@ -814,13 +814,24 @@ WXDLLIMPEXP_BASE wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **sa
 WXDLLIMPEXP_BASE double   wxAtof(const wxChar *psz);
 #endif
 
+/*
+   mingw32 doesn't provide _tsystem() even though it does provide all the other
+   stdlib.h functions wrappers so check for it separately:
+ */
+#if defined(__MINGW32__) && wxUSE_UNICODE && !defined(_tsystem)
+    #define wxNEED_WXSYSTEM
+#endif
+
 #ifdef wxNEED_WX_STDLIB_H
 WXDLLIMPEXP_BASE int      wxAtoi(const wxChar *psz);
 WXDLLIMPEXP_BASE long     wxAtol(const wxChar *psz);
 WXDLLIMPEXP_BASE wxChar * wxGetenv(const wxChar *name);
-WXDLLIMPEXP_BASE int      wxSystem(const wxChar *psz);
+#define wxNEED_WXSYSTEM
 #endif
 
+#ifdef wxNEED_WXSYSTEM
+WXDLLIMPEXP_BASE int      wxSystem(const wxChar *psz);
+#endif
 
 /* time.h functions */
 #ifdef wxNEED_WX_TIME_H
index 17c766599218d1babebf6190249540a932affe0d..56e6b9dad0b73e14666eccfd29ea6c32ede48710 100644 (file)
@@ -1327,12 +1327,14 @@ wxChar * WXDLLEXPORT wxGetenv(const wxChar *name)
 #endif
 }
 
+#endif // wxNEED_WX_STDLIB_H
+
+#ifdef wxNEED_WXSYSTEM
 int WXDLLEXPORT wxSystem(const wxChar *psz)
 {
     return system(wxConvLibc.cWX2MB(psz));
 }
-
-#endif // wxNEED_WX_STDLIB_H
+#endif // wxNEED_WXSYSTEM
 
 #ifdef wxNEED_WX_TIME_H
 WXDLLEXPORT size_t