home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / xdvik / c-openmx.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-28  |  1.2 KB  |  38 lines

  1. /* c-openmx.h: define OPEN_MAX, the maximum number of open files a
  2.    process can have. Possibly dynamically determined.
  3.  
  4. Copyright (C) 1993 Karl Berry.
  5.  
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #ifndef C_OPENMX_H
  21. #define C_OPENMX_H
  22.  
  23. #include <kpathsea/c-limits.h>
  24.  
  25. #ifndef OPEN_MAX
  26. #ifdef _SC_OPEN_MAX
  27. #define OPEN_MAX sysconf (_SC_OPEN_MAX)
  28. #else /* no SC_OPEN_MAX */
  29. #ifdef NOFILE
  30. #define OPEN_MAX NOFILE
  31. #else /* no NOFILE */
  32. #define OPEN_MAX 24 /* The POSIX minimum. */
  33. #endif /* no NOFILE */
  34. #endif /* no _SC_OPEN_MAX */
  35. #endif /* no OPEN_MAX */
  36.  
  37. #endif /* not C_OPENMX_H */
  38.