mirror of
https://repo.or.cz/socat.git
synced 2025-05-23 21:22:42 +00:00
Procan tells if char is signed or unsigned
This commit is contained in:
parent
200ccb24cd
commit
699da5f522
2 changed files with 7 additions and 0 deletions
2
CHANGES
2
CHANGES
|
@ -104,6 +104,8 @@ Features:
|
|||
Procan prints more C-defines, esp.O_*, AI_*, EAI_*; __GLIBC__;
|
||||
added option -V
|
||||
|
||||
Procan tells if char is signed or unsigned
|
||||
|
||||
Building:
|
||||
Disabling certain features during configure could break build process.
|
||||
|
||||
|
|
5
hostan.c
5
hostan.c
|
@ -33,6 +33,11 @@ int hostan(FILE *outfile) {
|
|||
#endif
|
||||
fprintf(outfile, "sizeof(size_t) = %u\n", (unsigned int)sizeof(size_t));
|
||||
|
||||
if ((char)-1 > 0)
|
||||
fprintf(outfile, "typedef unsigned char char;\n");
|
||||
else
|
||||
fprintf(outfile, "typedef signed char char;\n");
|
||||
|
||||
# if HAVE_BASIC_SIZE_T==2
|
||||
fprintf(outfile, "typedef unsigned short size_t; /* sizeof(size_t) = %u */\n", (unsigned int)sizeof(size_t));
|
||||
#elif HAVE_BASIC_SIZE_T==4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue