about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/Makefile9
-rw-r--r--sysdeps/unix/sysv/linux/sys/syscall.h4
2 files changed, 11 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 4ab97b2e92..2004a48b42 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -13,6 +13,8 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \
 		  sys/debugreg.h sys/kd.h sys/soundcard.h sys/vt.h \
 		  sys/quota.h
 
+install-others += $(inst_includedir)/bits/syscall.h
+
 # Generate the list of SYS_* macros for the system calls (__NR_* macros).
 $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h
 	rm -f $(@:.h=.d)
@@ -24,6 +26,13 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscal
 	sed -n >> $(@:.d=.h).new \
 	      's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p'
 	mv -f $(@:.d=.h).new $(@:.d=.h)
+
+$(inst_includedir)/bits/syscall.h: $(objpfx)syscall-list.h
+	$(make-target-directory)
+	if test -r $@ && cmp -s $< $@; \
+        then echo 'bits/syscall.h unchanged'; \
+        else $(INSTALL_DATA) $< $@; fi
+
 ifndef no_deps
 # Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
 -include $(objpfx)syscall-list.d
diff --git a/sysdeps/unix/sysv/linux/sys/syscall.h b/sysdeps/unix/sysv/linux/sys/syscall.h
index d6b14fcf0a..7eca4f086a 100644
--- a/sysdeps/unix/sysv/linux/sys/syscall.h
+++ b/sysdeps/unix/sysv/linux/sys/syscall.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 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
@@ -29,7 +29,7 @@
    programs expect the traditional form `SYS_<name>'.  So in building libc
    we scan the kernel's list and produce <bits/syscall.h> with macros for
    all the `SYS_' names.  */
-#include <bits/syscall.h>
+# include <bits/syscall.h>
 #endif
 
 #endif