Re: libc6 header file scheme
> Ok. I'm trying to write a simple program which calls fork().
>
> the fork() manpage lists it as
> pid_t fork(void);
> from <unistd.h>.
>
> So I do this:
>
> #include <unistd.h>
>
> int main() {
> pid_t p;
> p = fork;
> }
#include <unistd.h>
#include <sys/types.h>
int main() {
pid_t p;
p = fork();
}
Works better :) (also note the "()" after fork!)
> ... and I've noticed this with A LOT of libc6 stuff.
Me too. On all mailinglist I read I hear this means _improvement_.
Apparently, the old unistd.h file was wrong to define pid_t (well,
don't know in this particular case, but in general), and the
libc6 headers apparently are more conform the standards that be.
> "thing" is no longer
> defined in header files; it's now "__thing" ... why is this? And why
> aren't the manpages listing it as "__pid_t fork(void)" then?
I guess because the manpages are old :)
In general, I do:
$ cd /usr/include
$ grep ' pid_t' `find . -type f`
[...]
./sys/types.h:typedef __pid_t pid_t;
[...]
to find where on earth the definition is gone to this time. I mistyped
it a bit this time, and I have to admit I used some of my own sources
to find sys/types.h. (and then later improved the grep string).
--
joost witteveen, joostje@debian.org
#!/usr/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
#what's this? see http://www.dcs.ex.ac.uk/~aba/rsa/
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: