mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
37f802f864
__need_FOPEN_MAX wasn't being used anywhere. __need_IOV_MAX was more complicated; the basic deal is that sys/uio.h wants to define a constant named UIO_MAXIOV and bits/xopen_lim.h wants to define a constant named IOV_MAX, with the same meaning. For no apparent reason this was being handled via bits/stdio_lim.h -- stdio.h is NOT supposed to define IOV_MAX -- and some mess in Makerules. Also, bits/uio.h on Linux was being used as a dumping ground for extension functions. So now we have bits/uio_lim.h, which defines __IOV_MAX. bits/xopen_lim.h and sys/uio.h use that to define their respective constants. We also now have bits/uio-ext.h, which is the official Proper Home for extensions to sys/uio.h. bits/uio.h is removed, and stdio_lim.h doesn't define IOV_MAX at all. * bits/uio_lim.h, sysdeps/unix/sysv/linux/bits/uio_lim.h * bits/uio-ext.h, sysdeps/unix/sysv/linux/bits/uio-ext.h: New file. * bits/uio.h, sysdeps/unix/sysv/linux/bits/uio.h: Delete file. * include/bits/xopen_lim.h: Use bits/uio_lim.h to get the value for IOV_MAX. * misc/Makefile: Install bits/uio-ext.h and bits/uio_lim.h. Don't install bits/uio.h. * misc/sys/uio.h: Don't include bits/uio.h. Do include bits/types/struct_iovec.h and bits/uio_lim.h. Set UIO_MAXIOV based on __IOV_MAX. Under __USE_GNU, also include bits/uio-ext.h. * stdio-common/stdio_lim.h.in: Remove logic for __need_FOPEN_MAX and __need_IOV_MAX. Don't define IOV_MAX at all. * Makerules (stdio_lim.h): Remove logic for setting IOV_MAX. * sysdeps/unix/sysv/linux/bits/fcntl-linux.h: Include bits/types/struct_iovec.h, not bits/uio.h. Use __ssize_t, not ssize_t, in function prototypes. Don't use hard TAB for double space after period in comments.
140 lines
5.2 KiB
Makefile
140 lines
5.2 KiB
Makefile
# Copyright (C) 1991-2017 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, see
|
|
# <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
# Sub-makefile for misc portion of the library.
|
|
#
|
|
|
|
subdir := misc
|
|
|
|
include ../Makeconfig
|
|
|
|
headers := sys/uio.h bits/uio-ext.h bits/uio_lim.h \
|
|
sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \
|
|
sys/ptrace.h sys/file.h sys/dir.h sys/cdefs.h \
|
|
ar.h a.out.h libgen.h stab.h bits/stab.def sgtty.h \
|
|
ttyent.h paths.h sys/reboot.h \
|
|
sys/mman.h sys/param.h bits/param.h \
|
|
fstab.h mntent.h search.h err.h error.h \
|
|
sys/queue.h sysexits.h syscall.h sys/syscall.h sys/swap.h \
|
|
sys/select.h ustat.h sys/ustat.h bits/ustat.h sys/sysinfo.h \
|
|
regexp.h bits/select.h bits/mman.h sys/xattr.h \
|
|
syslog.h sys/syslog.h \
|
|
bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h bits/error.h \
|
|
bits/select2.h bits/hwcap.h sys/auxv.h \
|
|
sys/sysmacros.h bits/sysmacros.h bits/types/struct_iovec.h
|
|
|
|
routines := brk sbrk sstk ioctl \
|
|
readv writev preadv preadv64 pwritev pwritev64 \
|
|
preadv2 preadv64v2 pwritev2 pwritev64v2 \
|
|
setreuid setregid \
|
|
seteuid setegid \
|
|
getpagesize \
|
|
getdtsz \
|
|
gethostname sethostname getdomain setdomain \
|
|
select pselect \
|
|
acct chroot fsync sync fdatasync syncfs reboot \
|
|
gethostid sethostid \
|
|
revoke vhangup \
|
|
swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \
|
|
mkostemp mkostemp64 mkstemps mkstemps64 mkostemps mkostemps64 \
|
|
ualarm usleep \
|
|
gtty stty \
|
|
ptrace \
|
|
fstab mntent mntent_r \
|
|
utimes lutimes futimes futimesat \
|
|
truncate ftruncate truncate64 ftruncate64 \
|
|
chflags fchflags \
|
|
insremque getttyent getusershell getpass ttyslot \
|
|
syslog syscall daemon \
|
|
mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\
|
|
mlock munlock mlockall munlockall \
|
|
efgcvt efgcvt_r qefgcvt qefgcvt_r \
|
|
hsearch hsearch_r tsearch lsearch \
|
|
err error ustat \
|
|
getsysstats dirname regexp \
|
|
getloadavg getclktck \
|
|
fgetxattr flistxattr fremovexattr fsetxattr getxattr \
|
|
listxattr lgetxattr llistxattr lremovexattr lsetxattr \
|
|
removexattr setxattr getauxval ifunc-impl-list makedev
|
|
|
|
generated += tst-error1.mtrace tst-error1-mem.out
|
|
|
|
aux := init-misc
|
|
install-lib := libg.a
|
|
gpl2lgpl := error.c error.h
|
|
|
|
tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
|
|
tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 \
|
|
tst-mntent-blank-corrupt tst-mntent-blank-passno bug18240 \
|
|
tst-preadvwritev tst-preadvwritev64 tst-makedev tst-empty \
|
|
tst-preadvwritev2 tst-preadvwritev64v2
|
|
|
|
tests-internal := tst-atomic tst-atomic-long
|
|
tests-static := tst-empty
|
|
|
|
ifeq ($(run-built-tests),yes)
|
|
tests-special += $(objpfx)tst-error1-mem.out
|
|
endif
|
|
|
|
CFLAGS-select.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-tsearch.c = $(uses-callbacks)
|
|
CFLAGS-lsearch.c = $(uses-callbacks)
|
|
CFLAGS-pselect.c = -fexceptions
|
|
CFLAGS-readv.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-writev.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-preadv.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-preadv64.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pwritev.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pwritev64.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-preadv2.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-preadv64v2.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pwritev2.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pwritev64v2.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-usleep.c = -fexceptions
|
|
CFLAGS-syslog.c = -fexceptions
|
|
CFLAGS-error.c = -fexceptions
|
|
CFLAGS-getpass.c = -fexceptions
|
|
CFLAGS-mkstemp.c = -fexceptions
|
|
CFLAGS-mkstemp64.c = -fexceptions
|
|
CFLAGS-getsysstats.c = -fexceptions
|
|
CFLAGS-getusershell.c = -fexceptions
|
|
CFLAGS-err.c = -fexceptions
|
|
CFLAGS-tst-tsearch.c = $(stack-align-test-flags)
|
|
CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-fsync.c = -fexceptions -fasynchronous-unwind-tables
|
|
|
|
# Called during static library initialization, so turn stack-protection
|
|
# off for non-shared builds.
|
|
CFLAGS-sbrk.o = $(no-stack-protector)
|
|
CFLAGS-sbrk.op = $(no-stack-protector)
|
|
CFLAGS-brk.o = $(no-stack-protector)
|
|
CFLAGS-brk.op = $(no-stack-protector)
|
|
|
|
include ../Rules
|
|
|
|
$(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib)
|
|
|
|
$(objpfx)tst-tsearch: $(libm)
|
|
|
|
tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace
|
|
tst-error1-ARGS = $(objpfx)tst-error1.out
|
|
$(objpfx)tst-error1-mem.out: $(objpfx)tst-error1.out
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@; \
|
|
$(evaluate-test)
|