Cleanup for Win32 compile.

Andreas Pflug
This commit is contained in:
Bruce Momjian 2005-06-19 13:10:56 +00:00
parent a11333fab7
commit 624789d191
3 changed files with 16 additions and 12 deletions

View File

@ -99,15 +99,15 @@ LINK32_OBJS = $(LINK32_OBJS) "..\..\interfaces\libpq\Release\libpqdll.lib"
!ENDIF !ENDIF
"..\..\port\pg_config_paths.h": win32.mak "..\..\port\pg_config_paths.h": win32.mak
echo \#define PGBINDIR "" >$@ echo #define PGBINDIR "" >$@
echo \#define PGSHAREDIR "" >>$@ echo #define PGSHAREDIR "" >>$@
echo \#define SYSCONFDIR "" >>$@ echo #define SYSCONFDIR "" >>$@
echo \#define INCLUDEDIR "" >>$@ echo #define INCLUDEDIR "" >>$@
echo \#define PKGINCLUDEDIR "" >>$@ echo #define PKGINCLUDEDIR "" >>$@
echo \#define INCLUDEDIRSERVER "" >>$@ echo #define INCLUDEDIRSERVER "" >>$@
echo \#define LIBDIR "" >>$@ echo #define LIBDIR "" >>$@
echo \#define PKGLIBDIR "" >>$@ echo #define PKGLIBDIR "" >>$@
echo \#define LOCALEDIR "" >>$@ echo #define LOCALEDIR "" >>$@
"$(OUTDIR)" : "$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.311 2005/06/12 00:07:07 neilc Exp $ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.312 2005/06/19 13:10:55 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -3104,6 +3104,8 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
if (stat(pgpassfile, &stat_buf) == -1) if (stat(pgpassfile, &stat_buf) == -1)
return NULL; return NULL;
#ifndef WIN32
if (!S_ISREG(stat_buf.st_mode)) if (!S_ISREG(stat_buf.st_mode))
{ {
fprintf(stderr, fprintf(stderr,
@ -3113,7 +3115,6 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
return NULL; return NULL;
} }
#ifndef WIN32
/* If password file is insecure, alert the user and ignore it. */ /* If password file is insecure, alert the user and ignore it. */
if (stat_buf.st_mode & (S_IRWXG | S_IRWXO)) if (stat_buf.st_mode & (S_IRWXG | S_IRWXO))
{ {

View File

@ -115,7 +115,7 @@ pthread.h: pthread.h.win32
copy pthread.h.win32 pthread.h copy pthread.h.win32 pthread.h
pg_config_paths.h: win32.mak pg_config_paths.h: win32.mak
echo \#define SYSCONFDIR "" > pg_config_paths.h echo #define SYSCONFDIR "" > pg_config_paths.h
"$(OUTDIR)" : "$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
@ -215,5 +215,8 @@ LINK32_OBJS= \
$(CPP_PROJ) /I"." ..\..\backend\utils\mb\encnames.c $(CPP_PROJ) /I"." ..\..\backend\utils\mb\encnames.c
<< <<
.c{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.c.obj: .c.obj:
$(CPP) $(CPP_PROJ) $< $(CPP) $(CPP_PROJ) $<