Back to index

glibc  2.9
local_lim.h
Go to the documentation of this file.
00001 /* Minimum guaranteed maximum values for system limits.  Linux version.
00002    Copyright (C) 1993-1998,2000,2003,2004,2008 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 /* The kernel header pollutes the namespace with the NR_OPEN symbol
00021    and defines LINK_MAX although filesystems have different maxima.  A
00022    similar thing is true for OPEN_MAX: the limit can be changed at
00023    runtime and therefore the macro must not be defined.  Remove this
00024    after including the header if necessary.  */
00025 #ifndef NR_OPEN
00026 # define __undef_NR_OPEN
00027 #endif
00028 #ifndef LINK_MAX
00029 # define __undef_LINK_MAX
00030 #endif
00031 #ifndef OPEN_MAX
00032 # define __undef_OPEN_MAX
00033 #endif
00034 #ifndef ARG_MAX
00035 # define __undef_ARG_MAX
00036 #endif
00037 
00038 /* The kernel sources contain a file with all the needed information.  */
00039 #include <linux/limits.h>
00040 
00041 /* Have to remove NR_OPEN?  */
00042 #ifdef __undef_NR_OPEN
00043 # undef NR_OPEN
00044 # undef __undef_NR_OPEN
00045 #endif
00046 /* Have to remove LINK_MAX?  */
00047 #ifdef __undef_LINK_MAX
00048 # undef LINK_MAX
00049 # undef __undef_LINK_MAX
00050 #endif
00051 /* Have to remove OPEN_MAX?  */
00052 #ifdef __undef_OPEN_MAX
00053 # undef OPEN_MAX
00054 # undef __undef_OPEN_MAX
00055 #endif
00056 /* Have to remove ARG_MAX?  */
00057 #ifdef __undef_ARG_MAX
00058 # undef ARG_MAX
00059 # undef __undef_ARG_MAX
00060 #endif
00061 
00062 /* Maximum amount by which a process can descrease its asynchronous I/O
00063    priority level.  */
00064 #define AIO_PRIO_DELTA_MAX  20
00065 
00066 /* Maximum tty name length.  */
00067 #define TTY_NAME_MAX        32
00068 
00069 /* Maximum login name length.  This is arbitrary.  */
00070 #define LOGIN_NAME_MAX             256
00071 
00072 /* Maximum host name length.  */
00073 #define HOST_NAME_MAX              64
00074 
00075 /* Maximum message queue priority level.  */
00076 #define MQ_PRIO_MAX         32768