* user space and converted into a concatenated argument list).
*/
+#define _MINIX_SYSTEM 1
+
#include <minix/config.h>
#include <minix/endpoint.h>
#include <minix/paths.h>
+#define _MINIX_SYSTEM 1
+
#include <stdarg.h>
#include <assert.h>
#include <stdlib.h>
+#define _MINIX_SYSTEM 1
+
#include <sys/svrctl.h>
#include <sys/types.h>
#include <ctype.h>
#ifndef _MINIX_DS_H
#define _MINIX_DS_H
+#ifdef _MINIX_SYSTEM
+
#include <sys/types.h>
#include <minix/endpoint.h>
int ds_subscribe(const char *regex, int flags);
int ds_check(char *ds_name, int *type, endpoint_t *owner_e);
+#endif /* _MINIX_SYSTEM */
+
#endif /* _MINIX_DS_H */
#ifndef _MINIX_ENDPOINT_H
#define _MINIX_ENDPOINT_H 1
+#ifdef _MINIX_SYSTEM
+
#include <minix/sys_config.h>
#include <minix/com.h>
#include <limits.h>
#define _ENDPOINT_P(e) \
((((e)+MAX_NR_TASKS) & (_ENDPOINT_GENERATION_SIZE - 1)) - MAX_NR_TASKS)
+#endif /* _MINIX_SYSTEM */
+
#endif
/* Number of processes contained in the system image. */
#define NR_BOOT_PROCS (NR_TASKS + LAST_SPECIAL_PROC_NR + 1)
+#ifdef _MINIX_SYSTEM
/* This is used to obtain system information through SYS_GETINFO. */
#define MAXMEMMAP 40
typedef struct kinfo {
int kernel_allocated_bytes; /* used by kernel */
int kernel_allocated_bytes_dynamic; /* used by kernel (runtime) */
} kinfo_t;
+#endif /* _MINIX_SYSTEM */
#endif
# Makefile for the common audio framework
NOGCCERROR=yes
NOCLANGERROR=yes
+CPPFLAGS+= -D_MINIX_SYSTEM
LIB= audiodriver
SRCS= audio_fw.c liveupdate.c
NOGCCERROR=yes
NOCLANGERROR=yes
+CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libbdev
.include <bsd.own.mk>
NOGCCERROR=yes
NOCLANGERROR=yes
+CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libblockdriver
.include <bsd.own.mk>
#define _SYSTEM 1
+#define _MINIX_SYSTEM 1
#include <sys/cdefs.h>
#define _SYSTEM 1
+#define _MINIX_SYSTEM 1
#include <sys/cdefs.h>
#include "namespace.h"
#include <lib.h>
#define __USE_MISC
#define _SYSTEM 1
+#define _MINIX_SYSTEM 1
#include <sys/cdefs.h>
#include <lib.h>
#define _SYSTEM 1
+#define _MINIX_SYSTEM 1
#include <sys/cdefs.h>
#include <lib.h>
#define _SYSTEM 1
+#define _MINIX_SYSTEM 1
#include <sys/cdefs.h>
#include <lib.h>
* Author: Lionel A. Sambuc.
*/
+#define _MINIX_SYSTEM
+
#include <sys/cdefs.h>
#include "namespace.h"
#include <lib.h>
NOGCCERROR=yes
NOCLANGERROR=yes
+CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libchardriver
.include <bsd.own.mk>
#
# Makefile for libclkconf
-CPPFLAGS+= -D_SYSTEM
+CPPFLAGS+= -D_SYSTEM -D_MINIX_SYSTEM
LIB= clkconf
SRCS = pci.c printf.c mem.c pgtab.c dde.c initcall.c thread.c condvar.c lock.c semaphore.c timer.c panic.c irq.c resource.c msg_queue.c
-CFLAGS += -D_NETBSD_SOURCE
+CPPFLAGS += -D_NETBSD_SOURCE -D_MINIX_SYSTEM
.include <bsd.lib.mk>
# Makefile for libgpio
-CPPFLAGS+= -D_SYSTEM
+CPPFLAGS+= -D_SYSTEM -D_MINIX_SYSTEM
LIB= gpio
NOGCCERROR=yes
NOCLANGERROR=yes
+CPPFLAGS+=-D_MINIX_SYSTEM
+
# Makefile for libi2cdriver
LIB= i2cdriver
# Makefile for libinputdriver
.include <bsd.own.mk>
+CPPFLAGS+= -D_MINIX_SYSTEM
LIB= inputdriver
NOGCCERROR=yes
NOCLANGERROR=yes
+CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libminixfs
.include <bsd.own.mk>
NOGCCERROR=yes
NOCLANGERROR=yes
+CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libnetdriver
NOGCCERROR=yes
NOCLANGERROR=yes
+CPPFLAGS+= -D_MINIX_SYSTEM
LIB = netsock
protect.c read.c stadir.c time.c utility.c table.c
CPFFLAGS+=-Dlchown=chown -Dlchmod=chmod
+CPPFLAGS+= -D_MINIX_SYSTEM
NOGCCERROR=yes
NOCLANGERROR=yes
NOGCCERROR=yes
NOCLANGERROR=yes
+CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libsffs
.include <bsd.own.mk>
# Makefile for libsys
.include <bsd.own.mk>
+CPPFLAGS+= -D_MINIX_SYSTEM -D_SYSTEM
+
LIB= sys
CFLAGS+= -fno-builtin
-#define _SYSTEM 1
#include <minix/config.h>
#include <assert.h>
/* syslib.h - System library common definitions. */
-#define _SYSTEM
-
#include <lib.h>
#include <minix/com.h>
#include <minix/syslib.h>
NOGCCERROR=yes
NOCLANGERROR=yes
+CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libvirtio
.include <bsd.own.mk>
NOGCCERROR=yes
NOCLANGERROR=yes
+CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libvtreefs
.endif # ${MACHINE_ARCH} == "earm"
+# Get (more) internal minix definitions and declarations.
+CPPFLAGS += -D_MINIX_SYSTEM=1
+
.include <bsd.prog.mk>
#define MULTIBOOT_HEADER_HAS_VBE 0x00000004
#define MULTIBOOT_HEADER_HAS_ADDR 0x00010000
-#if defined(__minix) && !defined(__ASSEMBLY__)
+#if defined(__minix) && !defined(__ASSEMBLY__) && (defined(_MINIX_SYSTEM) || defined(_STANDALONE))
#if !defined(_LOCORE)
+
+#include <machine/types.h>
+
struct multiboot_header {
uint32_t mh_magic;
uint32_t mh_flags;
extern struct multiboot_header *Multiboot_Header;
#endif /* !defined(_LOCORE) && defined(_KERNEL) */
-#endif /* defined(__minix) && !defined(__ASSEMBLY__) */
+#endif /* defined(__minix) && !defined(__ASSEMBLY__) && (defined(_MINIX_SYSTEM) || defined(_STANDALONE))*/
/* --------------------------------------------------------------------- */
#define MULTIBOOT_INFO_HAS_APM_TABLE 0x00000400
#define MULTIBOOT_INFO_HAS_VBE 0x00000800
-#if defined(__minix) && !defined(__ASSEMBLY__)
+#if defined(__minix) && !defined(__ASSEMBLY__) && (defined(_MINIX_SYSTEM) || defined(_STANDALONE))
#if !defined(_LOCORE)
struct multiboot_info {
#endif /* !defined(_LOCORE) */
-#endif /* defined(__minix) && !defined(__ASSEMBLY__) */
+#endif /* defined(__minix) && !defined(__ASSEMBLY__) && (defined(_MINIX_SYSTEM) || defined(_STANDALONE))*/
#if defined(__minix)
/* --------------------------------------------------------------------- */
-#endif /* _MACHINE_MULTIBOOT_H */
\ No newline at end of file
+#endif /* _MACHINE_MULTIBOOT_H */
#endif
int posix_madvise(void *, size_t, int);
-#if defined(__minix)
+#if defined(__minix) && defined(_MINIX_SYSTEM)
#include <minix/endpoint.h>
void * vm_remap(endpoint_t d, endpoint_t s, void *da, void *sa, size_t si);
void * vm_remap_ro(endpoint_t d, endpoint_t s, void *da, void *sa, size_t si);
int vm_unmap(endpoint_t endpt, void *addr);
unsigned long vm_getphys(endpoint_t endpt, void *addr);
u8_t vm_getrefcount(endpoint_t endpt, void *addr);
-#endif /* defined(__minix) */
+#endif /* defined(__minix) && defined(_MINIX_SYSTEM) */
__END_DECLS
+#define _MINIX_SYSTEM
+
#include <stdio.h>
#include <minix/endpoint.h>
#include <minix/sys_config.h>
* Exercise the caching functionality of libminixfs in isolation.
*/
+#define _MINIX_SYSTEM
+
#include <minix/libminixfs.h>
#include <minix/sysutil.h>
#include <minix/syslib.h>
* in testvm.c, started as a service by this test program.
*/
+#define _MINIX_SYSTEM 1
+
#include <minix/libminixfs.h>
#include <minix/sysutil.h>
#include <minix/syslib.h>
/* Author: Ben Gras <beng@few.vu.nl> 17 march 2006 */
/* Modified for ProcFS by Alen Stojanov and David van Moolenbroek */
+#define _MINIX_SYSTEM 1
+
#include <stdio.h>
#include <unistd.h>
#include <pwd.h>