-CPPFLAGS+=-DTIME -DMINIX=1 -D_MINIX=1 -D_POSIX_SOURCE=1 -I../../src/ -D_NETBSD_SOURCE
+CPPFLAGS+=-DTIME -DMINIX=1 -I../../src/
HZ=60
BINDIR=/usr/benchmarks/unixbench/pgms
-CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE -D_MINIX_COMPAT
+CPPFLAGS+= -D_MINIX_COMPAT
LDADD+= -lminlib -lcompat_minix -lasyn -lterminfo
BINDIR?=/usr/bin
Created August 7, 1991 by Philip Homburg
*/
-#define _POSIX_C_SOURCE 2
-
#include <sys/types.h>
#include <sys/ioctl.h>
#include <errno.h>
#ifdef vax
fprintf(stderr, "vax, ");
#endif
-#ifdef _MINIX
+#ifdef __minix
fprintf(stderr, "MINIX, ");
#endif
#ifdef NO_UCHAR
-DHAVE_SYSEXITS_H \
-DHAVE_UTIME_H
-CPPFLAGS+= -D_POSIX_SOURCE
DPADD+= ${LIBFETCH}
LDADD+= -lfetch
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_FOLLOW, N_FPRINT,
-#ifndef _MINIX
+#if !defined(__minix)
N_FSTYPE,
N_FLAGS,
#endif
errx(1, "-delete: %s: relative path potentially not safe",
entry->fts_accpath);
-#ifndef _MINIX
+#if !defined(__minix)
/* Turn off user immutable bits if running as root */
if ((entry->fts_statp->st_flags & (UF_APPEND|UF_IMMUTABLE)) &&
!(entry->fts_statp->st_flags & (SF_APPEND|SF_IMMUTABLE)) &&
}
-#ifndef _MINIX
+#if !defined(__minix)
/*
* -flags [-]flags functions --
*/
*
* True if the file is of a certain type.
*/
-#ifndef _MINIX
+#if !defined(__minix)
int
f_fstype(PLAN *plan, FTSENT *entry)
{
{ "-false", N_FALSE, c_false, 0 },
{ "-follow", N_FOLLOW, c_follow, 0 },
{ "-fprint", N_FPRINT, c_fprint, 1 },
-#ifndef _MINIX
+#if !defined(__minix)
{ "-flags", N_FLAGS, c_flags, 1 },
{ "-fstype", N_FSTYPE, c_fstype, 1 },
#endif
struct person *person1; /* list of people */
long tloc; /* current time */
-#if !_MINIX
+#if !defined(__minix)
char *strcpy();
char *ctime();
#endif
char *host;
struct hostent *hp;
int s, result;
-#if !_MINIX
+#if !defined(__minix)
char *rindex();
#endif
register FILE *f;
char *mbxdir = preamble; /* string with path preamble */
char *mbxpath; /* space for entire pathname */
-#if !_MINIX
+#if !defined(__minix)
char *ctime(); /* convert longword time to ascii */
#endif
char *timestr;
* 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 <sys/types.h>
#include <arpa/nameser.h>
#include <net/gen/in.h>
#include <net/gen/tcp.h>
#include <net/gen/tcp_io.h>
-#endif
extern int h_errno;
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 \
tags.c ttyin.c version.c
-.if defined(NBSD_LIBC) && (${NBSD_LIBC} != "no")
+
LDADD+= -ltermcap
DPADD+= ${LIBTERM}
-.endif
+
MLINKS= less.1 more.1 less.1 page.1
LINKS= ${BINDIR}/less ${BINDIR}/more ${BINDIR}/less ${BINDIR}/page
* rcp
*/
-#undef _MINIX
#define NAMESERVER
#include <ctype.h>
* $Header$
*/
-#if _MINIX
+#if defined(__minix)
#include <sys/types.h>
#include <sys/ioctl.h>
#include <errno.h>
int argoff, asrsh, ch, dflag, nflag, one, pid, rem, uid;
register char *p;
char *args, *host, *user;
-#if !_MINIX
+#if !defined(__minix)
char *copyargs();
void sendsig();
#endif
(void)fprintf(stderr, "rsh: can't establish stderr.\n");
exit(1);
}
-#if !_MINIX
+#if !defined(__minix)
if (dflag) {
if (setsockopt(rem, SOL_SOCKET, SO_DEBUG, &one,
sizeof(one)) < 0)
#endif
(void)setuid(uid);
-#if !_MINIX
+#if !defined(__minix)
omask = sigblock(sigmask(SIGINT)|sigmask(SIGQUIT)|sigmask(SIGTERM));
#endif
if (signal(SIGINT, SIG_IGN) != SIG_IGN)
#endif
#endif
{
-#if _MINIX
+#if defined(__minix)
;
#else
(void)ioctl(rfd2, FIONBIO, &one);
{
register int cc, wc;
register char *bp;
-#if !_MINIX
+#if !defined(__minix)
int readfrom, ready, rembits;
#endif
char buf[BUFSIZ];
-#if _MINIX
+#if defined(__minix)
int pid1;
#endif
bp = buf;
rewrite:
-#if !_MINIX
+#if !defined(__minix)
rembits = 1 << rem;
if (select(16, 0, &rembits, 0, 0) < 0) {
if (errno != EINTR) {
#endif
wc = write(rem, bp, cc);
if (wc < 0) {
-#if !_MINIX
+#if !defined(__minix)
if (errno == EWOULDBLOCK)
goto rewrite;
#endif
goto reread;
goto rewrite;
done:
-#if _MINIX
+#if defined(__minix)
ioctl(rem, NWIOTCPSHUTDOWN, NULL);
#else
(void)shutdown(rem, 1);
exit(0);
}
-#if _MINIX
+#if defined(__minix)
pid1= fork();
if (pid1 == -1)
{
register int cc;
register char **ap, *p;
char *args;
-#if !_MINIX
+#if !defined(__minix)
char *malloc();
#endif
ttn.c
*/
-#ifndef _POSIX_SOURCE
-#define _POSIX_SOURCE 1
-#endif
-
#include <sys/types.h>
#include <sys/ioctl.h>
#include <assert.h>
/* 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 <sys/types.h>
#include <sys/stat.h>
-CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
BINDIR?=/usr/sbin
*
*****************************************************************************/
-#if defined(_MINIX) || defined(__minix)
+#if defined(__minix)
#include "acminix.h"
#elif defined(_LINUX) || defined(__linux__)
/* Filter driver - general include file */
-#define _MINIX 1
#define _SYSTEM 1
#include <minix/config.h>
#include <minix/const.h>
#define STRING_SIZE 200
-+#ifdef _MINIX
++#if defined(__minix)
+#define block_t gcc_block_t
+#endif
+
unsigned arcount :16; /*%< number of resource entries */
} HEADER;
-#ifdef _MINIX
+#if defined(__minix) && defined(_NETBSD_SOURCE)
#define dh_id id
#define dh_qdcount qdcount
#define dh_ancount ancount
#define dh_nscount nscount
#define dh_arcount arcount
-#endif
+#endif /* defined(__minix) && defined(_NETBSD_SOURCE) */
#define PACKETSZ NS_PACKETSZ
#define MAXDNAME NS_MAXDNAME
#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 */
+#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
#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. */
#include <minix/config.h> /* must be first */
/* Types and constants shared between block and character drivers. */
-#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
-#define _MINIX 1 /* tell headers to include MINIX stuff */
-#define _SYSTEM 1 /* get negative error number in <errno.h> */
+#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
+#define _NETBSD_SOURCE 1 /* tell headers to include MINIX stuff */
+#define _SYSTEM 1 /* get negative error number in <errno.h> */
/* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */
/* Base and size of a partition in bytes. */
struct device {
- u64_t dv_base;
- u64_t dv_size;
+ u64_t dv_base;
+ u64_t dv_size;
};
/* Generic receive function for all drivers. */
#ifndef _INC_DRIVERS_H
#define _INC_DRIVERS_H
-#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
-#define _MINIX 1 /* tell headers to include MINIX stuff */
-#define _SYSTEM 1 /* get negative error number in <errno.h> */
+#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
+#define _NETBSD_SOURCE 1 /* tell headers to include MINIX stuff */
+#define _SYSTEM 1 /* get negative error number in <errno.h> */
/* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */
#define VDISCARD 13 /* cc_c[VDISCARD] (^O) */
/* Extensions to baud rate settings. */
-#ifdef _MINIX
+#if defined(__minix) && defined(_NETBSD_SOURCE)
#define B57600 0x0100 /* 57600 baud */
#define B115200 0x0200 /* 115200 baud */
#define B230400 0x0400 /* 230400 baud */
#define B1843200 0x2000 /* 1843200 baud */
#define B3000000 0x4000 /* 3000000 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' */
*/
#ifdef __minix
int lseek64(int fd, u64_t _offset, int _whence, u64_t *_newpos);
-#if defined(_MINIX)
+#if defined(_NETBSD_SOURCE)
#include <minix/type.h>
int getprocnr(void);
int getnucred(endpoint_t proc_ep, struct ucred *ucred);
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);
-#endif /* __MINIX */
+#endif /* defined(_NETBSD_SOURCE) */
#endif /* __minix */
#if defined(_NETBSD_SOURCE)
LDFLAGS+= -nostdlib
CFLAGS += -fno-stack-protector
-CPPFLAGS+= -D_NETBSD_SOURCE -D_MINIX -D__kernel__
+CPPFLAGS+= -D__kernel__
# kernel headers are always called through kernel/*.h
CPPFLAGS+= -I${NETBSDSRCDIR}
/* This is the master header for the kernel. It includes some other files
* 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 */
/*
-.if defined(NBSD_LIBC) && (${NBSD_LIBC} == "yes")
-CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
-.else
-CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE
-.endif
+# $NetBSD: Makefile.inc,v 1.7 2012/03/21 05:39:21 matt Exp $
+
+#WARNS?= 5
-#include <sys/cdefs.h>
#define _SYSTEM 1
-#define _MINIX 1
+
+#include <sys/cdefs.h>
#include <minix/callnr.h>
#include <minix/com.h>
#define __USE_MISC
#define _SYSTEM 1
-#define _MINIX 1
#include <sys/cdefs.h>
#include <lib.h>
#define _SYSTEM 1
-#define _MINIX 1
#include <sys/cdefs.h>
#include <lib.h>
#define _SYSTEM 1
-#define _MINIX 1
#include <sys/cdefs.h>
#include <lib.h>
#define _SYSTEM 1
-#define _MINIX 1
+
#include <sys/cdefs.h>
#include <lib.h>
#include "namespace.h"
-#define _MINIX
-#define _POSIX_SOURCE
#include <minix/callnr.h>
#include <minix/com.h>
#include <minix/config.h>
INCS= libexec.h
SRCS= exec_aout.c exec_elf.c exec_general.c
-.if (${NBSD_LIBC} != "no")
INCSDIR= /usr/include
-.else
-INCSDIR= /usr/include.ack
-.endif
.include <bsd.lib.mk>
.include <bsd.own.mk>
-CPPFLAGS+= -D_POSIX_SOURCE
CPPFLAGS+= -I.
CPPFLAGS+= -D_LARGEFILE_SOURCE -D_LARGE_FILES
# Makefile for libmthread
-CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -Wall -Werror -D_SYSTEM
+CPPFLAGS+= -O1 -Wall -Werror -D_SYSTEM
LIB= gpio
# Makefile for libmthread
-CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -Wall -Werror
+CPPFLAGS+= -O1 -Wall -Werror
LIB= mthread
LIB = netsock
-CPPFLAGS += -I${.CURDIR}/include/ -D_SYSTEM -D_MINIX
+CPPFLAGS += -I${.CURDIR}/include/ -D_SYSTEM
CPPFLAGS+= -I${.CURDIR}/../../lib/liblwip/include
CFLAGS += -Wall -Wextra -std=c99
# Makefile for libpadconf
-CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -Wall -Werror -D_SYSTEM
+CPPFLAGS+= -O1 -Wall -Werror -D_SYSTEM
LIB= padconf
-/* This is the master header for fs. It includes some other files
- * and defines the principal constants.
- */
-
#ifndef LIBPUFFS_FS_H
#define LIBPUFFS_FS_H
-#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 */
+/* This is the master header for fs. It includes some other files
+ * and defines the principal constants.
+ */
+#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. */
#include <minix/config.h> /* MUST be first */
*
*/
-#define _MINIX 1
-#define _SYSTEM 1
+#define _SYSTEM 1
#include <lib.h>
#include <minix/u64.h>
#include <minix/sysutil.h>
-#define _MINIX 1
-#define _SYSTEM 1
+#define _SYSTEM 1
#include <minix/config.h>
#include <assert.h>
* May 2009 (D.C. van Moolenbroek)
*/
-#define _MINIX 1
#include <stdlib.h>
#include <string.h>
#include <minix/config.h>
-#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 */
#include <stdlib.h>
#include <stdio.h>
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
-.if (${NBSD_LIBC} != "no")
INCSDIR= /usr/include
-.else
-INCSDIR= /usr/include.ack
-.endif
INCS= zconf.h zlib.h
#include <ufs/ext2fs/ext2fs.h>
#include <sys/ioctl.h>
-#define _MINIX
#include <err.h>
#include <errno.h>
#include <string.h>
-CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
BINDIR?=/usr/sbin
/* buf.c - by Alen Stojanov and David van Moolenbroek, taken from procfs */
-#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 DEVMAN_SERVER 1
+#define _SYSTEM 1 /* tell headers that this is the kernel */
+#define DEVMAN_SERVER 1
#include <minix/config.h>
#include <errno.h>
#ifndef _SERVERS_DEVMAN_DEVMAN_H
#define _SERVERS_DEVMAN_DEVMAN_H
-#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 DEVMAN_SERVER 1
+#define _SYSTEM 1 /* tell headers that this is the kernel */
+#define DEVMAN_SERVER 1
#include <minix/config.h>
#include <errno.h>
-#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 */
#include <minix/config.h>
#include <errno.h>
/* Header file including all needed system headers. */
-#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
-#define _MINIX 1 /* tell headers to include MINIX stuff */
-#define _SYSTEM 1 /* get OK and negative error codes */
+#define _SYSTEM 1 /* get OK and negative error codes */
#include <sys/types.h>
#include <sys/param.h>
-/* This is the master header for fs. It includes some other files
- * and defines the principal constants.
- */
-
#ifndef EXT2_FS_H
#define EXT2_FS_H
-#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 */
+/* This is the master header for fs. It includes some other files
+ * and defines the principal constants.
+ */
+#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. */
#include <minix/config.h> /* MUST be first */
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>
*/
#define _MINIX_SOURCE 1
-#define _POSIX_SOURCE 1
#include <stdlib.h>
#include <unistd.h>
-#define _POSIX_SOURCE 1 /* tell headers to include POSIX stuff */
-#define _MINIX 1 /* tell headers to include MINIX stuff */
-#define _SYSTEM 1 /* get OK and negative error codes */
+#define _SYSTEM 1 /* get OK and negative error codes */
#include <minix/callnr.h>
#include <minix/com.h>
* Jul 13, 2004 by Jorrit N. Herder
*/
-#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 <limits.h>
-#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 */
-#define VERBOSE 0 /* display diagnostics */
+#define VERBOSE 0 /* display diagnostics */
#include <sys/types.h>
#include <limits.h>
BINDIR?= /usr/sbin
-CPPFLAGS+= -I${.CURDIR} -D_MINIX -D_SYSTEM
+CPPFLAGS+= -I${.CURDIR} -D_SYSTEM
CPPFLAGS+= -I${.CURDIR}/../../lib/liblwip/include
CFLAGS += -Wextra -std=c99
/* This is the master header for fs. It includes some other files
* 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 */
-#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. */
#include <minix/config.h> /* MUST be first */
#ifndef __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.
*/
-#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 */
/* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */
#include <minix/const.h>
#include <minix/type.h>
#include <minix/dmap.h>
+
#include <minix/vfsif.h>
#include <limits.h>
#include <errno.h>
-#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 */
+#define _NETBSD_SOURCE 1 /* tell headers to include MINIX stuff */
-#define VERBOSE 0 /* display diagnostics */
+#define VERBOSE 0 /* display diagnostics */
#ifdef __NBSD_LIBC
#include <sys/ioc_net.h>
/* This is the master header for PM. It includes some other files
* 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 */
/* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */
#ifndef _PROCFS_INC_H
#define _PROCFS_INC_H
-#define _POSIX_SOURCE 1
-#define _MINIX 1
-#define _SYSTEM 1
+#define _SYSTEM 1
#include <minix/config.h>
#include <limits.h>
* Jul 22, 2005 by Jorrit N. Herder
*/
-#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/wait.h>
/* This is the master header for the Scheduler. It includes some other files
* 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 */
/* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */
/* This is the master header for fs. It includes some other files
* 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 */
/* The following are so basic, all the *.c files get them automatically. */
#include <minix/config.h> /* MUST be first */
#define _SYSTEM 1
-#define _POSIX_SOURCE 1
#include <minix/callnr.h>
#include <minix/com.h>
-#define _POSIX_SOURCE 1
-#define _MINIX 1
-#define _SYSTEM 1
+#define _SYSTEM 1
#include <minix/callnr.h>
#include <minix/com.h>
/* This file contains some utility routines for VM. */
-#define _SYSTEM 1
-
-#define _MINIX 1 /* To get the brk() prototype (as _brk()). */
+#define _SYSTEM 1
#include <minix/callnr.h>
#include <minix/com.h>
unix?= We run MINIX.
-NBSD_LIBC= yes
-
DBG?= -O
CPP?= /usr/lib/cpp
.endif # defined(__MINIX)
#define sc_pc sc_regs.pc
#define sc_psr sc_regs.psr
-#ifdef _MINIX
+#if defined(__minix) && defined(_NETBSD_SOURCE)
__BEGIN_DECLS
int sigreturn(struct sigcontext *_scp);
__END_DECLS
-#endif /* _MINIX */
+#endif /* defined(__minix) && defined(_NETBSD_SOURCE) */
#endif /* !_ARM_SIGNAL_H_ */
#define sc_sp sc_regs.sp
#define sc_ss sc_regs.ss
-#ifdef _MINIX
+#if defined(__minix) && defined(_NETBSD_SOURCE)
__BEGIN_DECLS
int sigreturn(struct sigcontext *_scp);
__END_DECLS
-#endif /* _MINIX */
+#endif /* defined(__minix) && defined(_NETBSD_SOURCE) */
#endif /* !_I386_SIGNAL_H_ */
CPPFLAGS+= -I ${.OBJDIR}
.if defined(__MINIX)
CPPFLAGS+=-isystem ${DESTDIR}/usr/include
-CPPFLAGS+= -D_MINIX
.endif # defined(__MINIX)
# Make sure we override any optimization options specified by the user
COPTS= -Os
.if defined(__MINIX)
SAMISCMAKEFLAGS+="SA_INCLUDE_NET=no"
CPPFLAGS+= -isystem ${DESTDIR}/usr/include
-CPPFLAGS+= -D_MINIX
AFLAGS+= -Wa,--divide
.endif
.include "${S}/lib/libsa/Makefile.inc"
__END_DECLS
#endif /* _KERNEL */
-#ifdef _MINIX
+#if defined(__minix) && defined(_NETBSD_SOURCE)
/* possible select() operation types; read, write, errors */
/* (FS/driver internal use only) */
#define SEL_RD (1 << 0)
#define SEL_WR (1 << 1)
#define SEL_ERR (1 << 2)
#define SEL_NOTIFY (1 << 3) /* not a real select operation */
-#endif
+#endif /* defined(__minix) && defined(_NETBSD_SOURCE) */
#endif /* !_SYS_SELECT_H_ */
#define SIGTTIN 22 /* background process wants to read */
#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 */
/* MINIX specific signals. These signals are not used by user proceses,
|| (sig == SIGKILL || sig == SIGPIPE))
#define SIGS_IS_STACKTRACE(sig) (SIGS_IS_LETHAL(sig) && sig != SIGABRT)
-#endif
+#endif /* defined(__minix) && deinfed(_NETBSD_SOURCE) */
#ifndef _KERNEL
#include <sys/cdefs.h>
typedef u32_t big_uid_t;
-#ifdef _MINIX
+#ifdef _NETBSD_SOURCE
/* some Minix specific types that do not conflict with posix */
typedef uint32_t zone_t; /* zone number */
typedef uint32_t block_t; /* block number */
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
# Tests have no manpages
# Copied from drivers/Makefile.inc, and slightly edited.
-CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix -lc
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
BINDIR?=/usr/sbin
# Copied from drivers/Makefile.inc
-CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
BINDIR?=/usr/sbin
# Makefile for the tests
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
# Makefile for the tests
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
# Makefile for the tests
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
# Makefile for the tests
CC = exec cc
-CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -D_NETBSD_SOURCE=1 -I../lib/
+CFLAGS = -Wall -I../lib/
PROG = shmat01 shmat02 shmat03
# Makefile for the tests
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
# Makefile for the tests
CC = exec cc
-CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -D_NETBSD_SOURCE=1 -I../lib/
+CFLAGS = -Wall -I../lib/
PROG = shmdt01 shmdt02
# Makefile for the tests
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
# Makefile for the tests
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 \
shmt07 shmt08 shmt10 shmt01
# Copied from drivers/Makefile.inc
-CPPFLAGS+= -D_MINIX -D_NETBSD_SOURCE
LDADD+= -lminlib -lcompat_minix
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
BINDIR?=/usr/sbin
-#define _SYSTEM
-#define _MINIX
+
+#define _SYSTEM 1
+
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
-#define _MINIX
-
#include <errno.h>
#include <signal.h>
#include <stdio.h>
# Makefile for the tests
CC = exec cc
-CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE
+CFLAGS = -Wall
PROG = speed test00 test01 test02 test03 test04_srv test04_cli test05_srv \
test05_cli test06_srv test06_cli test07_srv test07_cli test08_srv \
#endif
/* 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);
#endif
}
void do_parent(void) {
-#ifndef _MINIX
+#if !defined(__minix)
int yes = 1;
#endif
int fd_sock, fd_new, exitstatus;
my_addr.sin_port = htons(MYPORT); /* Short, network byte order */
my_addr.sin_addr.s_addr = INADDR_ANY;
/* 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);
#endif
/* Reuse port number. Not implemented in Minix. */
-#ifndef _MINIX
+#if !defined(__minix)
if(setsockopt(fd_sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) < 0) {
perror("Error setting port reuse option");
exit(-1);
/* Check special file. */
if (stat("/dev/tty", &st1) != 0) e(40);
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 (!S_ISBLK(st1.st_mode)) e(43);
#endif
if (errno != ENOENT) e(38); /* is gone */
}
#endif
-#ifdef _MINIX
+#if defined(__minix) && defined(_NETBSD_SOURCE)
/* Some implementations might allow users to link directories. */
if (!superuser) {
if (link("foo", "footoo") != -1) e(39);
/* Tests for MINIX3 ptrace(2) - by D.C. van Moolenbroek */
-#define _POSIX_SOURCE 1
#include <setjmp.h>
#include <stdlib.h>
#include <stdio.h>
/* Tests for MINIX3 realpath(3) - by Erik van der Kouwe */
-#define _POSIX_SOURCE 1
#include <assert.h>
#include <dirent.h>
#include <errno.h>
/* Tests for truncate(2) call family - by D.C. van Moolenbroek */
-#define _POSIX_SOURCE 1
#include <sys/stat.h>
#include <sys/param.h>
#include <unistd.h>
-#define _POSIX_SOURCE 1
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
* installboot 3.0 - Make a device bootable Author: Kees J. Bot
* 21 Dec 1991
*/
-
-#define _POSIX_SOURCE 1
-#define _MINIX 1
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
BINDIR= /sbin
MAN=
-CPPFLAGS+= -D_MINIX
-
# LSC Adding this to activate the getline renaming macro
CPPFLAGS+= -D__NBSD_LIBC