[linux-help] Blood and Guts
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hallo Linux C gurus:
I was poking around with man pages and I found the write(2) systems call. It
writes to a file descriptor (the default is 1, standard output). As I
understand printf calls this to actually get the "printing" done. I started
poking around the #include file, unistd.h (required to use write), and I found
a (for me) the cryptic lines:
extern ssize_t __write __P ((int __fd, __const __ptr_t __buf, size_t __n));
extern ssize_t write __P ((int __fd, __const __ptr_t __buf, size_t __n));
I understand extern to allow globally declared stuff to not step on each other,
hence ssize_t is declared as a global in some other file, right? I'm confused
by how ssize_t is followed by a __write (or write) but then a space then __P
then double parentheses! What's going on here? I guess __P is the real write
function, embedded in the __write function? Also, what is the convention for
this double underscore stuff? And finally, where is the code where my write()
function actually gets done?
Hopefully somebody knows and maybe somebody can put me on the trail of a book,
etc. that will explain some of this blood and guts stuff.
Lars v.d. Ast
-- This is the linux-help@xxxxxxxxx list. To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
- [linux-help] Re: netcfg errors out, (continued)
- [linux-help] Re: netcfg errors out, Jeff, 2000/06/01
- [linux-help] Re: netcfg errors out, Greg House, 2000/06/03
- [linux-help] Re: netcfg errors out, Bruce Bales, 2000/06/03
- [linux-help] Re: netcfg errors out, Greg House, 2000/06/03
- [linux-help] Re: netcfg errors out, Bruce Bales, 2000/06/03
- [linux-help] Re: netcfg errors out, Greg House, 2000/06/05
- [linux-help] Re: netcfg errors out, Bruce Bales, 2000/06/06
- [linux-help] Re: netcfg errors out, Greg House, 2000/06/06
- [linux-help] Re: netcfg errors out, Dale W Hodge, 2000/06/07
- [linux-help] Re: netcfg errors out, John Alexander, 2000/06/07
- [linux-help] Blood and Guts,
Lrs v.d.Ast <=
- [linux-help] Re: Blood and Guts, Jeff, 2000/06/07
- [linux-help] Re: Blood and Guts, Tom Hull, 2000/06/07
- [linux-help] Re: netcfg errors out, Dale W Hodge, 2000/06/07
[linux-help] Re: netcfg errors out, Bruce Bales, 2000/06/01
|
|