This is the mail archive of the libc-alpha@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH] fcntl.h should provide mode_t, off_t and pid_t


Roland McGrath, le Sun 13 Jul 2008 15:29:41 -0700, a écrit :
> io/fcntl.h already has, even in the context of your diff:
> 
> >  /* For XPG all symbols from <sys/stat.h> should also be available.  */
> >  #ifdef __USE_XOPEN
> >  # include <sys/stat.h>

Hum, right. So the applications I'm seeing failing to build on Hurd do
so because they are lazy about includes and -D_XOPEN_SOURCE, and that
because Linux headers are lazy about not defining types, see below.

> That covers off_t and mode_t.  Can you verify that pid_t is really missing
> on Linux configurations?

It isn't because on Linux configurations _all_ types are just always
pulled by <bits/fcntl.h> from <sys/types.h>, as is also done in a bunch
of other headers.

> If it is missing only in Hurd configurations, we should figure out how
> the difference arises before changing anything.

That's the difference.

BTW, I've actually just ended up generating systematic tests, and we
are missing t_scalar_t from <stropts.h> (patch below), and va_list from
<wchar.h>.  For the latter the problem is that gcc headers don't provide
a way to fetch it...

Samuel

Index: streams/stropts.h
===================================================================
RCS file: /cvs/glibc/libc/streams/stropts.h,v
retrieving revision 1.7
diff -u -p -r1.7 stropts.h
--- streams/stropts.h	19 Apr 2003 16:48:35 -0000	1.7
+++ streams/stropts.h	13 Jul 2008 22:50:00 -0000
@@ -33,6 +33,7 @@ typedef __uid_t uid_t;
 # define __uid_t_defined
 #endif
 
+typedef __t_scalar_t t_scalar_t;
 typedef __t_uscalar_t t_uscalar_t;
 
 /* Get system specific contants.  */


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