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

Commit7992d0f

Browse files
author
Neil Conway
committed
Remove a few places that attempted to define INT_MAX, SCHAR_MAX, and
similar constants if they were not previously defined. All theseconstants must be defined by limits.h according to C89, so we cansafely assume they are present.
1 parentc65ab0b commit7992d0f

File tree

5 files changed

+6
-49
lines changed

5 files changed

+6
-49
lines changed

‎contrib/dblink/dblink.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
*/
3232
#include"postgres.h"
3333

34+
#include<limits.h>
35+
3436
#include"libpq-fe.h"
3537
#include"fmgr.h"
3638
#include"funcapi.h"
@@ -1112,9 +1114,6 @@ dblink_get_pkey(PG_FUNCTION_ARGS)
11121114
}
11131115

11141116

1115-
#ifndefSHRT_MAX
1116-
#defineSHRT_MAX (0x7FFF)
1117-
#endif
11181117
/*
11191118
* dblink_build_sql_insert
11201119
*

‎src/backend/utils/adt/char.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/utils/adt/char.c,v 1.44 2006/03/05 15:58:41 momjian Exp $
12+
* $PostgreSQL: pgsql/src/backend/utils/adt/char.c,v 1.45 2006/03/11 01:19:22 neilc Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -20,14 +20,6 @@
2020
#include"libpq/pqformat.h"
2121
#include"utils/builtins.h"
2222

23-
#ifndefSCHAR_MAX
24-
#defineSCHAR_MAX (0x7F)
25-
#endif
26-
#ifndefSCHAR_MIN
27-
#defineSCHAR_MIN (-SCHAR_MAX-1)
28-
#endif
29-
30-
3123
/*****************************************************************************
3224
* USER I/O ROUTINES *
3325
*****************************************************************************/

‎src/backend/utils/adt/float.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.122 2006/03/10 20:15:25 neilc Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.123 2006/03/11 01:19:22 neilc Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -74,13 +74,6 @@
7474
#defineM_PI 3.14159265358979323846
7575
#endif
7676

77-
#ifndefSHRT_MAX
78-
#defineSHRT_MAX 32767
79-
#endif
80-
#ifndefSHRT_MIN
81-
#defineSHRT_MIN (-32768)
82-
#endif
83-
8477
/* Recent HPUXen have isfinite() macro in place of more standard finite() */
8578
#if !defined(HAVE_FINITE)&& defined(isfinite)
8679
#definefinite(x) isfinite(x)

‎src/backend/utils/adt/int.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/int.c,v 1.71 2006/03/05 15:58:42 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/int.c,v 1.72 2006/03/11 01:19:22 neilc Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -40,13 +40,6 @@
4040
#include"utils/builtins.h"
4141

4242

43-
#ifndefSHRT_MAX
44-
#defineSHRT_MAX (0x7FFF)
45-
#endif
46-
#ifndefSHRT_MIN
47-
#defineSHRT_MIN (-0x8000)
48-
#endif
49-
5043
#defineSAMESIGN(a,b)(((a) < 0) == ((b) < 0))
5144

5245
#defineInt2VectorSize(n)(offsetof(int2vector, values) + (n) * sizeof(int2))

‎src/backend/utils/adt/numutils.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/adt/numutils.c,v 1.73 2006/03/05 15:58:43 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/adt/numutils.c,v 1.74 2006/03/11 01:19:22 neilc Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -22,26 +22,6 @@
2222

2323
#include"utils/builtins.h"
2424

25-
#ifndefINT_MAX
26-
#defineINT_MAX (0x7FFFFFFFL)
27-
#endif
28-
#ifndefINT_MIN
29-
#defineINT_MIN (-INT_MAX-1)
30-
#endif
31-
#ifndefSHRT_MAX
32-
#defineSHRT_MAX (0x7FFF)
33-
#endif
34-
#ifndefSHRT_MIN
35-
#defineSHRT_MIN (-SHRT_MAX-1)
36-
#endif
37-
#ifndefSCHAR_MAX
38-
#defineSCHAR_MAX (0x7F)
39-
#endif
40-
#ifndefSCHAR_MIN
41-
#defineSCHAR_MIN (-SCHAR_MAX-1)
42-
#endif
43-
44-
4525
/*
4626
* pg_atoi: convert string to integer
4727
*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp