This is the mail archive of the libc-hacker@cygnus.com mailing list for the glibc project.


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

[Craig Metz <cmetz@inner.net>] libc/962: uintxx_t not defined by sys/types.h



Craig has send the following PR.  How should we handle the inclusion
of uintxx_t?

Andreas





>Number:         962
>Category:       libc
>Synopsis:       uintxx_t not defined by sys/types.h
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    libc-gnats
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Sun Feb 14 01:30:00 EST 1999
>Last-Modified:
>Originator:     Craig Metz
>Organization:
The Inner Net
>Release:        libc-2.1
>Environment:
Host type: i686-pc-linux-gnu
System: Linux ministry-of-love 2.2.0 #7 Thu Feb 4 23:53:08 EST 1999 i686 unknown
Architecture: i686

Addons: linuxthreads crypt

Build CC: gcc
Compiler version: egcs-2.91.60 19981201 (egcs-1.1.1 release)
Kernel headers: 2.2.0
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: yes
Build bounded: no
Build static-nss: no
Stdio: libio

>Description:

  POSIX p1003.1g D6.6 section 3.1 (6) says:

  When the {_POSIX_PII_SOCKET} option is implemented and the header file
<sys/types.h> is included, then the following types should be defined. Which of
these types are defined shall be implementation-defined.

  <table of types>

  glibc 2.1 has the types, but does not define them when <sys/types.h> is
included, which makes them unreliable. I consider this a bug, but it's
technically compliant due to POSIX weasel-wording. It makes it hard to write
code expecting either the types to be supported correctly or not at all.

>How-To-Repeat:

#include <sys/types.h>

uint32_t foo;

>Fix:

  Have <sys/types.h> include <stdint.h>

>Audit-Trail:
>Unformatted:




-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

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