1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Fixes for Cygwin, with help from Pete Forman <gsez020@kryten.bedford.waii.com>.

Update the installation instructions (formerly misnamed "FAQ"), add configure
checks for some headers rather than having users copy stubs manually (ugh!).
Use Autoconf check for exe extension.  This also avoids inheriting the value
of $(X) from the environment.
This commit is contained in:
Peter Eisentraut
2000-09-27 15:17:57 +00:00
parent f5ab016923
commit 664ce79dd8
16 changed files with 564 additions and 743 deletions

View File

@ -1,4 +1,4 @@
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.95 2000/09/25 22:22:54 petere Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.96 2000/09/27 15:17:54 petere Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@ -149,6 +149,7 @@ AWK = @AWK@
CXX=@CXX@
CXXFLAGS=@CXXFLAGS@ @INCLUDES@
GCC = @GCC@
X = @EXEEXT@
ifeq ($(GCC), yes)
CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarations

View File

@ -29,7 +29,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pqcomm.c,v 1.100 2000/07/08 03:04:40 tgl Exp $
* $Id: pqcomm.c,v 1.101 2000/09/27 15:17:54 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -58,6 +58,8 @@
*
*------------------------
*/
#include "postgres.h"
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
@ -67,12 +69,12 @@
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h>
#endif
#include <arpa/inet.h>
#include <sys/file.h>
#include "postgres.h"
#include "libpq/libpq.h"
#include "miscadmin.h"

View File

@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
* $Id: config.h.in,v 1.134 2000/08/29 09:36:49 petere Exp $
* $Id: config.h.in,v 1.135 2000/09/27 15:17:55 petere Exp $
*/
#ifndef CONFIG_H
@ -330,6 +330,9 @@
/* Set to 1 if you have <ieeefp.h> */
#undef HAVE_IEEEFP_H
/* Set to 1 if you have <netinet/tcp.h> */
#undef HAVE_NETINET_TCP_H
/* Set to 1 if you have <readline.h> */
#undef HAVE_READLINE_H
@ -342,6 +345,9 @@
/* Set to 1 if you have <sys/select.h> */
#undef HAVE_SYS_SELECT_H
/* Set to 1 if you have <sys/un.h> */
#undef HAVE_SYS_UN_H
/* Set to 1 if you have <termios.h> */
#undef HAVE_TERMIOS_H
@ -535,6 +541,9 @@ extern void srandom(unsigned int seed);
/* Set to 1 if you have union semun */
#undef HAVE_UNION_SEMUN
/* Set to 1 if you have struct sockaddr_un */
#undef HAVE_STRUCT_SOCKADDR_UN
/* Set to 1 if you have F_SETLK option for fcntl() */
#undef HAVE_FCNTL_SETLK

View File

@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pqcomm.h,v 1.41 2000/01/26 05:58:12 momjian Exp $
* $Id: pqcomm.h,v 1.42 2000/09/27 15:17:56 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -20,11 +20,22 @@
#include <sys/types.h>
#ifdef WIN32
#include "winsock.h"
#else
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
# include "winsock.h"
#else /* not WIN32 */
# include <sys/socket.h>
# ifdef HAVE_SYS_UN_H
# include <sys/un.h>
# endif
# include <netinet/in.h>
#endif /* not WIN32 */
#ifndef HAVE_STRUCT_SOCKADDR_UN
struct sockaddr_un
{
short int sun_family; /* AF_UNIX */
char sun_path[108]; /* path name (gag) */
};
#endif
/* Define a generic socket address type. */
@ -33,9 +44,7 @@ typedef union SockAddr
{
struct sockaddr sa;
struct sockaddr_in in;
#ifndef WIN32
struct sockaddr_un un;
#endif
} SockAddr;

View File

@ -8,17 +8,18 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.133 2000/08/30 14:54:23 momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.134 2000/09/27 15:17:56 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <sys/types.h>
#include <fcntl.h>
#include <errno.h>
#include <ctype.h>
#include "postgres.h"
#include "libpq-fe.h"
#include "libpq-int.h"
#include "fe-auth.h"
@ -30,7 +31,9 @@
#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h>
#endif
#include <arpa/inet.h>
#endif

View File

@ -1,9 +1,7 @@
CFLAGS+= -I/usr/local/include
LDFLAGS+= -g
DLLTOOL= dlltool
DLLWRAP= dllwrap
DLLLIBS=-L/usr/local/lib -L$(libdir) -L$(top_builddir)/src/backend -lpostgres -lcygipc -lcygwin -lcrypt -lkernel32
X=.exe
MK_NO_LORDER=true
MAKE_DLL=true
#MAKE_DLL=false
@ -16,5 +14,5 @@ SHLIB_LINK=$(DLLLIBS)
curdir:=$(shell pwd)
ifeq ($(findstring backend,$(curdir)), backend)
CFLAGS+= -DBUILDING_DLL=1
CPPFLAGS+= -DBUILDING_DLL=1
endif

View File

@ -1,3 +0,0 @@
Add the included headers endian.h into Cygwin's include/, tcp.h into
include/netinet, and un.h into include/sys.

View File

@ -1,8 +0,0 @@
#ifndef _ENDIAN_H_
#define _ENDIAN_H_
/* JKR added file, all hacks will be in the files added, not in EGCS */
#include <sys/param.h>
#endif /* _ENDIAN_H_ */

View File

@ -1,6 +0,0 @@
#ifndef _INET_TCP_
#define _INET_TCP_
/* JKR added file, all hacks will be in the files added, not in EGCS */
#endif /* _INET_TCP_ */

View File

@ -1,12 +0,0 @@
#ifndef _SYS_UN_H
#define _SYS_UN_H
/* JKR added file, all hacks will be in the files added, not in EGCS */
struct sockaddr_un
{
short sun_family; /* AF_UNIX */
char sun_path[108]; /* path name (gag) */
};
#endif /* _SYS_UN_H */