[rtems commit] jffs2: Do not use command line defines
Sebastian Huber
sebh at rtems.org
Mon Apr 30 06:08:32 UTC 2018
Module: rtems
Branch: master
Commit: 6ac6a5c86638742f77f941f16d2db3a3377ce3e5
Changeset: http://git.rtems.org/rtems/commit/?id=6ac6a5c86638742f77f941f16d2db3a3377ce3e5
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Mar 27 13:01:56 2018 +0200
jffs2: Do not use command line defines
Update #3375.
---
cpukit/libfs/Makefile.am | 2 --
cpukit/libfs/src/jffs2/src/build.c | 2 ++
cpukit/libfs/src/jffs2/src/compat-crc32.c | 2 ++
cpukit/libfs/src/jffs2/src/compr.c | 2 ++
cpukit/libfs/src/jffs2/src/compr_rtime.c | 2 ++
cpukit/libfs/src/jffs2/src/compr_rubin.c | 2 ++
cpukit/libfs/src/jffs2/src/compr_zlib.c | 2 ++
cpukit/libfs/src/jffs2/src/debug.c | 2 ++
cpukit/libfs/src/jffs2/src/dir-rtems.c | 2 ++
cpukit/libfs/src/jffs2/src/erase.c | 2 ++
cpukit/libfs/src/jffs2/src/flashio.c | 2 ++
cpukit/libfs/src/jffs2/src/fs-rtems.c | 2 ++
cpukit/libfs/src/jffs2/src/gc.c | 2 ++
cpukit/libfs/src/jffs2/src/malloc-rtems.c | 2 ++
cpukit/libfs/src/jffs2/src/nodelist.c | 2 ++
cpukit/libfs/src/jffs2/src/nodemgmt.c | 2 ++
cpukit/libfs/src/jffs2/src/read.c | 2 ++
cpukit/libfs/src/jffs2/src/readinode.c | 2 ++
cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h | 2 ++
cpukit/libfs/src/jffs2/src/scan.c | 2 ++
cpukit/libfs/src/jffs2/src/write.c | 2 ++
21 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/cpukit/libfs/Makefile.am b/cpukit/libfs/Makefile.am
index b2d0342..37ecb6f 100644
--- a/cpukit/libfs/Makefile.am
+++ b/cpukit/libfs/Makefile.am
@@ -139,8 +139,6 @@ libjffs2_a_CFLAGS =
libjffs2_a_CFLAGS += -Wno-pointer-sign
libjffs2_a_CPPFLAGS =
libjffs2_a_CPPFLAGS += $(AM_CPPFLAGS) -I$(srcdir)/src/jffs2/include
-libjffs2_a_CPPFLAGS += -D__ECOS
-libjffs2_a_CPPFLAGS += '-DKBUILD_MODNAME="JFFS2"'
# ---
include $(top_srcdir)/automake/subdirs.am
diff --git a/cpukit/libfs/src/jffs2/src/build.c b/cpukit/libfs/src/jffs2/src/build.c
index a3750f9..b16f2c9 100644
--- a/cpukit/libfs/src/jffs2/src/build.c
+++ b/cpukit/libfs/src/jffs2/src/build.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/compat-crc32.c b/cpukit/libfs/src/jffs2/src/compat-crc32.c
index 7e4ea26..b084574 100644
--- a/cpukit/libfs/src/jffs2/src/compat-crc32.c
+++ b/cpukit/libfs/src/jffs2/src/compat-crc32.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
//==========================================================================
//
// crc32.c
diff --git a/cpukit/libfs/src/jffs2/src/compr.c b/cpukit/libfs/src/jffs2/src/compr.c
index 9859649..a9e821a 100644
--- a/cpukit/libfs/src/jffs2/src/compr.c
+++ b/cpukit/libfs/src/jffs2/src/compr.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/compr_rtime.c b/cpukit/libfs/src/jffs2/src/compr_rtime.c
index 3386d1e..98d7ccd 100644
--- a/cpukit/libfs/src/jffs2/src/compr_rtime.c
+++ b/cpukit/libfs/src/jffs2/src/compr_rtime.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/compr_rubin.c b/cpukit/libfs/src/jffs2/src/compr_rubin.c
index 92e0644..424891c 100644
--- a/cpukit/libfs/src/jffs2/src/compr_rubin.c
+++ b/cpukit/libfs/src/jffs2/src/compr_rubin.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/compr_zlib.c b/cpukit/libfs/src/jffs2/src/compr_zlib.c
index 8bfbacf..ec640c1 100644
--- a/cpukit/libfs/src/jffs2/src/compr_zlib.c
+++ b/cpukit/libfs/src/jffs2/src/compr_zlib.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/debug.c b/cpukit/libfs/src/jffs2/src/debug.c
index 1090eb6..a5ff322 100644
--- a/cpukit/libfs/src/jffs2/src/debug.c
+++ b/cpukit/libfs/src/jffs2/src/debug.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/dir-rtems.c b/cpukit/libfs/src/jffs2/src/dir-rtems.c
index 7bbbabc..8d3c3bd 100644
--- a/cpukit/libfs/src/jffs2/src/dir-rtems.c
+++ b/cpukit/libfs/src/jffs2/src/dir-rtems.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/erase.c b/cpukit/libfs/src/jffs2/src/erase.c
index d0d8a69..323848c 100644
--- a/cpukit/libfs/src/jffs2/src/erase.c
+++ b/cpukit/libfs/src/jffs2/src/erase.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/flashio.c b/cpukit/libfs/src/jffs2/src/flashio.c
index af93168..7b689a5 100644
--- a/cpukit/libfs/src/jffs2/src/flashio.c
+++ b/cpukit/libfs/src/jffs2/src/flashio.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/fs-rtems.c b/cpukit/libfs/src/jffs2/src/fs-rtems.c
index 652a8e7..17a4985 100644
--- a/cpukit/libfs/src/jffs2/src/fs-rtems.c
+++ b/cpukit/libfs/src/jffs2/src/fs-rtems.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/gc.c b/cpukit/libfs/src/jffs2/src/gc.c
index 2f42ee2..22963dc 100644
--- a/cpukit/libfs/src/jffs2/src/gc.c
+++ b/cpukit/libfs/src/jffs2/src/gc.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/malloc-rtems.c b/cpukit/libfs/src/jffs2/src/malloc-rtems.c
index 100b619..d6b4533 100644
--- a/cpukit/libfs/src/jffs2/src/malloc-rtems.c
+++ b/cpukit/libfs/src/jffs2/src/malloc-rtems.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/nodelist.c b/cpukit/libfs/src/jffs2/src/nodelist.c
index 975a1f5..f0ad570 100644
--- a/cpukit/libfs/src/jffs2/src/nodelist.c
+++ b/cpukit/libfs/src/jffs2/src/nodelist.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/nodemgmt.c b/cpukit/libfs/src/jffs2/src/nodemgmt.c
index 0331072..40fa34c 100644
--- a/cpukit/libfs/src/jffs2/src/nodemgmt.c
+++ b/cpukit/libfs/src/jffs2/src/nodemgmt.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/read.c b/cpukit/libfs/src/jffs2/src/read.c
index 0b042b1..516ba43 100644
--- a/cpukit/libfs/src/jffs2/src/read.c
+++ b/cpukit/libfs/src/jffs2/src/read.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/readinode.c b/cpukit/libfs/src/jffs2/src/readinode.c
index 7c0f1bf..a166da9 100644
--- a/cpukit/libfs/src/jffs2/src/readinode.c
+++ b/cpukit/libfs/src/jffs2/src/readinode.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h b/cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h
new file mode 100644
index 0000000..11d3646
--- /dev/null
+++ b/cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h
@@ -0,0 +1,2 @@
+#define __ECOS 1
+#define KBUILD_MODNAME "JFFS2"
diff --git a/cpukit/libfs/src/jffs2/src/scan.c b/cpukit/libfs/src/jffs2/src/scan.c
index 4d45ca2..1cfa548 100644
--- a/cpukit/libfs/src/jffs2/src/scan.c
+++ b/cpukit/libfs/src/jffs2/src/scan.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
diff --git a/cpukit/libfs/src/jffs2/src/write.c b/cpukit/libfs/src/jffs2/src/write.c
index b634de4..1b14cc6 100644
--- a/cpukit/libfs/src/jffs2/src/write.c
+++ b/cpukit/libfs/src/jffs2/src/write.c
@@ -1,3 +1,5 @@
+#include "rtems-jffs2-config.h"
+
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
More information about the vc
mailing list