]> pd.if.org Git - pdclib/blobdiff - includes/stddef.h
Re-import from Subversion.
[pdclib] / includes / stddef.h
index 3c6955b627e6034a7ecdcabe9e4e0ea2b34443c5..cec8dfbaddcf14a856f0db8843ca87dfd4a8f78f 100644 (file)
@@ -1,30 +1,46 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-// Common definitions
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * ----------------------------------------------------------------------------
+ * Common definitions
+ * ----------------------------------------------------------------------------
+ * This header is part of a freestanding implementation
+ * --------------------------------------------------------------------------*/
 
-#ifndef __STDDEF_H
-#define __STDDEF_H __STDDEF_H
+#ifndef _STDDEF_H
+#define _STDDEF_H _STDDEF_H
 
-// TODO: Documentation
+#ifndef _NULL
+#include "__intern.h"
+#endif
 
-// ----------------------------------------------------------------------------
-// MACROS
+/* TODO: Documentation */
 
-#include "__NULL.h"
+/* ----------------------------------------------------------------------------
+ * MACROS
+ * --------------------------------------------------------------------------*/
 
-#define offsetof( s-type, mbr ) // TODO - personality?
+#define NULL _NULL
 
-// ----------------------------------------------------------------------------
-// TYPEDEFS
+#define offsetof( s-type, mbr ) /* TODO - to __intern.h / __personality.h? */
 
-#include "__size_t.h"
-#include "__wchar_t.h"
+/* ----------------------------------------------------------------------------
+ * TYPEDEFS
+ * --------------------------------------------------------------------------*/
 
-typedef ptrdiff_t; // TODO - personality?
+#ifndef _SIZE_T
+#define _SIZE_T _SIZE_T
+typedef __size_t size_t;
+#endif /* _SIZE_T */
 
-#endif // __STDDEF_H
+#ifndef _WCHAR_T
+#define _WCHAR_T _WCHAR_T
+typedef __wchar_t wchar_t;
+#endif /* _WCHAR_T */
+
+/* Look this up in the C Standard Rationale, which has example code on this. */
+typedef ptrdiff_t; /* TODO - to __intern.h / __personality.h? */
+
+#endif /* _STDDEF_H */