MAX_PATH mess fix

Steven Edwards Steven_Ed4153 at yahoo.com
Tue Apr 30 16:53:56 CDT 2002


It seems mingw tries to include stdlib.h after windef.h in the build 
process and that was the result of the warnings/error.

By making this change I don't have to change any of the other headers
That depend on MAX_PATH (winnls,wingdi) by adding stdlib.h in them. 
I don't know if its right by the wine project standards but now I can 
compile 90% of the wine dll sources without warrnings/errors from 
stupid MAX_PATH. If someone has a better way please cvs diff -u me =)

Thanks 
Steven

Changelog: Fix the MAX_PATH mess under Mingw. (for real this time)

cvs diff -u windef.h 
Index: windef.h
===================================================================
RCS file: /home/wine/wine/include/windef.h,v
retrieving revision 1.62
diff -u -r1.62 windef.h
--- windef.h	10 Mar 2002 00:02:34 -0000	1.62
+++ windef.h	30 Apr 2002 21:41:42 -0000
@@ -149,6 +149,10 @@
 #endif
 #endif  /* NOMINMAX */
 
+#ifdef __MINGW__
+#include <stdlib.h>
+#else
+
 #ifndef _MAX_PATH
 /* FIXME: These are supposed to be in stdlib.h only */
 #define _MAX_DRIVE          3
@@ -156,9 +160,13 @@
 #define _MAX_DIR            _MAX_FNAME
 #define _MAX_EXT            _MAX_FNAME
 #define _MAX_PATH           260
-#endif
+#endif /* _MAX_PATH */
+
+#ifndef MAX_PATH
 #define MAX_PATH            _MAX_PATH
+#endif /* MAX_PATH */
 
+#endif /* __MINGW__ */
 
 #define HFILE_ERROR     ((HFILE)-1)




More information about the wine-devel mailing list