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

Commit903e21b

Browse files
committed
More cleanups. Move alot of the prototype definitions straight into
config.h, right beside their appropriate HAVE_ #ifdefs...one centrallocation that is included everywhere...
1 parent4ee5f2b commit903e21b

File tree

9 files changed

+25
-75
lines changed

9 files changed

+25
-75
lines changed

‎src/backend/port/hpux/port-protos.h‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: port-protos.h,v 1.4 1997/09/08 02:26:23 momjian Exp $
9+
* $Id: port-protos.h,v 1.5 1997/12/19 22:45:57 scrappy Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -27,8 +27,5 @@
2727
externintinit_address_fixup(void);
2828
externdoublerint(doublex);
2929
externdoublecbrt(doublex);
30-
externlongrandom(void);
31-
externvoidsrandom(unsignedseed);
32-
externintgetrusage(intwho,structrusage*ru);
3330

3431
#endif/* PORT_PROTOS_H */

‎src/backend/port/i386_solaris/port-protos.h‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: port-protos.h,v 1.3 1997/09/08 02:26:27 momjian Exp $
9+
* $Id: port-protos.h,v 1.4 1997/12/19 22:45:59 scrappy Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -31,8 +31,4 @@
3131
#definepg_dlclosedlclose
3232
#definepg_dlerrordlerror
3333

34-
/* port.c */
35-
externlongrandom(void);
36-
externvoidsrandom(intseed);
37-
3834
#endif/* PORT_PROTOS_H */

‎src/backend/port/irix5/port-protos.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,4 @@
3131
#definepg_dlclosedlclose
3232
#definepg_dlerrordlerror
3333

34-
/* port.c */
35-
externlongrandom(void);
36-
3734
#endif/* PORT_PROTOS_H */

‎src/backend/port/sparc_solaris/port-protos.h‎

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: port-protos.h,v 1.7 1997/09/18 16:09:14 scrappy Exp $
9+
* $Id: port-protos.h,v 1.8 1997/12/19 22:46:15 scrappy Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -35,22 +35,4 @@
3535
#definepg_dlclosedlclose
3636
#definepg_dlerrordlerror
3737

38-
/* port.c */
39-
#ifndefHAVE_RANDOM
40-
externlongrandom(void);
41-
#endif
42-
#ifndefHAVE_SRANDOM
43-
externvoidsrandom(intseed);
44-
#endif
45-
46-
/* inet_aton.c in backend/port directory */
47-
externintinet_aton(constchar*cp,structin_addr*addr);
48-
49-
/* In system library, but can't find prototype in system library .h files */
50-
externintgethostname(char*name,intnamelen);
51-
52-
/* In system library, but can't find prototype in system library .h files */
53-
#include<sys/resource.h>
54-
externintgetrusage(intwho,structrusage*rusage);
55-
5638
#endif/* PORT_PROTOS_H */

‎src/backend/port/svr4/port-protos.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,4 @@
3131
#definepg_dlclosedlclose
3232
#definepg_dlerrordlerror
3333

34-
/* port.c */
35-
externlongrandom(void);
36-
externvoidsrandom(intseed);
37-
3834
#endif/* PORT_PROTOS_H */

‎src/backend/port/ultrix4/port-protos.h‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: port-protos.h,v 1.7 1997/09/08 02:27:36 momjian Exp $
9+
* $Id: port-protos.h,v 1.8 1997/12/19 22:46:47 scrappy Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -40,15 +40,4 @@ extern intsyscall();
4040

4141
externvoidinit_address_fixup(void);
4242

43-
/* strdup.c: strdup() is not part of libc on Ultrix */
44-
externchar*strdup(charconst*);
45-
46-
/* inet_aton() is not part of libc on Ultrix. The following is from
47-
backend/port/inet_aton.h
48-
*/
49-
50-
structin_addr;
51-
int
52-
inet_aton(constchar*cp,structin_addr*addr);
53-
5443
#endif/* PORT_PORTOS_H */

‎src/backend/port/univel/frontend-port-protos.h‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎src/backend/port/univel/port-protos.h‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,4 @@
3131
#definepg_dlclosedlclose
3232
#definepg_dlerrordlerror
3333

34-
/* port.c */
35-
externlongrandom(void);
36-
externvoidsrandom(intseed);
37-
externintstrcasecmp(char*s1,char*s2);
38-
externintgethostname(char*name,intnamelen);
39-
4034
#endif/* PORT_PROTOS_H */

‎src/include/config.h.in‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858

5959
/* Set to 1 if you have gethostname() */
6060
#undef HAVE_GETHOSTNAME
61+
#ifndefGETHOSTNAME
62+
externintgethostname(char*name,intnamelen);
63+
#endif
6164

6265
/* Set to 1 if you have int timezone */
6366
#undef HAVE_INT_TIMEZONE
@@ -67,6 +70,9 @@
6770

6871
/* Set to 1 if you have inet_aton() */
6972
#undef HAVE_INET_ATON
73+
#ifndefHAVE_INET_ATON
74+
externintinet_aton(constchar*cp,structin_addr*addr);
75+
#endif
7076

7177
/* Set to 1 if you have fcvt() */
7278
#undef HAVE_FCVT
@@ -104,14 +110,29 @@
104110
/* Set to 1 if you have sigprocmask() */
105111
#undef HAVE_SIGPROCMASK
106112

113+
/* Set to 1 if you have sigprocmask() */
114+
#undef HAVE_STRCASECMP
115+
#ifndefHAVE_STRCASECMP
116+
externintstrcasecmp(char*s1,char*s2);
117+
#endif
118+
107119
/* Set to 1 if you have strdup() */
108120
#undef HAVE_STRDUP
121+
#ifndefHAVE_STRDUP
122+
externchar*strdup(charconst*);
123+
#endif
109124

110125
/* Set to 1 if you have random() */
111126
#undef HAVE_RANDOM
127+
#ifndefHAVE_RANDOM
128+
externlongrandom(void);
129+
#endif
112130

113131
/* Set to 1 if you have srandom() */
114132
#undef HAVE_SRANDOM
133+
#ifndefHAVE_SRANDOM
134+
externvoidsrandom(intseed);
135+
#endif
115136

116137
/* Set to 1 if you have libreadline.a */
117138
#undef HAVE_LIBREADLINE

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp