|
17 | 17 | * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group |
18 | 18 | * Portions Copyright (c) 1994, Regents of the University of California |
19 | 19 | * |
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 $ |
21 | 21 | */ |
22 | 22 | #ifndefPG_CRC_H |
23 | 23 | #definePG_CRC_H |
24 | 24 |
|
| 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 |
25 | 31 |
|
26 | 32 | typedefuint32pg_crc32; |
27 | 33 |
|
|
48 | 54 | #defineEQ_CRC32(c1,c2) ((c1) == (c2)) |
49 | 55 |
|
50 | 56 | /* Constant table for CRC calculation */ |
51 | | -externPGDLLIMPORTconstuint32pg_crc32_table[]; |
| 57 | +externCRCDLLIMPORTconstuint32pg_crc32_table[]; |
52 | 58 |
|
53 | 59 |
|
54 | 60 | #ifdefPROVIDE_64BIT_CRC |
@@ -106,8 +112,8 @@ do { \ |
106 | 112 | #defineEQ_CRC64(c1,c2) ((c1).crc0 == (c2).crc0 && (c1).crc1 == (c2).crc1) |
107 | 113 |
|
108 | 114 | /* Constant table for CRC calculation */ |
109 | | -externPGDLLIMPORTconstuint32pg_crc64_table0[]; |
110 | | -externPGDLLIMPORTconstuint32pg_crc64_table1[]; |
| 115 | +externCRCDLLIMPORTconstuint32pg_crc64_table0[]; |
| 116 | +externCRCDLLIMPORTconstuint32pg_crc64_table1[]; |
111 | 117 | #else/* int64 works */ |
112 | 118 |
|
113 | 119 | typedefstructpg_crc64 |
@@ -140,7 +146,7 @@ do { \ |
140 | 146 | #defineEQ_CRC64(c1,c2) ((c1).crc0 == (c2).crc0) |
141 | 147 |
|
142 | 148 | /* Constant table for CRC calculation */ |
143 | | -externPGDLLIMPORTconstuint64pg_crc64_table[]; |
| 149 | +externCRCDLLIMPORTconstuint64pg_crc64_table[]; |
144 | 150 | #endif/* INT64_IS_BUSTED */ |
145 | 151 | #endif/* PROVIDE_64BIT_CRC */ |
146 | 152 |
|
|