If I want all of my *.c files that have proto.h included to use int32_t
instead of int
is it correct to write this into a header file called proto.h
:
#ifndef PROTO_H_INCLUDED#define PROTO_H_INCLUDED#ifndef STDINT_H_INCLUDED#define STDINT_H_INCLUDEDtypedef int int32_t;typedef unsigned int uint32_t;typedef size_t uint32_t;#endif
and then include proto.h into all the *.c files that need this typedef
?
Or should I include stdint.h into all of my *.c files?