]> granicus.if.org Git - php/commitdiff
windows fixes
authorkrakjoe <joe.watkins@live.co.uk>
Thu, 28 Nov 2013 17:30:27 +0000 (17:30 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Thu, 28 Nov 2013 17:30:27 +0000 (17:30 +0000)
phpdbg.c
phpdbg_cmd.c

index 39963a5698a08a75fa2e08103aca4b4f823ff811..1b3f227a7b900b1346f85bca42534df9cf8c03bc 100644 (file)
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -557,9 +557,17 @@ int phpdbg_open_socket(short port) /* {{{ */
                        return -1;
                        
                default: {
+#ifndef _WIN32
                        int boolean = 1;
-                       
-                       switch (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &boolean, sizeof(int))) {
+#else
+                       const char *boolean = "1";
+#endif
+
+#ifndef _WIN32
+                       switch (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &boolean, sizeof(boolean))) {
+#else
+                       switch (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, boolean, sizeof(boolean))) {
+#endif
                                case -1:
                                        close(fd);
                                        return -2;
index 916c9d7f62eae0e4be8174cbad4aad6bfc858873..037e6dfd63d2e4d2400a7c572d15f85b11322742 100644 (file)
@@ -218,12 +218,12 @@ PHPDBG_API phpdbg_input_t *phpdbg_read_input(char *buffered TSRMLS_DC) /* {{{ */
        char *cmd = NULL;
 
        if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) {
-               if (buffered == NULL) {
+               if ((PHPDBG_G(flags) & PHPDBG_IS_REMOTE) &&
+                       (buffered == NULL)) {   
+                       fflush(PHPDBG_G(io)[PHPDBG_STDOUT]);
+               }
                
-                       if ((PHPDBG_G(flags) & PHPDBG_IS_REMOTE)) {     
-                               fflush(PHPDBG_G(io)[PHPDBG_STDOUT]);
-                       }
-                       
+               if (buffered == NULL) { 
 #ifndef HAVE_LIBREADLINE
                        char buf[PHPDBG_MAX_CMD];
                        if ((!(PHPDBG_G(flags) & PHPDBG_IS_REMOTE) && !phpdbg_write(phpdbg_get_prompt(TSRMLS_C))) ||