#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
struct addrinfo sin, *psin;
int pass(void)
{
sin.ai_family = PF_INET;
sin.ai_socktype = SOCK_STREAM;
sin.ai_protocol = 0;
sin.ai_flags = AF_PASSIVE;
}
pass.c:6: warning: built-in function 'sin' declared as non-function
pass.c: In function `pass':
pass.c:13: error: `AF_PASSIVE' undeclared (first use in this function)
pass.c:13: error: (Each undeclared identifier is reported only once
pass.c:13: error: for each function it appears in.)
It looks to me like some macros are out of scope. I'm using the headers
I am supposed to. I believe I am following directions properly. As per this
site where I'm learning but writing my own code.
http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html
Bill
Should I not have put this in a function? Is that why things are out of
scope?
Bill
Read the page again. Then read it again, it's AI_PASSIVE, not AF_PASSIVE.
Igmar
> Read the page again. Then read it again, it's AI_PASSIVE, not AF_PASSIVE.
Oh yes.. I saw that error finally but I am compiling the code now but I
am getting a waring concerning the
struct addrinfo sin,*psin;
line. Something about not a function? Maybe I should just ignore it but I
hate to there must be something triggering this warning.
Bill
The truth is that you were "studying sockets" six years ago in
comp.os.ms-windows.programmer.win32 and
microsoft.public.win32.programmer.ole, where you were asking Win32
programmers WinSock-flavoured versions of the questions that you are now
asking Unix programmers. Your postings would have the world think that
you have made zero progress in learning how to compile even basic C
programs in eight years, when you first started talking about how you
were using DJGPP and mingw. Indeed you are trying to convince people
that you have less grasp of things now than you did when you were
talking about recompiling gcc in comp.os.linux.development.apps in 2005,
or about the Standard C library in kernel-mode code in comp.lang.c back
in 2003, or about microkernels in comp.os.linux.development.system in
2002, or about how to use DJGPP in comp.os.linux in 2002, or about Win32
API programming in comp.programming in 2002.
More and more people are not going to fall for this any more. Jens
Thoms Toerring has sussed you. santosh and Mark McIntyre sussed you in
2005. They'll all no doubt be disappointed to learn that it took them
longer than Eric Tomson, who sussed you in 2002 when you asked Linus
Torvalds silly questions on the IETF mailing list.
sin is a build-in function.
Igmar
> sin is a build-in function.
Thanks for your help Igmar I will try to sort as much of this posix out
as I can and if I have a problem I'll call back. :)
Bill
He's been at it recently on c.u.p as well.
--
Ian Collins
> Bill Cunningham a écrit :
> > Bill Cunningham wrote:
> >
> > Should I not have put this in a function? Is that why things are out of
> > scope?
> The truth is that you were "studying sockets" six years ago in
> comp.os.ms-windows.programmer.win32 and
> microsoft.public.win32.programmer.ole, where you were asking Win32
> programmers WinSock-flavoured versions of the questions that you are now
> asking Unix programmers.
Nonsense, and you bloody well know it. He's asking them of _C_
programmers now, not in any way specifically of Unix programmers.
> Your postings would have the world think that you have made zero progress
> in learning how to compile even basic C programs in eight years,
This, however, remains as true as it has always been.
Richard
That's in fact what led me to post in comp.unix.programmer
what M. navia was quoting there. (-:
Yes but the message had no attributions, sorry.
My objective was to stop this guy from going on and on...
Note that he did NOT answer any of the several messages I sent
with the same text in the different threads he started.
jacob
No worries. I didn't mind. I was just killing two birds
with one post, clueing M. Bos in at the same time.
> My objective was to stop this guy from going on and on...
This wouldn't be the first time that a post of mine has
been used in such a way. You probably won't stop Bill
Cunningham from posting, but with an improved canned
response, that doesn't confuse as M. Bos was confused
here, you can probably stop people falling for it.
> Note that he did NOT answer any of the several messages I sent
> with the same text in the different threads he started.
Xe answered the original, asking us to continue to believe
that xe *really is* Bill Cunningham, Worst Programmer
In The World. We all ignored it, because we've caught
wise. (-:
There is a guy I know from another forum, who after 10 years of
*professional* programming with C and Perl, still confuses 5 and "5"
when it comes to C. My personal favorite comment from him was he he
tried to tell me that compiler warnings are meaningless.