Back to index

tetex-bin  3.0
c-openmx.h
Go to the documentation of this file.
00001 /* c-openmx.h: define OPEN_MAX, the maximum number of open files a
00002    process can have. Possibly dynamically determined.
00003 
00004 Copyright (C) 1993 Karl Berry.
00005 
00006 This program is free software; you can redistribute it and/or modify
00007 it under the terms of the GNU General Public License as published by
00008 the Free Software Foundation; either version 2, or (at your option)
00009 any later version.
00010 
00011 This program is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with this program; if not, write to the Free Software
00018 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
00019 
00020 #ifndef C_OPENMX_H_
00021 #define C_OPENMX_H_
00022 
00023 #include "kpathsea/c-limits.h"
00024 
00025 #ifndef OPEN_MAX
00026 #ifdef _SC_OPEN_MAX
00027 #define OPEN_MAX sysconf (_SC_OPEN_MAX)
00028 #else /* no SC_OPEN_MAX */
00029 #ifdef NOFILE
00030 #define OPEN_MAX NOFILE
00031 #else /* no NOFILE */
00032 #define OPEN_MAX 24 /* The POSIX minimum. */
00033 #endif /* no NOFILE */
00034 #endif /* no _SC_OPEN_MAX */
00035 #endif /* no OPEN_MAX */
00036 
00037 #endif /* not C_OPENMX_H_ */