Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
c42581eb
Commit
c42581eb
authored
May 16, 2003
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow interfaces to compile under MingGW/Win32 by adding _P to symbols
in ecpg.
parent
32be7207
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
70 deletions
+111
-70
src/include/port.h
src/include/port.h
+2
-1
src/include/port/win32.h
src/include/port/win32.h
+1
-13
src/interfaces/ecpg/preproc/c_keywords.c
src/interfaces/ecpg/preproc/c_keywords.c
+2
-2
src/interfaces/ecpg/preproc/keywords.c
src/interfaces/ecpg/preproc/keywords.c
+9
-9
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+44
-45
src/port/gettimeofday.c
src/port/gettimeofday.c
+53
-0
No files found.
src/include/port.h
View file @
c42581eb
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: port.h,v 1.
2 2003/05/16 01:57:51
momjian Exp $
* $Id: port.h,v 1.
3 2003/05/16 04:59:22
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -34,6 +34,7 @@ int pgunlink(const char *path);
#endif
extern
int
copydir
(
char
*
fromdir
,
char
*
todir
);
/* Last parameter not used */
extern
int
gettimeofday
(
struct
timeval
*
tp
,
struct
timezone
*
tzp
);
#else
...
...
src/include/port/win32.h
View file @
c42581eb
/* $Header: /cvsroot/pgsql/src/include/port/win32.h,v 1.1
0 2003/05/15 16:35:29
momjian Exp $ */
/* $Header: /cvsroot/pgsql/src/include/port/win32.h,v 1.1
1 2003/05/16 04:59:22
momjian Exp $ */
/* undefine and redefine after #include */
#undef mkdir
...
...
@@ -164,15 +164,3 @@ struct timezone
#define ECONNRESET WSAECONNRESET
#define EINPROGRESS WSAEINPROGRESS
/*
* Supplement to <math.h>.
*/
#define isnan _isnan
#define finite _finite
extern
double
rint
(
double
x
);
/*
* Supplement to <stdio.h>.
*/
#define snprintf _snprintf
#define vsnprintf _vsnprintf
src/interfaces/ecpg/preproc/c_keywords.c
View file @
c42581eb
...
...
@@ -25,11 +25,11 @@ static ScanKeyword ScanKeywords[] = {
{
"bool"
,
SQL_BOOL
},
{
"char"
,
CHAR_P
},
{
"const"
,
S_CONST
},
{
"double"
,
DOUBLE
},
{
"double"
,
DOUBLE
_P
},
{
"enum"
,
SQL_ENUM
},
{
"extern"
,
S_EXTERN
},
{
"float"
,
FLOAT_P
},
{
"int"
,
INT
},
{
"int"
,
INT
_P
},
{
"long"
,
SQL_LONG
},
{
"register"
,
S_REGISTER
},
{
"short"
,
SQL_SHORT
},
...
...
src/interfaces/ecpg/preproc/keywords.c
View file @
c42581eb
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.5
6 2003/02/14 13:17:13 meskes
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.5
7 2003/05/16 04:59:22 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -29,7 +29,7 @@
static
ScanKeyword
ScanKeywords
[]
=
{
/* name, value */
{
"abort"
,
ABORT_P
},
{
"absolute"
,
ABSOLUTE
},
{
"absolute"
,
ABSOLUTE
_P
},
{
"access"
,
ACCESS
},
{
"action"
,
ACTION
},
{
"add"
,
ADD
},
...
...
@@ -54,7 +54,7 @@ static ScanKeyword ScanKeywords[] = {
{
"bigint"
,
BIGINT
},
{
"binary"
,
BINARY
},
{
"bit"
,
BIT
},
{
"boolean"
,
BOOLEAN
},
{
"boolean"
,
BOOLEAN
_P
},
{
"both"
,
BOTH
},
{
"by"
,
BY
},
{
"cache"
,
CACHE
},
...
...
@@ -96,7 +96,7 @@ static ScanKeyword ScanKeywords[] = {
{
"day"
,
DAY_P
},
{
"deallocate"
,
DEALLOCATE
},
{
"dec"
,
DEC
},
{
"decimal"
,
DECIMAL
},
{
"decimal"
,
DECIMAL
_P
},
{
"declare"
,
DECLARE
},
{
"default"
,
DEFAULT
},
{
"deferrable"
,
DEFERRABLE
},
...
...
@@ -109,7 +109,7 @@ static ScanKeyword ScanKeywords[] = {
{
"distinct"
,
DISTINCT
},
{
"do"
,
DO
},
{
"domain"
,
DOMAIN_P
},
{
"double"
,
DOUBLE
},
{
"double"
,
DOUBLE
_P
},
{
"drop"
,
DROP
},
{
"each"
,
EACH
},
{
"else"
,
ELSE
},
...
...
@@ -153,11 +153,11 @@ static ScanKeyword ScanKeywords[] = {
{
"initially"
,
INITIALLY
},
{
"inner"
,
INNER_P
},
{
"inout"
,
INOUT
},
{
"input"
,
INPUT
},
{
"input"
,
INPUT
_P
},
{
"insensitive"
,
INSENSITIVE
},
{
"insert"
,
INSERT
},
{
"instead"
,
INSTEAD
},
{
"int"
,
INT
},
{
"int"
,
INT
_P
},
{
"integer"
,
INTEGER
},
{
"intersect"
,
INTERSECT
},
{
"interval"
,
INTERVAL
},
...
...
@@ -237,7 +237,7 @@ static ScanKeyword ScanKeywords[] = {
{
"recheck"
,
RECHECK
},
{
"references"
,
REFERENCES
},
{
"reindex"
,
REINDEX
},
{
"relative"
,
RELATIVE
},
{
"relative"
,
RELATIVE
_P
},
{
"rename"
,
RENAME
},
{
"replace"
,
REPLACE
},
{
"reset"
,
RESET
},
...
...
@@ -273,7 +273,7 @@ static ScanKeyword ScanKeywords[] = {
{
"stdin"
,
STDIN
},
{
"stdout"
,
STDOUT
},
{
"storage"
,
STORAGE
},
{
"strict"
,
STRICT
},
{
"strict"
,
STRICT
_P
},
{
"substring"
,
SUBSTRING
},
{
"sysid"
,
SYSID
},
{
"table"
,
TABLE
},
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
c42581eb
This diff is collapsed.
Click to expand it.
src/port/gettimeofday.c
0 → 100644
View file @
c42581eb
/*
* $Header: /cvsroot/pgsql/src/port/gettimeofday.c,v 1.1 2003/05/16 04:59:24 momjian Exp $
*
* Copyright (c) 2003 SRA, Inc.
* Copyright (c) 2003 SKC, Inc.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose, without fee, and without a
* written agreement is hereby granted, provided that the above
* copyright notice and this paragraph and the following two
* paragraphs appear in all copies.
*
* IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
* LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
* DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS
* IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE,
* SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
#include "postgres.h"
#include "sys/time.h"
/* FILETIME of Jan 1 1970 00:00:00. */
static
const
unsigned
__int64
epoch
=
116444736000000000L
;
/*
* timezone information is stored outside the kernel so tzp isn't used anymore.
*/
int
gettimeofday
(
struct
timeval
*
tp
,
struct
timezone
*
tzp
)
{
FILETIME
file_time
;
SYSTEMTIME
system_time
;
ULARGE_INTEGER
ularge
;
GetSystemTime
(
&
system_time
);
SystemTimeToFileTime
(
&
system_time
,
&
file_time
);
ularge
.
LowPart
=
file_time
.
dwLowDateTime
;
ularge
.
HighPart
=
file_time
.
dwHighDateTime
;
tp
->
tv_sec
=
(
long
)((
ularge
.
QuadPart
-
epoch
)
/
10000000L
);
tp
->
tv_usec
=
(
long
)(
system_time
.
wMilliseconds
*
1000
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment