Removing obsolete _MINIX define

Change-Id: Id33ac7e973d1c0e249b690fe44a597474fac6076
This commit is contained in:
Lionel Sambuc 2013-02-25 12:43:15 +01:00
parent f360500351
commit 8e4736f2df
102 changed files with 122 additions and 239 deletions

View file

@ -1,4 +1,4 @@
CPPFLAGS+=-DTIME -DMINIX=1 -D_MINIX=1 -D_POSIX_SOURCE=1 -I../../src/ -D_NETBSD_SOURCE CPPFLAGS+=-DTIME -DMINIX=1 -I../../src/
HZ=60 HZ=60
BINDIR=/usr/benchmarks/unixbench/pgms BINDIR=/usr/benchmarks/unixbench/pgms

View file

@ -1,3 +1,3 @@
CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE -D_MINIX_COMPAT CPPFLAGS+= -D_MINIX_COMPAT
LDADD+= -lminlib -lcompat_minix -lasyn -lterminfo LDADD+= -lminlib -lcompat_minix -lasyn -lterminfo
BINDIR?=/usr/bin BINDIR?=/usr/bin

View file

@ -4,8 +4,6 @@ add_route.c
Created August 7, 1991 by Philip Homburg Created August 7, 1991 by Philip Homburg
*/ */
#define _POSIX_C_SOURCE 2
#include <sys/types.h> #include <sys/types.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <errno.h> #include <errno.h>

View file

@ -1591,7 +1591,7 @@ void version()
#ifdef vax #ifdef vax
fprintf(stderr, "vax, "); fprintf(stderr, "vax, ");
#endif #endif
#ifdef _MINIX #ifdef __minix
fprintf(stderr, "MINIX, "); fprintf(stderr, "MINIX, ");
#endif #endif
#ifdef NO_UCHAR #ifdef NO_UCHAR

View file

@ -13,7 +13,6 @@ CPPFLAGS+= -DHAVE_SYS_PARAM_H \
-DHAVE_SYSEXITS_H \ -DHAVE_SYSEXITS_H \
-DHAVE_UTIME_H -DHAVE_UTIME_H
CPPFLAGS+= -D_POSIX_SOURCE
DPADD+= ${LIBFETCH} DPADD+= ${LIBFETCH}
LDADD+= -lfetch LDADD+= -lfetch

View file

@ -42,7 +42,7 @@ enum ntype {
N_AMIN, N_ANEWER, N_ATIME, N_CLOSEPAREN, N_CMIN, N_CNEWER, N_CTIME, N_AMIN, N_ANEWER, N_ATIME, N_CLOSEPAREN, N_CMIN, N_CNEWER, N_CTIME,
N_DEPTH, N_EMPTY, N_EXEC, N_EXECDIR, N_EXIT, N_EXPR, N_FALSE, N_DEPTH, N_EMPTY, N_EXEC, N_EXECDIR, N_EXIT, N_EXPR, N_FALSE,
N_FOLLOW, N_FPRINT, N_FOLLOW, N_FPRINT,
#ifndef _MINIX #if !defined(__minix)
N_FSTYPE, N_FSTYPE,
N_FLAGS, N_FLAGS,
#endif #endif

View file

@ -377,7 +377,7 @@ f_delete(PLAN *plan __unused, FTSENT *entry)
errx(1, "-delete: %s: relative path potentially not safe", errx(1, "-delete: %s: relative path potentially not safe",
entry->fts_accpath); entry->fts_accpath);
#ifndef _MINIX #if !defined(__minix)
/* Turn off user immutable bits if running as root */ /* Turn off user immutable bits if running as root */
if ((entry->fts_statp->st_flags & (UF_APPEND|UF_IMMUTABLE)) && if ((entry->fts_statp->st_flags & (UF_APPEND|UF_IMMUTABLE)) &&
!(entry->fts_statp->st_flags & (SF_APPEND|SF_IMMUTABLE)) && !(entry->fts_statp->st_flags & (SF_APPEND|SF_IMMUTABLE)) &&
@ -857,7 +857,7 @@ c_false(char ***argvp, int isok)
} }
#ifndef _MINIX #if !defined(__minix)
/* /*
* -flags [-]flags functions -- * -flags [-]flags functions --
*/ */
@ -955,7 +955,7 @@ c_fprint(char ***argvp, int isok)
* *
* True if the file is of a certain type. * True if the file is of a certain type.
*/ */
#ifndef _MINIX #if !defined(__minix)
int int
f_fstype(PLAN *plan, FTSENT *entry) f_fstype(PLAN *plan, FTSENT *entry)
{ {

View file

@ -70,7 +70,7 @@ static OPTION const options[] = {
{ "-false", N_FALSE, c_false, 0 }, { "-false", N_FALSE, c_false, 0 },
{ "-follow", N_FOLLOW, c_follow, 0 }, { "-follow", N_FOLLOW, c_follow, 0 },
{ "-fprint", N_FPRINT, c_fprint, 1 }, { "-fprint", N_FPRINT, c_fprint, 1 },
#ifndef _MINIX #if !defined(__minix)
{ "-flags", N_FLAGS, c_flags, 1 }, { "-flags", N_FLAGS, c_flags, 1 },
{ "-fstype", N_FSTYPE, c_fstype, 1 }, { "-fstype", N_FSTYPE, c_fstype, 1 },
#endif #endif

View file

@ -120,7 +120,7 @@ int lf; /* LASTLOG file descriptor */
struct person *person1; /* list of people */ struct person *person1; /* list of people */
long tloc; /* current time */ long tloc; /* current time */
#if !_MINIX #if !defined(__minix)
char *strcpy(); char *strcpy();
char *ctime(); char *ctime();
#endif #endif
@ -893,7 +893,7 @@ netfinger(name)
char *host; char *host;
struct hostent *hp; struct hostent *hp;
int s, result; int s, result;
#if !_MINIX #if !defined(__minix)
char *rindex(); char *rindex();
#endif #endif
register FILE *f; register FILE *f;
@ -1027,7 +1027,7 @@ char *name;
char *mbxdir = preamble; /* string with path preamble */ char *mbxdir = preamble; /* string with path preamble */
char *mbxpath; /* space for entire pathname */ char *mbxpath; /* space for entire pathname */
#if !_MINIX #if !defined(__minix)
char *ctime(); /* convert longword time to ascii */ char *ctime(); /* convert longword time to ascii */
#endif #endif
char *timestr; char *timestr;

View file

@ -16,30 +16,6 @@
* that copyright notice. * that copyright notice.
*/ */
#if _MINIX && !defined(__NBSD_LIBC)
#include <sys/types.h>
#include <sys/ioctl.h>
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <net/hton.h>
#include <net/netlib.h>
#include <net/gen/in.h>
#include <net/gen/inet.h>
#include <net/gen/netdb.h>
#include <net/gen/nameser.h>
#include <net/gen/resolv.h>
#include <net/gen/socket.h>
#include <net/gen/tcp.h>
#include <net/gen/tcp_io.h>
#undef ERROR
#else
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <arpa/nameser.h> #include <arpa/nameser.h>
@ -60,7 +36,6 @@
#include <net/gen/in.h> #include <net/gen/in.h>
#include <net/gen/tcp.h> #include <net/gen/tcp.h>
#include <net/gen/tcp_io.h> #include <net/gen/tcp_io.h>
#endif
extern int h_errno; extern int h_errno;

View file

@ -12,10 +12,10 @@ SRCS= brac.c ch.c charset.c cmdbuf.c command.c decode.c edit.c \
linenum.c lsystem.c main.c mark.c optfunc.c option.c opttbl.c \ linenum.c lsystem.c main.c mark.c optfunc.c option.c opttbl.c \
os.c output.c position.c prompt.c screen.c search.c signal.c \ os.c output.c position.c prompt.c screen.c search.c signal.c \
tags.c ttyin.c version.c tags.c ttyin.c version.c
.if defined(NBSD_LIBC) && (${NBSD_LIBC} != "no")
LDADD+= -ltermcap LDADD+= -ltermcap
DPADD+= ${LIBTERM} DPADD+= ${LIBTERM}
.endif
MLINKS= less.1 more.1 less.1 page.1 MLINKS= less.1 more.1 less.1 page.1
LINKS= ${BINDIR}/less ${BINDIR}/more ${BINDIR}/less ${BINDIR}/page LINKS= ${BINDIR}/less ${BINDIR}/more ${BINDIR}/less ${BINDIR}/page

View file

@ -20,7 +20,6 @@ static char sccsid[] = "@(#)rcp.c 1.1 87/12/21 SMI"; /* from UCB 5.3 6/8/85"*/
* rcp * rcp
*/ */
#undef _MINIX
#define NAMESERVER #define NAMESERVER
#include <ctype.h> #include <ctype.h>

View file

@ -48,7 +48,7 @@ static char sccsid[] = "@(#)rsh.c 5.24 (Berkeley) 7/1/91";
* $Header$ * $Header$
*/ */
#if _MINIX #if defined(__minix)
#include <sys/types.h> #include <sys/types.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <errno.h> #include <errno.h>
@ -118,7 +118,7 @@ main(argc, argv)
int argoff, asrsh, ch, dflag, nflag, one, pid, rem, uid; int argoff, asrsh, ch, dflag, nflag, one, pid, rem, uid;
register char *p; register char *p;
char *args, *host, *user; char *args, *host, *user;
#if !_MINIX #if !defined(__minix)
char *copyargs(); char *copyargs();
void sendsig(); void sendsig();
#endif #endif
@ -294,7 +294,7 @@ try_connect:
(void)fprintf(stderr, "rsh: can't establish stderr.\n"); (void)fprintf(stderr, "rsh: can't establish stderr.\n");
exit(1); exit(1);
} }
#if !_MINIX #if !defined(__minix)
if (dflag) { if (dflag) {
if (setsockopt(rem, SOL_SOCKET, SO_DEBUG, &one, if (setsockopt(rem, SOL_SOCKET, SO_DEBUG, &one,
sizeof(one)) < 0) sizeof(one)) < 0)
@ -308,7 +308,7 @@ try_connect:
#endif #endif
(void)setuid(uid); (void)setuid(uid);
#if !_MINIX #if !defined(__minix)
omask = sigblock(sigmask(SIGINT)|sigmask(SIGQUIT)|sigmask(SIGTERM)); omask = sigblock(sigmask(SIGINT)|sigmask(SIGQUIT)|sigmask(SIGTERM));
#endif #endif
if (signal(SIGINT, SIG_IGN) != SIG_IGN) if (signal(SIGINT, SIG_IGN) != SIG_IGN)
@ -333,7 +333,7 @@ try_connect:
#endif #endif
#endif #endif
{ {
#if _MINIX #if defined(__minix)
; ;
#else #else
(void)ioctl(rfd2, FIONBIO, &one); (void)ioctl(rfd2, FIONBIO, &one);
@ -361,11 +361,11 @@ talk(nflag, omask, pid, rem)
{ {
register int cc, wc; register int cc, wc;
register char *bp; register char *bp;
#if !_MINIX #if !defined(__minix)
int readfrom, ready, rembits; int readfrom, ready, rembits;
#endif #endif
char buf[BUFSIZ]; char buf[BUFSIZ];
#if _MINIX #if defined(__minix)
int pid1; int pid1;
#endif #endif
@ -378,7 +378,7 @@ reread: errno = 0;
bp = buf; bp = buf;
rewrite: rewrite:
#if !_MINIX #if !defined(__minix)
rembits = 1 << rem; rembits = 1 << rem;
if (select(16, 0, &rembits, 0, 0) < 0) { if (select(16, 0, &rembits, 0, 0) < 0) {
if (errno != EINTR) { if (errno != EINTR) {
@ -400,7 +400,7 @@ rewrite:
#endif #endif
wc = write(rem, bp, cc); wc = write(rem, bp, cc);
if (wc < 0) { if (wc < 0) {
#if !_MINIX #if !defined(__minix)
if (errno == EWOULDBLOCK) if (errno == EWOULDBLOCK)
goto rewrite; goto rewrite;
#endif #endif
@ -412,7 +412,7 @@ rewrite:
goto reread; goto reread;
goto rewrite; goto rewrite;
done: done:
#if _MINIX #if defined(__minix)
ioctl(rem, NWIOTCPSHUTDOWN, NULL); ioctl(rem, NWIOTCPSHUTDOWN, NULL);
#else #else
(void)shutdown(rem, 1); (void)shutdown(rem, 1);
@ -420,7 +420,7 @@ done:
exit(0); exit(0);
} }
#if _MINIX #if defined(__minix)
pid1= fork(); pid1= fork();
if (pid1 == -1) if (pid1 == -1)
{ {
@ -533,7 +533,7 @@ copyargs(argv)
register int cc; register int cc;
register char **ap, *p; register char **ap, *p;
char *args; char *args;
#if !_MINIX #if !defined(__minix)
char *malloc(); char *malloc();
#endif #endif

View file

@ -2,10 +2,6 @@
ttn.c ttn.c
*/ */
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE 1
#endif
#include <sys/types.h> #include <sys/types.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <assert.h> #include <assert.h>

View file

@ -1,8 +1,5 @@
/* umount - unmount a file system Author: Andy Tanenbaum */ /* umount - unmount a file system Author: Andy Tanenbaum */
#define _MINIX 1 /* for proto of the non-POSIX umount() */
#define _POSIX_SOURCE 1 /* for PATH_MAX from limits.h */
#include <minix/type.h> #include <minix/type.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>

View file

@ -1,4 +1,3 @@
CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix LDADD+= -lminlib -lcompat_minix
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX} DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
BINDIR?=/usr/sbin BINDIR?=/usr/sbin

View file

@ -190,7 +190,7 @@
* *
*****************************************************************************/ *****************************************************************************/
#if defined(_MINIX) || defined(__minix) #if defined(__minix)
#include "acminix.h" #include "acminix.h"
#elif defined(_LINUX) || defined(__linux__) #elif defined(_LINUX) || defined(__linux__)

View file

@ -1,5 +1,4 @@
/* Filter driver - general include file */ /* Filter driver - general include file */
#define _MINIX 1
#define _SYSTEM 1 #define _SYSTEM 1
#include <minix/config.h> #include <minix/config.h>
#include <minix/const.h> #include <minix/const.h>

View file

@ -43,7 +43,7 @@ diff -r -x CVS -N -U 3 dist.orig/gcc/gcov.c dist/gcc/gcov.c
#define STRING_SIZE 200 #define STRING_SIZE 200
+#ifdef _MINIX +#if defined(__minix)
+#define block_t gcc_block_t +#define block_t gcc_block_t
+#endif +#endif
+ +

View file

@ -133,13 +133,13 @@ typedef struct {
unsigned arcount :16; /*%< number of resource entries */ unsigned arcount :16; /*%< number of resource entries */
} HEADER; } HEADER;
#ifdef _MINIX #if defined(__minix) && defined(_NETBSD_SOURCE)
#define dh_id id #define dh_id id
#define dh_qdcount qdcount #define dh_qdcount qdcount
#define dh_ancount ancount #define dh_ancount ancount
#define dh_nscount nscount #define dh_nscount nscount
#define dh_arcount arcount #define dh_arcount arcount
#endif #endif /* defined(__minix) && defined(_NETBSD_SOURCE) */
#define PACKETSZ NS_PACKETSZ #define PACKETSZ NS_PACKETSZ
#define MAXDNAME NS_MAXDNAME #define MAXDNAME NS_MAXDNAME

View file

@ -9,10 +9,10 @@
#ifdef __NBSD_LIBC #ifdef __NBSD_LIBC
#include <sys/featuretest.h> /* tell headers to include NetBSD stuff. */ #include <sys/featuretest.h> /* tell headers to include NetBSD stuff. */
#else /* !__NBSD_LIBC */ #else /* !__NBSD_LIBC */
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
#endif #endif
#define _MINIX 1 /* tell headers to include MINIX stuff */ #define _NETBSD_SOURCE 1 /* tell headers to include MINIX stuff */
/* The following are so basic, all the lib files get them automatically. */ /* The following are so basic, all the lib files get them automatically. */
#include <minix/config.h> /* must be first */ #include <minix/config.h> /* must be first */

View file

@ -3,9 +3,9 @@
/* Types and constants shared between block and character drivers. */ /* Types and constants shared between block and character drivers. */
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
#define _MINIX 1 /* tell headers to include MINIX stuff */ #define _NETBSD_SOURCE 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* get negative error number in <errno.h> */ #define _SYSTEM 1 /* get negative error number in <errno.h> */
/* The following are so basic, all the *.c files get them automatically. */ /* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */ #include <minix/config.h> /* MUST be first */
@ -28,8 +28,8 @@
/* Base and size of a partition in bytes. */ /* Base and size of a partition in bytes. */
struct device { struct device {
u64_t dv_base; u64_t dv_base;
u64_t dv_size; u64_t dv_size;
}; };
/* Generic receive function for all drivers. */ /* Generic receive function for all drivers. */

View file

@ -5,9 +5,9 @@
#ifndef _INC_DRIVERS_H #ifndef _INC_DRIVERS_H
#define _INC_DRIVERS_H #define _INC_DRIVERS_H
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
#define _MINIX 1 /* tell headers to include MINIX stuff */ #define _NETBSD_SOURCE 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* get negative error number in <errno.h> */ #define _SYSTEM 1 /* get negative error number in <errno.h> */
/* The following are so basic, all the *.c files get them automatically. */ /* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */ #include <minix/config.h> /* MUST be first */

View file

@ -166,7 +166,7 @@ int tcsetattr(int _filedes, int _opt_actions, const struct termios
#define VDISCARD 13 /* cc_c[VDISCARD] (^O) */ #define VDISCARD 13 /* cc_c[VDISCARD] (^O) */
/* Extensions to baud rate settings. */ /* Extensions to baud rate settings. */
#ifdef _MINIX #if defined(__minix) && defined(_NETBSD_SOURCE)
#define B57600 0x0100 /* 57600 baud */ #define B57600 0x0100 /* 57600 baud */
#define B115200 0x0200 /* 115200 baud */ #define B115200 0x0200 /* 115200 baud */
#define B230400 0x0400 /* 230400 baud */ #define B230400 0x0400 /* 230400 baud */
@ -175,7 +175,7 @@ int tcsetattr(int _filedes, int _opt_actions, const struct termios
#define B1843200 0x2000 /* 1843200 baud */ #define B1843200 0x2000 /* 1843200 baud */
#define B3000000 0x4000 /* 3000000 baud */ #define B3000000 0x4000 /* 3000000 baud */
#define B3686400 0x8000 /* 3686400 baud */ #define B3686400 0x8000 /* 3686400 baud */
#endif /* _MINIX */ #endif /* defined(__minix) && defined(_NETBSD_SOURCE) */
/* These are the default settings used by the kernel and by 'stty sane' */ /* These are the default settings used by the kernel and by 'stty sane' */

View file

@ -323,7 +323,7 @@ int unlinkat(int, const char *, int);
*/ */
#ifdef __minix #ifdef __minix
int lseek64(int fd, u64_t _offset, int _whence, u64_t *_newpos); int lseek64(int fd, u64_t _offset, int _whence, u64_t *_newpos);
#if defined(_MINIX) #if defined(_NETBSD_SOURCE)
#include <minix/type.h> #include <minix/type.h>
int getprocnr(void); int getprocnr(void);
@ -337,7 +337,7 @@ gid_t getngid(endpoint_t proc_ep);
int getnucred(endpoint_t proc_ep, struct ucred *ucred); int getnucred(endpoint_t proc_ep, struct ucred *ucred);
ssize_t pread64(int fd, void *buf, size_t count, u64_t where); ssize_t pread64(int fd, void *buf, size_t count, u64_t where);
ssize_t pwrite64(int fd, const void *buf, size_t count, u64_t where); ssize_t pwrite64(int fd, const void *buf, size_t count, u64_t where);
#endif /* __MINIX */ #endif /* defined(_NETBSD_SOURCE) */
#endif /* __minix */ #endif /* __minix */
#if defined(_NETBSD_SOURCE) #if defined(_NETBSD_SOURCE)

View file

@ -19,7 +19,7 @@ LDFLAGS+= -T ${LINKERSCRIPT}
LDFLAGS+= -nostdlib LDFLAGS+= -nostdlib
CFLAGS += -fno-stack-protector CFLAGS += -fno-stack-protector
CPPFLAGS+= -D_NETBSD_SOURCE -D_MINIX -D__kernel__ CPPFLAGS+= -D__kernel__
# kernel headers are always called through kernel/*.h # kernel headers are always called through kernel/*.h
CPPFLAGS+= -I${NETBSDSRCDIR} CPPFLAGS+= -I${NETBSDSRCDIR}

View file

@ -14,8 +14,6 @@
/* This is the master header for the kernel. It includes some other files /* This is the master header for the kernel. It includes some other files
* and defines the principal constants. * and defines the principal constants.
*/ */
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* tell headers that this is the kernel */ #define _SYSTEM 1 /* tell headers that this is the kernel */
/* /*

View file

@ -1,5 +1,3 @@
.if defined(NBSD_LIBC) && (${NBSD_LIBC} == "yes") # $NetBSD: Makefile.inc,v 1.7 2012/03/21 05:39:21 matt Exp $
CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
.else #WARNS?= 5
CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE
.endif

View file

@ -1,6 +1,6 @@
#include <sys/cdefs.h>
#define _SYSTEM 1 #define _SYSTEM 1
#define _MINIX 1
#include <sys/cdefs.h>
#include <minix/callnr.h> #include <minix/callnr.h>
#include <minix/com.h> #include <minix/com.h>

View file

@ -1,6 +1,5 @@
#define __USE_MISC #define __USE_MISC
#define _SYSTEM 1 #define _SYSTEM 1
#define _MINIX 1
#include <sys/cdefs.h> #include <sys/cdefs.h>
#include <lib.h> #include <lib.h>

View file

@ -1,5 +1,4 @@
#define _SYSTEM 1 #define _SYSTEM 1
#define _MINIX 1
#include <sys/cdefs.h> #include <sys/cdefs.h>
#include <lib.h> #include <lib.h>

View file

@ -1,5 +1,4 @@
#define _SYSTEM 1 #define _SYSTEM 1
#define _MINIX 1
#include <sys/cdefs.h> #include <sys/cdefs.h>
#include <lib.h> #include <lib.h>

View file

@ -1,5 +1,5 @@
#define _SYSTEM 1 #define _SYSTEM 1
#define _MINIX 1
#include <sys/cdefs.h> #include <sys/cdefs.h>
#include <lib.h> #include <lib.h>
#include "namespace.h" #include "namespace.h"

View file

@ -1,5 +1,3 @@
#define _MINIX
#define _POSIX_SOURCE
#include <minix/callnr.h> #include <minix/callnr.h>
#include <minix/com.h> #include <minix/com.h>
#include <minix/config.h> #include <minix/config.h>

View file

@ -7,10 +7,6 @@ LIB= exec
INCS= libexec.h INCS= libexec.h
SRCS= exec_aout.c exec_elf.c exec_general.c SRCS= exec_aout.c exec_elf.c exec_general.c
.if (${NBSD_LIBC} != "no")
INCSDIR= /usr/include INCSDIR= /usr/include
.else
INCSDIR= /usr/include.ack
.endif
.include <bsd.lib.mk> .include <bsd.lib.mk>

View file

@ -10,7 +10,6 @@ MKPROFILE= no
.include <bsd.own.mk> .include <bsd.own.mk>
CPPFLAGS+= -D_POSIX_SOURCE
CPPFLAGS+= -I. CPPFLAGS+= -I.
CPPFLAGS+= -D_LARGEFILE_SOURCE -D_LARGE_FILES CPPFLAGS+= -D_LARGEFILE_SOURCE -D_LARGE_FILES

View file

@ -1,6 +1,6 @@
# Makefile for libmthread # Makefile for libmthread
CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -Wall -Werror -D_SYSTEM CPPFLAGS+= -O1 -Wall -Werror -D_SYSTEM
LIB= gpio LIB= gpio

View file

@ -1,6 +1,6 @@
# Makefile for libmthread # Makefile for libmthread
CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -Wall -Werror CPPFLAGS+= -O1 -Wall -Werror
LIB= mthread LIB= mthread

View file

@ -1,6 +1,6 @@
LIB = netsock LIB = netsock
CPPFLAGS += -I${.CURDIR}/include/ -D_SYSTEM -D_MINIX CPPFLAGS += -I${.CURDIR}/include/ -D_SYSTEM
CPPFLAGS+= -I${.CURDIR}/../../lib/liblwip/include CPPFLAGS+= -I${.CURDIR}/../../lib/liblwip/include
CFLAGS += -Wall -Wextra -std=c99 CFLAGS += -Wall -Wextra -std=c99

View file

@ -1,6 +1,6 @@
# Makefile for libpadconf # Makefile for libpadconf
CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -Wall -Werror -D_SYSTEM CPPFLAGS+= -O1 -Wall -Werror -D_SYSTEM
LIB= padconf LIB= padconf

View file

@ -1,15 +1,12 @@
/* This is the master header for fs. It includes some other files
* and defines the principal constants.
*/
#ifndef LIBPUFFS_FS_H #ifndef LIBPUFFS_FS_H
#define LIBPUFFS_FS_H #define LIBPUFFS_FS_H
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ /* This is the master header for fs. It includes some other files
#define _MINIX 1 /* tell headers to include MINIX stuff */ * and defines the principal constants.
#define _SYSTEM 1 /* tell headers that this is the kernel */ */
#define _SYSTEM 1 /* tell headers that this is the kernel */
#define VERBOSE 0 /* show messages during initialization? */ #define VERBOSE 0 /* show messages during initialization? */
/* The following are so basic, all the *.c files get them automatically. */ /* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */ #include <minix/config.h> /* MUST be first */

View file

@ -15,8 +15,7 @@
* *
*/ */
#define _MINIX 1 #define _SYSTEM 1
#define _SYSTEM 1
#include <lib.h> #include <lib.h>
#include <minix/u64.h> #include <minix/u64.h>
#include <minix/sysutil.h> #include <minix/sysutil.h>

View file

@ -1,5 +1,4 @@
#define _MINIX 1 #define _SYSTEM 1
#define _SYSTEM 1
#include <minix/config.h> #include <minix/config.h>
#include <assert.h> #include <assert.h>

View file

@ -12,7 +12,6 @@
* May 2009 (D.C. van Moolenbroek) * May 2009 (D.C. van Moolenbroek)
*/ */
#define _MINIX 1
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <minix/config.h> #include <minix/config.h>

View file

@ -1,6 +1,4 @@
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _SYSTEM 1 /* tell headers that this is the kernel */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* tell headers that this is the kernel */
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View file

@ -5,11 +5,7 @@ LIB= z
SRCS= adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c \ SRCS= adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c \
gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c
.if (${NBSD_LIBC} != "no")
INCSDIR= /usr/include INCSDIR= /usr/include
.else
INCSDIR= /usr/include.ack
.endif
INCS= zconf.h zlib.h INCS= zconf.h zlib.h

View file

@ -118,7 +118,6 @@ __RCSID("$NetBSD: mke2fs.c,v 1.14 2010/09/10 15:51:20 tsutsui Exp $");
#include <ufs/ext2fs/ext2fs.h> #include <ufs/ext2fs/ext2fs.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#define _MINIX
#include <err.h> #include <err.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>

View file

@ -1,4 +1,3 @@
CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix LDADD+= -lminlib -lcompat_minix
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX} DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
BINDIR?=/usr/sbin BINDIR?=/usr/sbin

View file

@ -1,8 +1,6 @@
/* buf.c - by Alen Stojanov and David van Moolenbroek, taken from procfs */ /* buf.c - by Alen Stojanov and David van Moolenbroek, taken from procfs */
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _SYSTEM 1 /* tell headers that this is the kernel */
#define _MINIX 1 /* tell headers to include MINIX stuff */ #define DEVMAN_SERVER 1
#define _SYSTEM 1 /* tell headers that this is the kernel */
#define DEVMAN_SERVER 1
#include <minix/config.h> #include <minix/config.h>
#include <errno.h> #include <errno.h>

View file

@ -1,9 +1,7 @@
#ifndef _SERVERS_DEVMAN_DEVMAN_H #ifndef _SERVERS_DEVMAN_DEVMAN_H
#define _SERVERS_DEVMAN_DEVMAN_H #define _SERVERS_DEVMAN_DEVMAN_H
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _SYSTEM 1 /* tell headers that this is the kernel */
#define _MINIX 1 /* tell headers to include MINIX stuff */ #define DEVMAN_SERVER 1
#define _SYSTEM 1 /* tell headers that this is the kernel */
#define DEVMAN_SERVER 1
#include <minix/config.h> #include <minix/config.h>
#include <errno.h> #include <errno.h>

View file

@ -1,6 +1,4 @@
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _SYSTEM 1 /* tell headers that this is the kernel */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* tell headers that this is the kernel */
#include <minix/config.h> #include <minix/config.h>
#include <errno.h> #include <errno.h>

View file

@ -3,9 +3,7 @@
/* Header file including all needed system headers. */ /* Header file including all needed system headers. */
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _SYSTEM 1 /* get OK and negative error codes */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* get OK and negative error codes */
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>

View file

@ -1,15 +1,12 @@
/* This is the master header for fs. It includes some other files
* and defines the principal constants.
*/
#ifndef EXT2_FS_H #ifndef EXT2_FS_H
#define EXT2_FS_H #define EXT2_FS_H
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ /* This is the master header for fs. It includes some other files
#define _MINIX 1 /* tell headers to include MINIX stuff */ * and defines the principal constants.
#define _SYSTEM 1 /* tell headers that this is the kernel */ */
#define _SYSTEM 1 /* tell headers that this is the kernel */
#define VERBOSE 0 /* show messages during initialization? */ #define VERBOSE 0 /* show messages during initialization? */
/* The following are so basic, all the *.c files get them automatically. */ /* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */ #include <minix/config.h> /* MUST be first */

View file

@ -21,6 +21,6 @@ MAN=
BINDIR?= /usr/sbin BINDIR?= /usr/sbin
CPPFLAGS+= -I${.CURDIR} -D_MINIX -D'ARGS(a)=a' -Wall -Werror CPPFLAGS+= -I${.CURDIR} -D'ARGS(a)=a' -Wall -Werror
.include <minix.service.mk> .include <minix.service.mk>

View file

@ -10,7 +10,6 @@ Copyright 1995 Philip Homburg
*/ */
#define _MINIX_SOURCE 1 #define _MINIX_SOURCE 1
#define _POSIX_SOURCE 1
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>

View file

@ -1,6 +1,4 @@
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _SYSTEM 1 /* get OK and negative error codes */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* get OK and negative error codes */
#include <minix/callnr.h> #include <minix/callnr.h>
#include <minix/com.h> #include <minix/com.h>

View file

@ -4,8 +4,7 @@
* Jul 13, 2004 by Jorrit N. Herder * Jul 13, 2004 by Jorrit N. Herder
*/ */
#define _SYSTEM 1 /* get OK and negative error codes */ #define _SYSTEM 1 /* get OK and negative error codes */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#include <sys/types.h> #include <sys/types.h>
#include <limits.h> #include <limits.h>

View file

@ -1,8 +1,7 @@
#define _SYSTEM 1 /* get OK and negative error codes */ #define _SYSTEM 1 /* get OK and negative error codes */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define VERBOSE 0 /* display diagnostics */ #define VERBOSE 0 /* display diagnostics */
#include <sys/types.h> #include <sys/types.h>
#include <limits.h> #include <limits.h>

View file

@ -17,7 +17,7 @@ MAN=
BINDIR?= /usr/sbin BINDIR?= /usr/sbin
CPPFLAGS+= -I${.CURDIR} -D_MINIX -D_SYSTEM CPPFLAGS+= -I${.CURDIR} -D_SYSTEM
CPPFLAGS+= -I${.CURDIR}/../../lib/liblwip/include CPPFLAGS+= -I${.CURDIR}/../../lib/liblwip/include
CFLAGS += -Wextra -std=c99 CFLAGS += -Wextra -std=c99

View file

@ -4,11 +4,9 @@
/* This is the master header for fs. It includes some other files /* This is the master header for fs. It includes some other files
* and defines the principal constants. * and defines the principal constants.
*/ */
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _SYSTEM 1 /* tell headers that this is the kernel */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* tell headers that this is the kernel */
#define VERBOSE 0 /* show messages during initialization? */ #define VERBOSE 0 /* show messages during initialization? */
/* The following are so basic, all the *.c files get them automatically. */ /* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */ #include <minix/config.h> /* MUST be first */

View file

@ -1,12 +1,10 @@
#ifndef __PFS_FS_H__ #ifndef __PFS_FS_H__
#define __PFS_FS_H__ #define __PFS_FS_H__
/* This is the master header for pfs. It includes some other files /* This is the master header for fs. It includes some other files
* and defines the principal constants. * and defines the principal constants.
*/ */
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _SYSTEM 1 /* tell headers that this is the kernel */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* tell headers that this is the kernel */
/* The following are so basic, all the *.c files get them automatically. */ /* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */ #include <minix/config.h> /* MUST be first */
@ -14,6 +12,7 @@
#include <minix/const.h> #include <minix/const.h>
#include <minix/type.h> #include <minix/type.h>
#include <minix/dmap.h> #include <minix/dmap.h>
#include <minix/vfsif.h> #include <minix/vfsif.h>
#include <limits.h> #include <limits.h>
#include <errno.h> #include <errno.h>

View file

@ -1,8 +1,8 @@
#define _SYSTEM 1 /* get OK and negative error codes */ #define _SYSTEM 1 /* get OK and negative error codes */
#define _MINIX 1 /* tell headers to include MINIX stuff */ #define _NETBSD_SOURCE 1 /* tell headers to include MINIX stuff */
#define VERBOSE 0 /* display diagnostics */ #define VERBOSE 0 /* display diagnostics */
#ifdef __NBSD_LIBC #ifdef __NBSD_LIBC
#include <sys/ioc_net.h> #include <sys/ioc_net.h>

View file

@ -1,9 +1,7 @@
/* This is the master header for PM. It includes some other files /* This is the master header for PM. It includes some other files
* and defines the principal constants. * and defines the principal constants.
*/ */
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _SYSTEM 1 /* tell headers that this is the kernel */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* tell headers that this is the kernel */
/* The following are so basic, all the *.c files get them automatically. */ /* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */ #include <minix/config.h> /* MUST be first */

View file

@ -1,9 +1,7 @@
#ifndef _PROCFS_INC_H #ifndef _PROCFS_INC_H
#define _PROCFS_INC_H #define _PROCFS_INC_H
#define _POSIX_SOURCE 1 #define _SYSTEM 1
#define _MINIX 1
#define _SYSTEM 1
#include <minix/config.h> #include <minix/config.h>
#include <limits.h> #include <limits.h>

View file

@ -4,8 +4,7 @@
* Jul 22, 2005 by Jorrit N. Herder * Jul 22, 2005 by Jorrit N. Herder
*/ */
#define _SYSTEM 1 /* get OK and negative error codes */ #define _SYSTEM 1 /* get OK and negative error codes */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>

View file

@ -1,9 +1,7 @@
/* This is the master header for the Scheduler. It includes some other files /* This is the master header for the Scheduler. It includes some other files
* and defines the principal constants. * and defines the principal constants.
*/ */
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _SYSTEM 1 /* tell headers that this is the kernel */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* tell headers that this is the kernel */
/* The following are so basic, all the *.c files get them automatically. */ /* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */ #include <minix/config.h> /* MUST be first */

View file

@ -4,9 +4,7 @@
/* This is the master header for fs. It includes some other files /* This is the master header for fs. It includes some other files
* and defines the principal constants. * and defines the principal constants.
*/ */
#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */ #define _SYSTEM 1 /* tell headers that this is the kernel */
#define _MINIX 1 /* tell headers to include MINIX stuff */
#define _SYSTEM 1 /* tell headers that this is the kernel */
/* The following are so basic, all the *.c files get them automatically. */ /* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */ #include <minix/config.h> /* MUST be first */

View file

@ -1,6 +1,5 @@
#define _SYSTEM 1 #define _SYSTEM 1
#define _POSIX_SOURCE 1
#include <minix/callnr.h> #include <minix/callnr.h>
#include <minix/com.h> #include <minix/com.h>

View file

@ -1,7 +1,5 @@
#define _POSIX_SOURCE 1 #define _SYSTEM 1
#define _MINIX 1
#define _SYSTEM 1
#include <minix/callnr.h> #include <minix/callnr.h>
#include <minix/com.h> #include <minix/com.h>

View file

@ -1,9 +1,7 @@
/* This file contains some utility routines for VM. */ /* This file contains some utility routines for VM. */
#define _SYSTEM 1 #define _SYSTEM 1
#define _MINIX 1 /* To get the brk() prototype (as _brk()). */
#include <minix/callnr.h> #include <minix/callnr.h>
#include <minix/com.h> #include <minix/com.h>

View file

@ -12,8 +12,6 @@ CFLAGS+= -DNDEBUG
unix?= We run MINIX. unix?= We run MINIX.
NBSD_LIBC= yes
DBG?= -O DBG?= -O
CPP?= /usr/lib/cpp CPP?= /usr/lib/cpp
.endif # defined(__MINIX) .endif # defined(__MINIX)

View file

@ -50,10 +50,10 @@ struct sigcontext {
#define sc_pc sc_regs.pc #define sc_pc sc_regs.pc
#define sc_psr sc_regs.psr #define sc_psr sc_regs.psr
#ifdef _MINIX #if defined(__minix) && defined(_NETBSD_SOURCE)
__BEGIN_DECLS __BEGIN_DECLS
int sigreturn(struct sigcontext *_scp); int sigreturn(struct sigcontext *_scp);
__END_DECLS __END_DECLS
#endif /* _MINIX */ #endif /* defined(__minix) && defined(_NETBSD_SOURCE) */
#endif /* !_ARM_SIGNAL_H_ */ #endif /* !_ARM_SIGNAL_H_ */

View file

@ -54,10 +54,10 @@ struct sigcontext {
#define sc_sp sc_regs.sp #define sc_sp sc_regs.sp
#define sc_ss sc_regs.ss #define sc_ss sc_regs.ss
#ifdef _MINIX #if defined(__minix) && defined(_NETBSD_SOURCE)
__BEGIN_DECLS __BEGIN_DECLS
int sigreturn(struct sigcontext *_scp); int sigreturn(struct sigcontext *_scp);
__END_DECLS __END_DECLS
#endif /* _MINIX */ #endif /* defined(__minix) && defined(_NETBSD_SOURCE) */
#endif /* !_I386_SIGNAL_H_ */ #endif /* !_I386_SIGNAL_H_ */

View file

@ -38,7 +38,6 @@ CPPFLAGS+= -I ${.CURDIR}/.. -I ${.CURDIR}/../../lib -I ${S}/lib/libsa
CPPFLAGS+= -I ${.OBJDIR} CPPFLAGS+= -I ${.OBJDIR}
.if defined(__MINIX) .if defined(__MINIX)
CPPFLAGS+=-isystem ${DESTDIR}/usr/include CPPFLAGS+=-isystem ${DESTDIR}/usr/include
CPPFLAGS+= -D_MINIX
.endif # defined(__MINIX) .endif # defined(__MINIX)
# Make sure we override any optimization options specified by the user # Make sure we override any optimization options specified by the user
COPTS= -Os COPTS= -Os

View file

@ -116,7 +116,6 @@ SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
.if defined(__MINIX) .if defined(__MINIX)
SAMISCMAKEFLAGS+="SA_INCLUDE_NET=no" SAMISCMAKEFLAGS+="SA_INCLUDE_NET=no"
CPPFLAGS+= -isystem ${DESTDIR}/usr/include CPPFLAGS+= -isystem ${DESTDIR}/usr/include
CPPFLAGS+= -D_MINIX
AFLAGS+= -Wa,--divide AFLAGS+= -Wa,--divide
.endif .endif
.include "${S}/lib/libsa/Makefile.inc" .include "${S}/lib/libsa/Makefile.inc"

View file

@ -75,13 +75,13 @@ int select(int, fd_set * __restrict, fd_set * __restrict,
__END_DECLS __END_DECLS
#endif /* _KERNEL */ #endif /* _KERNEL */
#ifdef _MINIX #if defined(__minix) && defined(_NETBSD_SOURCE)
/* possible select() operation types; read, write, errors */ /* possible select() operation types; read, write, errors */
/* (FS/driver internal use only) */ /* (FS/driver internal use only) */
#define SEL_RD (1 << 0) #define SEL_RD (1 << 0)
#define SEL_WR (1 << 1) #define SEL_WR (1 << 1)
#define SEL_ERR (1 << 2) #define SEL_ERR (1 << 2)
#define SEL_NOTIFY (1 << 3) /* not a real select operation */ #define SEL_NOTIFY (1 << 3) /* not a real select operation */
#endif #endif /* defined(__minix) && defined(_NETBSD_SOURCE) */
#endif /* !_SYS_SELECT_H_ */ #endif /* !_SYS_SELECT_H_ */

View file

@ -77,7 +77,7 @@
#define SIGTTIN 22 /* background process wants to read */ #define SIGTTIN 22 /* background process wants to read */
#define SIGTTOU 23 /* background process wants to write */ #define SIGTTOU 23 /* background process wants to write */
#ifdef _MINIX #if defined(__minix) && defined(_NETBSD_SOURCE)
#define SIGIOT SIGABRT /* for people who speak PDP-11 */ #define SIGIOT SIGABRT /* for people who speak PDP-11 */
/* MINIX specific signals. These signals are not used by user proceses, /* MINIX specific signals. These signals are not used by user proceses,
@ -110,7 +110,7 @@
|| (sig == SIGKILL || sig == SIGPIPE)) || (sig == SIGKILL || sig == SIGPIPE))
#define SIGS_IS_STACKTRACE(sig) (SIGS_IS_LETHAL(sig) && sig != SIGABRT) #define SIGS_IS_STACKTRACE(sig) (SIGS_IS_LETHAL(sig) && sig != SIGABRT)
#endif #endif /* defined(__minix) && deinfed(_NETBSD_SOURCE) */
#ifndef _KERNEL #ifndef _KERNEL
#include <sys/cdefs.h> #include <sys/cdefs.h>

View file

@ -115,7 +115,7 @@ typedef u32_t big_nlink_t;
typedef u32_t big_uid_t; typedef u32_t big_uid_t;
#ifdef _MINIX #ifdef _NETBSD_SOURCE
/* some Minix specific types that do not conflict with posix */ /* some Minix specific types that do not conflict with posix */
typedef uint32_t zone_t; /* zone number */ typedef uint32_t zone_t; /* zone number */
typedef uint32_t block_t; /* block number */ typedef uint32_t block_t; /* block number */

View file

@ -1,5 +1,5 @@
DBG=-O0 -g DBG=-O0 -g
CFLAGS+= -Wall -Werror -D_NETBSD_SOURCE -fno-builtin -D_MINIX -D_POSIX_SOURCE CFLAGS+= -Wall -Werror -fno-builtin
LDADD+= -lm -lcompat_minix LDADD+= -lm -lcompat_minix
# Tests have no manpages # Tests have no manpages

View file

@ -1,5 +1,4 @@
# Copied from drivers/Makefile.inc, and slightly edited. # Copied from drivers/Makefile.inc, and slightly edited.
CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix -lc LDADD+= -lminlib -lcompat_minix -lc
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX} DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
BINDIR?=/usr/sbin BINDIR?=/usr/sbin

View file

@ -1,5 +1,4 @@
# Copied from drivers/Makefile.inc # Copied from drivers/Makefile.inc
CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix LDADD+= -lminlib -lcompat_minix
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX} DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
BINDIR?=/usr/sbin BINDIR?=/usr/sbin

View file

@ -1,7 +1,7 @@
# Makefile for the tests # Makefile for the tests
CC = exec cc CC = exec cc
CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -D_NETBSD_SOURCE=1 -I../lib/ CFLAGS = -Wall -I../lib/
PROG = semctl01 semctl02 semctl03 semctl04 semctl05 semctl06 semctl07 PROG = semctl01 semctl02 semctl03 semctl04 semctl05 semctl06 semctl07

View file

@ -1,7 +1,7 @@
# Makefile for the tests # Makefile for the tests
CC = exec cc CC = exec cc
CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -D_NETBSD_SOURCE=1 -I../lib/ CFLAGS = -Wall -I../lib/
PROG = semget01 semget02 semget03 semget05 semget06 PROG = semget01 semget02 semget03 semget05 semget06

View file

@ -1,7 +1,7 @@
# Makefile for the tests # Makefile for the tests
CC = exec cc CC = exec cc
CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -D_NETBSD_SOURCE=1 -I../lib/ CFLAGS = -Wall -I../lib/
PROG = semop01 semop02 semop03 semop04 semop05 PROG = semop01 semop02 semop03 semop04 semop05

View file

@ -1,7 +1,7 @@
# Makefile for the tests # Makefile for the tests
CC = exec cc CC = exec cc
CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -D_NETBSD_SOURCE=1 -I../lib/ CFLAGS = -Wall -I../lib/
PROG = shmat01 shmat02 shmat03 PROG = shmat01 shmat02 shmat03

View file

@ -1,7 +1,7 @@
# Makefile for the tests # Makefile for the tests
CC = exec cc CC = exec cc
CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -D_NETBSD_SOURCE=1 -I../lib/ CFLAGS = -Wall -I../lib/
PROG = shmctl01 shmctl02 shmctl03 shmctl04 PROG = shmctl01 shmctl02 shmctl03 shmctl04

View file

@ -1,7 +1,7 @@
# Makefile for the tests # Makefile for the tests
CC = exec cc CC = exec cc
CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -D_NETBSD_SOURCE=1 -I../lib/ CFLAGS = -Wall -I../lib/
PROG = shmdt01 shmdt02 PROG = shmdt01 shmdt02

View file

@ -1,7 +1,7 @@
# Makefile for the tests # Makefile for the tests
CC = exec cc CC = exec cc
CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -D_NETBSD_SOURCE=1 -I../lib/ CFLAGS = -Wall -I../lib/
PROG = shmget01 shmget02 shmget04 shmget05 PROG = shmget01 shmget02 shmget04 shmget05

View file

@ -1,7 +1,7 @@
# Makefile for the tests # Makefile for the tests
CC = exec cc CC = exec cc
CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -D_NETBSD_SOURCE=1 -I../lib/ CFLAGS = -Wall -I../lib/
PROG = shmt02 shmt03 shmt04 shmt05 shmt06 \ PROG = shmt02 shmt03 shmt04 shmt05 shmt06 \
shmt07 shmt08 shmt10 shmt01 shmt07 shmt08 shmt10 shmt01

View file

@ -1,5 +1,4 @@
# Copied from drivers/Makefile.inc # Copied from drivers/Makefile.inc
CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix LDADD+= -lminlib -lcompat_minix
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX} DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
BINDIR?=/usr/sbin BINDIR?=/usr/sbin

View file

@ -1,5 +1,6 @@
#define _SYSTEM
#define _MINIX #define _SYSTEM 1
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>

View file

@ -1,5 +1,3 @@
#define _MINIX
#include <errno.h> #include <errno.h>
#include <signal.h> #include <signal.h>
#include <stdio.h> #include <stdio.h>

View file

@ -1,7 +1,7 @@
# Makefile for the tests # Makefile for the tests
CC = exec cc CC = exec cc
CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE CFLAGS = -Wall
PROG = speed test00 test01 test02 test03 test04_srv test04_cli test05_srv \ PROG = speed test00 test01 test02 test03 test04_srv test04_cli test05_srv \
test05_cli test06_srv test06_cli test07_srv test07_cli test08_srv \ test05_cli test06_srv test06_cli test07_srv test07_cli test08_srv \

View file

@ -158,7 +158,7 @@ void do_child(int childno) {
#endif #endif
/* Normally we'd zerofill sin_zero, but there is no such thing on Minix */ /* Normally we'd zerofill sin_zero, but there is no such thing on Minix */
#ifndef _MINIX #if !defined(__minix)
memset(server.sin_zero, '\0', sizeof server.sin_zero); memset(server.sin_zero, '\0', sizeof server.sin_zero);
#endif #endif
@ -219,7 +219,7 @@ void do_child(int childno) {
} }
void do_parent(void) { void do_parent(void) {
#ifndef _MINIX #if !defined(__minix)
int yes = 1; int yes = 1;
#endif #endif
int fd_sock, fd_new, exitstatus; int fd_sock, fd_new, exitstatus;
@ -242,12 +242,12 @@ void do_parent(void) {
my_addr.sin_port = htons(MYPORT); /* Short, network byte order */ my_addr.sin_port = htons(MYPORT); /* Short, network byte order */
my_addr.sin_addr.s_addr = INADDR_ANY; my_addr.sin_addr.s_addr = INADDR_ANY;
/* Normally we'd zerofill sin_zero, but there is no such thing on Minix */ /* Normally we'd zerofill sin_zero, but there is no such thing on Minix */
#ifndef _MINIX #if !defined(__minix)
memset(my_addr.sin_zero, '\0', sizeof my_addr.sin_zero); memset(my_addr.sin_zero, '\0', sizeof my_addr.sin_zero);
#endif #endif
/* Reuse port number. Not implemented in Minix. */ /* Reuse port number. Not implemented in Minix. */
#ifndef _MINIX #if !defined(__minix)
if(setsockopt(fd_sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) < 0) { if(setsockopt(fd_sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) < 0) {
perror("Error setting port reuse option"); perror("Error setting port reuse option");
exit(-1); exit(-1);

View file

@ -123,7 +123,7 @@ void test27a()
/* Check special file. */ /* Check special file. */
if (stat("/dev/tty", &st1) != 0) e(40); if (stat("/dev/tty", &st1) != 0) e(40);
if (!S_ISCHR(st1.st_mode)) e(41); if (!S_ISCHR(st1.st_mode)) e(41);
#ifdef _MINIX #if defined(__minix) && defined(_NETBSD_SOURCE)
if (stat("/dev/ram", &st1) != 0) e(42); if (stat("/dev/ram", &st1) != 0) e(42);
if (!S_ISBLK(st1.st_mode)) e(43); if (!S_ISBLK(st1.st_mode)) e(43);
#endif #endif

View file

@ -231,7 +231,7 @@ void test28b()
if (errno != ENOENT) e(38); /* is gone */ if (errno != ENOENT) e(38); /* is gone */
} }
#endif #endif
#ifdef _MINIX #if defined(__minix) && defined(_NETBSD_SOURCE)
/* Some implementations might allow users to link directories. */ /* Some implementations might allow users to link directories. */
if (!superuser) { if (!superuser) {
if (link("foo", "footoo") != -1) e(39); if (link("foo", "footoo") != -1) e(39);

View file

@ -1,5 +1,4 @@
/* Tests for MINIX3 ptrace(2) - by D.C. van Moolenbroek */ /* Tests for MINIX3 ptrace(2) - by D.C. van Moolenbroek */
#define _POSIX_SOURCE 1
#include <setjmp.h> #include <setjmp.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View file

@ -1,5 +1,4 @@
/* Tests for MINIX3 realpath(3) - by Erik van der Kouwe */ /* Tests for MINIX3 realpath(3) - by Erik van der Kouwe */
#define _POSIX_SOURCE 1
#include <assert.h> #include <assert.h>
#include <dirent.h> #include <dirent.h>
#include <errno.h> #include <errno.h>

View file

@ -1,5 +1,4 @@
/* Tests for truncate(2) call family - by D.C. van Moolenbroek */ /* Tests for truncate(2) call family - by D.C. van Moolenbroek */
#define _POSIX_SOURCE 1
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/param.h> #include <sys/param.h>
#include <unistd.h> #include <unistd.h>

View file

@ -1,4 +1,3 @@
#define _POSIX_SOURCE 1
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

Some files were not shown because too many files have changed in this diff Show more