diff options
Diffstat (limited to 'src/include/libpq')
| -rw-r--r-- | src/include/libpq/crypt.h | 4 | ||||
| -rw-r--r-- | src/include/libpq/ip.h | 34 | ||||
| -rw-r--r-- | src/include/libpq/libpq-be.h | 13 | ||||
| -rw-r--r-- | src/include/libpq/libpq.h | 18 | ||||
| -rw-r--r-- | src/include/libpq/pqcomm.h | 38 | ||||
| -rw-r--r-- | src/include/libpq/pqformat.h | 4 |
6 files changed, 57 insertions, 54 deletions
diff --git a/src/include/libpq/crypt.h b/src/include/libpq/crypt.h index a881e0ae0a..bde0568d48 100644 --- a/src/include/libpq/crypt.h +++ b/src/include/libpq/crypt.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: crypt.h,v 1.24 2002/12/05 18:52:43 momjian Exp $ + * $Id: crypt.h,v 1.25 2003/08/04 00:43:31 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -23,7 +23,7 @@ extern int md5_crypt_verify(const Port *port, const char *user, - char *client_pass); + char *client_pass); extern bool md5_hash(const void *buff, size_t len, char *hexsum); extern bool CheckMD5Pwd(char *passwd, char *storedpwd, char *seed); diff --git a/src/include/libpq/ip.h b/src/include/libpq/ip.h index 5c614b1681..c60030ccf5 100644 --- a/src/include/libpq/ip.h +++ b/src/include/libpq/ip.h @@ -5,7 +5,7 @@ * * Copyright (c) 2003, PostgreSQL Global Development Group * - * $Id: ip.h,v 1.9 2003/07/23 23:30:41 tgl Exp $ + * $Id: ip.h,v 1.10 2003/08/04 00:43:31 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,27 +16,27 @@ #include "libpq/pqcomm.h" -extern int getaddrinfo_all(const char *hostname, const char *servname, - const struct addrinfo *hintp, - struct addrinfo **result); -extern void freeaddrinfo_all(int hint_ai_family, struct addrinfo *ai); +extern int getaddrinfo_all(const char *hostname, const char *servname, + const struct addrinfo * hintp, + struct addrinfo ** result); +extern void freeaddrinfo_all(int hint_ai_family, struct addrinfo * ai); -extern int getnameinfo_all(const struct sockaddr_storage *addr, int salen, - char *node, int nodelen, - char *service, int servicelen, - int flags); +extern int getnameinfo_all(const struct sockaddr_storage * addr, int salen, + char *node, int nodelen, + char *service, int servicelen, + int flags); -extern int rangeSockAddr(const struct sockaddr_storage *addr, - const struct sockaddr_storage *netaddr, - const struct sockaddr_storage *netmask); +extern int rangeSockAddr(const struct sockaddr_storage * addr, + const struct sockaddr_storage * netaddr, + const struct sockaddr_storage * netmask); -extern int SockAddr_cidr_mask(struct sockaddr_storage **mask, - char *numbits, int family); +extern int SockAddr_cidr_mask(struct sockaddr_storage ** mask, + char *numbits, int family); #ifdef HAVE_UNIX_SOCKETS -#define IS_AF_UNIX(fam) ((fam) == AF_UNIX) +#define IS_AF_UNIX(fam) ((fam) == AF_UNIX) #else -#define IS_AF_UNIX(fam) (0) +#define IS_AF_UNIX(fam) (0) #endif -#endif /* IP_H */ +#endif /* IP_H */ diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 19ac0402d3..44bf573313 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -11,7 +11,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: libpq-be.h,v 1.35 2003/04/17 22:26:01 tgl Exp $ + * $Id: libpq-be.h,v 1.36 2003/08/04 00:43:31 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -30,8 +30,8 @@ /* * This is used by the postmaster in its communication with frontends. It * contains all state information needed during this communication before the - * backend is run. The Port structure is kept in malloc'd memory and is - * still available when a backend is running (see MyProcPort). The data + * backend is run. The Port structure is kept in malloc'd memory and is + * still available when a backend is running (see MyProcPort). The data * it points to must also be malloc'd, or else palloc'd in TopMemoryContext, * so that it survives into PostgresMain execution! */ @@ -44,9 +44,10 @@ typedef struct Port SockAddr raddr; /* remote addr (client) */ /* - * Information that needs to be saved from the startup packet and passed - * into backend execution. "char *" fields are NULL if not set. - * guc_options points to a List of alternating option names and values. + * Information that needs to be saved from the startup packet and + * passed into backend execution. "char *" fields are NULL if not + * set. guc_options points to a List of alternating option names and + * values. */ char *database_name; char *user_name; diff --git a/src/include/libpq/libpq.h b/src/include/libpq/libpq.h index 9f72b7e432..82e621fcd1 100644 --- a/src/include/libpq/libpq.h +++ b/src/include/libpq/libpq.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: libpq.h,v 1.58 2003/06/12 07:36:51 momjian Exp $ + * $Id: libpq.h,v 1.59 2003/08/04 00:43:31 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -46,8 +46,8 @@ typedef struct * prototypes for functions in pqcomm.c */ extern int StreamServerPort(int family, char *hostName, - unsigned short portNumber, char *unixSocketName, int ListenSocket[], - int MaxListen); + unsigned short portNumber, char *unixSocketName, int ListenSocket[], + int MaxListen); extern int StreamConnection(int server_fd, Port *port); extern void StreamClose(int sock); extern void TouchSocketFile(void); @@ -66,11 +66,11 @@ extern void pq_endcopyout(bool errorAbort); /* * prototypes for functions in be-secure.c */ -extern int secure_initialize(void); -extern void secure_destroy(void); -extern int secure_open_server(Port *port); -extern void secure_close(Port *port); -extern ssize_t secure_read(Port *port, void *ptr, size_t len); -extern ssize_t secure_write(Port *port, void *ptr, size_t len); +extern int secure_initialize(void); +extern void secure_destroy(void); +extern int secure_open_server(Port *port); +extern void secure_close(Port *port); +extern ssize_t secure_read(Port *port, void *ptr, size_t len); +extern ssize_t secure_write(Port *port, void *ptr, size_t len); #endif /* LIBPQ_H */ diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index 2e41b0896a..da756fb316 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pqcomm.h,v 1.91 2003/07/27 17:10:07 tgl Exp $ + * $Id: pqcomm.h,v 1.92 2003/08/04 00:43:31 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -35,11 +35,11 @@ #ifdef HAVE_STRUCT_SOCKADDR_STORAGE #ifndef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY -# ifdef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY -# define ss_family __ss_family -# else -# error struct sockaddr_storage does not provide an ss_family member -# endif +#ifdef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY +#define ss_family __ss_family +#else +#error struct sockaddr_storage does not provide an ss_family member +#endif #endif #ifdef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN @@ -47,16 +47,18 @@ #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1 #endif -#else /* !HAVE_STRUCT_SOCKADDR_STORAGE */ +#else /* !HAVE_STRUCT_SOCKADDR_STORAGE */ /* Define a struct sockaddr_storage if we don't have one. */ -struct sockaddr_storage { - union { +struct sockaddr_storage +{ + union + { struct sockaddr sa; /* get the system-dependent fields */ - int64 ss_align; /* ensures struct is properly aligned */ - char ss_pad[128]; /* ensures struct has desired size */ - } ss_stuff; + int64 ss_align; /* ensures struct is properly aligned */ + char ss_pad[128]; /* ensures struct has desired size */ + } ss_stuff; }; #define ss_family ss_stuff.sa.sa_family @@ -65,12 +67,12 @@ struct sockaddr_storage { #define ss_len ss_stuff.sa.sa_len #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1 #endif +#endif /* HAVE_STRUCT_SOCKADDR_STORAGE */ -#endif /* HAVE_STRUCT_SOCKADDR_STORAGE */ - -typedef struct { - struct sockaddr_storage addr; - ACCEPT_TYPE_ARG3 salen; +typedef struct +{ + struct sockaddr_storage addr; + ACCEPT_TYPE_ARG3 salen; } SockAddr; /* Configure the UNIX socket location for the well known port. */ @@ -148,7 +150,7 @@ extern bool Db_user_namespace; /* * In protocol 3.0 and later, the startup packet length is not fixed, but - * we set an arbitrary limit on it anyway. This is just to prevent simple + * we set an arbitrary limit on it anyway. This is just to prevent simple * denial-of-service attacks via sending enough data to run the server * out of memory. */ diff --git a/src/include/libpq/pqformat.h b/src/include/libpq/pqformat.h index 2102960e88..9f73083e10 100644 --- a/src/include/libpq/pqformat.h +++ b/src/include/libpq/pqformat.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pqformat.h,v 1.18 2003/05/09 21:19:50 tgl Exp $ + * $Id: pqformat.h,v 1.19 2003/08/04 00:43:31 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -19,7 +19,7 @@ extern void pq_beginmessage(StringInfo buf, char msgtype); extern void pq_sendbyte(StringInfo buf, int byt); extern void pq_sendbytes(StringInfo buf, const char *data, int datalen); extern void pq_sendcountedtext(StringInfo buf, const char *str, int slen, - bool countincludesself); + bool countincludesself); extern void pq_sendtext(StringInfo buf, const char *str, int slen); extern void pq_sendstring(StringInfo buf, const char *str); extern void pq_sendint(StringInfo buf, int i, int b); |
