diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-17 21:15:31 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-17 21:15:31 +0000 |
commit | 5a0722f9d657233ed85bdcf75a9a14ea321a1a28 (patch) | |
tree | 3ce9d8153ebbd5259472394eca8ef369cfcfd455 /nuttx/binfmt | |
parent | d8ee4cfaf8afacfe8ff455900ed391af4f642888 (diff) | |
download | px4-nuttx-5a0722f9d657233ed85bdcf75a9a14ea321a1a28.tar.gz px4-nuttx-5a0722f9d657233ed85bdcf75a9a14ea321a1a28.tar.bz2 px4-nuttx-5a0722f9d657233ed85bdcf75a9a14ea321a1a28.zip |
Straighten out conditional compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1896 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r-- | nuttx/binfmt/binfmt_dumpmodule.c | 2 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_execmodule.c | 5 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_globals.c | 9 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_loadmodule.c | 3 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_register.c | 3 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_unloadmodule.c | 4 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_unregister.c | 3 | ||||
-rw-r--r-- | nuttx/binfmt/nxflat.c | 4 |
8 files changed, 30 insertions, 3 deletions
diff --git a/nuttx/binfmt/binfmt_dumpmodule.c b/nuttx/binfmt/binfmt_dumpmodule.c index 190889d64..ee8913066 100644 --- a/nuttx/binfmt/binfmt_dumpmodule.c +++ b/nuttx/binfmt/binfmt_dumpmodule.c @@ -48,7 +48,7 @@ #include "binfmt_internal.h" -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_BINFMT) +#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_BINFMT) && !defined(CONFIG_BINFMT_DISABLE) /**************************************************************************** * Pre-processor Definitions diff --git a/nuttx/binfmt/binfmt_execmodule.c b/nuttx/binfmt/binfmt_execmodule.c index 21c1bf6ac..de65c15cf 100644 --- a/nuttx/binfmt/binfmt_execmodule.c +++ b/nuttx/binfmt/binfmt_execmodule.c @@ -51,6 +51,8 @@ #include "os_internal.h" #include "binfmt_internal.h" +#ifndef CONFIG_BINFMT_DISABLE + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -142,11 +144,13 @@ int exec_module(FAR const struct binary_s *bin, int priority) /* Add the DSpace address as the PIC base address */ +#ifdef CONFIG_PIC tcb->picbase = bin->dspace; /* Re-initialize the task's initial state to account for the new PIC base */ up_initial_state(tcb); +#endif /* Get the assigned pid before we start the task */ @@ -181,4 +185,5 @@ errout: return ERROR; } +#endif /* CONFIG_BINFMT_DISABLE */ diff --git a/nuttx/binfmt/binfmt_globals.c b/nuttx/binfmt/binfmt_globals.c index 535160cff..b6985840d 100644 --- a/nuttx/binfmt/binfmt_globals.c +++ b/nuttx/binfmt/binfmt_globals.c @@ -42,6 +42,8 @@ #include <nuttx/binfmt.h> +#ifndef CONFIG_BINFMT_DISABLE + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -61,7 +63,10 @@ FAR struct binfmt_s *g_binfmts; * Private Functions ****************************************************************************/ -/*********************************************************************** +/**************************************************************************** * Public Functions - ***********************************************************************/ + ****************************************************************************/ + +#endif /* CONFIG_BINFMT_DISABLE */ + diff --git a/nuttx/binfmt/binfmt_loadmodule.c b/nuttx/binfmt/binfmt_loadmodule.c index b73b6223e..7ab613c02 100644 --- a/nuttx/binfmt/binfmt_loadmodule.c +++ b/nuttx/binfmt/binfmt_loadmodule.c @@ -48,6 +48,8 @@ #include "binfmt_internal.h" +#ifndef CONFIG_BINFMT_DISABLE + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -136,4 +138,5 @@ int load_module(const char *filename, FAR struct binary_s *bin) return OK; } +#endif /* CONFIG_BINFMT_DISABLE */ diff --git a/nuttx/binfmt/binfmt_register.c b/nuttx/binfmt/binfmt_register.c index 2323062ec..90b417723 100644 --- a/nuttx/binfmt/binfmt_register.c +++ b/nuttx/binfmt/binfmt_register.c @@ -49,6 +49,8 @@ #include "binfmt_internal.h" +#ifndef CONFIG_BINFMT_DISABLE + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -99,4 +101,5 @@ int register_binfmt(FAR struct binfmt_s *binfmt) return -EINVAL; } +#endif /* CONFIG_BINFMT_DISABLE */ diff --git a/nuttx/binfmt/binfmt_unloadmodule.c b/nuttx/binfmt/binfmt_unloadmodule.c index ff745171a..e8de31f10 100644 --- a/nuttx/binfmt/binfmt_unloadmodule.c +++ b/nuttx/binfmt/binfmt_unloadmodule.c @@ -50,6 +50,8 @@ #include "binfmt_internal.h" +#ifndef CONFIG_BINFMT_DISABLE + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -103,3 +105,5 @@ int unload_module(FAR const struct binary_s *bin) return OK; } +#endif /* CONFIG_BINFMT_DISABLE */ + diff --git a/nuttx/binfmt/binfmt_unregister.c b/nuttx/binfmt/binfmt_unregister.c index 62c156a61..f964d02a3 100644 --- a/nuttx/binfmt/binfmt_unregister.c +++ b/nuttx/binfmt/binfmt_unregister.c @@ -49,6 +49,8 @@ #include "binfmt_internal.h" +#ifndef CONFIG_BINFMT_DISABLE + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -133,4 +135,5 @@ int unregister_binfmt(FAR struct binfmt_s *binfmt) return ret; } +#endif /* CONFIG_BINFMT_DISABLE */ diff --git a/nuttx/binfmt/nxflat.c b/nuttx/binfmt/nxflat.c index 94b15a32c..e9c2b9961 100644 --- a/nuttx/binfmt/nxflat.c +++ b/nuttx/binfmt/nxflat.c @@ -49,6 +49,8 @@ #include <nuttx/binfmt.h> #include <nuttx/nxflat.h> +#ifdef CONFIG_NXFLAT + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -235,3 +237,5 @@ void nxflat_uninitialize(void) unregister_binfmt(&g_nxflatbinfmt); } +#endif /* CONFIG_NXFLAT */ + |