[ros-diffs] [sserapion] 37352: Correct definitions for WIN32 and WIN64.

sserapion at svn.reactos.org sserapion at svn.reactos.org
Fri Nov 14 06:51:47 CET 2008


Author: sserapion
Date: Thu Nov 13 23:51:46 2008
New Revision: 37352

URL: http://svn.reactos.org/svn/reactos?rev=37352&view=rev
Log:
Correct definitions for WIN32 and WIN64.

Modified:
    branches/ros-amd64-bringup/reactos/include/crt/mingw32/stddef.h

Modified: branches/ros-amd64-bringup/reactos/include/crt/mingw32/stddef.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/include/crt/mingw32/stddef.h?rev=37352&r1=37351&r2=37352&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/crt/mingw32/stddef.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/crt/mingw32/stddef.h [iso-8859-1] Thu Nov 13 23:51:46 2008
@@ -140,7 +140,11 @@
 #define ___int_ptrdiff_t_h
 #define _GCC_PTRDIFF_T
 #ifndef __PTRDIFF_TYPE__
-#define __PTRDIFF_TYPE__ long long int
+# ifdef _WIN64
+  #define __PTRDIFF_TYPE__ long long int
+# else
+# #define __PTRDIFF_TYPE__ long int
+# endif  
 #endif
 #ifndef _PTRDIFF_T_DEFINED
 #define _PTRDIFF_T_DEFINED
@@ -204,7 +208,11 @@
 #define __size_t
 #endif
 #ifndef __SIZE_TYPE__
-#define __SIZE_TYPE__ long long unsigned int
+# ifdef _WIN64
+#  define __SIZE_TYPE__ long long unsigned int
+# else
+#  define __SIZE_TYPE__ long unsigned int
+# endif
 #endif
 #if !(defined (__GNUG__) && defined (size_t))
 typedef __SIZE_TYPE__ size_t;
@@ -379,12 +387,12 @@
 #endif	/* NULL not defined and <stddef.h> or need NULL.  */
 #undef	__need_NULL
 
-#ifdef _STDDEF_H
+#ifndef offsetof
 
 /* Offset of member MEMBER in a struct of type TYPE. */
 #define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
 
-#endif /* _STDDEF_H was defined this time */
+#endif /* !offsetof */
 
 #endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__
 	  || __need_XXX was not defined before */



More information about the Ros-diffs mailing list