]> granicus.if.org Git - postgresql/blobdiff - src/include/c.h
Remove define inadvertantly left over from testing.
[postgresql] / src / include / c.h
index 35b3830ffe6ebcc27f7bad8719052913493e41fe..5bed7190da5180bb88dc39c3ad5c0fe6f6b64902 100644 (file)
@@ -9,10 +9,10 @@
  *       polluting the namespace with lots of stuff...
  *
  *
- * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/c.h,v 1.238 2010/01/02 16:58:00 momjian Exp $
+ * src/include/c.h
  *
  *-------------------------------------------------------------------------
  */
@@ -58,7 +58,7 @@
 #endif
 #include "postgres_ext.h"
 
-#if _MSC_VER >= 1400
+#if _MSC_VER >= 1400 || defined(HAVE_CRTDEFS_H)
 #define errcode __msvc_errcode
 #include <crtdefs.h>
 #undef errcode
@@ -279,21 +279,11 @@ typedef long long int int64;
 #ifndef HAVE_UINT64
 typedef unsigned long long int uint64;
 #endif
-#else                                                  /* not HAVE_LONG_INT_64 and not
-                                                                * HAVE_LONG_LONG_INT_64 */
-
-/* Won't actually work, but fall back to long int so that code compiles */
-#ifndef HAVE_INT64
-typedef long int int64;
-#endif
-#ifndef HAVE_UINT64
-typedef unsigned long int uint64;
+#else
+/* neither HAVE_LONG_INT_64 nor HAVE_LONG_LONG_INT_64 */
+#error must have a working 64-bit integer datatype
 #endif
 
-#define INT64_IS_BUSTED
-#endif   /* not HAVE_LONG_INT_64 and not
-                                                                * HAVE_LONG_LONG_INT_64 */
-
 /* Decide if we need to decorate 64-bit constants */
 #ifdef HAVE_LL_CONSTANTS
 #define INT64CONST(x)  ((int64) x##LL)
@@ -305,7 +295,7 @@ typedef unsigned long int uint64;
 
 
 /* Select timestamp representation (float8 or int64) */
-#if defined(USE_INTEGER_DATETIMES) && !defined(INT64_IS_BUSTED)
+#ifdef USE_INTEGER_DATETIMES
 #define HAVE_INT64_TIMESTAMP
 #endif
 
@@ -783,7 +773,7 @@ typedef NameData *Name;
 extern int
 snprintf(char *str, size_t count, const char *fmt,...)
 /* This extension allows gcc to check the format string */
-__attribute__((format(printf, 3, 4)));
+__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4)));
 #endif
 
 #if !HAVE_DECL_VSNPRINTF
@@ -794,8 +784,12 @@ extern int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
 #define memmove(d, s, c)               bcopy(s, d, c)
 #endif
 
+/* no special DLL markers on most ports */
 #ifndef PGDLLIMPORT
-#define PGDLLIMPORT                            /* no special DLL markers on most ports */
+#define PGDLLIMPORT
+#endif
+#ifndef PGDLLEXPORT
+#define PGDLLEXPORT
 #endif
 
 /*