あるC言語で書かれたプログラムのソースを見ててu_intとかu_charとかいう方があって、これってなんだろうと思ったので調べてみた。

Mac OS X(Leopard)だと/usr/include/sys/types.hに答えが。

typedef unsigned char           u_char;
typedef unsigned short          u_short;
typedef unsigned int            u_int;

なるほど。unsigned intやunsigned charのエイリアスなんだね。

ちなみにCentOSとTurboLinuxだと/usr/include/sys/types.hには

typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;

と書いてあって、__u_charとかは/usr/include/bits/types.hに

typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;

って書いてありました。