stdint.h & machine/types.h Header file redefinitions

Derick Hammond derick at perkinstechnologies.com.au
Wed Nov 19 04:10:10 UTC 2003


Hello All:

I have come up with a redefinition warning when I started using the 
stdint.h header file.

A little background:

I use the multilib compiled version of the RTEMS libraries for m68k, and my 
own build system that  links to the appropriate libraries.  Much like using 
the AMX RTOS, or any commercial RTOS for that matter.  :-)

The current warning that I get is:

/opt/rtems-4.6/bin/m68k-rtems-gcc -m5200 -O4 -fomit-frame-pointer -Wall -g 
-ansi -fasm -DBOOTSTRAP 
-I/home/derickh/cvs_wa/DataVault_Firmware/devtools/rtems/m68k-rtems/lib/include 
-I/home/derickh/cvs_wa/DataVault_Firmware/firmware/include 
-I/home/derickh/cvs_wa/DataVault_Firmware/firmware/rom_start 
-I/home/derickh/cvs_wa/DataVault_Firmware/firmware/startup -o 
/home/derickh/cvs_wa/DataVault_Firmware/firmware/../library/rom_objs/rom_start/main.o 
-c /home/derickh/cvs_wa/DataVault_Firmware/firmware/startup/main.c
In file included from 
/home/derickh/cvs_wa/DataVault_Firmware/devtools/rtems/m68k-rtems/lib/include/stdint.h:16,
                  from 
/home/derickh/cvs_wa/DataVault_Firmware/devtools/rtems/m68k-rtems/lib/include/rtems/rtems/types.h:26,
                  from 
/home/derickh/cvs_wa/DataVault_Firmware/devtools/rtems/m68k-rtems/lib/include/rtems.h:39,
                  from 
/home/derickh/cvs_wa/DataVault_Firmware/firmware/include/tod/tod.h:33,
                  from 
/home/derickh/cvs_wa/DataVault_Firmware/firmware/startup/main.c:32:
/home/derickh/cvs_wa/DataVault_Firmware/devtools/rtems/m68k-rtems/lib/include/rtems/stdint.h:21: 
warning: redefinition of `int8_t'
/opt/rtems-4.6/m68k-rtems/include/machine/types.h:18: warning: `int8_t' 
previously declared here
/home/derickh/cvs_wa/DataVault_Firmware/devtools/rtems/m68k-rtems/lib/include/rtems/stdint.h:22: 
warning: redefinition of `int16_t'
/opt/rtems-4.6/m68k-rtems/include/machine/types.h:17: warning: `int16_t' 
previously declared here
/home/derickh/cvs_wa/DataVault_Firmware/devtools/rtems/m68k-rtems/lib/include/rtems/stdint.h:23: 
warning: redefinition of `int32_t'
/opt/rtems-4.6/m68k-rtems/include/machine/types.h:15: warning: `int32_t' 
previously declared here
/home/derickh/cvs_wa/DataVault_Firmware/devtools/rtems/m68k-rtems/lib/include/rtems/stdint.h:24: 
warning: redefinition of `int64_t'
/opt/rtems-4.6/m68k-rtems/include/machine/types.h:11: warning: `int64_t' 
previously declared here

I have had a quick investigation and have found that machine/types.h seems 
to only be used in cpukit/libnetworking.  Is this correct?  If so can 
libnetworking be updated to use stdint.h instead?

I am happy to do a patch for rtems-4.6.0pre5 if I can get some feedback on 
what would be considered the best way to solve this issue.

Thanks in advance.

Regards,
Derick Hammond




More information about the users mailing list