summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2015-01-31 23:10:56 +0000
committerchristos <christos@NetBSD.org>2015-01-31 23:10:56 +0000
commit089dbe7b788ff9f2c3ce4ec3b05030ca2f38c3fa (patch)
tree23cc722359f7f16b203951ad25e7cc178f386e6a /lib/libc/sys
parente82883bb5b44818c185f703c2e63274e464bb907 (diff)
PR/49617: Kirk Russell: posix_fallocate() should be returning an error on
failure, without setting errno, so make it PSEUDO_NOERROR, by adding a new category GLUENOERR.
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/Makefile.inc34
1 files changed, 29 insertions, 5 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index b9ceb2e4acd..e75f54063a2 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.226 2014/12/10 00:37:30 pooka Exp $
+# $NetBSD: Makefile.inc,v 1.227 2015/01/31 23:10:56 christos Exp $
# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
# sys sources
@@ -30,10 +30,10 @@ CLEANFILES+= ${_LSRC:MLintSys*.c}
# glue to provide compatibility between GCC 1.X and 2.X and for compat
# with old syscall interfaces.
-GLUE+= fdiscard.c ftruncate.c lseek.c mmap.c posix_fallocate.c \
+GLUE+= fdiscard.c ftruncate.c lseek.c mmap.c \
pread.c preadv.c pwrite.c pwritev.c truncate.c ntp_adjtime.c \
mknodat.c
-
+GLUENOERR+= posix_fallocate.c
GLUE50+= adjtime.c clock_settime.c settimeofday.c
# 'glue' files might .c or .S depending on the architecture
@@ -54,6 +54,23 @@ ASM_GLUE+= tmp_${glue:.c=.S}
.endfor
# 'glue' files might .c or .S depending on the architecture
+.for glue in ${GLUENOERR}
+. if exists(${glue:.c=.S})
+# Build the ASM glue file
+SRCS+=${glue:.c=.S}
+. else
+. if exists(__${glue:.c=.S})
+SRCS+=__${glue:.c=.S} ${glue}
+. else
+# Build the C glue file
+SRCS+= ${glue}
+# and an asm entry for __<syscall>
+ASM_GLUENOERR+= tmp_${glue:.c=.S}
+. endif
+. endif
+.endfor
+
+# 'glue' files might .c or .S depending on the architecture
.for glue in ${GLUE50}
. if exists(${glue:.c=.S})
# Build the ASM glue file
@@ -163,8 +180,11 @@ NOERR= getegid.S geteuid.S getgid.S getpid.S getppid.S getuid.S \
PSEUDONOERR= _exit.S
-SRCS+= ${ASM} ${WEAKASM} ${NOERR} ${PSEUDONOERR} ${ASM_GLUE}
-CLEANFILES+= ${ASM} ${WEAKASM} ${NOERR} ${PSEUDONOERR} ${ASM_GLUE}
+_GENFILES= ${ASM} ${WEAKASM} ${NOERR} ${PSEUDONOERR} \
+ ${ASM_GLUE} ${ASM_GLUENOERR}
+
+SRCS+= ${_GENFILES}
+CLEANFILES+= ${_GENFILES}
ASMDEPS= ${.CURDIR}/sys/Makefile.inc ${ARCHDIR}/SYS.h \
${DESTDIR}/usr/include/sys/syscall.h
@@ -180,6 +200,10 @@ ${ASM_GLUE}: ${ASMDEPS}
${_MKTARGET_CREATE}
printf '#include "SYS.h"\nPSEUDO(${.PREFIX:S/tmp_/__/},${.PREFIX:S/tmp_//})\n' >${.TARGET}
+${ASM_GLUENOERR}: ${ASMDEPS}
+ ${_MKTARGET_CREATE}
+ printf '#include "SYS.h"\nPSEUDO_NOERROR(${.PREFIX:S/tmp_/__/},${.PREFIX:S/tmp_//})\n' >${.TARGET}
+
${WEAKASM}: ${ASMDEPS}
${_MKTARGET_CREATE}
printf '#include "SYS.h"\nWSYSCALL(${.PREFIX},_sys_${.PREFIX})\nWEAK_ALIAS(_${.PREFIX},_sys_${.PREFIX})\n' >${.TARGET}