]> Zhao Yanbai Git Server - minix.git/commitdiff
Move elf headers in common/include and libexec.h in lib/libexec.
authorGianluca Guida <gianluca@minix3.org>
Fri, 18 Mar 2011 15:13:05 +0000 (15:13 +0000)
committerGianluca Guida <gianluca@minix3.org>
Fri, 18 Mar 2011 15:13:05 +0000 (15:13 +0000)
It also fixes elf headers for NBSD compilation.

common/include/sys/Makefile.inc
common/include/sys/elf32.h [moved from include/sys/elf32.h with 100% similarity]
common/include/sys/elf64.h [moved from include/sys/elf64.h with 100% similarity]
common/include/sys/elf_common.h [moved from include/sys/elf_common.h with 100% similarity]
common/include/sys/elf_generic.h [moved from include/sys/elf_generic.h with 89% similarity]
include/Makefile
include/sys/Makefile
lib/libexec/Makefile
lib/libexec/libexec.h [moved from include/libexec.h with 100% similarity]

index e5b9fbd15a64281f47ed32cea161ef95dbbc657d..3ea277505aed4910f8c310a4fe28fcc4a450bbc0 100644 (file)
@@ -2,7 +2,8 @@
 
 .PATH: ${MINIXSRCDIR}/common/include/sys
 
-INCS+=         ioc_cmos.h ioc_file.h ioc_scsi.h ioc_tape.h \
+INCS+=         elf32.h elf64.h elf_common.h elf_generic.h \
+       ioc_cmos.h ioc_file.h ioc_scsi.h ioc_tape.h \
        ioc_disk.h ioc_memory.h ioc_sound.h ioc_tty.h \
        kbdio.h mtio.h svrctl.h video.h vm.h
 
similarity index 89%
rename from include/sys/elf_generic.h
rename to common/include/sys/elf_generic.h
index 95a682f25941f92d34f73b50e9c70f2e7623fcd2..a96afe3e19f13c01f1657d34fe7aafd8db602b64 100644 (file)
 #error "Unknown byte order"
 #endif
 
+#ifdef __NBSD_LIBC
+#define CONCAT(x,y)    __CONCAT(x,y)
+#define        __elfN(x)       CONCAT(CONCAT(CONCAT(elf,__ELF_WORD_SIZE),_),x)
+#define        __ElfN(x)       CONCAT(CONCAT(CONCAT(Elf,__ELF_WORD_SIZE),_),x)
+#define        __ELFN(x)       CONCAT(CONCAT(CONCAT(ELF,__ELF_WORD_SIZE),_),x)
+#define        __ElfType(x)    typedef __ElfN(x) __CONCAT(Elf_,x)
+#else
 #define        __elfN(x)       __CONCAT(__CONCAT(__CONCAT(elf,__ELF_WORD_SIZE),_),x)
 #define        __ElfN(x)       __CONCAT(__CONCAT(__CONCAT(Elf,__ELF_WORD_SIZE),_),x)
 #define        __ELFN(x)       __CONCAT(__CONCAT(__CONCAT(ELF,__ELF_WORD_SIZE),_),x)
 #define        __ElfType(x)    typedef __ElfN(x) __CONCAT(Elf_,x)
+#endif
 
 __ElfType(Addr);
 __ElfType(Half);
index d8f9ffd24b3afa96b5a22f190653e2aa3c11f706..7ff202c7e843673000c13cee681591f01d109f00 100644 (file)
@@ -10,7 +10,7 @@ INCS= alloca.h a.out.h ar.h assert.h configfile.h ctype.h \
        syslog.h tar.h termcap.h time.h timers.h tools.h \
        ttyent.h ucontext.h unistd.h utime.h utmp.h wchar.h wctype.h \
        hgfs.h tzfile.h util.h fetch.h mpool.h ndbm.h db.h poll.h resolv.h \
-       memory.h paths.h libexec.h complex.h
+       memory.h paths.h complex.h
 INCS+= arpa/inet.h arpa/nameser.h
 INCS+= minix/a.out.h minix/cdrom.h minix/compiler-ack.h minix/dirent.h \
        minix/dl_eth.h minix/md5.h minix/sha1.h minix/sha2.h minix/types.h
index 57d69588e395f61a4be007c333fa5d440227f851..0cdfa7ec545105a05633fc78eba35bc1675b7cbf 100644 (file)
@@ -8,8 +8,7 @@ INCS=   asynchio.h dir.h file.h  \
        select.h sem.h shm.h sigcontext.h signal.h socket.h \
        soundcard.h statfs.h statvfs.h stat.h svrctl.h timeb.h \
        time.h times.h types.h ucontext.h ucred.h uio.h un.h \
-       utsname.h video.h vm.h wait.h cdefs.h null.h poll.h \
-       elf32.h elf64.h elf_common.h elf_generic.h
+       utsname.h video.h vm.h wait.h cdefs.h null.h poll.h
 
 .include "../../common/include/sys/Makefile.inc"
 .include "../../common/include/sys/Makefile.mount.inc"
index 1dd73ce10449053e6dedcc5c5ced7692be8c6e76..098db001915412010428f6c891d81fa820950a87 100644 (file)
@@ -1,7 +1,12 @@
 # Makefile for libexec
 
 LIB=   exec
-
+INCS=  libexec.h
 SRCS=  exec_aout.c exec_elf.c
 
+.if (${NBSD_LIBC} != "no")
+INCSDIR= /usr/netbsd/include
+.else
+INCSDIR= /usr/include
+.endif
 .include <bsd.lib.mk>
similarity index 100%
rename from include/libexec.h
rename to lib/libexec/libexec.h