]> git.sur5r.net Git - openldap/blob - include/ac/fdset.h
4558542a858a2d12b68d2b42cf13981eb5762332
[openldap] / include / ac / fdset.h
1 /* redefine FD_SET */
2 /* $OpenLDAP$ */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4  *
5  * Copyright 1998-2015 The OpenLDAP Foundation.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted only as authorized by the OpenLDAP
10  * Public License.
11  *
12  * A copy of this license is available in file LICENSE in the
13  * top-level directory of the distribution or, alternatively, at
14  * <http://www.OpenLDAP.org/license.html>.
15  */
16
17 /*
18  * This header is to be included by portable.h to ensure
19  * tweaking of FD_SETSIZE is done early enough to be effective.
20  */
21
22 #ifndef _AC_FDSET_H
23 #define _AC_FDSET_H
24
25 #if !defined( OPENLDAP_FD_SETSIZE ) && !defined( FD_SETSIZE )
26 #  define OPENLDAP_FD_SETSIZE 4096
27 #endif
28
29 #ifdef OPENLDAP_FD_SETSIZE
30     /* assume installer desires to enlarge fd_set */
31 #  ifdef HAVE_BITS_TYPES_H
32 #    include <bits/types.h>
33 #  endif
34 #  ifdef __FD_SETSIZE
35 #    undef __FD_SETSIZE
36 #    define __FD_SETSIZE OPENLDAP_FD_SETSIZE
37 #  else
38 #    define FD_SETSIZE OPENLDAP_FD_SETSIZE
39 #  endif
40 #endif
41
42 #endif /* _AC_FDSET_H */