Move elf headers in common/include and libexec.h in lib/libexec.

It also fixes elf headers for NBSD compilation.
This commit is contained in:
Gianluca Guida 2011-03-18 15:13:05 +00:00
parent c8d0edc06a
commit 6f4e3dd910
9 changed files with 18 additions and 5 deletions

View 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

View file

@ -50,10 +50,18 @@
#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);

View 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

View 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"

View 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>