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
866627f8
Commit
866627f8
authored
Sep 27, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make adjustment for MS VC and BCC compile of psql, from Dave Page.
parent
f6b896b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
src/bin/psql/win32.mak
src/bin/psql/win32.mak
+14
-1
src/port/exec.c
src/port/exec.c
+11
-3
No files found.
src/bin/psql/win32.mak
View file @
866627f8
...
@@ -60,7 +60,8 @@ CLEAN :
...
@@ -60,7 +60,8 @@ CLEAN :
CPP_PROJ
=
/nologo /MD /W3 /GX /O2 /D
"WIN32"
/D
"NDEBUG"
/D
"_CONSOLE"
/D
\
CPP_PROJ
=
/nologo /MD /W3 /GX /O2 /D
"WIN32"
/D
"NDEBUG"
/D
"_CONSOLE"
/D
\
"_MBCS"
/Fp
"
$(INTDIR)
\p
sql.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /c
\
"_MBCS"
/Fp
"
$(INTDIR)
\p
sql.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /c
\
/I ..
\.
.
\i
nclude /I ..
\.
.
\i
nterfaces
\l
ibpq /D
"HAVE_STRDUP"
/D
"FRONTEND"
/I ..
\.
.
\i
nclude /I ..
\.
.
\i
nterfaces
\l
ibpq /I ..
\.
.
\i
nclude
\p
ort
\w
in32
\
/D
"HAVE_STRDUP"
/D
"FRONTEND"
CPP_OBJS
=
.
\R
elease/
CPP_OBJS
=
.
\R
elease/
CPP_SBRS
=
.
CPP_SBRS
=
.
...
@@ -71,6 +72,8 @@ LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
...
@@ -71,6 +72,8 @@ LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
odbccp32.lib wsock32.lib /nologo /subsystem:console /incremental:no
\
odbccp32.lib wsock32.lib /nologo /subsystem:console /incremental:no
\
/pdb:
"
$(OUTDIR)
\p
sql.pdb"
/machine:I386 /out:
"
$(OUTDIR)
\p
sql.exe"
/pdb:
"
$(OUTDIR)
\p
sql.pdb"
/machine:I386 /out:
"
$(OUTDIR)
\p
sql.exe"
LINK32_OBJS
=
\
LINK32_OBJS
=
\
"
$(INTDIR)
\p
gstrcasecmp.obj"
\
"
$(INTDIR)
\e
xec.obj"
\
"
$(INTDIR)
\c
ommand.obj"
\
"
$(INTDIR)
\c
ommand.obj"
\
"
$(INTDIR)
\c
ommon.obj"
\
"
$(INTDIR)
\c
ommon.obj"
\
"
$(INTDIR)
\h
elp.obj"
\
"
$(INTDIR)
\h
elp.obj"
\
...
@@ -118,6 +121,16 @@ LINK32_OBJS= \
...
@@ -118,6 +121,16 @@ LINK32_OBJS= \
$(CPP_PROJ)
..\..\port\path.c
$(CPP_PROJ)
..\..\port\path.c
<<
<<
"$(INTDIR)\pgstrcasecmp.obj"
:
..\..\port\pgstrcasecmp.c
$(CPP)
@<<
$(CPP_PROJ)
..\..\port\pgstrcasecmp.c
<<
"$(INTDIR)\exec.obj"
:
..\..\port\exec.c
$(CPP)
@<<
$(CPP_PROJ)
..\..\port\exec.c
<<
.c{$(CPP_OBJS)}.obj
::
.c{$(CPP_OBJS)}.obj
::
$(CPP)
@<<
$(CPP)
@<<
$(CPP_PROJ)
$<
$(CPP_PROJ)
$<
...
...
src/port/exec.c
View file @
866627f8
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/exec.c,v 1.2
5 2004/08/29 05:07:02
momjian Exp $
* $PostgreSQL: pgsql/src/port/exec.c,v 1.2
6 2004/09/27 22:06:41
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -22,7 +22,11 @@
...
@@ -22,7 +22,11 @@
#include <pwd.h>
#include <pwd.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/wait.h>
#if !defined(_MSC_VER) && !defined(__BORLANDC__)
#include <unistd.h>
#include <unistd.h>
#else
#include "port/win32.h"
#endif
#include "miscadmin.h"
#include "miscadmin.h"
...
@@ -71,7 +75,7 @@ validate_exec(const char *path)
...
@@ -71,7 +75,7 @@ validate_exec(const char *path)
int
in_grp
=
0
;
int
in_grp
=
0
;
#else
#else
char
path_exe
[
MAXPGPATH
+
2
+
strlen
(
".exe"
)
];
char
path_exe
[
MAXPGPATH
+
sizeof
(
".exe"
)
-
1
];
#endif
#endif
int
is_r
=
0
;
int
is_r
=
0
;
int
is_x
=
0
;
int
is_x
=
0
;
...
@@ -176,7 +180,11 @@ find_my_exec(const char *argv0, char *retpath)
...
@@ -176,7 +180,11 @@ find_my_exec(const char *argv0, char *retpath)
test_path
[
MAXPGPATH
];
test_path
[
MAXPGPATH
];
char
*
path
;
char
*
path
;
#if !defined(_MSC_VER) && !defined(__BORLANDC__)
if
(
!
getcwd
(
cwd
,
MAXPGPATH
))
if
(
!
getcwd
(
cwd
,
MAXPGPATH
))
#else
if
(
!
GetCurrentDirectory
(
MAXPGPATH
,
cwd
))
#endif
cwd
[
0
]
=
'\0'
;
cwd
[
0
]
=
'\0'
;
/*
/*
...
@@ -387,8 +395,8 @@ pipe_read_line(char *cmd, char *line, int maxsize)
...
@@ -387,8 +395,8 @@ pipe_read_line(char *cmd, char *line, int maxsize)
bytesread
>
0
)
bytesread
>
0
)
{
{
/* So we read some data */
/* So we read some data */
retval
=
line
;
int
len
=
strlen
(
line
);
int
len
=
strlen
(
line
);
retval
=
line
;
/*
/*
* If EOL is \r\n, convert to just \n. Because stdout is a
* If EOL is \r\n, convert to just \n. Because stdout is a
...
...
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