Skip to content

Commit a23c641

Browse files
committed
Make sure FD_SETSIZE is set before we include any Windows
header files. Josh Williams
1 parent 060baf2 commit a23c641

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

contrib/pgbench/pgbench.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* A simple benchmark program for PostgreSQL
55
* Originally written by Tatsuo Ishii and enhanced by many contributors.
66
*
7-
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.87 2009/06/11 14:48:51 momjian Exp $
7+
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.88 2009/07/30 09:28:00 mha Exp $
88
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
99
* ALL RIGHTS RESERVED;
1010
*
@@ -26,6 +26,11 @@
2626
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
2727
*
2828
*/
29+
30+
#ifdef WIN32
31+
#define FD_SETSIZE 1024 /* set before winsock2.h is included */
32+
#endif /* ! WIN32 */
33+
2934
#include "postgres_fe.h"
3035

3136
#include "libpq-fe.h"
@@ -34,8 +39,6 @@
3439
#include <ctype.h>
3540

3641
#ifdef WIN32
37-
#undef FD_SETSIZE
38-
#define FD_SETSIZE 1024
3942
#include <win32.h>
4043
#else
4144
#include <signal.h>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy