*/
/*
- Copyright (C) 2000-2003 Kern Sibbald and John Walker
+ Copyright (C) 2000-2004 Kern Sibbald and John Walker
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
#ifdef HAVE_WIN32
#include <windows.h>
-#define isatty(fd) (fd==1)
+#define isatty(fd) (fd==0)
DWORD g_platform_id = VER_PLATFORM_WIN32_WINDOWS;
#endif
init_stack_dump();
my_name_is(argc, argv, "bconsole");
- textdomain("bacula-console");
+ textdomain("bacula");
init_msg(NULL, NULL);
working_directory = "/tmp";
args = get_pool_memory(PM_FNAME);
memset(&jcr, 0, sizeof(jcr));
+#ifdef HAVE_WIN32
+ WSA_Init(); /* Initialize Windows sockets */
+#endif
+
if (ndir > 1) {
struct sockaddr_in client_addr;
memset(&client_addr, 0, sizeof(client_addr));
{
fd_set fdset;
struct timeval tv;
+#ifdef HAVE_WIN32
+ return 1; /* select doesn't seem to work on Win32 */
+#endif
tv.tv_sec = sec;
tv.tv_usec = 0;
if (tee) {
fputs(buf, stdout);
}
- fflush(stdout);
+ if (output == stdout || tee) {
+ fflush(stdout);
+ }
#endif
}