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

Commit6c9b11b

Browse files
committed
Fix for AIX compile and unsigned/signed typedefs.
Peter E, Tatsuo, Andreas
1 parenta6348ae commit6c9b11b

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

‎configure.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,12 @@ else
11691169
fi
11701170
AC_DEFINE_UNQUOTED(MAXIMUM_ALIGNOF, $MAX_ALIGNOF, [Define as the maximum alignment requirement of any type])
11711171

1172+
# Some platforms predefine the types int8, int16, etc. Only check
1173+
# a (hopefully) representative subset. Don't use AC_CHECK_TYPE, which
1174+
# doesn't work the way we want to.
1175+
AC_CHECK_SIZEOF(int8, 0)
1176+
AC_CHECK_SIZEOF(uint8, 0)
1177+
11721178
PGAC_FUNC_POSIX_SIGNALS
11731179

11741180

‎src/include/c.h

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $Id: c.h,v 1.109 2001/11/12 01:52:46 momjian Exp $
15+
* $Id: c.h,v 1.110 2001/11/15 16:09:34 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -205,11 +205,11 @@ typedef char *Pointer;
205205
*used for numerical computations and the
206206
*frontend/backend protocol.
207207
*/
208-
#ifndef__BEOS__/* this shouldn't be required, but is is! */
208+
#ifSIZEOF_INT8==0
209209
typedefsignedcharint8;/* == 8 bits */
210210
typedefsigned shortint16;/* == 16 bits */
211211
typedefsignedintint32;/* == 32 bits */
212-
#endif/*__BEOS__ */
212+
#endif/*SIZEOF_INT8 == 0 */
213213

214214
/*
215215
* uintN
@@ -218,11 +218,11 @@ typedef signed int int32;/* == 32 bits */
218218
*frontend/backend protocol.
219219
*/
220220
/* Also defined in interfaces/odbc/md5.h */
221-
#ifndef__BEOS__/* this shouldn't be required, but is is! */
221+
#ifSIZEOF_UINT8==0
222222
typedefunsignedcharuint8;/* == 8 bits */
223223
typedefunsigned shortuint16;/* == 16 bits */
224224
typedefunsignedintuint32;/* == 32 bits */
225-
#endif/*__BEOS__ */
225+
#endif/*SIZEOF_UINT8 == 0 */
226226

227227
/*
228228
* boolN
@@ -268,27 +268,37 @@ typedef double *float64;
268268
/*
269269
* 64-bit integers
270270
*/
271-
#ifndef__BEOS__/* this is already defined on BeOS */
272271
#ifdefHAVE_LONG_INT_64
273272
/* Plain "long int" fits, use it */
273+
#ifSIZEOF_INT8==0
274274
typedeflongintint64;
275+
#endif
276+
#ifSIZEOF_UINT8==0
275277
typedefunsigned longintuint64;
278+
#endif
276279

277280
#else
278281
#ifdefHAVE_LONG_LONG_INT_64
279282
/* We have working support for "long long int", use that */
283+
#ifSIZEOF_INT8==0
280284
typedeflong longintint64;
285+
#endif
286+
#ifSIZEOF_UINT8==0
281287
typedefunsigned long longintuint64;
288+
#endif
282289

283290
#else
284291
/* Won't actually work, but fall back to long int so that code compiles */
292+
#ifSIZEOF_INT8==0
285293
typedeflongintint64;
294+
#endif
295+
#ifSIZEOF_UINT8==0
286296
typedefunsigned longintuint64;
297+
#endif
287298

288299
#defineINT64_IS_BUSTED
289300
#endif
290301
#endif
291-
#endif/* __BEOS__ */
292302

293303
/*
294304
* Size

‎src/include/pg_config.h.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* or in pg_config.h afterwards. Of course, if you edit pg_config.h, then your
99
* changes will be overwritten the next time you run configure.
1010
*
11-
* $Id: pg_config.h.in,v 1.11 2001/10/20 17:57:39 tgl Exp $
11+
* $Id: pg_config.h.in,v 1.12 2001/11/15 16:09:34 momjian Exp $
1212
*/
1313

1414
#ifndefPG_CONFIG_H
@@ -697,6 +697,9 @@ extern int fdatasync(int fildes);
697697
/* Define if you have on_exit() */
698698
#undef HAVE_ON_EXIT
699699

700+
#undef SIZEOF_INT8
701+
#undef SIZEOF_UINT8
702+
700703
/*
701704
*------------------------------------------------------------------------
702705
* Part 4: pull in system-specific declarations.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp