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;
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))) ||