Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ Dawn of Time ➜ Installing/compiling the server ➜ Make of dawn1.69r

Make of dawn1.69r

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Wraithian   USA  (16 posts)  Bio
Date Thu 20 Jan 2005 12:34 PM (UTC)
Message
results of make 2> make-errors follow:
Quote:
connect.cpp: In member function `void connection_data::close_socket()':
connect.cpp:214: error: parse error before `{' token
connect.cpp: At global scope:
connect.cpp:221: error: ISO C++ forbids declaration of `connected_socket' with
no type
connect.cpp:222: error: parse error before `}' token
make: *** [connect.o] Error 1


Any clues? I have zlib... heck, I have everything (I had the luxury of being able to just plop everything onto my installation).
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #1 on Thu 20 Jan 2005 03:37 PM (UTC)
Message
Can you show us the lines displayed in the errors?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Wraithian   USA  (16 posts)  Bio
Date Reply #2 on Fri 21 Jan 2005 03:14 AM (UTC)
Message
Here's lines 209 to 217 (extra lines are for reference, comments are removed). This block applies to the error:
Quote:
connect.cpp: In member function `void connection_data::close_socket()':
connect.cpp:214: error: parse error before `{' token


#ifdef __CYGWIN__
	if(shutdown(connected_socket, 2)!=0{
		logf("error %d calling shutdown on socket %d.", errno, connected_socket);
	}
#endif





Lines 221 and 222 reguarding the following make errors:
Quote:
connect.cpp: At global scope:
connect.cpp:221: error: ISO C++ forbids declaration of `connected_socket' with
no type
connect.cpp:222: error: parse error before `}' token


if (closesocket(connected_socket )!=0){
		socket_error(FORMATF("connection_data::close_socket(): error calling closesocket() on socket %d",connected_socket));
	}
	connected_socket=0;
}

Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Fri 21 Jan 2005 07:36 AM (UTC)
Message
Quote:
#ifdef __CYGWIN__
	if(shutdown(connected_socket, 2)!=0{
		logf("error %d calling shutdown on socket %d.", errno, connected_socket);
	}
#endif
Well, here it's pretty straightforward: you're missing a parenthesis before the open-bracket.
Quote:
if (closesocket(connected_socket )!=0){
		socket_error(FORMATF("connection_data::close_socket(): error calling closesocket() on socket %d",connected_socket));
	}
	connected_socket=0;
}
I'm not sure what the problem is here. Apparently it doesn't know what 'connected_socket' is. Since your brackets are unbalanced, I'm assuming there's a lot more to the code than what you pasted; could you show the full block?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Rakon   USA  (123 posts)  Bio
Date Reply #4 on Fri 06 May 2005 02:50 AM (UTC)
Message
Well, I am getting the same error, so here goes.

/**************************************************************************/
// close the actual socket attached to a connection structure
void connection_data::close_socket()
{
	logf("Closing socket %d", connected_socket);
#ifdef __CYGWIN__
	// a hack to make cygwin shutdown sockets after a hotreboot
	// cygwin still appears to be leaking endpoints according to 
	// processexplorer from sysinternals, but this atleast gets
	// the socket to disconnect.
	if(shutdown(connected_socket, 2)!=0{
		logf("error %d calling shutdown on socket %d.", errno, connected_socket);
	}
#endif
	if (closesocket(connected_socket )!=0){
		socket_error(FORMATF("connection_data::close_socket(): error calling closesocket() on socket %d",connected_socket));
	}
	connected_socket=0;
}
/**************************************************************************/

There is the full block of code.

Yes, I am a criminal.
My crime is that of curiosity.
My crime is that of judging people by what they say and think, not what they look like.
My crime is that of outsmarting you, something that you will never forgive me for.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


22,657 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.