Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf13cb7e

Browse files
committed
Fixes to make ecpg work on Cygwin, from Jason Tishler <Jason.Tishler@dothill.com>.
1 parentb95ff0c commitf13cb7e

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

‎src/interfaces/ecpg/include/sqlca.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#ifndefPOSTGRES_SQLCA_H
22
#definePOSTGRES_SQLCA_H
33

4+
#ifndefDLLIMPORT
5+
#ifdef__CYGWIN__
6+
#defineDLLIMPORT __declspec (dllimport)
7+
#else
8+
#defineDLLIMPORT
9+
#endif/* __CYGWIN__ */
10+
#endif/* DLLIMPORT */
11+
412
#defineSQLERRMC_LEN70
513

614
#ifdef__cplusplus
@@ -45,7 +53,7 @@ extern"C"
4553
charsqlext[8];
4654
};
4755

48-
externstructsqlcasqlca;
56+
externDLLIMPORTstructsqlcasqlca;
4957

5058

5159
#ifdef__cplusplus

‎src/interfaces/ecpg/test/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
all: test1 test2 test3 test4 perftest dyntest dyntest2 test_notice test_code100 test_init
22

33
#LDFLAGS=-g -I /usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg -lpq
4-
LDFLAGS=-g -I ../include -I /usr/include/postgresql -L /usr/lib -lecpg -lpq
4+
LDFLAGS=-g -I ../include
5+
LDLIBS=-L ../lib -lecpg -L ../../libpq -lpq
56

67
#ECPG=/usr/local/pgsql/bin/ecpg -I../include
78
ECPG=../preproc/ecpg -I../include
@@ -24,4 +25,4 @@ test_text: test_text.c
2425
$(ECPG)$?
2526

2627
clean:
27-
rm -f test1 test2 test3 test4 perftest*.c log dyntest dyntest2 test_notice test_code100 test_init test_text
28+
rm -f test1 test2 test3 test4 perftest*.c log dyntest dyntest2 test_notice test_code100 test_init test_text*.exe

‎src/makefiles/Makefile.win

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.10 2001/04/04 21:15:56 tgl Exp $
1+
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.11 2001/05/03 16:07:52 tgl Exp $
22
LDFLAGS+= -g
33
DLLTOOL= dlltool
44
DLLWRAP= dllwrap
@@ -23,3 +23,7 @@ CFLAGS_SL =
2323
ifeq ($(findstring backend,$(subdir)), backend)
2424
override CPPFLAGS+= -DBUILDING_DLL=1
2525
endif
26+
27+
ifeq ($(findstring ecpg/lib,$(subdir)), ecpg/lib)
28+
override CPPFLAGS+= -DBUILDING_DLL=1
29+
endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp