.PATH: ${MINIXSRCDIR}/common/include
-INCS+= lib.h
+INCS+= curses.h env.h fetch.h hgfs.h lib.h libutil.h timers.h
-INCS+= minix/ansi.h minix/bitmap.h minix/callnr.h minix/com.h \
- minix/compiler.h minix/config.h minix/const.h minix/debug.h \
- minix/devio.h minix/ds.h minix/endpoint.h minix/gcov.h \
- minix/ioctl.h minix/ipc.h minix/ipcconst.h minix/keymap.h \
- minix/limits.h minix/minlib.h minix/portio.h minix/priv.h \
- minix/profile.h minix/rs.h minix/safecopies.h minix/sef.h \
- minix/spin.h minix/sys_config.h minix/sysinfo.h minix/syslib.h \
- minix/sysutil.h minix/timers.h minix/type.h minix/u64.h minix/vm.h
+INCS+= minix/acpi.h minix/ansi.h minix/audio_fw.h minix/bitmap.h \
+ minix/callnr.h minix/com.h minix/compiler.h minix/config.h \
+ minix/const.h minix/cpufeature.h minix/crtso.h minix/debug.h \
+ minix/devio.h minix/devman.h minix/dir.h minix/dmap.h \
+ minix/driver.h minix/drivers.h minix/drvlib.h minix/ds.h \
+ minix/endpoint.h minix/fslib.h minix/gcov.h minix/hash.h \
+ minix/ioctl.h minix/input.h minix/ipc.h minix/ipcconst.h \
+ minix/keymap.h minix/limits.h minix/mthread.h minix/minlib.h \
+ minix/mq.h minix/netdriver.h minix/partition.h minix/portio.h \
+ minix/priv.h minix/procfs.h minix/profile.h minix/queryparam.h \
+ minix/rs.h minix/safecopies.h minix/sched.h minix/sef.h \
+ minix/sound.h minix/spin.h minix/sys_config.h minix/sysinfo.h \
+ minix/syslib.h minix/sysutil.h minix/timers.h minix/type.h \
+ minix/tty.h minix/u64.h minix/usb.h minix/usb_ch9.h minix/vm.h \
+ minix/vfsif.h minix/vtreefs.h
INCS+= net/gen/arp_io.h net/gen/dhcp.h net/gen/ether.h \
net/gen/eth_hdr.h net/gen/eth_io.h net/gen/icmp.h \
net/gen/tcp.h net/gen/tcp_hdr.h net/gen/tcp_io.h \
net/gen/udp.h net/gen/udp_hdr.h net/gen/udp_io.h \
net/gen/vjhc.h
+
+INCS+= ddekit/assert.h ddekit/initcall.h ddekit/memory.h ddekit/pgtab.h \
+ ddekit/thread.h ddekit/attribs.h ddekit/inline.h ddekit/printf.h \
+ ddekit/timer.h ddekit/condvar.h ddekit/interrupt.h ddekit/panic.h \
+ ddekit/resources.h ddekit/types.h ddekit/debug.h ddekit/lock.h \
+ ddekit/pci.h ddekit/semaphore.h ddekit/usb.h ddekit/minix/pci.h \
+ ddekit/minix/msg_queue.h ddekit/ddekit.h
+#ifdef __NBSD_LIBC
+#include <minix/ansi.h>
+#endif
_PROTOTYPE( int env_parse, (char *env, char *fmt, int field,
long *param, long min, long max) );
_PROTOTYPE( void env_panic, (char *env) );
#define _LIB_H
/* First come the defines. */
+#ifdef __NBSD_LIBC
+#include <sys/featuretest.h> /* tell headers to include NetBSD stuff. */
+#else /* !__NBSD_LIBC */
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
+#endif
+
#define _MINIX 1 /* tell headers to include MINIX stuff */
/* The following are so basic, all the lib files get them automatically. */
/* This should be defined as restrict when a C99 compiler is used. */
#define _RESTRICT
+#ifdef __NBSD_LIBC
+/* Setting of _POSIX_SOURCE (or _NETBSD_SOURCE) in NBSD headers is
+ * done in <sys/featuretest.h> */
+#include <sys/featuretest.h>
+
+/* Also, do not redefine _BSD_VA_LIST */
+
+#else /* !__NBSD_LIBC */
+
/* Setting any of _MINIX, _POSIX_C_SOURCE or _POSIX2_SOURCE implies
* _POSIX_SOURCE. (Seems wrong to put this here in ANSI space.)
*/
#define _POSIX_SOURCE 1
#endif
-#ifndef __NBSD_LIBC
/* What is a va_list? */
#include <stdarg.h>
#define _BSD_VA_LIST_ va_list
#ifndef _DIR_H
#define _DIR_H
+#ifdef __NBSD_LIBC
+#include <sys/cdefs.h>
+#endif
#include <minix/types.h>
#define DIRBLKSIZ 512 /* size of directory block */
struct direct {
ino_t d_ino;
char d_name[DIRSIZ];
+#ifdef __NBSD_LIBC
+} __packed;
+#else
};
+#endif
#endif /* _DIR_H */
#ifndef _IPC_H
#define _IPC_H
+#ifdef __NBSD_LIBC
+#include <minix/ansi.h>
+#endif
#include <minix/ipcconst.h>
#include <minix/type.h>
#endif
/* Miscellaneous BSD. */
-_PROTOTYPE(void swab, (char *_from, char *_to, int _count));
_PROTOTYPE(char *itoa, (int _n));
+#ifndef __NBSD_LIBC
_PROTOTYPE(char *getpass, (const char *_prompt));
+_PROTOTYPE(void swab, (char *_from, char *_to, int _count));
+#endif /* !_NBSD_LIBC */
/* Miscellaneous MINIX. */
_PROTOTYPE(void std_err, (const char *_s));
#include <ucontext.h>
#include <errno.h>
#include <stdlib.h>
+#ifndef __NBSD_LIBC
#include <alloca.h>
+#endif
#include <limits.h>
+#ifdef __NBSD_LIBC
+#include <sys/signal.h>
+#endif
typedef int mthread_thread_t;
typedef int mthread_once_t;
#define DHCP_FLAGS_BCAST 0x8000U /* Reply must be broadcast to client. */
/* "Magic" first four option bytes. */
+#ifdef __NBSD_LIBC
+#define DHCP_MAGIC htonl(0x63825363UL)
+#else
#define DHCP_MAGIC HTONL(0x63825363UL)
+#endif
/* DHCP common tags: */
#define DHCP_TAG_NETMASK 1 /* Netmask. */
.PATH: ${MINIXSRCDIR}/common/include/sys
INCS+= ioc_cmos.h ioc_file.h ioc_scsi.h ioc_tape.h \
- ioc_disk.h ioc_memory.h ioc_sound.h ioc_tty.h
+ ioc_disk.h ioc_memory.h ioc_sound.h ioc_tty.h \
+ kbdio.h mtio.h svrctl.h video.h vm.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
INCS+= arpa/inet.h arpa/nameser.h
-INCS+= minix/a.out.h minix/cdrom.h minix/cpufeature.h \
- minix/crtso.h minix/dirent.h \
- minix/dir.h minix/dl_eth.h minix/dmap.h minix/driver.h \
- minix/acpi.h \
- minix/drivers.h minix/drvlib.h \
- minix/fslib.h \
- minix/mq.h minix/mthread.h \
- minix/netdriver.h minix/partition.h \
- minix/procfs.h \
- minix/queryparam.h \
- minix/sched.h minix/sound.h \
- minix/tty.h minix/types.h \
- minix/vfsif.h minix/vtreefs.h \
- minix/compiler-ack.h minix/sha2.h minix/sha1.h minix/md5.h \
- minix/audio_fw.h minix/hash.h minix/input.h \
- minix/devman.h minix/usb.h minix/usb_ch9.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
INCS+= net/hton.h net/if.h net/ioctl.h net/netlib.h
INCS+= netinet/if_ether.h netinet/in.h netinet/tcp.h
-INCS+= ddekit/assert.h ddekit/initcall.h ddekit/memory.h ddekit/pgtab.h \
- ddekit/thread.h ddekit/attribs.h ddekit/inline.h ddekit/printf.h \
- ddekit/timer.h ddekit/condvar.h ddekit/interrupt.h ddekit/panic.h \
- ddekit/resources.h ddekit/types.h ddekit/debug.h ddekit/lock.h \
- ddekit/pci.h ddekit/semaphore.h ddekit/usb.h ddekit/minix/pci.h \
- ddekit/minix/msg_queue.h ddekit/ddekit.h
-
-
.include <bsd.own.mk>
INCSDIR= /usr/include