From: krakjoe Date: Thu, 28 Nov 2013 18:22:30 +0000 (+0000) Subject: windows ... X-Git-Tag: php-5.6.0alpha1~110^2~30^2~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55f210c83b91643051bd0f8c73aba5fac106e383;p=php windows ... --- diff --git a/phpdbg.c b/phpdbg.c index 1b3f227a7b..48d618de60 100644 --- a/phpdbg.c +++ b/phpdbg.c @@ -604,6 +604,7 @@ int phpdbg_open_socket(short port) /* {{{ */ static inline void phpdbg_close_sockets(int (*socket)[2], FILE *streams[2]) /* {{{ */ { +#ifndef _WIN32 if ((*socket)[0]) { shutdown((*socket)[0], SHUT_RDWR); close((*socket)[0]); @@ -621,6 +622,7 @@ static inline void phpdbg_close_sockets(int (*socket)[2], FILE *streams[2]) /* { if (streams[1]) { fclose(streams[1]); } +#endif } /* }}} */ /* don't inline this, want to debug it easily, will inline when done */ @@ -739,6 +741,11 @@ int main(int argc, char **argv) /* {{{ */ streams[1] = NULL; #ifdef PHP_WIN32 + { + WSADATA WSAData; + + WSAStartup (0x0101, &WSAData); + } _fmode = _O_BINARY; /* sets default for file streams to binary */ setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ @@ -886,7 +893,7 @@ phpdbg_main: (listen[0] > 0 && listen[1] > 0)) { if (phpdbg_open_sockets(listen, &server, &socket, streams) == FAILURE) { remote = 0; - goto phpdbg_out; + exit(0); } /* set remote flag to stop service shutting down upon quit */ remote = 1;