From: Gianluca Guida Date: Fri, 18 Mar 2011 15:13:05 +0000 (+0000) Subject: Move elf headers in common/include and libexec.h in lib/libexec. X-Git-Tag: v3.2.0~610 X-Git-Url: http://zhaoyanbai.com/repos/%22../static/icons/man.7.txt?a=commitdiff_plain;h=6f4e3dd9100d9ca8957b4e981001894958149573;p=minix.git Move elf headers in common/include and libexec.h in lib/libexec. It also fixes elf headers for NBSD compilation. --- diff --git a/common/include/sys/Makefile.inc b/common/include/sys/Makefile.inc index e5b9fbd15..3ea277505 100644 --- a/common/include/sys/Makefile.inc +++ b/common/include/sys/Makefile.inc @@ -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 diff --git a/include/sys/elf32.h b/common/include/sys/elf32.h similarity index 100% rename from include/sys/elf32.h rename to common/include/sys/elf32.h diff --git a/include/sys/elf64.h b/common/include/sys/elf64.h similarity index 100% rename from include/sys/elf64.h rename to common/include/sys/elf64.h diff --git a/include/sys/elf_common.h b/common/include/sys/elf_common.h similarity index 100% rename from include/sys/elf_common.h rename to common/include/sys/elf_common.h diff --git a/include/sys/elf_generic.h b/common/include/sys/elf_generic.h similarity index 89% rename from include/sys/elf_generic.h rename to common/include/sys/elf_generic.h index 95a682f25..a96afe3e1 100644 --- a/include/sys/elf_generic.h +++ b/common/include/sys/elf_generic.h @@ -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); diff --git a/include/Makefile b/include/Makefile index d8f9ffd24..7ff202c7e 100644 --- a/include/Makefile +++ b/include/Makefile @@ -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 diff --git a/include/sys/Makefile b/include/sys/Makefile index 57d69588e..0cdfa7ec5 100644 --- a/include/sys/Makefile +++ b/include/sys/Makefile @@ -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" diff --git a/lib/libexec/Makefile b/lib/libexec/Makefile index 1dd73ce10..098db0019 100644 --- a/lib/libexec/Makefile +++ b/lib/libexec/Makefile @@ -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 diff --git a/include/libexec.h b/lib/libexec/libexec.h similarity index 100% rename from include/libexec.h rename to lib/libexec/libexec.h