-# $PostgreSQL: pgsql/contrib/spi/Makefile,v 1.24 2004/08/20 20:13:08 momjian Exp $
+# $PostgreSQL: pgsql/contrib/spi/Makefile,v 1.25 2004/11/17 17:45:59 tgl Exp $
MODULES = autoinc insert_username moddatetime refint timetravel
DATA_built = $(addsuffix .sql, $(MODULES))
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
+
+SHLIB_LINK += -L$(top_builddir)/src/port -lpgport
*
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.46 2004/11/17 16:34:42 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.47 2004/11/17 17:46:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "getopt_long.h"
#if defined(__CYGWIN__)
+#include <sys/cygwin.h>
#include <windows.h>
/* Cygwin defines WIN32 in windows.h, but we don't want it. */
#undef WIN32
{
static char cmdLine[MAXPGPATH];
int ret;
+#ifdef __CYGWIN__
+ char buf[MAXPGPATH];
+#endif
if (registration)
{
}
}
+#ifdef __CYGWIN__
+ /* need to convert to windows path */
+ cygwin_conv_to_full_win32_path(cmdLine, buf);
+ strcpy(cmdLine, buf);
+#endif
+
if (registration)
{
if (strcasecmp(cmdLine + strlen(cmdLine) - 4, ".exe"))
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/port.h,v 1.66 2004/11/08 16:34:23 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/port.h,v 1.67 2004/11/17 17:46:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#if defined(WIN32) || defined(__CYGWIN__)
#define EXE ".exe"
-#define DEVNULL "nul"
#else
#define EXE ""
+#endif
+
+#if defined(WIN32) && !defined(__CYGWIN__)
+#define DEVNULL "nul"
+#else
#define DEVNULL "/dev/null"
#endif
* See the "Notes" section about quotes at:
* http://home.earthlink.net/~rlively/MANUALS/COMMANDS/C/CMD.HTM
*/
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
#define SYSTEMQUOTE "\""
#else
#define SYSTEMQUOTE ""
#endif
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
#define HOMEDIR "USERPROFILE"
#else
#define HOMEDIR "HOME"
* Cygwin has its own symlinks which work on Win95/98/ME where
* junction points don't, so use it instead. We have no way of
* knowing what type of system Cygwin binaries will be run on.
+ * Note: Some CYGWIN includes might #define WIN32.
*/
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
extern int pgsymlink(const char *oldpath, const char *newpath);
#define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
#endif
extern bool rmtree(char *path, bool rmtopdir);
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
/* open() replacement to allow delete of held files */
#ifndef WIN32_CLIENT_ONLY
/* thread.h */
extern char *pqStrerror(int errnum, char *strerrbuf, size_t buflen);
-#ifndef WIN32
+#if !defined(WIN32) || defined(__CYGWIN__)
extern int pqGetpwuid(uid_t uid, struct passwd * resultbuf, char *buffer,
size_t buflen, struct passwd ** result);
#endif
# Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.120 2004/10/16 22:52:49 tgl Exp $
+# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.121 2004/11/17 17:46:19 tgl Exp $
#
#-------------------------------------------------------------------------
md5.o ip.o wchar.o encnames.o noblock.o pgstrcasecmp.o thread.o \
$(filter crypt.o getaddrinfo.o inet_aton.o open.o snprintf.o strerror.o, $(LIBOBJS))
+ifeq ($(PORTNAME), cygwin)
+override shlib = cyg$(NAME)$(DLSUFFIX)
+endif
+
ifeq ($(PORTNAME), win32)
OBJS += win32.o libpqrc.o
libpqrc.o : libpq.rc
# This is required to link pg_dump because it finds pg_toupper() in
# libpq and pgport
-LDFLAGS="-Wl,--allow-multiple-definition"
-
+LDFLAGS="-Wl,--allow-multiple-definition -Wl,--enable-auto-import"
+# --enable-auto-import gets rid of a diagnostics linker message
+LDFLAGS_SL="-Wl,--enable-auto-import"