This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: uchar in <sys/types.h>


J Grant <jg@jguk.org> writes:

> Hello
>
> I believe the types.h are part of the compiler rather than lib's etc.

That depends on the system.  On a typical Linux system, types.h comes
from glibc as shown in line 2 of the file:
   This file is part of the GNU C Library.

> I quote from <sys/types.h>
> ----------
> #ifdef __USE_MISC
> /* Old compatibility names for C types.  */
> typedef unsigned long int ulong;
> typedef unsigned short int ushort;
> typedef unsigned int uint;
> #endif
> -----------
>
> I have an application that I am compiling and porting to a new target, i
> noticed that
> typedef unsigned char uchar;
>
> was not present, could anyone comment on this please?

If you need this, define it yourself.  The other names are just for
convenience.

> I see there is the "old compatibility' comment, is there a better
> alternative to uchar, ulong, uint abbreviations available?

Use the new ISO C99 <stdint.h> header,

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]