diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-15 17:06:59 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-15 17:06:59 +0000 |
commit | 16d2eec530d7d269332d81edc1975de6c99d61b4 (patch) | |
tree | 1cfec3ee5e021e932c68b5868486b0046e776b8f /nuttx/binfmt | |
parent | ceb27f64b4e5c1740c5d5d4730b57c48f5745735 (diff) | |
download | px4-nuttx-16d2eec530d7d269332d81edc1975de6c99d61b4.tar.gz px4-nuttx-16d2eec530d7d269332d81edc1975de6c99d61b4.tar.bz2 px4-nuttx-16d2eec530d7d269332d81edc1975de6c99d61b4.zip |
Changing NuttX fixed size type names to C99 standard names -- things will be broken for awhile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2349 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r-- | nuttx/binfmt/binfmt_dumpmodule.c | 1 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_exec.c | 1 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_execmodule.c | 15 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_globals.c | 1 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_internal.h | 1 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_loadmodule.c | 1 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_register.c | 1 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_unloadmodule.c | 3 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_unregister.c | 1 | ||||
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_bind.c | 50 | ||||
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_init.c | 16 | ||||
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_load.c | 17 | ||||
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_read.c | 7 | ||||
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_uninit.c | 2 | ||||
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_unload.c | 3 | ||||
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_verify.c | 2 | ||||
-rw-r--r-- | nuttx/binfmt/nxflat.c | 5 | ||||
-rw-r--r-- | nuttx/binfmt/symtab_findbyname.c | 1 | ||||
-rw-r--r-- | nuttx/binfmt/symtab_findbyvalue.c | 1 | ||||
-rw-r--r-- | nuttx/binfmt/symtab_findorderedbyname.c | 1 | ||||
-rw-r--r-- | nuttx/binfmt/symtab_findorderedbyvalue.c | 1 |
21 files changed, 61 insertions, 70 deletions
diff --git a/nuttx/binfmt/binfmt_dumpmodule.c b/nuttx/binfmt/binfmt_dumpmodule.c index ee8913066..945dcb3ac 100644 --- a/nuttx/binfmt/binfmt_dumpmodule.c +++ b/nuttx/binfmt/binfmt_dumpmodule.c @@ -38,7 +38,6 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> #include <sched.h> #include <debug.h> diff --git a/nuttx/binfmt/binfmt_exec.c b/nuttx/binfmt/binfmt_exec.c index 2305f6d63..cefd3aa5c 100644 --- a/nuttx/binfmt/binfmt_exec.c +++ b/nuttx/binfmt/binfmt_exec.c @@ -38,7 +38,6 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> #include <string.h> #include <sched.h> diff --git a/nuttx/binfmt/binfmt_execmodule.c b/nuttx/binfmt/binfmt_execmodule.c index 21fe55987..6c8dd37f3 100644 --- a/nuttx/binfmt/binfmt_execmodule.c +++ b/nuttx/binfmt/binfmt_execmodule.c @@ -38,8 +38,9 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> +#include <sys/types.h> +#include <stdint.h> #include <stdlib.h> #include <sched.h> #include <debug.h> @@ -88,13 +89,13 @@ int exec_module(FAR const struct binary_s *bin, int priority) { - FAR _TCB *tcb; + FAR _TCB *tcb; #ifndef CONFIG_CUSTOM_STACK - FAR uint32 *stack; + FAR uint32_t *stack; #endif - pid_t pid; - int err; - int ret; + pid_t pid; + int err; + int ret; /* Sanity checking */ @@ -120,7 +121,7 @@ int exec_module(FAR const struct binary_s *bin, int priority) /* Allocate the stack for the new task */ #ifndef CONFIG_CUSTOM_STACK - stack = (FAR uint32*)malloc(bin->stacksize); + stack = (FAR uint32_t*)malloc(bin->stacksize); if (!tcb) { err = ENOMEM; diff --git a/nuttx/binfmt/binfmt_globals.c b/nuttx/binfmt/binfmt_globals.c index b6985840d..0d0b2dbb4 100644 --- a/nuttx/binfmt/binfmt_globals.c +++ b/nuttx/binfmt/binfmt_globals.c @@ -38,7 +38,6 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> #include <nuttx/binfmt.h> diff --git a/nuttx/binfmt/binfmt_internal.h b/nuttx/binfmt/binfmt_internal.h index c5232f3d3..22fadcd21 100644 --- a/nuttx/binfmt/binfmt_internal.h +++ b/nuttx/binfmt/binfmt_internal.h @@ -41,7 +41,6 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> #include <nuttx/binfmt.h> diff --git a/nuttx/binfmt/binfmt_loadmodule.c b/nuttx/binfmt/binfmt_loadmodule.c index 0bed16f3d..d4ef7cde2 100644 --- a/nuttx/binfmt/binfmt_loadmodule.c +++ b/nuttx/binfmt/binfmt_loadmodule.c @@ -38,7 +38,6 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> #include <sched.h> #include <debug.h> diff --git a/nuttx/binfmt/binfmt_register.c b/nuttx/binfmt/binfmt_register.c index 90b417723..e41c7a0d9 100644 --- a/nuttx/binfmt/binfmt_register.c +++ b/nuttx/binfmt/binfmt_register.c @@ -38,7 +38,6 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> #include <string.h> #include <sched.h> diff --git a/nuttx/binfmt/binfmt_unloadmodule.c b/nuttx/binfmt/binfmt_unloadmodule.c index e8de31f10..c6fa90c39 100644 --- a/nuttx/binfmt/binfmt_unloadmodule.c +++ b/nuttx/binfmt/binfmt_unloadmodule.c @@ -38,9 +38,8 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> -#include <sys/mman.h> +#include <sys/mman.h> #include <stdlib.h> #include <sched.h> #include <debug.h> diff --git a/nuttx/binfmt/binfmt_unregister.c b/nuttx/binfmt/binfmt_unregister.c index f964d02a3..1b50b2c58 100644 --- a/nuttx/binfmt/binfmt_unregister.c +++ b/nuttx/binfmt/binfmt_unregister.c @@ -38,7 +38,6 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> #include <string.h> #include <sched.h> diff --git a/nuttx/binfmt/libnxflat/libnxflat_bind.c b/nuttx/binfmt/libnxflat/libnxflat_bind.c index 0b2a80a95..eb65a7e63 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_bind.c +++ b/nuttx/binfmt/libnxflat/libnxflat_bind.c @@ -38,8 +38,8 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> +#include <stdint.h> #include <string.h> #include <nxflat.h> #include <errno.h> @@ -96,18 +96,18 @@ ****************************************************************************/ static inline int nxflat_bindrel32i(FAR struct nxflat_loadinfo_s *loadinfo, - uint32 offset) + uint32_t offset) { - uint32 *addr; + uint32_t *addr; bvdbg("NXFLAT_RELOC_TYPE_REL32I Offset: %08x I-Space: %p\n", offset, loadinfo->ispace + sizeof(struct nxflat_hdr_s)); if (offset < loadinfo->dsize) { - addr = (uint32*)(offset + loadinfo->dspace->region); + addr = (uint32_t*)(offset + loadinfo->dspace->region); bvdbg(" Before: %08x\n", *addr); - *addr += (uint32)(loadinfo->ispace + sizeof(struct nxflat_hdr_s)); + *addr += (uint32_t)(loadinfo->ispace + sizeof(struct nxflat_hdr_s)); bvdbg(" After: %08x\n", *addr); return OK; } @@ -135,18 +135,18 @@ static inline int nxflat_bindrel32i(FAR struct nxflat_loadinfo_s *loadinfo, ****************************************************************************/ static inline int nxflat_bindrel32d(FAR struct nxflat_loadinfo_s *loadinfo, - uint32 offset) + uint32_t offset) { - uint32 *addr; + uint32_t *addr; bvdbg("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n", offset, loadinfo->dspace->region); if (offset < loadinfo->dsize) { - addr = (uint32*)(offset + loadinfo->dspace->region); + addr = (uint32_t*)(offset + loadinfo->dspace->region); bvdbg(" Before: %08x\n", *addr); - *addr += (uint32)(loadinfo->dspace->region); + *addr += (uint32_t)(loadinfo->dspace->region); bvdbg(" After: %08x\n", *addr); return OK; } @@ -177,18 +177,18 @@ static inline int nxflat_bindrel32d(FAR struct nxflat_loadinfo_s *loadinfo, #ifdef NXFLAT_RELOC_TYPE_REL32ID static inline int nxflat_bindrel32id(FAR struct nxflat_loadinfo_s *loadinfo, - uint32 offset) + uint32_t offset) { - uint32 *addr; + uint32_t *addr; bvdbg("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n", offset, loadinfo->dspace->region); if (offset < loadinfo->dsize) { - addr = (uint32*)(offset + loadinfo->dspace->region); + addr = (uint32_t*)(offset + loadinfo->dspace->region); bvdbg(" Before: %08x\n", *addr); - *addr += ((uint32)loadinfo->ispace - (uint32)(loadinfo->dspace->region)); + *addr += ((uint32_t)loadinfo->ispace - (uint32_t)(loadinfo->dspace->region)); bvdbg(" After: %08x\n", *addr); return OK; } @@ -219,11 +219,11 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) FAR struct nxflat_reloc_s *relocs; FAR struct nxflat_reloc_s reloc; FAR struct nxflat_hdr_s *hdr; - uint32 offset; - uint16 nrelocs; - int ret; - int result; - int i; + uint32_t offset; + uint16_t nrelocs; + int ret; + int result; + int i; /* The NXFLAT header is the first thing at the beginning of the ISpace. */ @@ -326,7 +326,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) if (ret == OK && nrelocs > 0) { relocs = (FAR struct nxflat_reloc_s*)(offset - loadinfo->isize + loadinfo->dspace->region); - nxflat_dumpbuffer("GOT", (FAR const ubyte*)relocs, nrelocs * sizeof(struct nxflat_reloc_s)); + nxflat_dumpbuffer("GOT", (FAR const uint8_t*)relocs, nrelocs * sizeof(struct nxflat_reloc_s)); } #endif return ret; @@ -353,10 +353,10 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, FAR struct nxflat_hdr_s *hdr; FAR const struct symtab_s *symbol; - char *symname; - uint32 offset; - uint16 nimports; - int i; + char *symname; + uint32_t offset; + uint16_t nimports; + int i; /* The NXFLAT header is the first thing at the beginning of the ISpace. */ @@ -426,7 +426,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, /* And put this into the module's import structure. */ - imports[i].i_funcaddress = (uint32)symbol->sym_value; + imports[i].i_funcaddress = (uint32_t)symbol->sym_value; bvdbg("Bound import[%d] (%08p) to export '%s' (%08x)\n", i, &imports[i], symname, imports[i].i_funcaddress); @@ -438,7 +438,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, #ifdef CONFIG_NXFLAT_DUMPBUFFER if (nimports > 0) { - nxflat_dumpbuffer("Imports", (FAR const ubyte*)imports, nimports * sizeof(struct nxflat_import_s)); + nxflat_dumpbuffer("Imports", (FAR const uint8_t*)imports, nimports * sizeof(struct nxflat_import_s)); } #endif return OK; diff --git a/nuttx/binfmt/libnxflat/libnxflat_init.c b/nuttx/binfmt/libnxflat/libnxflat_init.c index 321c90e51..45f016e27 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_init.c +++ b/nuttx/binfmt/libnxflat/libnxflat_init.c @@ -38,9 +38,9 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> -#include <sys/stat.h> +#include <sys/stat.h> +#include <stdint.h> #include <string.h> #include <fcntl.h> #include <nxflat.h> @@ -95,11 +95,11 @@ int nxflat_init(const char *filename, struct nxflat_loadinfo_s *loadinfo) { - uint32 datastart; - uint32 dataend; - uint32 bssstart; - uint32 bssend; - int ret; + uint32_t datastart; + uint32_t dataend; + uint32_t bssstart; + uint32_t bssend; + int ret; bvdbg("filename: %s loadinfo: %p\n", filename, loadinfo); @@ -125,7 +125,7 @@ int nxflat_init(const char *filename, struct nxflat_loadinfo_s *loadinfo) bdbg("Failed to read NXFLAT header: %d\n", ret); return ret; } - nxflat_dumpbuffer("NXFLAT header", (FAR const ubyte*)&loadinfo->header, + nxflat_dumpbuffer("NXFLAT header", (FAR const uint8_t*)&loadinfo->header, sizeof(struct nxflat_hdr_s)); /* Verify the NXFLAT header */ diff --git a/nuttx/binfmt/libnxflat/libnxflat_load.c b/nuttx/binfmt/libnxflat/libnxflat_load.c index 805b3440d..25be05621 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_load.c +++ b/nuttx/binfmt/libnxflat/libnxflat_load.c @@ -38,9 +38,10 @@ ****************************************************************************/ #include <nuttx/config.h> + #include <sys/types.h> #include <sys/mman.h> - +#include <stdint.h> #include <stdlib.h> #include <nxflat.h> #include <debug.h> @@ -105,11 +106,11 @@ static const char *g_reloctype[] = int nxflat_load(struct nxflat_loadinfo_s *loadinfo) { - off_t doffset; /* Offset to .data in the NXFLAT file */ - uint32 dreadsize; /* Total number of bytes of .data to be read */ - uint32 relocsize; /* Memory needed to hold relocations */ - uint32 extrasize; /* MAX(BSS size, relocsize) */ - int ret = OK; + off_t doffset; /* Offset to .data in the NXFLAT file */ + uint32_t dreadsize; /* Total number of bytes of .data to be read */ + uint32_t relocsize; /* Memory needed to hold relocations */ + uint32_t extrasize; /* MAX(BSS size, relocsize) */ + int ret = OK; /* Calculate the extra space we need to allocate. This extra space will be * the size of the BSS section. This extra space will also be used @@ -159,9 +160,9 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) * resides as long as it is fully initialized and ready to execute. */ - loadinfo->ispace = (uint32)mmap(NULL, loadinfo->isize, PROT_READ, + loadinfo->ispace = (uint32_t)mmap(NULL, loadinfo->isize, PROT_READ, MAP_SHARED|MAP_FILE, loadinfo->filfd, 0); - if (loadinfo->ispace == (uint32)MAP_FAILED) + if (loadinfo->ispace == (uint32_t)MAP_FAILED) { bdbg("Failed to map NXFLAT ISpace: %d\n", errno); return -errno; diff --git a/nuttx/binfmt/libnxflat/libnxflat_read.c b/nuttx/binfmt/libnxflat/libnxflat_read.c index f94015060..95e62bbb2 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_read.c +++ b/nuttx/binfmt/libnxflat/libnxflat_read.c @@ -38,8 +38,9 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> +#include <sys/types.h> +#include <stdint.h> #include <unistd.h> #include <string.h> #include <nxflat.h> @@ -72,14 +73,14 @@ #if defined(NXFLAT_DUMP_READDATA) static inline void nxflat_dumpreaddata(char *buffer, int buflen) { - uint32 *buf32 = (uint32*)buffer; + uint32 *buf32 = (uint32_t*)buffer; int i; int j; for (i = 0; i < buflen; i += 32) { DUMPER("%04x:", i); - for (j = 0; j < 32; j += sizeof(uint32)) + for (j = 0; j < 32; j += sizeof(uint32_t)) { DUMPER(" %08x", *buf32++); } diff --git a/nuttx/binfmt/libnxflat/libnxflat_uninit.c b/nuttx/binfmt/libnxflat/libnxflat_uninit.c index 22d9e3ac5..72be6c7ae 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_uninit.c +++ b/nuttx/binfmt/libnxflat/libnxflat_uninit.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> + #include <unistd.h> #include <debug.h> #include <errno.h> diff --git a/nuttx/binfmt/libnxflat/libnxflat_unload.c b/nuttx/binfmt/libnxflat/libnxflat_unload.c index 1f8d1163d..7dc3e87a7 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_unload.c +++ b/nuttx/binfmt/libnxflat/libnxflat_unload.c @@ -38,9 +38,8 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> -#include <sys/mman.h> +#include <sys/mman.h> #include <stdlib.h> #include <debug.h> diff --git a/nuttx/binfmt/libnxflat/libnxflat_verify.c b/nuttx/binfmt/libnxflat/libnxflat_verify.c index bf5221278..de952774f 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_verify.c +++ b/nuttx/binfmt/libnxflat/libnxflat_verify.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> + #include <string.h> #include <debug.h> #include <errno.h> diff --git a/nuttx/binfmt/nxflat.c b/nuttx/binfmt/nxflat.c index 0c179053a..99b99249a 100644 --- a/nuttx/binfmt/nxflat.c +++ b/nuttx/binfmt/nxflat.c @@ -38,8 +38,9 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> +#include <sys/types.h> +#include <stdint.h> #include <string.h> #include <nxflat.h> #include <debug.h> @@ -188,7 +189,7 @@ static int nxflat_loadbinary(struct binary_s *binp) binp->isize = loadinfo.isize; binp->stacksize = loadinfo.stacksize; - nxflat_dumpbuffer("Entry code", (FAR const ubyte*)binp->entrypt, + nxflat_dumpbuffer("Entry code", (FAR const uint8_t*)binp->entrypt, MIN(binp->isize - loadinfo.entryoffs,512)); nxflat_uninit(&loadinfo); diff --git a/nuttx/binfmt/symtab_findbyname.c b/nuttx/binfmt/symtab_findbyname.c index 35e615e9f..02b2ac22b 100644 --- a/nuttx/binfmt/symtab_findbyname.c +++ b/nuttx/binfmt/symtab_findbyname.c @@ -38,7 +38,6 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> #include <string.h> #include <debug.h> diff --git a/nuttx/binfmt/symtab_findbyvalue.c b/nuttx/binfmt/symtab_findbyvalue.c index bda09a10d..269fd8bb2 100644 --- a/nuttx/binfmt/symtab_findbyvalue.c +++ b/nuttx/binfmt/symtab_findbyvalue.c @@ -38,7 +38,6 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> #include <debug.h> #include <assert.h> diff --git a/nuttx/binfmt/symtab_findorderedbyname.c b/nuttx/binfmt/symtab_findorderedbyname.c index 9c7f6d5cf..82d68bfea 100644 --- a/nuttx/binfmt/symtab_findorderedbyname.c +++ b/nuttx/binfmt/symtab_findorderedbyname.c @@ -38,7 +38,6 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> #include <string.h> #include <debug.h> diff --git a/nuttx/binfmt/symtab_findorderedbyvalue.c b/nuttx/binfmt/symtab_findorderedbyvalue.c index c1f824769..aae3f780b 100644 --- a/nuttx/binfmt/symtab_findorderedbyvalue.c +++ b/nuttx/binfmt/symtab_findorderedbyvalue.c @@ -38,7 +38,6 @@ ****************************************************************************/ #include <nuttx/config.h> -#include <sys/types.h> #include <debug.h> #include <assert.h> |