diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-10-31 18:20:21 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-10-31 18:20:21 +0000 |
commit | 6737908f74ff566748864548cf35bb1da8e64af6 (patch) | |
tree | 6eeafda4548f49d960e1b597c880a810a08a66f0 /libc | |
parent | c734e7ca57f520e55236b21eaef16ac40099a378 (diff) |
Ok, this commit is _huge_ and its gonna change the world. I've
been working on a new config system on and off for about 6 months
now, but I've never been fully satisfied. Well, I'm finally am
happy with the new config system, so here it is. This completely
removes the old uClibc configuration system, and replaces it with
an entirely new system based on LinuxKernelConf, from
http://www.xs4all.nl/~zippel/lc/
As it turns out, Linus has just merged LinuxKernelConf into Linux
2.5.45, so it looks like I made the right choice.
I have thus far updated only x86. I'll be updating the other
architectures shortly.
-Erik
Diffstat (limited to 'libc')
55 files changed, 135 insertions, 154 deletions
diff --git a/libc/inet/Makefile b/libc/inet/Makefile index 67699506a..efc8cb621 100644 --- a/libc/inet/Makefile +++ b/libc/inet/Makefile @@ -24,7 +24,7 @@ TOPDIR=../../ include $(TOPDIR)Rules.mak -ifeq ($(strip $(INCLUDE_RPC)),true) +ifeq ($(strip $(UCLIBC_HAS_RPC)),y) DIRS=rpc else DIRS= diff --git a/libc/inet/rpc/Makefile b/libc/inet/rpc/Makefile index 67691e4b6..0cfa64d8d 100644 --- a/libc/inet/rpc/Makefile +++ b/libc/inet/rpc/Makefile @@ -25,20 +25,7 @@ TOPDIR=../../../ include $(TOPDIR)Rules.mak CFLAGS+=-I$(TOPDIR)libpthread/linuxthreads/sysdeps/pthread -# If INCLUDE_FULL_RPC is not defined, default to `false' if shared -# libraries are enabled, and `true' otherwise (because the main -# advantage of not including everything is that it reduces the size of -# shared libraries; the size of static libraries doesn't typically -# matter as much, since they need not be present at runtime). -ifeq ($(strip $(INCLUDE_FULL_RPC)),) - ifeq ($(strip $(HAVE_SHARED)),false) - INCLUDE_FULL_RPC = true - else - INCLUDE_FULL_RPC = false - endif -endif - -ifeq ($(strip $(INCLUDE_FULL_RPC)),true) +ifeq ($(strip $(UCLIBC_HAS_FULL_RPC)),y) CSRC :=auth_none.c auth_unix.c authunix_prot.c bindresvport.c \ clnt_generic.c clnt_perror.c clnt_raw.c clnt_simple.c clnt_tcp.c \ clnt_udp.c rpc_dtablesize.c get_myaddress.c getrpcent.c getrpcport.c \ diff --git a/libc/misc/Makefile b/libc/misc/Makefile index 8278a5767..2a74a4e54 100644 --- a/libc/misc/Makefile +++ b/libc/misc/Makefile @@ -28,13 +28,13 @@ include $(TOPDIR)Rules.mak DIRS = assert ctype dirent file fnmatch glob internals lsearch \ mntent syslog time utmp tsearch locale sysvipc statfs \ error insremque ttyent gnu -ifeq ($(strip $(INCLUDE_REGEX)),true) +ifeq ($(strip $(UCLIBC_HAS_REGEX)),y) DIRS += regex endif -ifeq ($(strip $(INCLUDE_THREADS)),true) +ifeq ($(strip $(UCLIBC_HAS_THREADS)),y) DIRS += pthread endif -ifeq ($(strip $(HAS_WCHAR)),true) +ifeq ($(strip $(UCLIBC_HAS_WCHAR)),y) DIRS += wctype wchar endif diff --git a/libc/misc/dirent/alphasort64.c b/libc/misc/dirent/alphasort64.c index e98d7138a..bcae8108f 100644 --- a/libc/misc/dirent/alphasort64.c +++ b/libc/misc/dirent/alphasort64.c @@ -1,5 +1,5 @@ #include <features.h> -#ifdef __UCLIBC_HAVE_LFS__ +#ifdef __UCLIBC_HAS_LFS__ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64 #undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 @@ -22,5 +22,5 @@ int alphasort64(const void * a, const void * b) return strcmp ((*(const struct dirent64 **) a)->d_name, (*(const struct dirent64 **) b)->d_name); } -#endif /* __UCLIBC_HAVE_LFS__ */ +#endif /* __UCLIBC_HAS_LFS__ */ diff --git a/libc/misc/dirent/readdir64.c b/libc/misc/dirent/readdir64.c index b845b8139..d30a4398f 100644 --- a/libc/misc/dirent/readdir64.c +++ b/libc/misc/dirent/readdir64.c @@ -1,5 +1,5 @@ #include <features.h> -#ifdef __UCLIBC_HAVE_LFS__ +#ifdef __UCLIBC_HAS_LFS__ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64 #undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 @@ -68,4 +68,4 @@ all_done: return de; } -#endif /* __UCLIBC_HAVE_LFS__ */ +#endif /* __UCLIBC_HAS_LFS__ */ diff --git a/libc/misc/dirent/readdir64_r.c b/libc/misc/dirent/readdir64_r.c index 6735db8d8..f4aeb7869 100644 --- a/libc/misc/dirent/readdir64_r.c +++ b/libc/misc/dirent/readdir64_r.c @@ -1,5 +1,5 @@ #include <features.h> -#ifdef __UCLIBC_HAVE_LFS__ +#ifdef __UCLIBC_HAS_LFS__ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64 #undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 @@ -75,5 +75,5 @@ all_done: #endif return((de != NULL)? 0 : ret); } -#endif /* __UCLIBC_HAVE_LFS__ */ +#endif /* __UCLIBC_HAS_LFS__ */ diff --git a/libc/misc/dirent/scandir64.c b/libc/misc/dirent/scandir64.c index 476193c94..d7543a61e 100644 --- a/libc/misc/dirent/scandir64.c +++ b/libc/misc/dirent/scandir64.c @@ -24,7 +24,7 @@ */ #include <features.h> -#ifdef __UCLIBC_HAVE_LFS__ +#ifdef __UCLIBC_HAS_LFS__ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64 #undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 @@ -99,5 +99,5 @@ int scandir64(const char *dir, struct dirent64 ***namelist, return pos; } -#endif /* __UCLIBC_HAVE_LFS__ */ +#endif /* __UCLIBC_HAS_LFS__ */ diff --git a/libc/misc/glob/glob64.c b/libc/misc/glob/glob64.c index 56d48444d..c053de4f0 100644 --- a/libc/misc/glob/glob64.c +++ b/libc/misc/glob/glob64.c @@ -1,6 +1,6 @@ #include <features.h> -#ifdef __UCLIBC_HAVE_LFS__ +#ifdef __UCLIBC_HAS_LFS__ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64 #undef _FILE_OFFSET_BITS diff --git a/libc/misc/internals/Makefile b/libc/misc/internals/Makefile index a33afef60..1e772ce60 100644 --- a/libc/misc/internals/Makefile +++ b/libc/misc/internals/Makefile @@ -43,7 +43,7 @@ ar-target: $(OBJS) interp.c: Makefile echo "/* Force shared libraries to know about the correct library loader */" > interp.c echo "#include <features.h>" >> interp.c - echo "#ifdef HAVE_ELF" >> interp.c + echo "#ifdef __HAVE_ELF__" >> interp.c echo "const char __dl_ldso__[] __attribute__ ((section " \ "(\".interp\"))) =\""$(DYNAMIC_LINKER)"\";" >> interp.c echo "#endif" >> interp.c diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c index 31b16c18a..236a62e85 100644 --- a/libc/misc/internals/tempname.c +++ b/libc/misc/internals/tempname.c @@ -189,7 +189,7 @@ int __gen_tempname (char *tmpl, int kind) case __GT_FILE: fd = open (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); break; -#if defined __UCLIBC_HAVE_LFS__ +#if defined __UCLIBC_HAS_LFS__ case __GT_BIGFILE: fd = open64 (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); break; diff --git a/libc/misc/locale/Makefile b/libc/misc/locale/Makefile index 881b0c0e5..29c8cd5a0 100644 --- a/libc/misc/locale/Makefile +++ b/libc/misc/locale/Makefile @@ -29,7 +29,7 @@ MOBJ= setlocale.o localeconv.o _locale_init.o nl_langinfo.o OBJS= $(MOBJ) -ifeq ($(HAS_LOCALE),true) +ifeq ($(UCLIBC_HAS_LOCALE),y) OBJS += locale_data.o endif @@ -47,7 +47,7 @@ $(MOBJ): $(MSRC) $(OBJS): Makefile data: -ifeq ($(HAS_LOCALE),true) +ifeq ($(UCLIBC_HAS_LOCALE),y) make -C $(TOPDIR)/extra/locale endif diff --git a/libc/misc/statfs/Makefile b/libc/misc/statfs/Makefile index e8fcf21e4..89eb7fd89 100644 --- a/libc/misc/statfs/Makefile +++ b/libc/misc/statfs/Makefile @@ -22,7 +22,7 @@ TOPDIR=../../../ include $(TOPDIR)Rules.mak -ifeq ($(strip $(DOLFS)),true) +ifeq ($(strip $(UCLIBC_HAS_LFS)),y) CSRC = fstatfs64.c statfs64.c statvfs.c statvfs64.c fstatvfs.c fstatvfs64.c else CSRC = statvfs.c fstatvfs.c diff --git a/libc/misc/statfs/fstatfs64.c b/libc/misc/statfs/fstatfs64.c index acc25d2e0..1040e1fe1 100644 --- a/libc/misc/statfs/fstatfs64.c +++ b/libc/misc/statfs/fstatfs64.c @@ -19,7 +19,7 @@ #include <features.h> -#ifdef __UCLIBC_HAVE_LFS__ +#ifdef __UCLIBC_HAS_LFS__ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64 #undef _FILE_OFFSET_BITS @@ -62,5 +62,5 @@ int fstatfs64 (int fd, struct statfs64 *buf) return 0; } -#endif /* __UCLIBC_HAVE_LFS__ */ +#endif /* __UCLIBC_HAS_LFS__ */ diff --git a/libc/misc/statfs/fstatvfs64.c b/libc/misc/statfs/fstatvfs64.c index 84f68ae9b..ed4b63234 100644 --- a/libc/misc/statfs/fstatvfs64.c +++ b/libc/misc/statfs/fstatvfs64.c @@ -19,7 +19,7 @@ #include <features.h> -#ifdef __UCLIBC_HAVE_LFS__ +#ifdef __UCLIBC_HAS_LFS__ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64 #undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 diff --git a/libc/misc/statfs/statfs64.c b/libc/misc/statfs/statfs64.c index b237624c3..0b954c675 100644 --- a/libc/misc/statfs/statfs64.c +++ b/libc/misc/statfs/statfs64.c @@ -36,7 +36,7 @@ #include <stddef.h> #include <sys/statfs.h> -#if defined __UCLIBC_HAVE_LFS__ +#if defined __UCLIBC_HAS_LFS__ /* Return information about the filesystem on which FILE resides. */ int statfs64 (const char *file, struct statfs64 *buf) diff --git a/libc/misc/statfs/statvfs64.c b/libc/misc/statfs/statvfs64.c index 1e3ec0a36..78d1a4c3f 100644 --- a/libc/misc/statfs/statvfs64.c +++ b/libc/misc/statfs/statvfs64.c @@ -19,7 +19,7 @@ #include <features.h> -#ifdef __UCLIBC_HAVE_LFS__ +#ifdef __UCLIBC_HAS_LFS__ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64 #undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 diff --git a/libc/misc/time/Makefile b/libc/misc/time/Makefile index 841c19600..b187e5555 100644 --- a/libc/misc/time/Makefile +++ b/libc/misc/time/Makefile @@ -29,7 +29,7 @@ MOBJ= asctime.o asctime_r.o clock.o ctime.o ctime_r.o gmtime.o gmtime_r.o \ localtime.o localtime_r.o mktime.o strftime.o strptime.o tzset.o \ _time_t2tm.o __time_tm.o _time_mktime.o -ifeq ($(HAS_FLOATING_POINT),true) +ifeq ($(UCLIBC_HAS_FLOATS),y) MOBJ += difftime.o endif diff --git a/libc/pwd_grp/Makefile b/libc/pwd_grp/Makefile index 5efa1414e..c34142d6b 100644 --- a/libc/pwd_grp/Makefile +++ b/libc/pwd_grp/Makefile @@ -28,7 +28,7 @@ CSRC= pwent.c getpwnam.c getpwuid.c putpwent.c getpw.c fgetpwent.c \ __getgrent.c grent.c getgrnam.c getgrgid.c fgetgrent.c \ initgroups.c __getpwent_r.c -ifeq ($(HAS_SHADOW),true) +ifeq ($(HAS_SHADOW),y) CSRC+= lckpwdf.c spent.c getspnam.c getspuid.c putspent.c sgetspent.c \ fgetspent.c __getspent_r.c __sgetspent_r.c endif diff --git a/libc/stdio/Makefile b/libc/stdio/Makefile index 011f3a7f8..09cb0710a 100644 --- a/libc/stdio/Makefile +++ b/libc/stdio/Makefile @@ -24,21 +24,8 @@ TOPDIR=../../ include $(TOPDIR)Rules.mak -# Set to true to use the old vfprintf instead of the new. The old is roughly -# C89 compliant, but doesn't deal with qualifiers on %n and doesn't deal with -# %h correctly or %hh at all on the interger conversions. But on i386 it is -# over 1.5k smaller than the new code. Of course, the new code fixes the -# above mentioned deficiencies and adds custom specifier support similar to -# glibc, as well as handling positional args. This option is here temporarily -# until the configuration system gets rewritten. Note also that the old -# vfprintf code will be rewritten at some point to bring it into at least C89 -# standards compliance. - -USE_OLD_VFPRINTF = false - # Note: The *64.o objects are empty when compiled without large file support. -# To not build them at all, remove the appropriate line from the MOBJ -# definition and uncomment the DOLFS test below. +# # Note: Use the libpthreads of: flockfile.o ftrylockfile.o funlockfile.o # Also, maybe move __fsetlocking.o as well? @@ -60,15 +47,11 @@ MOBJ = fclose.o fflush.o fopen.o freopen.o perror.o remove.o \ _stdio_fsfopen.o _stdio_fdout.o _uintmaxtostr.o _stdio_strerror_r.o \ getdelim.o getline.o ctermid.o -# ifeq ($(DOLFS),true) -# MOBJ += fopen64.o freopen64.o ftello64.o fseeko64.o fsetpos64.o fgetpos64.o -# endif - MSRC2= printf.c MOBJ2= vsnprintf.o vdprintf.o vasprintf.o vprintf.o vsprintf.o \ fprintf.o snprintf.o dprintf.o asprintf.o printf.o sprintf.o -ifneq ($(USE_OLD_VFPRINTF),true) +ifneq ($(USE_OLD_VFPRINTF),y) MOBJ2 += _ppfs_init.o _ppfs_prepargs.o _ppfs_setargs.o \ _ppfs_parsespec.o _do_one_spec.o vfprintf.o \ _store_inttype.o _load_inttype.o \ @@ -77,7 +60,7 @@ endif -ifeq ($(HAS_FLOATING_POINT),true) +ifeq ($(UCLIBC_HAS_FLOATS),y) MOBJ2 += _dtostr.o endif @@ -85,7 +68,7 @@ MSRC3=scanf.c MOBJ3=scanf.o sscanf.o fscanf.o vscanf.o vsscanf.o vfscanf.o CSRC=popen.c tmpfile.c tmpnam.c tmpnam_r.c tempnam.c -ifeq ($(USE_OLD_VFPRINTF),true) +ifeq ($(USE_OLD_VFPRINTF),y) CSRC += old_vfprintf.c endif COBJS=$(patsubst %.c,%.o, $(CSRC)) diff --git a/libc/stdio/tmpfile.c b/libc/stdio/tmpfile.c index d7940b139..5484d5d6c 100644 --- a/libc/stdio/tmpfile.c +++ b/libc/stdio/tmpfile.c @@ -46,6 +46,6 @@ FILE * tmpfile (void) return f; } -#ifdef __UCLIBC_HAVE_LFS__ +#ifdef __UCLIBC_HAS_LFS__ weak_alias(tmpfile, tmpfile64); #endif diff --git a/libc/stdlib/Makefile b/libc/stdlib/Makefile index aa311afcb..5bf12b322 100644 --- a/libc/stdlib/Makefile +++ b/libc/stdlib/Makefile @@ -24,15 +24,21 @@ TOPDIR=../../ include $(TOPDIR)Rules.mak -DIRS = $(MALLOC) -ALL_SUBDIRS = malloc malloc-930716 +DIRS:= +ifeq ($(MALLOC),y) + DIRS+=malloc +endif +ifeq ($(MALLOC_930716),y) + DIRS+=malloc-930716 +endif + MSRC = stdlib.c MOBJ = abs.o labs.o atoi.o atol.o strtol.o strtoul.o _stdlib_strto_l.o \ qsort.o bsearch.o MOBJ += llabs.o atoll.o strtoll.o strtoull.o _stdlib_strto_ll.o -ifeq ($(HAS_WCHAR),true) +ifeq ($(UCLIBC_HAS_WCHAR),y) MOBJ += mblen.o mbtowc.o wctomb.o mbstowcs.o wcstombs.o \ _stdlib_mb_cur_max.o endif @@ -46,7 +52,7 @@ CSRC = abort.c getenv.c mkdtemp.c mktemp.c realpath.c mkstemp.c mkstemp64.c \ drand48_r.c erand48.c erand48_r.c jrand48.c jrand48_r.c lrand48.c \ lrand48_r.c mrand48.c mrand48_r.c nrand48.c nrand48_r.c rand_r.c \ srand48.c srand48_r.c calloc.c valloc.c -ifeq ($(HAS_FLOATING_POINT),true) +ifeq ($(UCLIBC_HAS_FLOATS),y) CSRC += strtod.c strtof.c strtold.c endif COBJS=$(patsubst %.c,%.o, $(CSRC)) diff --git a/libc/stdlib/getpt.c b/libc/stdlib/getpt.c index f4e52f672..71d7d6c5f 100644 --- a/libc/stdlib/getpt.c +++ b/libc/stdlib/getpt.c @@ -23,7 +23,7 @@ #include <unistd.h> #include <paths.h> -#if !defined ASSUME_DEVPTS +#if !defined __ASSUME_DEVPTS__ # include <sys/statfs.h> /* Constant that identifies the `devpts' filesystem. */ @@ -37,7 +37,7 @@ /* Directory containing the UNIX98 pseudo terminals. */ #define _PATH_DEVPTS _PATH_DEV "pts" -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ /* Prototype for function that opens BSD-style master pseudo-terminals. */ int __bsd_getpt (void); #endif @@ -46,19 +46,19 @@ int __bsd_getpt (void); int getpt (void) { -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ static int have_no_dev_ptmx; #endif int fd; -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ if (!have_no_dev_ptmx) #endif { fd = open (_PATH_DEVPTMX, O_RDWR); if (fd != -1) { -#if defined ASSUME_DEVPTS +#if defined __ASSUME_DEVPTS__ return fd; #else struct statfs fsbuf; @@ -80,14 +80,14 @@ getpt (void) /* If /dev/pts is not mounted then the UNIX98 pseudo terminals are not usable. */ close (fd); -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ have_no_dev_ptmx = 1; #endif #endif } else { -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ if (errno == ENOENT || errno == ENODEV) have_no_dev_ptmx = 1; else @@ -96,12 +96,12 @@ getpt (void) } } -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ return __bsd_getpt (); #endif } -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ # define PTYNAME1 "pqrstuvwxyzabcde"; # define PTYNAME2 "0123456789abcdef"; diff --git a/libc/stdlib/grantpt.c b/libc/stdlib/grantpt.c index d49f0af4f..5b4427a0c 100644 --- a/libc/stdlib/grantpt.c +++ b/libc/stdlib/grantpt.c @@ -19,10 +19,10 @@ #include <limits.h> #include <stdlib.h> -/* If ASSUME_DEVPTS is defined, grantpt() reduces to a stub since we +/* If __ASSUME_DEVPTS__ is defined, grantpt() reduces to a stub since we assume that the devfs/devpts filesystem automatically manages the permissions. */ -#if !defined ASSUME_DEVPTS +#if !defined __ASSUME_DEVPTS__ #include <sys/statfs.h> /* Constant that identifies the `devpts' filesystem. */ @@ -47,7 +47,7 @@ static int pts_name (int fd, char **pts, size_t buf_len); int grantpt (int fd) { -#if !defined ASSUME_DEVPTS +#if !defined __ASSUME_DEVPTS__ struct statfs fsbuf; # ifdef PATH_MAX char _buf[PATH_MAX]; @@ -70,7 +70,7 @@ grantpt (int fd) return 0; } -#if !defined ASSUME_DEVPTS +#if !defined __ASSUME_DEVPTS__ # define grantpt __unix_grantpt # include "unix_grantpt.c" #endif diff --git a/libc/stdlib/ptsname.c b/libc/stdlib/ptsname.c index 7f9b04e93..2472edb3f 100644 --- a/libc/stdlib/ptsname.c +++ b/libc/stdlib/ptsname.c @@ -30,7 +30,7 @@ #include <unistd.h> -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ /* Check if DEV corresponds to a master pseudo terminal device. */ #define MASTER_P(Dev) \ @@ -64,7 +64,7 @@ extern const char _ptyname2[]; int ptsname_r (int fd, char *buf, size_t buflen) { int save_errno = errno; -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ struct stat st; #endif int ptyno; @@ -75,14 +75,14 @@ int ptsname_r (int fd, char *buf, size_t buflen) return EINVAL; } -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ if (!isatty (fd)) { errno = ENOTTY; return ENOTTY; } #elif !defined TIOCGPTN -# error "UNIX98PTY_ONLY enabled but TIOCGPTN ioctl not supported by your kernel." +# error "__UNIX98PTY_ONLY__ enabled but TIOCGPTN ioctl not supported by your kernel." #endif #ifdef TIOCGPTN if (ioctl (fd, TIOCGPTN, &ptyno) == 0) @@ -113,7 +113,7 @@ int ptsname_r (int fd, char *buf, size_t buflen) return 0; } |