[rtems-libbsd commit] Move __FreeBSD__ define to header files
Sebastian Huber
sebh at rtems.org
Mon Dec 16 14:29:34 UTC 2013
Module: rtems-libbsd
Branch: master
Commit: e48f60383eb88f515bc28faf1c36739e91ac262e
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=e48f60383eb88f515bc28faf1c36739e91ac262e
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Dec 12 10:38:22 2013 +0100
Move __FreeBSD__ define to header files
---
Makefile | 1 -
freebsd-to-rtems.py | 1 -
.../include/machine/rtems-bsd-kernel-space.h.in | 2 ++
rtemsbsd/include/machine/rtems-bsd-user-space.h | 2 ++
4 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 1b3dfc4..7d9222d 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,6 @@ CFLAGS += -Ifreebsd/lib/libkvm
CFLAGS += -Ifreebsd/lib/libmemstat
CFLAGS += -Ifreebsd/lib/libipsec
CFLAGS += -Itestsuite/include
-CFLAGS += -D__FreeBSD__
CFLAGS += -D__DBINTERFACE_PRIVATE
CFLAGS += -DINET6
CFLAGS += -w
diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py
index ce8ca10..18b1c19 100755
--- a/freebsd-to-rtems.py
+++ b/freebsd-to-rtems.py
@@ -421,7 +421,6 @@ class ModuleManager:
'CFLAGS += -Ifreebsd/lib/libmemstat\n' \
'CFLAGS += -Ifreebsd/lib/libipsec\n' \
'CFLAGS += -Itestsuite/include\n' \
- 'CFLAGS += -D__FreeBSD__\n' \
'CFLAGS += -D__DBINTERFACE_PRIVATE\n' \
'CFLAGS += -DINET6\n' \
'CFLAGS += -w\n' \
diff --git a/rtemsbsd/include/machine/rtems-bsd-kernel-space.h.in b/rtemsbsd/include/machine/rtems-bsd-kernel-space.h.in
index 8833472..2191f36 100644
--- a/rtemsbsd/include/machine/rtems-bsd-kernel-space.h.in
+++ b/rtemsbsd/include/machine/rtems-bsd-kernel-space.h.in
@@ -47,6 +47,8 @@
#define __GLOBL1(sym) __asm__(".globl " #sym)
#define __GLOBL(sym) __GLOBL1(sym)
+#define __FreeBSD__ 1
+
/* General define to activate BSD kernel parts */
#define _KERNEL 1
diff --git a/rtemsbsd/include/machine/rtems-bsd-user-space.h b/rtemsbsd/include/machine/rtems-bsd-user-space.h
index 64d3cb0..b4f74a5 100644
--- a/rtemsbsd/include/machine/rtems-bsd-user-space.h
+++ b/rtemsbsd/include/machine/rtems-bsd-user-space.h
@@ -40,6 +40,8 @@
#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_USER_SPACE_H_
#define _RTEMS_BSD_MACHINE_RTEMS_BSD_USER_SPACE_H_
+#define __FreeBSD__ 1
+
#include <sys/cdefs.h>
#include <stdio.h>
More information about the vc
mailing list