1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Remove use of large BUFSIZ for buffers and use the proper struct sizes.

This greatly helps threaded libpq programs.
This commit is contained in:
Bruce Momjian
2004-09-27 23:39:14 +00:00
parent e1c8b37afb
commit b534a5605f
4 changed files with 10 additions and 12 deletions

View File

@ -12,7 +12,7 @@
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/getaddrinfo.c,v 1.13 2004/09/27 23:24:45 momjian Exp $
* $PostgreSQL: pgsql/src/port/getaddrinfo.c,v 1.14 2004/09/27 23:39:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -85,7 +85,7 @@ getaddrinfo(const char *node, const char *service,
#ifdef FRONTEND
struct hostent hpstr;
char buf[BUFSIZ];
char buf[sizeof(struct hostent)];
int herrno = 0;
pqGethostbyname(node, &hpstr, buf, sizeof(buf),