Re: How to look up a system type?



"Leo.Hou" <leo.hou@xxxxxxxxx> writes:

then '__STD_TYPE __SSIZE_T_TYPE __ssize_t;'
then '#define __SSIZE_T_TYPE __SWORD_TYPE'
and finally '# define __SWORD_TYPE int'.

So 'int' it is, but that took me about 10 minutes... What is a better
way to do so?

$ echo '#include <signal.h>' | gcc -E - | grep ssize_t
__extension__ typedef int __ssize_t;

Another question popped up when I was trying to do something like:
#define SIZE_OF_T(T) printf("size = %d\n", sizeof(T))

#define SIZE_OF_T(x) do { printf("sizeof(%s) = %ld\n", #x, sizeof(x)); } while (0)

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.