sockets

Jesus Daniel Valencia Sanchez valencia at cicese.mx
Wed Mar 26 17:37:26 PST 2003



On Wed, 26 Mar 2003, Giorgos Keramidas wrote:

> On 2003-03-25 19:07, Jesus Daniel Valencia Sanchez <valencia at cicese.mx> wrote:
> >
> > I'm using R4.6.2 and when i try to compile anything with the file
> > sys/socket.h i get tons of error messages INSIDE that file.  is
> > there anything i should know about it?
> >
> > any help will be very appreciated
> 
> Show us the exact command-line options you're using to compile your
> programs with and the errors you're getting.
> 
> - Giorgos
> 
> 
> 

here you go

[Equipo7] ~/programas/tontos> uname -a
FreeBSD Equipo7.mat.uson.mx 4.6.2-RELEASE FreeBSD 4.6.2-RELEASE #0: Thu 
Feb  6 20:03:17 MST 2003     
root at Equipo7.mat.uson.mx:/usr/src/sys/compile/GENERIC  i386
[Equipo7] ~/programas/tontos> g++ -o server_1 server_1.cpp
In file included from server_1.cpp:1:
/usr/include/sys/socket.h:52: syntax error before `;'
/usr/include/sys/socket.h:163: syntax error before `;'
/usr/include/sys/socket.h:174: syntax error before `;'
/usr/include/sys/socket.h:188: syntax error before `;'
/usr/include/sys/socket.h:190: `int64_t' was not declared in this scope
/usr/include/sys/socket.h:190: `u_char' was not declared in this scope
/usr/include/sys/socket.h:190: `sa_family_t' was not declared in this scope
/usr/include/sys/socket.h:190: size of array `__ss_pad1' is negative
/usr/include/sys/socket.h:191: syntax error before `;'
/usr/include/sys/socket.h:192: `u_char' was not declared in this scope
/usr/include/sys/socket.h:192: `sa_family_t' was not declared in this scope
/usr/include/sys/socket.h:192: `int64_t' was not declared in this scope
/usr/include/sys/socket.h:192: `u_char' was not declared in this scope
/usr/include/sys/socket.h:192: `sa_family_t' was not declared in this scope
/usr/include/sys/socket.h:192: `int64_t' was not declared in this scope
/usr/include/sys/socket.h:359: syntax error before `;'
/usr/include/sys/socket.h:364: syntax error before `['
/usr/include/sys/socket.h:399: syntax error before `;'
/usr/include/sys/socket.h:407: syntax error before `;'
/usr/include/sys/socket.h:411: syntax error before `;'
In file included from server_1.cpp:1:
/usr/include/sys/socket.h:444: syntax error before `('
/usr/include/sys/socket.h:451: type specifier omitted for parameter
/usr/include/sys/socket.h:451: type specifier omitted for parameter
/usr/include/sys/socket.h:451: syntax error before `*'
server_1.cpp: In function `int main()':
server_1.cpp:16: syntax error before `,'
server_1.cpp:17: `direl' undeclared (first use this function)
server_1.cpp:17: (Each undeclared identifier is reported only once
server_1.cpp:17: for each function it appears in.)
server_1.cpp:17: `addr' undeclared (first use this function)
server_1.cpp:17: implicit declaration of function `int bzero(...)'
server_1.cpp:18: `direr' undeclared (first use this function)
server_1.cpp:20: `INADDR_ANY' undeclared (first use this function)
/usr/include/sys/socket.h:454: too few arguments to function `int 
socket(int, int, int)'
server_1.cpp:27: at this point in file
server_1.cpp:38: implicit declaration of function `int read(...)'
server_1.cpp:43: syntax error before `if'
server_1.cpp:47: implicit declaration of function `int close(...)'
[Equipo7] ~/programas/tontos> cat server_1.cpp 
#include <sys/socket.h>
#include <sys/types.h>
#include <iostream.h>
#include <stdlib.h>

void error( char *s )
{
.
.
.
and my code goes on...

thank you


More information about the freebsd-questions mailing list