diff --git a/configure.in b/configure.in index 2b414b9d5..3cb47c23f 100644 --- a/configure.in +++ b/configure.in @@ -397,9 +397,6 @@ AC_OUTPUT( coregrind/arm/Makefile coregrind/x86/Makefile coregrind/linux/Makefile - coregrind/amd64-linux/Makefile - coregrind/arm-linux/Makefile - coregrind/x86-linux/Makefile addrcheck/Makefile addrcheck/tests/Makefile addrcheck/docs/Makefile diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index ade1a6d46..22b840898 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -13,11 +13,11 @@ MODULES = \ ## But when doing 'make dist', we are interested in every arch/OS/platform. ## That's what DIST_SUBDIRS specifies. SUBDIRS = \ - $(VG_ARCH) $(VG_OS) $(VG_PLATFORM) \ + $(VG_ARCH) $(VG_OS) \ $(MODULES) . DIST_SUBDIRS = \ - $(VG_ARCH_ALL) $(VG_OS_ALL) $(VG_PLATFORM_ALL) \ + $(VG_ARCH_ALL) $(VG_OS_ALL) \ $(MODULES) . AM_CPPFLAGS += -DVG_LIBDIR="\"$(valdir)"\" \ @@ -57,7 +57,11 @@ noinst_HEADERS = \ pub_core_transtab_asm.h \ ume.h \ vg_symtab2.h \ - vg_symtypes.h + vg_symtypes.h \ + vki_unistd.h \ + vki_unistd-amd64-linux.h\ + vki_unistd-arm-linux.h \ + vki_unistd-x86-linux.h EXTRA_DIST = \ valgrind.vs \ diff --git a/coregrind/amd64-linux/Makefile.am b/coregrind/amd64-linux/Makefile.am deleted file mode 100644 index c485764a8..000000000 --- a/coregrind/amd64-linux/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -include $(top_srcdir)/Makefile.all.am -include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am - -noinst_HEADERS = \ - vki_unistd.h diff --git a/coregrind/arm-linux/Makefile.am b/coregrind/arm-linux/Makefile.am deleted file mode 100644 index c485764a8..000000000 --- a/coregrind/arm-linux/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -include $(top_srcdir)/Makefile.all.am -include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am - -noinst_HEADERS = \ - vki_unistd.h diff --git a/coregrind/amd64-linux/vki_unistd.h b/coregrind/vki_unistd-amd64-linux.h similarity index 99% rename from coregrind/amd64-linux/vki_unistd.h rename to coregrind/vki_unistd-amd64-linux.h index 0c94fa7ef..d6cd28da0 100644 --- a/coregrind/amd64-linux/vki_unistd.h +++ b/coregrind/vki_unistd-amd64-linux.h @@ -24,8 +24,8 @@ The GNU General Public License is contained in the file COPYING. */ -#ifndef __AMD64_LINUX_VKI_UNISTD_H_ -#define __AMD64_LINUX_VKI_UNISTD_H_ +#ifndef __VKI_UNISTD_AMD64_LINUX_H +#define __VKI_UNISTD_AMD64_LINUX_H // From linux-2.6.9/include/asm-x86_64/unistd.h @@ -326,4 +326,4 @@ #define __NR_waitid 247 -#endif /* __AMD64_LINUX_VKI_UNISTD_H_ */ +#endif /* __VKI_UNISTD_AMD64_LINUX_H */ diff --git a/coregrind/arm-linux/vki_unistd.h b/coregrind/vki_unistd-arm-linux.h similarity index 99% rename from coregrind/arm-linux/vki_unistd.h rename to coregrind/vki_unistd-arm-linux.h index 6ecfc9714..21ae8b563 100644 --- a/coregrind/arm-linux/vki_unistd.h +++ b/coregrind/vki_unistd-arm-linux.h @@ -24,8 +24,8 @@ The GNU General Public License is contained in the file COPYING. */ -#ifndef __ARM_LINUX_VKI_UNISTD_H_ -#define __ARM_LINUX_VKI_UNISTD_H_ +#ifndef __VKI_UNISTD_ARM_LINUX_H +#define __VKI_UNISTD_ARM_LINUX_H // From linux-2.6.8.1/include/asm-arm/unistd.h @@ -308,4 +308,4 @@ #define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) #define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) -#endif /* __ARM_LINUX_VKI_UNISTD_H_ */ +#endif /* __VKI_UNISTD_ARM_LINUX_H */ diff --git a/coregrind/x86-linux/vki_unistd.h b/coregrind/vki_unistd-x86-linux.h similarity index 98% rename from coregrind/x86-linux/vki_unistd.h rename to coregrind/vki_unistd-x86-linux.h index a03cdcfb1..f46af8cf8 100644 --- a/coregrind/x86-linux/vki_unistd.h +++ b/coregrind/vki_unistd-x86-linux.h @@ -24,8 +24,8 @@ The GNU General Public License is contained in the file COPYING. */ -#ifndef __X86_LINUX_VKI_UNISTD_H_ -#define __X86_LINUX_VKI_UNISTD_H_ +#ifndef __VKI_UNISTD_X86_LINUX_H +#define __VKI_UNISTD_X86_LINUX_H // From linux-2.6.9/include/asm-i386/unistd.h @@ -315,4 +315,4 @@ #define __NR_sys_kexec_load 283 #define __NR_wait 284 -#endif /* __X86_LINUX_VKI_UNISTD_H_ */ +#endif /* __VKI_UNISTD_X86_LINUX_H */ diff --git a/coregrind/vki_unistd.h b/coregrind/vki_unistd.h new file mode 100644 index 000000000..4953c1dd6 --- /dev/null +++ b/coregrind/vki_unistd.h @@ -0,0 +1,49 @@ + +/*--------------------------------------------------------------------*/ +/*--- Generic header for Valgrind's kernel interface. ---*/ +/*--- vki_unistd.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + Copyright (C) 2005 Nicholas Nethercote + njn@valgrind.org + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program 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 + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __VKI_UNISTD_H +#define __VKI_UNISTD_H + +#if defined(VGP_x86_linux) +# include "vki_unistd-x86-linux.h" +#elif defined(VGP_amd64_linux) +# include "vki_unistd-amd64-linux.h" +#elif defined(VGP_arm_linux) +# include "vki_unistd-arm-linux.h" +#else +# error Unknown platform +#endif + +#endif // __VKI_UNISTD_H + +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ diff --git a/coregrind/x86-linux/.cvsignore b/coregrind/x86-linux/.cvsignore deleted file mode 100644 index 282522db0..000000000 --- a/coregrind/x86-linux/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/coregrind/x86-linux/Makefile.am b/coregrind/x86-linux/Makefile.am deleted file mode 100644 index c485764a8..000000000 --- a/coregrind/x86-linux/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -include $(top_srcdir)/Makefile.all.am -include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am - -noinst_HEADERS = \ - vki_unistd.h diff --git a/memcheck/tests/x86/scalar.h b/memcheck/tests/x86/scalar.h index f9e1c99aa..3fa86c911 100644 --- a/memcheck/tests/x86/scalar.h +++ b/memcheck/tests/x86/scalar.h @@ -1,4 +1,4 @@ -#include "../../../coregrind/x86-linux/vki_unistd.h" +#include "../../../coregrind/vki_unistd-x86-linux.h" #include #include