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

Commit62533d3

Browse files
committed
Second try at fixing DLLIMPORT problem for pg_crc.h on Cygwin.
1 parent32cc9e5 commit62533d3

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

‎src/include/utils/pg_crc.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,17 @@
1717
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
1818
* Portions Copyright (c) 1994, Regents of the University of California
1919
*
20-
* $PostgreSQL: pgsql/src/include/utils/pg_crc.h,v 1.19 2008/11/13 14:42:28 tgl Exp $
20+
* $PostgreSQL: pgsql/src/include/utils/pg_crc.h,v 1.20 2008/11/14 20:21:07 tgl Exp $
2121
*/
2222
#ifndefPG_CRC_H
2323
#definePG_CRC_H
2424

25+
/* ugly hack to let this be used in frontend and backend code on Cygwin */
26+
#ifdefFRONTEND
27+
#defineCRCDLLIMPORT
28+
#else
29+
#defineCRCDLLIMPORT PGDLLIMPORT
30+
#endif
2531

2632
typedefuint32pg_crc32;
2733

@@ -48,7 +54,7 @@ do { \
4854
#defineEQ_CRC32(c1,c2) ((c1) == (c2))
4955

5056
/* Constant table for CRC calculation */
51-
externPGDLLIMPORTconstuint32pg_crc32_table[];
57+
externCRCDLLIMPORTconstuint32pg_crc32_table[];
5258

5359

5460
#ifdefPROVIDE_64BIT_CRC
@@ -106,8 +112,8 @@ do { \
106112
#defineEQ_CRC64(c1,c2) ((c1).crc0 == (c2).crc0 && (c1).crc1 == (c2).crc1)
107113

108114
/* Constant table for CRC calculation */
109-
externPGDLLIMPORTconstuint32pg_crc64_table0[];
110-
externPGDLLIMPORTconstuint32pg_crc64_table1[];
115+
externCRCDLLIMPORTconstuint32pg_crc64_table0[];
116+
externCRCDLLIMPORTconstuint32pg_crc64_table1[];
111117
#else/* int64 works */
112118

113119
typedefstructpg_crc64
@@ -140,7 +146,7 @@ do { \
140146
#defineEQ_CRC64(c1,c2) ((c1).crc0 == (c2).crc0)
141147

142148
/* Constant table for CRC calculation */
143-
externPGDLLIMPORTconstuint64pg_crc64_table[];
149+
externCRCDLLIMPORTconstuint64pg_crc64_table[];
144150
#endif/* INT64_IS_BUSTED */
145151
#endif/* PROVIDE_64BIT_CRC */
146152

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp