Re: [PATCH] move socket-related client parts into separate file

Alexey Mahotkin <[email protected]>
Newsgroups gmane.comp.version-control.cvs.bugs
Message-ID <[email protected]>
>>>>> "DRP" == Derek Robert Price <[email protected]> writes:

 DRP> Have you tried compiling this on Windows?  Windows and OS2 are the
 DRP> only platforms that define NO_SOCKET_TO_FD that I know of and this
 DRP> will break there.  At the very least, cvsnt.mak will need to be
 DRP> modified to find the new source file, but it is possible that this
 DRP> code needs some includes from cvs.h and client.h.  Don't worry about
 DRP> OS2 so much, but we still try and keep support on Windows up to date.

 DRP> Okay, I just defined NO_SOCKET_TO_FD by hand on UNIX and attempted to
 DRP> compile and discovered that, at the least, socket-client.c needs some
 DRP> function prototypes from cvs.h.  I also got some "dereferencing
 DRP> pointer to incomplete type" errors I didn't bother to track down.

 DRP> I'm cc'ing bug-cvs in the interest of additional input.

That's a lose-lose scenario IMHO.  That means that there are ~300 lines
which could not be checked by most of the developers.  Btw, is that really
still a case for modern Win32, that sockets are not convertible to fds?

Ok, I turned on NO_SOCKET_TO_FD temporarily, and I think that this
compile-fixes it.


2003-04-24  Alexey Mahotkin <[email protected]>


Fixes for NO_SOCKET_TO_FD


 src/socket-client.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

--- ccvs/src/socket-client.c~socket-client-fix	Thu Apr 24 22:12:28 2003
+++ ccvs-alexm/src/socket-client.c	Thu Apr 24 22:14:00 2003
@@ -13,6 +13,7 @@
 #include <config.h>
 
 #include "cvs.h"
+#include "buffer.h"
 
 #include "socket-client.h"
 
@@ -55,7 +56,7 @@ static int socket_buffer_shutdown PROTO(
 
 /* Create a buffer based on a socket.  */
 
-static struct buffer *
+struct buffer *
 socket_buffer_initialize (socket, input, memory)
     int socket;
     int input;

_


--alexm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.