Author: sginsberg
Date: Fri Nov 14 08:49:11 2008
New Revision: 37358
URL: http://svn.reactos.org/svn/reactos?rev=37358&view=rev
Log:
- Don't define PAGE_SIZE in typedefs.h as -- "this value is target specific, host tools MUST not use it and this line has to be removed". Instead, define it locally for cmlib.
- Also correct TRUE definition in this header
Modified:
trunk/reactos/include/host/typedefs.h
trunk/reactos/lib/cmlib/cmlib.h
Modified: trunk/reactos/include/host/typedefs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/host/typedefs.h?re…
==============================================================================
--- trunk/reactos/include/host/typedefs.h [iso-8859-1] (original)
+++ trunk/reactos/include/host/typedefs.h [iso-8859-1] Fri Nov 14 08:49:11 2008
@@ -40,11 +40,7 @@
#define OPTIONAL
#define FALSE 0
-#define TRUE (!(FALSE))
-
-/* FIXME: this value is target specific, host tools MUST not use it
- * and this line has to be removed */
-#define PAGE_SIZE 4096
+#define TRUE 1
#define ANYSIZE_ARRAY 1
Modified: trunk/reactos/lib/cmlib/cmlib.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.h?rev=3735…
==============================================================================
--- trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] Fri Nov 14 08:49:11 2008
@@ -101,6 +101,21 @@
#ifndef ROUND_UP
#define ROUND_UP(a,b) ((((a)+(b)-1)/(b))*(b))
#define ROUND_DOWN(a,b) (((a)/(b))*(b))
+#endif
+
+//
+// PAGE_SIZE definition
+//
+#ifndef PAGE_SIZE
+#if defined(_M_IX86)
+#define PAGE_SIZE 0x1000
+#elif defined(_M_AMD64)
+#define PAGE_SIZE 0x1000
+#elif defined(_M_ARM)
+#define PAGE_SIZE 0x1000
+#else
+#error Local PAGE_SIZE definition required
+#endif
#endif
#define TAG_CM 0x68742020
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/inclu…
==============================================================================
--- 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 */