home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3648 / maxfiles.c < prev    next >
C/C++ Source or Header  |  1991-07-16  |  416b  |  22 lines

  1. /* 
  2.  * maxfiles.c  $Date: 91/06/30 17:46:52 $
  3.  *
  4.  * If your system doesn't support sysconf, then you might try
  5.  * replacing the function below with one which returns the
  6.  * value of FOPEN_MAX, _NFILE, or _MAXFILES from <stdio.h> .
  7.  */
  8.  
  9. #include <unistd.h>
  10.  
  11. static char Rcsid[] = "$What: <@(#) maxfiles.c,v    2.1> $";
  12.  
  13. int maxfiles()
  14. {
  15.     long sysconf();
  16.     int temp;
  17.  
  18.     temp = (int) sysconf(_SC_OPEN_MAX);
  19.     return temp;
  20. }
  21.  
  22.