mirror of
https://sourceware.org/git/glibc.git
synced 2025-06-19 16:01:03 +03:00
abilist
aout
argp
assert
bare
bits
catgets
conf
conform
crypt
csu
ctype
debug
dirent
dlfcn
elf
gmon
gnulib
grp
hesiod
hurd
iconv
iconvdata
include
inet
intl
io
libidn
libio
linuxthreads
linuxthreads_db
locale
localedata
login
mach
malloc
manual
math
misc
nis
nptl
nptl_db
nscd
nss
po
posix
pwd
resolv
resource
rt
scripts
setjmp
shadow
signal
socket
soft-fp
stdio-common
stdlib
streams
string
sunrpc
sysdeps
alpha
am29k
arm
cris
generic
gnu
hppa
i386
i860
i960
ia64
ieee754
m68k
m88k
mach
mips
posix
powerpc
pthread
rs6000
s390
sh
sparc
standalone
tahoe
unix
alpha
arm
bsd
common
i386
inet
mips
mman
powerpc
sh
sparc
sysv
x86_64
Dist
Implies
Makefile
Subdirs
_exit.S
alarm.c
clock_gettime.c
clock_nanosleep.c
clock_settime.c
closedir.c
configure
configure.in
confstr.h
dirfd.c
dirstream.h
errnos-tmpl.c
errnos.awk
execve.S
fork.S
fxstat.c
getdents.c
getegid.S
geteuid.S
getlogin.c
getlogin_r.c
getpagesize.c
getppid.S
grantpt.c
ioctls-tmpl.c
ioctls.awk
make-syscalls.sh
make_errlist.c
mk-local_lim.c
mkdir.c
mkfifo.c
nice.c
opendir.c
readdir.c
readdir_r.c
rewinddir.c
rmdir.c
s-proto-bp.S
s-proto-cancel.S
s-proto.S
seekdir.c
siglist.c
snarf-ioctls
sockatmark.c
start.c
stime.c
syscall.S
syscalls.list
sysdep.h
system.c
telldir.c
time.c
utime.c
xmknod.c
xstat.c
vax
wordsize-32
wordsize-64
x86_64
z8000
sysvipc
termios
time
timezone
wcsmbs
wctype
.cvsignore
BUGS
CANCEL-FCT-WAIVE
CANCEL-FILE-WAIVE
CONFORMANCE
COPYING
COPYING.LIB
ChangeLog
ChangeLog.1
ChangeLog.10
ChangeLog.11
ChangeLog.12
ChangeLog.13
ChangeLog.14
ChangeLog.2
ChangeLog.3
ChangeLog.4
ChangeLog.5
ChangeLog.6
ChangeLog.7
ChangeLog.8
ChangeLog.9
FAQ
FAQ.in
INSTALL
INTERFACE
LICENSES
MakeTAGS
Makeconfig
Makefile
Makefile.in
Makerules
NAMESPACE
NEWS
NOTES
PROJECTS
README
README-alpha
README.libm
README.template
Rules
Versions.def
abi-tags
aclocal.m4
config-name.in
config.h.in
config.make.in
configure
configure.in
cppflags-iterator.mk
extra-lib.mk
extra-modules.mk
o-iterator.mk
shlib-versions
test-skeleton.c
tls.make.c
version.h
2001-07-06 Paul Eggert <eggert@twinsun.com> * manual/argp.texi: Remove ignored LGPL copyright notice; it's not appropriate for documentation anyway. * manual/libc-texinfo.sh: "Library General Public License" -> "Lesser General Public License". 2001-07-06 Andreas Jaeger <aj@suse.de> * All files under GPL/LGPL version 2: Place under LGPL version 2.1.
127 lines
2.8 KiB
C
127 lines
2.8 KiB
C
/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with the GNU C Library; if not, write to the Free
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
02111-1307 USA. */
|
|
|
|
#include <stdio.h>
|
|
#include <sys/types.h>
|
|
|
|
#ifdef HAVE_SYS_PARAM_H
|
|
#include <sys/param.h>
|
|
#endif
|
|
|
|
#ifdef HAVE_LIMITS_H
|
|
#include <limits.h>
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_LIMITS_H
|
|
#include <sys/limits.h>
|
|
#endif
|
|
|
|
/* Generate bits/local_lim.h from the values defined in the system's
|
|
headers. */
|
|
|
|
struct param
|
|
{
|
|
char *name;
|
|
int value;
|
|
};
|
|
|
|
static struct param params[] =
|
|
{
|
|
|
|
#if !defined (ARG_MAX) && defined (NCARGS)
|
|
#define ARG_MAX NCARGS
|
|
#endif
|
|
#ifdef ARG_MAX
|
|
{ "ARG_MAX", ARG_MAX },
|
|
#endif
|
|
|
|
#if !defined (CHILD_MAX) && defined (MAXUPRC)
|
|
#define CHILD_MAX MAXUPRC
|
|
#endif
|
|
#ifdef CHILD_MAX
|
|
{ "CHILD_MAX", CHILD_MAX },
|
|
#endif
|
|
|
|
#if !defined (LINK_MAX) && defined (MAXLINK)
|
|
#define LINK_MAX MAXLINK
|
|
#endif
|
|
#ifdef LINK_MAX
|
|
{ "LINK_MAX", LINK_MAX },
|
|
#endif
|
|
|
|
#if !defined (OPEN_MAX) && defined (NOFILE)
|
|
#define OPEN_MAX NOFILE
|
|
#endif
|
|
#ifdef OPEN_MAX
|
|
{ "OPEN_MAX", OPEN_MAX },
|
|
#endif
|
|
|
|
#if !defined (MAX_CANON) && defined (CANBSIZ)
|
|
#define MAX_CANON CANBSIZ
|
|
#endif
|
|
#ifdef MAX_CANON
|
|
{ "MAX_CANON", MAX_CANON },
|
|
#endif
|
|
|
|
#if !defined (NAME_MAX) && defined (MAXNAMLEN)
|
|
#define NAME_MAX MAXNAMLEN
|
|
#endif
|
|
#ifndef NAME_MAX
|
|
#define NAME_MAX 255 /* XXX ? */
|
|
#endif
|
|
{ "NAME_MAX", NAME_MAX },
|
|
|
|
#if !defined (PATH_MAX) && defined (MAXPATHLEN)
|
|
#define PATH_MAX MAXPATHLEN
|
|
#endif
|
|
#ifdef PATH_MAX
|
|
{ "PATH_MAX", PATH_MAX },
|
|
#endif
|
|
|
|
#if !defined (SYMLOOP_MAX) && defined (MAXSYMLINKS)
|
|
#define SYMLOOP_MAX MAXSYMLINKS
|
|
#endif
|
|
#ifdef SYMLOOP_MAX
|
|
{ "SYMLOOP_MAX", SYMLOOP_MAX },
|
|
#endif
|
|
|
|
{ NULL, 0 }
|
|
};
|
|
|
|
int
|
|
main()
|
|
{
|
|
extern char *ctime ();
|
|
extern time_t time ();
|
|
time_t now = time ((time_t *) NULL);
|
|
register struct param *p;
|
|
|
|
if (! params[0].name)
|
|
/* We have no information to give, so let the caller know. */
|
|
exit (1);
|
|
|
|
printf ("\
|
|
/* Implementation-specific limits.\n\
|
|
Generated at %.24s. */\n\n", ctime (&now));
|
|
|
|
for (p = params; p->name != NULL; ++p)
|
|
printf ("#define %s %d\n", p->name, p->value);
|
|
|
|
exit (0);
|
|
}
|