Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 903e21b

Browse files
committed
More cleanups. Move alot of the prototype definitions straight into
config.h, right beside their appropriate HAVE_ #ifdefs...one central location that is included everywhere...
1 parent 4ee5f2b commit 903e21b

File tree

9 files changed

+25
-75
lines changed

9 files changed

+25
-75
lines changed

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

+1-4
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
extern int init_address_fixup(void);
2828
extern double rint(double x);
2929
extern double cbrt(double x);
30-
extern long random(void);
31-
extern void srandom(unsigned seed);
32-
extern int getrusage(int who, struct rusage * ru);
3330

3431
#endif /* PORT_PROTOS_H */

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

+1-5
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
#define pg_dlclose dlclose
3232
#define pg_dlerror dlerror
3333

34-
/* port.c */
35-
extern long random(void);
36-
extern void srandom(int seed);
37-
3834
#endif /* PORT_PROTOS_H */

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

-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,4 @@
3131
#define pg_dlclose dlclose
3232
#define pg_dlerror dlerror
3333

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

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

+1-19
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
#define pg_dlclose dlclose
3636
#define pg_dlerror dlerror
3737

38-
/* port.c */
39-
#ifndef HAVE_RANDOM
40-
extern long random(void);
41-
#endif
42-
#ifndef HAVE_SRANDOM
43-
extern void srandom(int seed);
44-
#endif
45-
46-
/* inet_aton.c in backend/port directory */
47-
extern int inet_aton(const char *cp, struct in_addr * addr);
48-
49-
/* In system library, but can't find prototype in system library .h files */
50-
extern int gethostname(char *name, int namelen);
51-
52-
/* In system library, but can't find prototype in system library .h files */
53-
#include <sys/resource.h>
54-
extern int getrusage(int who, struct rusage * rusage);
55-
5638
#endif /* PORT_PROTOS_H */

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

-4
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,4 @@
3131
#define pg_dlclose dlclose
3232
#define pg_dlerror dlerror
3333

34-
/* port.c */
35-
extern long random(void);
36-
extern void srandom(int seed);
37-
3834
#endif /* PORT_PROTOS_H */

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

+1-12
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 int syscall();
4040

4141
extern void init_address_fixup(void);
4242

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

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

-22
This file was deleted.

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

-6
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,4 @@
3131
#define pg_dlclose dlclose
3232
#define pg_dlerror dlerror
3333

34-
/* port.c */
35-
extern long random(void);
36-
extern void srandom(int seed);
37-
extern int strcasecmp(char *s1, char *s2);
38-
extern int gethostname(char *name, int namelen);
39-
4034
#endif /* PORT_PROTOS_H */

src/include/config.h.in

+21
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+
#ifndef GETHOSTNAME
62+
extern int gethostname(char *name, int namelen);
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+
#ifndef HAVE_INET_ATON
74+
extern int inet_aton(const char *cp, struct in_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+
#ifndef HAVE_STRCASECMP
116+
extern int strcasecmp(char *s1, char *s2);
117+
#endif
118+
107119
/* Set to 1 if you have strdup() */
108120
#undef HAVE_STRDUP
121+
#ifndef HAVE_STRDUP
122+
extern char *strdup(char const *);
123+
#endif
109124

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

113131
/* Set to 1 if you have srandom() */
114132
#undef HAVE_SRANDOM
133+
#ifndef HAVE_SRANDOM
134+
extern void srandom(int seed);
135+
#endif
115136

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

0 commit comments

Comments
 (0)