Subject: [OT] u_int*_t vs. uint*_t - which to use?
To: NetBSD Users <>
From: None <>
List: netbsd-users
Date: 01/19/2002 11:48:48

I apologize in advance if this is OT, but I've been scouring the 'Net for
some time and still can't find the answer.  I have been using "intX_t" and
"u_intX_t" for years in my applications because I believed it was the
portable thing to do according to POSIX 1003.1.  I have had no problems
between NetBSD, Linux and HP-UX.   Recently, I discovered that these types
are not defined anywhere on SunOS 5.6.  Instead, there is "intX_t" (yes,
the same) and "uintX_t".  These are defined via <inttypes.h>.  Now I see
that NetBSD, Linux and HP-UX define these as well.  Am I incorrect to use
the (apparently) old-style "u_intX_t"?  It seems these newer types (via
<inttypes.h>) are UNIX-98.  I would like to know if this supercedes the
POSIX types.

# bryanxms at ecst dot csuchico dot edu
# Software Engineer