summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-06-03 08:11:56 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-06-03 08:11:56 +0000
commit4cc4b30426c5e5a0ecf912791e3f27312438d10e (patch)
tree81c31f4bde953f135d9e63582b162c17cc173f10
parent1f124eb0280a5009f1265a9dca49fdb0d95b845e (diff)
- adds several config-options to allow for turning off certain features
like o UCLIBC_HAS_GNU_ERROR o UCLIBC_HAS_BSD_ERR o UCLIBC_HAS_PTY o UCLIBC_HAS_GETPT (1) o UCLIBC_SYSCALL_STUBS o UCLIBC_SYSCALL_STUB_WARNING o UCLIBC_LINUX_SPECIFIC (2) o UCLIBC_BSD_SPECIFIC (3) o UCLIBC_NTP_LEGACY (4) o UCLIBC_SV4_DEPRECATED (5) o UCLIBC_HAVE_REALTIME (6) o UCLIBC_HAVE_ADVANCED_REALTIME (7) o UCLIBC_HAVE_EPOLL (8) o UCLIBC_HAVE_XATTR (9) o UCLIBC_HAVE_PROFILING (10) (1) make non-standard getpt optional and implement standard posix_openpt (2) fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(), personality() ppoll(), setresuid() (3) mincore(), getdomainname(), setdomainname() (4) ntp_adjtime(), ntp_gettime() aliases (5) ustat() [use statfs(2) in your code instead] (6) All marked as "(REALTIME)" in SUSv3 (7) All marked as "(ADVANCED REALTIME)" in SUSv3 (8) epoll_create(), epoll_ctl(), epoll_wait() (9) all Extended Attributes (10) helpers for gcc's -finstrument-functions - Fixes _dl_exit() - Implements sleep(3) for !UCLIBC_HAVE_REALTIME - Implements usleep(3) for !UCLIBC_HAVE_REALTIME - adds #warning about incorrect posix_fadvise{,64}() - removes unused and unwanted uselib() Net outcome is that an allnoconfig with HAVE_SHARED is now about 88k instead of formerly 130k.
-rw-r--r--Makefile.in63
-rw-r--r--TODO4
-rw-r--r--extra/Configs/Config.in282
-rw-r--r--include/fcntl.h4
-rw-r--r--include/mqueue.h8
-rw-r--r--include/netinet/in.h2
-rw-r--r--include/signal.h7
-rw-r--r--include/stdlib.h5
-rw-r--r--include/sys/mman.h10
-rw-r--r--include/sys/poll.h2
-rw-r--r--include/sys/statfs.h2
-rw-r--r--include/sys/timex.h2
-rw-r--r--include/time.h10
-rw-r--r--include/unistd.h9
-rw-r--r--ldso/include/dl-syscall.h6
-rw-r--r--libc/inet/Makefile.in21
-rw-r--r--libc/inet/getaddrinfo.c22
-rw-r--r--libc/inet/hostid.c2
-rw-r--r--libc/inet/if_index.c8
-rw-r--r--libc/inet/resolv.c36
-rw-r--r--libc/inet/socketcalls.c11
-rw-r--r--libc/misc/dirent/Makefile.in4
-rw-r--r--libc/misc/error/Makefile.in8
-rw-r--r--libc/misc/error/err.c3
-rw-r--r--libc/misc/statfs/fstatvfs.c18
-rw-r--r--libc/misc/statfs/statvfs.c5
-rw-r--r--libc/misc/syslog/Makefile.in2
-rw-r--r--libc/misc/sysvipc/sem.c6
-rw-r--r--libc/misc/time/Makefile.in6
-rw-r--r--libc/signal/Makefile.in13
-rw-r--r--libc/signal/sigwait.c62
-rw-r--r--libc/stdlib/Makefile.in10
-rw-r--r--libc/stdlib/_atexit.c1
-rw-r--r--libc/stdlib/bsd_getpt.c2
-rw-r--r--libc/stdlib/getpt.c40
-rw-r--r--libc/sysdeps/linux/common/Makefile.in49
-rw-r--r--libc/sysdeps/linux/common/adjtimex.c2
-rw-r--r--libc/sysdeps/linux/common/fstatfs.c26
-rw-r--r--libc/sysdeps/linux/common/getdomainname.c16
-rw-r--r--libc/sysdeps/linux/common/getdtablesize.c3
-rw-r--r--libc/sysdeps/linux/common/getpgid.c3
-rw-r--r--libc/sysdeps/linux/common/getpgrp.c1
-rw-r--r--libc/sysdeps/linux/common/getrlimit.c2
-rw-r--r--libc/sysdeps/linux/common/mincore.c4
-rw-r--r--libc/sysdeps/linux/common/mprotect.c2
-rw-r--r--libc/sysdeps/linux/common/msync.c6
-rw-r--r--libc/sysdeps/linux/common/munlockall.c4
-rw-r--r--libc/sysdeps/linux/common/nanosleep.c3
-rw-r--r--libc/sysdeps/linux/common/poll.c2
-rw-r--r--libc/sysdeps/linux/common/posix_fadvise.c1
-rw-r--r--libc/sysdeps/linux/common/posix_fadvise64.c1
-rw-r--r--libc/sysdeps/linux/common/ppoll.c2
-rw-r--r--libc/sysdeps/linux/common/ptrace.c5
-rw-r--r--libc/sysdeps/linux/common/quotactl.c3
-rw-r--r--libc/sysdeps/linux/common/sbrk.c2
-rw-r--r--libc/sysdeps/linux/common/select.c3
-rw-r--r--libc/sysdeps/linux/common/seteuid.c5
-rw-r--r--libc/sysdeps/linux/common/setpgid.c3
-rw-r--r--libc/sysdeps/linux/common/setresuid.c2
-rw-r--r--libc/sysdeps/linux/common/sigaltstack.c3
-rw-r--r--libc/sysdeps/linux/common/sigpending.c3
-rw-r--r--libc/sysdeps/linux/common/sigprocmask.c3
-rw-r--r--libc/sysdeps/linux/common/sigqueue.c2
-rw-r--r--libc/sysdeps/linux/common/sigsuspend.c3
-rw-r--r--libc/sysdeps/linux/common/statfs.c12
-rw-r--r--libc/sysdeps/linux/common/symlink.c2
-rw-r--r--libc/sysdeps/linux/common/sync.c7
-rw-r--r--libc/sysdeps/linux/common/sysctl.c15
-rw-r--r--libc/sysdeps/linux/common/sysfs.c5
-rw-r--r--libc/sysdeps/linux/common/tee.c12
-rw-r--r--libc/sysdeps/linux/common/truncate64.c2
-rw-r--r--libc/sysdeps/linux/common/umount.c3
-rw-r--r--libc/sysdeps/linux/common/umount2.c5
-rw-r--r--libc/sysdeps/linux/common/uselib.c3
-rw-r--r--libc/sysdeps/linux/common/utimes.c1
-rw-r--r--libc/sysdeps/linux/common/wait3.c5
-rw-r--r--libc/sysdeps/linux/common/wait4.c2
-rw-r--r--libc/sysdeps/linux/common/waitid.c3
-rw-r--r--libc/sysdeps/linux/i386/sys/io.h2
-rw-r--r--libc/unistd/fpathconf.c20
-rw-r--r--libc/unistd/pathconf.c5
-rw-r--r--libc/unistd/sleep.c55
-rw-r--r--libc/unistd/usleep.c14
-rw-r--r--librt/Makefile.in5
-rw-r--r--librt/mq_receive.c1
-rw-r--r--librt/mq_send.c1
-rw-r--r--libutil/Makefile.in4
-rw-r--r--libutil/openpty.c2
88 files changed, 892 insertions, 154 deletions
diff --git a/Makefile.in b/Makefile.in
index 1608dc7da..b593a64dc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -221,6 +221,69 @@ ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
# Remove this as it is only used internally.
$(RM) $(PREFIX)$(DEVEL_PREFIX)include/tls.h
endif
+ifneq ($(UCLIBC_HAS_GNU_ERROR),y)
+ # Remove error.h upon request
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/error.h
+endif
+ifneq ($(UCLIBC_HAS_BSD_ERR),y)
+ # Remove err.h upon request
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/err.h
+endif
+ifneq ($(UCLIBC_SUSV3_LEGACY),y)
+ # Remove timeb.h since the LEGACY ftime() was disabled upon request
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/timeb.h
+endif
+ifneq ($(UCLIBC_HAS_EPOLL),y)
+ # Remove epoll.h since epoll_*() were disabled upon request
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/epoll.h
+endif
+ifneq ($(UCLIBC_HAS_XATTR),y)
+ # Remove xattr.h since extended attributes were disabled upon request
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/xattr.h
+endif
+ifneq ($(UCLIBC_SV4_DEPRECATED),y)
+ # Remove ustst.h since ustat was disabled upon request
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ustat.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/ustat.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/ustat.h
+endif
+ifneq ($(UCLIBC_HAS_PTY),y)
+ # Remove pty.h since PTY support was disabled upon request
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/pty.h
+endif
+ifneq ($(UCLIBC_LINUX_SPECIFIC),y)
+ # Remove linux-specific headers as requested
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/inotify.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/perm.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/personality.h
+endif
+ifneq ($(UCLIBC_SV4_DEPRECATED),y)
+ # Remove ustat.h since deprecated SV4 support was disabled upon request
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ustat.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/ustat.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/ustat.h
+endif
+ifeq ($(UCLIBC_HAS_REALTIME)$(UCLIBC_HAS_ADVANCED_REALTIME),)
+ # Remove SUSv-realtime related message-queue headers upon request
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/mqueue.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/mqueue.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/mqueue.h
+endif
+ifneq ($(UCLIBC_HAS_REALTIME),y)
+ # Remove SUSv-realtime related headers upon request
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sched.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sched.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/sched.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/semaphore.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/semaphore.h
+endif
+ifneq ($(UCLIBC_HAS_SOCKET),y)
+ # Remove socket related headers upon request
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/socket.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/socket.h
+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/socketvar.h
+endif
# Installs development library links.
install_dev: install_headers
diff --git a/TODO b/TODO
index 3a8be1d46..fa5a9bbf5 100644
--- a/TODO
+++ b/TODO
@@ -144,6 +144,10 @@ Manuel's todo:
e) Allow use of the older non-table-based ctype functions when using
stub locale support. (smaller)
f) __drand48_iterate should be void
+ g) alphasort vs. versionsort. The former seems to be SVID, the latter GNU
+ i.e. reverse to what we currently do. The latter is unimplemented.
+ h) ponder removal/configs to turn off: __xpg_*, bsd_signal, dysize,
+ getw/putw, utimes,
2) Additional str{f|p}time issues.
----------------------------------
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index 7372f260e..8ac002d41 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -357,7 +357,7 @@ config HAS_NO_THREADS
default n
config UCLIBC_HAS_THREADS
- bool "POSIX Threading Support"
+ bool "POSIX Threading support"
depends on !HAS_NO_THREADS
default y
help
@@ -399,6 +399,15 @@ config LINUXTHREADS_OLD
the latest code from glibc, so it may be the only choice for the
newer ports (like alpha/amd64/64bit arches and hppa).
+config UCLIBC_HAS_SYSLOG
+ bool "Syslog support"
+ default y
+ depends on UCLIBC_HAS_NETWORK_SUPPORT
+ select UCLIBC_HAS_SOCKET
+ help
+ Support sending messages to the system logger.
+ This requires socket-support.
+
config UCLIBC_HAS_LFS
bool "Large File Support"
default y
@@ -493,7 +502,7 @@ config UCLIBC_SUSV3_LEGACY
help
Enable this option if you want to have SuSv3 LEGACY functions
in the library, else they are replaced by SuSv3 proposed macros.
- Currently applies to bcopy/bzero/bcmp/index/rindex.
+ Currently applies to bcopy/bzero/bcmp/index/rindex/ftime.
WARNING! ABI incompatibility.
config UCLIBC_SUSV3_LEGACY_MACROS
@@ -538,17 +547,40 @@ config UCLIBC_HAS___PROGNAME
If unsure, just answer N.
+config UCLIBC_HAS_PTY
+ bool "Support for pseudo-terminals"
+ default y
+ help
+ This enables support for pseudo-terminals (see man 4 pts
+ and man 7 pty).
+
+ If unsure, just answer Y.
+
config UNIX98PTY_ONLY
bool "Support only Unix 98 PTYs"
default y
+ depends on UCLIBC_HAS_PTY
help
If you want to support only Unix 98 PTYs enable this. Some older
applications may need this disabled. For most current programs,
you can generally answer Y.
+config UCLIBC_HAS_GETPT
+ bool "Support getpt() (glibc-compat)"
+ default n
+ depends on UCLIBC_HAS_PTY
+ help
+ Some packages may need getpt().
+ All of those are non-standard and can be considered
+ GNU/libc compatibility.
+ Either use posix_openpt() or just open /dev/ptmx yourself.
+
+ If unsure, just say N.
+
config ASSUME_DEVPTS
bool "Assume that /dev/pts is a devpts or devfs file system"
default y
+ depends on UCLIBC_HAS_PTY
help
Enable this if /dev/pts is on a devpts or devfs filesystem. Both
these filesystems automatically manage permissions on the /dev/pts
@@ -649,6 +681,8 @@ config UCLIBC_GRP_BUFFER_SIZE
The value can be found using sysconf() with the _SC_GETGR_R_SIZE_MAX
parameter.
+comment "Support various families of functions"
+
config UCLIBC_LINUX_MODULE_24
bool "Linux kernel module functions"
default y
@@ -659,13 +693,250 @@ config UCLIBC_LINUX_MODULE_24
Say N if you do not use kernel modules.
+config UCLIBC_LINUX_SPECIFIC
+ bool "Linux specific functions"
+ default y
+ help
+ fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(),
+ personality(), ppoll(), setresuid()
+
+config UCLIBC_HAS_GNU_ERROR
+ bool "Support GNU extensions for error-reporting"
+ default y
+ help
+ Support for the GNU-specific error(), error_at_line(),
+ void (* error_print_progname)(), error_message_count
+ functions and variables. Some GNU packages
+ utilize these for extra useful output, but in general
+ are not required.
+
+ If unsure, just answer N.
+
+config UCLIBC_BSD_SPECIFIC
+ bool "BSD specific functions"
+ default y
+ help
+ mincore(), getdomainname(), setdomainname()
+
+ If unsure, say N.
+
+config UCLIBC_HAS_BSD_ERR
+ bool "BSD err functions"
+ default y
+ help
+ These functions are non-standard BSD extensions.
+ err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx()
+
+ If unsure, say N.
+
+config UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
+ bool "BSD obsolete signal functions"
+ default n
+ help
+ These functions are provided as a compatibility interface for
+ programs that make use of the historical System V signal API.
+ This API is obsolete:
+ new applications should use the POSIX signal API (sigaction(2),
+ sigprocmask(2), etc.).
+ Affected functions:
+
+ sigset(), sighold(), sigrelse(), sigignore()
+
+ If unsure, say N.
+
+config UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL
+ bool "SYSV obsolete signal functions"
+ default n
+ help
+ Use of sysv_signal() should be avoided; use sigaction(2) instead.
+
+ If unsure, say N.
+
+config UCLIBC_NTP_LEGACY
+ bool "ntp_*() aliases"
+ default n
+ help
+ Provide legacy aliases for ntp functions:
+ ntp_adjtime(), ntp_gettime()
+
+ It is safe to say N here.
+
+config UCLIBC_SV4_DEPRECATED
+ bool "Enable SVr4 deprecated functions"
+ default n
+ help
+ These functions are DEPRECATED in System V release 4.
+ Say N unless you desparately need one of the functions below:
+
+ ustat() [use statfs(2) in your code instead]
+
+config UCLIBC_HAS_REALTIME
+ bool "Realtime-related family of SUSv functions"
+ default y
+ # glitch in mq_{send,receive} currently forces this on
+ select UCLIBC_HAS_ADVANCED_REALTIME
+ help
+ These functions are part of the Timers option and need not
+ be available on all implementations.
+ Includes AIO, message-queue, scheduler, semaphore functions:
+
+ aio.h
+ mqueue.h
+ sched.h
+ semaphore.h
+
+ aio_cancel()
+ aio_error()
+ aio_fsync()
+ aio_read()
+ lio_listio()
+ aio_return()
+ aio_suspend()
+ aio_write()
+ clock_getres(), clock_gettime(), clock_settime()
+ fdatasync()
+ mlockall(), munlockall()
+ mlock(), munlock()
+ mq_close()
+ mq_getattr()
+ mq_notify()
+ mq_open()
+ mq_receive()
+ mq_send()
+ mq_setattr()
+ mq_unlink()
+ nanosleep()
+ sched_getparam()
+ sched_get_priority_max(), sched_get_priority_min()
+ sched_getscheduler()
+ sched_rr_get_interval()
+ sched_setparam()
+ sched_setscheduler()
+ sem_close()
+ sem_destroy()
+ sem_getvalue()
+ sem_init()
+ sem_open()
+ sem_post()
+ sem_trywait(), sem_wait()
+ sem_unlink()
+ sigqueue()
+ sigtimedwait(), sigwaitinfo()
+ timer_create()
+ timer_delete()
+ timer_getoverrun(), timer_gettime(), timer_settime()
+
+config UCLIBC_HAS_ADVANCED_REALTIME
+ bool "Advanced realtime-related family of SUSv functions"
+ default y
+ depends on UCLIBC_HAS_REALTIME
+ help
+ These functions are part of the Timers option and need not
+ be available on all implementations.
+
+ clock_getcpuclockid()
+ clock_nanosleep()
+ mq_timedreceive()
+ mq_timedsend()
+ posix_fadvise()
+ posix_fallocate()
+ posix_madvise()
+ posix_memalign()
+ posix_mem_offset()
+ posix_spawnattr_destroy(), posix_spawnattr_init()
+ posix_spawnattr_getflags(), posix_spawnattr_setflags()
+ posix_spawnattr_getpgroup(), posix_spawnattr_setpgroup()
+ posix_spawnattr_getschedparam(), posix_spawnattr_setschedparam()
+ posix_spawnattr_getschedpolicy(), posix_spawnattr_setschedpolicy()
+ posix_spawnattr_getsigdefault(), posix_spawnattr_setsigdefault()
+ posix_spawnattr_getsigmask(), posix_spawnattr_setsigmask()
+ posix_spawn_file_actions_addclose()
+ posix_spawn_file_actions_adddup2()
+ posix_spawn_file_actions_addopen()
+ posix_spawn_file_actions_destroy()
+ posix_spawn_file_actions_init()
+ posix_spawn()
+ posix_spawnp()
+ posix_typed_mem_get_info()
+ pthread_mutex_timedlock()
+ sem_timedwait()
+
+#config UCLIBC_HAS_TERMIOS
+# bool "termios functions"
+# default y
+# help
+# Get and set terminal attributes, line control, get and set baud
+# rate.
+# termios(), tcgetattr(), tcsetattr(), tcsendbreak(), tcdrain(),
+# tcflush(), tcflow(), cfmakeraw(), cfgetospeed(), cfgetispeed(),
+# cfsetispeed(), cfsetospeed(), cfsetspeed()
+#
+# If unsure, say Y.
+
+config UCLIBC_HAS_EPOLL
+ bool "epoll"
+ default y
+ help
+ epoll_create(), epoll_ctl(), epoll_wait() functions.
+
+config UCLIBC_HAS_XATTR
+ bool "Extended Attributes"
+ default y
+ help
+ Extended Attributes support.
+
+ setxattr()
+ lsetxattr()
+ fsetxattr()
+ getxattr()
+ lgetxattr()
+ fgetxattr()
+ listxattr()
+ llistxattr()
+ flistxattr()
+ removexattr()
+ lremovexattr()
+ fremovexattr()
+
+ Say N unless you need support for extended attributes and the
+ filesystems do actually support them.
+
+config UCLIBC_HAS_PROFILING
+ bool "Profiling support"
+ default y
+ help
+ gcc's -finstrument-functions needs these.
+
+ Most people can safely answer N.