Skip to content

Commit 62533d3

Browse files
committed
Second try at fixing DLLIMPORT problem for pg_crc.h on Cygwin.
1 parent 32cc9e5 commit 62533d3

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
#ifndef PG_CRC_H
2323
#define PG_CRC_H
2424

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

2632
typedef uint32 pg_crc32;
2733

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

5056
/* Constant table for CRC calculation */
51-
extern PGDLLIMPORT const uint32 pg_crc32_table[];
57+
extern CRCDLLIMPORT const uint32 pg_crc32_table[];
5258

5359

5460
#ifdef PROVIDE_64BIT_CRC
@@ -106,8 +112,8 @@ do { \
106112
#define EQ_CRC64(c1,c2) ((c1).crc0 == (c2).crc0 && (c1).crc1 == (c2).crc1)
107113

108114
/* Constant table for CRC calculation */
109-
extern PGDLLIMPORT const uint32 pg_crc64_table0[];
110-
extern PGDLLIMPORT const uint32 pg_crc64_table1[];
115+
extern CRCDLLIMPORT const uint32 pg_crc64_table0[];
116+
extern CRCDLLIMPORT const uint32 pg_crc64_table1[];
111117
#else /* int64 works */
112118

113119
typedef struct pg_crc64
@@ -140,7 +146,7 @@ do { \
140146
#define EQ_CRC64(c1,c2) ((c1).crc0 == (c2).crc0)
141147

142148
/* Constant table for CRC calculation */
143-
extern PGDLLIMPORT const uint64 pg_crc64_table[];
149+
extern CRCDLLIMPORT const uint64 pg_crc64_table[];
144150
#endif /* INT64_IS_BUSTED */
145151
#endif /* PROVIDE_64BIT_CRC */
146152

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy