Skip to content
Snippets Groups Projects
Commit f13cb7e5 authored by Tom Lane's avatar Tom Lane
Browse files

Fixes to make ecpg work on Cygwin, from Jason Tishler <Jason.Tishler@dothill.com>.

parent b95ff0c5
No related branches found
No related tags found
No related merge requests found
#ifndef POSTGRES_SQLCA_H #ifndef POSTGRES_SQLCA_H
#define POSTGRES_SQLCA_H #define POSTGRES_SQLCA_H
#ifndef DLLIMPORT
#ifdef __CYGWIN__
#define DLLIMPORT __declspec (dllimport)
#else
#define DLLIMPORT
#endif /* __CYGWIN__ */
#endif /* DLLIMPORT */
#define SQLERRMC_LEN 70 #define SQLERRMC_LEN 70
#ifdef __cplusplus #ifdef __cplusplus
...@@ -45,7 +53,7 @@ extern "C" ...@@ -45,7 +53,7 @@ extern "C"
char sqlext[8]; char sqlext[8];
}; };
extern struct sqlca sqlca; extern DLLIMPORT struct sqlca sqlca;
#ifdef __cplusplus #ifdef __cplusplus
......
all: test1 test2 test3 test4 perftest dyntest dyntest2 test_notice test_code100 test_init all: test1 test2 test3 test4 perftest dyntest dyntest2 test_notice test_code100 test_init
#LDFLAGS=-g -I /usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg -lpq #LDFLAGS=-g -I /usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg -lpq
LDFLAGS=-g -I ../include -I /usr/include/postgresql -L /usr/lib -lecpg -lpq LDFLAGS=-g -I ../include
LDLIBS=-L ../lib -lecpg -L ../../libpq -lpq
#ECPG=/usr/local/pgsql/bin/ecpg -I../include #ECPG=/usr/local/pgsql/bin/ecpg -I../include
ECPG=../preproc/ecpg -I../include ECPG=../preproc/ecpg -I../include
...@@ -24,4 +25,4 @@ test_text: test_text.c ...@@ -24,4 +25,4 @@ test_text: test_text.c
$(ECPG) $? $(ECPG) $?
clean: clean:
rm -f test1 test2 test3 test4 perftest *.c log dyntest dyntest2 test_notice test_code100 test_init test_text rm -f test1 test2 test3 test4 perftest *.c log dyntest dyntest2 test_notice test_code100 test_init test_text *.exe
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.10 2001/04/04 21:15:56 tgl Exp $ # $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.11 2001/05/03 16:07:52 tgl Exp $
LDFLAGS+= -g LDFLAGS+= -g
DLLTOOL= dlltool DLLTOOL= dlltool
DLLWRAP= dllwrap DLLWRAP= dllwrap
...@@ -23,3 +23,7 @@ CFLAGS_SL = ...@@ -23,3 +23,7 @@ CFLAGS_SL =
ifeq ($(findstring backend,$(subdir)), backend) ifeq ($(findstring backend,$(subdir)), backend)
override CPPFLAGS+= -DBUILDING_DLL=1 override CPPFLAGS+= -DBUILDING_DLL=1
endif endif
ifeq ($(findstring ecpg/lib,$(subdir)), ecpg/lib)
override CPPFLAGS+= -DBUILDING_DLL=1
endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment