aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/xlog_internal.h9
-rw-r--r--src/include/catalog/pg_control.h11
-rw-r--r--src/include/miscadmin.h6
-rw-r--r--src/include/port/win32.h14
-rw-r--r--src/include/utils/timestamp.h6
5 files changed, 17 insertions, 29 deletions
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index a4a4e72badf..88fe0b6a95f 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -11,15 +11,14 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/xlog_internal.h,v 1.22 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/xlog_internal.h,v 1.23 2008/02/17 02:09:30 tgl Exp $
*/
#ifndef XLOG_INTERNAL_H
#define XLOG_INTERNAL_H
-#include <time.h>
-
#include "access/xlog.h"
#include "fmgr.h"
+#include "pgtime.h"
#include "storage/block.h"
#include "storage/relfilenode.h"
@@ -71,7 +70,7 @@ typedef struct XLogContRecord
/*
* Each page of XLOG file has a header like this:
*/
-#define XLOG_PAGE_MAGIC 0xD062 /* can be used as WAL version indicator */
+#define XLOG_PAGE_MAGIC 0xD063 /* can be used as WAL version indicator */
typedef struct XLogPageHeaderData
{
@@ -242,7 +241,7 @@ extern const RmgrData RmgrTable[];
/*
* Exported to support xlog switching from bgwriter
*/
-extern time_t GetLastSegSwitchTime(void);
+extern pg_time_t GetLastSegSwitchTime(void);
extern XLogRecPtr RequestXLogSwitch(void);
/*
diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h
index 84e6d9424e0..e61faed9876 100644
--- a/src/include/catalog/pg_control.h
+++ b/src/include/catalog/pg_control.h
@@ -8,21 +8,20 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.39 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.40 2008/02/17 02:09:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef PG_CONTROL_H
#define PG_CONTROL_H
-#include <time.h>
-
#include "access/xlogdefs.h"
+#include "pgtime.h" /* for pg_time_t */
#include "utils/pg_crc.h"
/* Version identifier for this pg_control format */
-#define PG_CONTROL_VERSION 833
+#define PG_CONTROL_VERSION 841
/*
* Body of CheckPoint XLOG records. This is declared here because we keep
@@ -38,7 +37,7 @@ typedef struct CheckPoint
Oid nextOid; /* next free OID */
MultiXactId nextMulti; /* next free MultiXactId */
MultiXactOffset nextMultiOffset; /* next free MultiXact offset */
- time_t time; /* time stamp of checkpoint */
+ pg_time_t time; /* time stamp of checkpoint */
} CheckPoint;
/* XLOG info values for XLOG rmgr */
@@ -99,7 +98,7 @@ typedef struct ControlFileData
* System status data
*/
DBState state; /* see enum above */
- time_t time; /* time stamp of last pg_control update */
+ pg_time_t time; /* time stamp of last pg_control update */
XLogRecPtr checkPoint; /* last check point record ptr */
XLogRecPtr prevCheckPoint; /* previous check point record ptr */
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 6ded4c9bc4c..75a7e1f7f7c 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.199 2008/01/03 21:23:15 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.200 2008/02/17 02:09:31 tgl Exp $
*
* NOTES
* some of the information in this file should be moved to other files.
@@ -23,7 +23,7 @@
#ifndef MISCADMIN_H
#define MISCADMIN_H
-#include <time.h> /* for time_t */
+#include "pgtime.h" /* for pg_time_t */
#define PG_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
@@ -134,7 +134,7 @@ extern int MaxBackends;
extern int MaxConnections;
extern PGDLLIMPORT int MyProcPid;
-extern PGDLLIMPORT time_t MyStartTime;
+extern PGDLLIMPORT pg_time_t MyStartTime;
extern PGDLLIMPORT struct Port *MyProcPort;
extern long MyCancelKey;
diff --git a/src/include/port/win32.h b/src/include/port/win32.h
index 54aafa25cc4..d670576787e 100644
--- a/src/include/port/win32.h
+++ b/src/include/port/win32.h
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.83 2008/01/09 09:16:43 mha Exp $ */
+/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.84 2008/02/17 02:09:31 tgl Exp $ */
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define WIN32_ONLY_COMPILER
@@ -45,17 +45,6 @@
#define USES_WINSOCK
-/*
- * Ensure that anyone building an extension is using a 32 bit time_t.
- * On Mingw/Msys, that should always be the case, but MSVC++ defaults
- * to 64 bits. We set that for our own build in the project files
- */
-#if defined(WIN32_ONLY_COMPILER) && !defined(FRONTEND)
-#ifndef _USE_32BIT_TIME_T
-#error "Postgres uses 32 bit time_t - add #define _USE_32BIT_TIME_T on Windows"
-#endif
-#endif
-
/* defines for dynamic linking on Win32 platform */
#if defined(WIN32) || defined(__CYGWIN__)
@@ -198,6 +187,7 @@ struct itimerval
struct timeval it_interval;
struct timeval it_value;
};
+
int setitimer(int which, const struct itimerval * value, struct itimerval * ovalue);
diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h
index 1f73a2a081a..cc224aa147a 100644
--- a/src/include/utils/timestamp.h
+++ b/src/include/utils/timestamp.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.74 2008/01/23 21:26:13 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.75 2008/02/17 02:09:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -310,8 +310,8 @@ extern bool TimestampDifferenceExceeds(TimestampTz start_time,
TimestampTz stop_time,
int msec);
-extern TimestampTz time_t_to_timestamptz(time_t tm);
-extern time_t timestamptz_to_time_t(TimestampTz t);
+extern TimestampTz time_t_to_timestamptz(pg_time_t tm);
+extern pg_time_t timestamptz_to_time_t(TimestampTz t);
extern const char *timestamptz_to_str(TimestampTz t);