]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Do partial integration of the Win32 bat build created by Eric.
authorKern Sibbald <kern@sibbald.com>
Sat, 19 Jul 2008 15:50:38 +0000 (15:50 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 19 Jul 2008 15:50:38 +0000 (15:50 +0000)
kes  Fix bat not to block.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7401 91ce42f0-d328-0410-95d8-f526ca767f89

20 files changed:
bacula/src/lib/bnet.c
bacula/src/lib/bsock.c
bacula/src/lib/bsock.h
bacula/src/lib/cram-md5.c
bacula/src/lib/message.c
bacula/src/qt-console/README.mingw [deleted file]
bacula/src/qt-console/README.mingw32 [new file with mode: 0644]
bacula/src/qt-console/bat.pro.mingw [deleted file]
bacula/src/qt-console/bat.pro.mingw32 [new file with mode: 0644]
bacula/src/qt-console/bcomm/dircomm.cpp
bacula/src/qt-console/console/console.cpp
bacula/src/qt-console/mainwin.cpp
bacula/src/qt-console/make-win32 [new file with mode: 0755]
bacula/src/qt-console/win32-x-g++/qmake.conf [deleted file]
bacula/src/qt-console/win32-x-g++/qplatformdefs.h [deleted file]
bacula/src/qt-console/win32/qmake.conf [new file with mode: 0644]
bacula/src/qt-console/win32/qplatformdefs.h [new file with mode: 0644]
bacula/src/version.h
bacula/src/win32/dll/bacula.def
bacula/technotes-2.4

index d5aed8a57db64e3827ff5411bae89e7fd5047d7e..057a7d4fe77ff90b63022c3e8be92ec3d93e351f 100644 (file)
@@ -342,7 +342,7 @@ bool bnet_tls_client(TLS_CONTEXT *ctx, BSOCK * bsock, alist *verify_list)
  */
 int bnet_wait_data(BSOCK * bsock, int sec)
 {
-   return bsock->wait_data(sec);
+   return bsock->wait_data(sec, 0);
 }
 
 /*
@@ -350,7 +350,7 @@ int bnet_wait_data(BSOCK * bsock, int sec)
  */
 int bnet_wait_data_intr(BSOCK * bsock, int sec)
 {
-   return bsock->wait_data_intr(sec);
+   return bsock->wait_data_intr(sec, 0);
 }
 
 #ifndef NETDB_INTERNAL
index 66703c80787ff369ad230fc794b1b39d8342edcc..3536afba635e642c1ee811fbad597503d5697fce 100644 (file)
@@ -728,7 +728,7 @@ void BSOCK::restore_blocking (int flags)
  *            0 if timeout
  *           -1 if error
  */
-int BSOCK::wait_data(int sec)
+int BSOCK::wait_data(int sec, int usec)
 {
    fd_set fdset;
    struct timeval tv;
@@ -737,7 +737,7 @@ int BSOCK::wait_data(int sec)
    FD_SET((unsigned)m_fd, &fdset);
    for (;;) {
       tv.tv_sec = sec;
-      tv.tv_usec = 0;
+      tv.tv_usec = usec;
       switch (select(m_fd + 1, &fdset, NULL, NULL, &tv)) {
       case 0:                      /* timeout */
          b_errno = 0;
@@ -758,7 +758,7 @@ int BSOCK::wait_data(int sec)
 /*
  * As above, but returns on interrupt
  */
-int BSOCK::wait_data_intr(int sec)
+int BSOCK::wait_data_intr(int sec, int usec)
 {
    fd_set fdset;
    struct timeval tv;
@@ -766,7 +766,7 @@ int BSOCK::wait_data_intr(int sec)
    FD_ZERO(&fdset);
    FD_SET((unsigned)m_fd, &fdset);
    tv.tv_sec = sec;
-   tv.tv_usec = 0;
+   tv.tv_usec = usec;
    switch (select(m_fd + 1, &fdset, NULL, NULL, &tv)) {
    case 0:                      /* timeout */
       b_errno = 0;
@@ -781,6 +781,7 @@ int BSOCK::wait_data_intr(int sec)
    return 1;
 }
 
+
 /*
  * Note, this routine closes and destroys all the sockets
  *  that are open including the duped ones.
index 29a693772d372e805204396c298f15f113346197..08e32859de48f4eec51f10819a52bc84de6a9ae1 100644 (file)
@@ -107,8 +107,8 @@ public:
    int set_nonblocking();
    int set_blocking();
    void restore_blocking(int flags);
-   int wait_data(int sec);
-   int wait_data_intr(int sec);
+   int wait_data(int sec, int usec);
+   int wait_data_intr(int sec, int usec);
    bool authenticate_director(const char *name, const char *password,
                   TLS_CONTEXT *tls_ctx, char *msg, int msglen);
 
index 036dc4ed34c8c34ff799a05994438e4e80343902..aa0ef82f7c478363a1d6563e0f57179c51987c97 100644 (file)
@@ -85,7 +85,7 @@ bool cram_md5_challenge(BSOCK *bs, const char *password, int tls_local_need, int
    }
 
    /* Read hashed response to challenge */
-   if (bs->wait_data(180) <= 0 || bs->recv() <= 0) {
+   if (bs->wait_data(180, 0) <= 0 || bs->recv() <= 0) {
       Dmsg1(dbglvl, "Bnet receive challenge response error.\n", bs->bstrerror());
       bmicrosleep(5, 0);
       return false;
@@ -150,7 +150,7 @@ bool cram_md5_respond(BSOCK *bs, const char *password, int *tls_remote_need, int
       return false;
    }
    Dmsg1(99, "sending resp to challenge: %s\n", bs->msg);
-   if (bs->wait_data(180) <= 0 || bs->recv() <= 0) {
+   if (bs->wait_data(180, 0) <= 0 || bs->recv() <= 0) {
       Dmsg1(dbglvl, "Receive chanllenge response failed. ERR=%s\n", bs->bstrerror());
       bmicrosleep(5, 0);
       return false;
index 3596291b5dc1c8ef013c72d16e11a00d7fec47ed..ac0e8e00f08fcd147a288e43833ebcf70b2928c7 100644 (file)
@@ -875,7 +875,11 @@ d_msg(const char *file, int line, int level, const char *fmt,...)
        if (trace) {
           if (!trace_fd) {
              char fn[200];
+#ifdef HAVE_WIN32
              bsnprintf(fn, sizeof(fn), "%s/%s.trace", working_directory ? working_directory : ".", my_name);
+#else
+             bsnprintf(fn, sizeof(fn), "%s.trace", my_name);
+#endif
              trace_fd = fopen(fn, "a+b");
           }
           if (trace_fd) {
diff --git a/bacula/src/qt-console/README.mingw b/bacula/src/qt-console/README.mingw
deleted file mode 100644 (file)
index ff2fe76..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-
-BUILD SYSTEM: Ubuntu gutsy
-STATUS: Works
-
-REQUIRE: 
- - Bacula cross compilation tool (must be able to compile bacula-fd.exe)
- - wine (apt-get install wine)
- - qt mingw32 distribution
-
-ORIGINAL HOWTO (french):
-http://doc.qtfr.org/post/2007/04/10/Cross-Compilation-Native-dapplication-Qt-depuis-Linux
-
-Legend:
-# comment
-$ shell command
-* tips
-
-Directory setup
----------------
-$ cd bacula/src/win32
-$ ./build-win32-cross-tools
-$ ./build-depkgs-mingw32
-
-It will result something like :
-
-./
-|-- depkgs-mingw32
-|-- cross-tools
-`-- bacula
-
-bacula setup
-------------
-$ cd bacula/src/win32
-$ make
-
-Don't run any configure, make or make install
-Make sure that bacula/src/win32/release/bacula.dll is built
-
-QT4 setup
-----------
-
-Install QT for mingw
-
-Get the mingw installation from http://trolltech.com/developer/downloads/qt/windows
-(Try to get the same version than your linux installation)
-
-$ wine qt-win-opensource-4.4.0-mingw.exe
- * Install under c:\Qt (no space)
- * no worry about mingw installation
-
-$ cp -r ~/.wine/drive_c/Qt/4.4.0/src/    depkgs-mingw32/include
-$ cp -r ~/.wine/drive_c/Qt/4.4.0/include depkgs-mingw32/include/qt
-$ cp -r ~/.wine/drive_c/Qt/4.4.0/lib     depkgs-mingw32/lib/qt
-
-MINGW setup
------------
-
---- cross-tools/mingw32/mingw32/include/wchar.h.org     2008-07-13 15:18:52.000000000 +0200
-+++ cross-tools/mingw32/mingw32/include/wchar.h 2008-07-12 14:47:10.000000000 +0200
-@@ -394,7 +394,7 @@
-        time_t  st_ctime;       /* Creation time */
- };
-
--#ifdef _NO_OLDNAMES
-+#ifdef _NO_OLDNAMES_DISABLE
- /* NOTE: Must be the same as _stat above. */
- struct stat
- {
-
-Compile bat
------------
-
-$ cd bacula/src/qt-console
-$ cp bat.pro.mingw bat.pro
-$ qmake-qt4 -spec win32-x-g++
-$ make
-
-Run Bat on Windows
-------------------
-
-You'll need
-   zlib1.dll
-   ssleay32.dll
-   libeay32.dll
-   QtCore4.dll
-   QtGui4.dll
-   bacula.dll
-   pthreadGCE.dll
-   mingwm10.dll
-   bat.conf
-
-You can find QT dlls on ~/.wine/drive_c/Qt/4.4.0/bin
-
-Run Bat with wine
------------------
-$ cd bacula/src/qt-console/debug
-
-# configure a bat.conf
-# copy all dll to this directory
-
-$ wine bat 
-
-
-That all, easy isn't it ?
-
diff --git a/bacula/src/qt-console/README.mingw32 b/bacula/src/qt-console/README.mingw32
new file mode 100644 (file)
index 0000000..7f416e0
--- /dev/null
@@ -0,0 +1,110 @@
+
+BUILD SYSTEM: Ubuntu gutsy
+STATUS: Works
+
+REQUIRE: 
+ - Bacula cross compilation tool (must be able to compile bacula-fd.exe)
+ - wine (apt-get install wine)
+ - qt mingw32 distribution
+
+ORIGINAL HOWTO (french):
+http://doc.qtfr.org/post/2007/04/10/Cross-Compilation-Native-dapplication-Qt-depuis-Linux
+
+Legend:
+# comment
+$ shell command
+* tips
+
+Directory setup
+---------------
+$ cd bacula/src/win32
+$ ./build-win32-cross-tools
+$ ./build-depkgs-mingw32
+
+It will result something like :
+
+./
+|-- depkgs-mingw32
+|-- cross-tools
+`-- bacula
+
+bacula setup
+------------
+$ cd bacula/src/win32
+$ make
+
+Make sure that bacula/src/win32/release/bacula.dll is built
+
+QT4 setup
+----------
+
+Install QT for mingw
+
+Get the mingw installation from http://trolltech.com/developer/downloads/qt/windows
+(Try to get the same version than your linux installation)
+
+$ wine qt-win-opensource-4.4.0-mingw.exe
+ * Install under c:\Qt (no space)
+ * no worry about mingw installation
+
+$ cp -r ~/.wine/drive_c/Qt/4.4.0/src/    depkgs-mingw32/include
+$ cp -r ~/.wine/drive_c/Qt/4.4.0/include depkgs-mingw32/include/qt
+$ cp -r ~/.wine/drive_c/Qt/4.4.0/lib     depkgs-mingw32/lib/qt
+# copy ~/.wine/drive_c/Qt/4.4.0/bin/QtCore4.dll to src/win32/release
+# copy ~/.wine/drive_c/Qt/4.4.0/bin/QtGui4.dll to src/win32/release
+
+MINGW setup
+-----------
+
+--- cross-tools/mingw32/mingw32/include/wchar.h.org     2008-07-13 15:18:52.000000000 +0200
++++ cross-tools/mingw32/mingw32/include/wchar.h 2008-07-12 14:47:10.000000000 +0200
+@@ -394,7 +394,7 @@
+        time_t  st_ctime;       /* Creation time */
+ };
+
+-#ifndef _NO_OLDNAMES
++#ifdef _NO_OLDNAMES_DISABLE
+ /* NOTE: Must be the same as _stat above. */
+ struct stat
+ {
+
+Compile bat
+-----------
+
+$ cd bacula/src/qt-console
+$ ./make-win32
+
+Cleanup
+-------
+$ cd bacula/src/qt-console
+$ ./make-win32 clean
+
+
+
+Run Bat on Windows
+------------------
+
+You'll need
+   zlib1.dll
+   ssleay32.dll
+   libeay32.dll
+   QtCore4.dll
+   QtGui4.dll
+   bacula.dll
+   pthreadGCE.dll
+   mingwm10.dll
+   bat.conf
+
+You can find the Qt dlls in ~/.wine/drive_c/Qt/4.4.0/bin
+
+Run Bat with wine
+-----------------
+$ cd bacula/src/qt-console/debug
+
+# configure a bat.conf
+# copy all dlls to this directory
+
+$ wine bat 
+
+
+That all, easy isn't it ?
diff --git a/bacula/src/qt-console/bat.pro.mingw b/bacula/src/qt-console/bat.pro.mingw
deleted file mode 100644 (file)
index 5fe906b..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-######################################################################
-# Version $Id: bat.pro.in 6956 2008-05-12 09:32:54Z kerns $
-#
-#   !!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-#
-#      Edit only bat.pro.in  -- bat.pro is built by the ./configure program
-#
-#   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-#    
-CONFIG += qt debug 
-
-bins.path = ./
-bins.files = ./bat.exe
-confs.path = ./
-confs.commands = ./install_conf_file   
-
-TEMPLATE     = app
-TARGET       = bat
-DEPENDPATH  += .
-INCLUDEPATH += .. . ./console ./restore ./select
-LIBS        += -L../win32/release -lbacula -mwindows
-
-RESOURCES    = main.qrc
-MOC_DIR      = moc
-OBJECTS_DIR  = obj
-UI_DIR       = ui
-
-# Main window
-FORMS += main.ui 
-FORMS += prefs.ui
-FORMS += label/label.ui 
-FORMS += relabel/relabel.ui 
-FORMS += mount/mount.ui
-FORMS += console/console.ui
-FORMS += restore/restore.ui restore/prerestore.ui restore/brestore.ui
-FORMS += restore/restoretree.ui
-FORMS += run/run.ui run/runcmd.ui run/estimate.ui run/prune.ui
-FORMS += select/select.ui
-FORMS += medialist/medialist.ui mediaedit/mediaedit.ui joblist/joblist.ui
-FORMS += clients/clients.ui storage/storage.ui fileset/fileset.ui
-FORMS += joblog/joblog.ui jobs/jobs.ui
-FORMS += help/help.ui
-qwt {
-   FORMS += jobgraphs/jobplotcontrols.ui
-}
-
-# Main directory
-HEADERS += mainwin.h bat.h bat_conf.h qstd.h pages.h
-SOURCES += main.cpp bat_conf.cpp mainwin.cpp qstd.cpp pages.cpp
-
-# bcomm
-HEADERS += bcomm/dircomm.h
-SOURCES += bcomm/dircomm.cpp bcomm/dircomm_auth.cpp
-
-# Console
-HEADERS += console/console.h
-SOURCES += console/authenticate.cpp console/console.cpp
-
-# Restore
-HEADERS += restore/restore.h
-SOURCES += restore/prerestore.cpp restore/restore.cpp restore/brestore.cpp
-
-# Label dialog
-HEADERS += label/label.h
-SOURCES += label/label.cpp
-
-# Relabel dialog
-HEADERS += relabel/relabel.h
-SOURCES += relabel/relabel.cpp
-
-# Mount dialog
-HEADERS += mount/mount.h
-SOURCES += mount/mount.cpp
-
-# Run dialog
-HEADERS += run/run.h
-SOURCES += run/run.cpp run/runcmd.cpp run/estimate.cpp run/prune.cpp
-
-# Select dialog
-HEADERS += select/select.h
-SOURCES += select/select.cpp
-
-## MediaList
-HEADERS += medialist/medialist.h
-SOURCES += medialist/medialist.cpp
-
-## MediaEdit
-HEADERS += mediaedit/mediaedit.h
-SOURCES += mediaedit/mediaedit.cpp
-
-## JobList
-HEADERS += joblist/joblist.h
-SOURCES += joblist/joblist.cpp
-
-## Clients
-HEADERS += clients/clients.h
-SOURCES += clients/clients.cpp
-
-## Storage
-HEADERS += storage/storage.h
-SOURCES += storage/storage.cpp
-
-## Fileset
-HEADERS += fileset/fileset.h
-SOURCES += fileset/fileset.cpp
-
-## Job log
-HEADERS += joblog/joblog.h
-SOURCES += joblog/joblog.cpp
-
-## Jobs
-HEADERS += jobs/jobs.h
-SOURCES += jobs/jobs.cpp
-
-## RestoreTree
-HEADERS += restore/restoretree.h
-SOURCES += restore/restoretree.cpp
-
-## Job Step Graphs
-qwt {
-  HEADERS += jobgraphs/jobplot.h
-  SOURCES += jobgraphs/jobplot.cpp
-}
-
-# Help dialog
-HEADERS += help/help.h
-SOURCES += help/help.cpp
-
-INSTALLS += bins
-INSTALLS += confs
-
-QMAKE_EXTRA_TARGETS += depend
diff --git a/bacula/src/qt-console/bat.pro.mingw32 b/bacula/src/qt-console/bat.pro.mingw32
new file mode 100644 (file)
index 0000000..ea60bb1
--- /dev/null
@@ -0,0 +1,132 @@
+######################################################################
+# Version $Id: bat.pro.in 6956 2008-05-12 09:32:54Z kerns $
+#
+#   !!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+#
+#      Edit only bat.pro.in  -- bat.pro is built by the ./configure program
+#
+#   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+#    
+CONFIG += qt debug
+
+bins.path = ./
+bins.files = ./bat.exe
+confs.path = ./
+confs.commands = ./install_conf_file   
+
+TEMPLATE     = app
+TARGET       = bat
+DEPENDPATH  += .
+INCLUDEPATH += .. . ./console ./restore ./select
+LIBS        += -L../win32/release -lbacula -mwindows
+
+RESOURCES    = main.qrc
+MOC_DIR      = win32/moc
+OBJECTS_DIR  = win32/obj
+UI_DIR       = win32/ui
+
+# Main window
+FORMS += main.ui 
+FORMS += prefs.ui
+FORMS += label/label.ui 
+FORMS += relabel/relabel.ui 
+FORMS += mount/mount.ui
+FORMS += console/console.ui
+FORMS += restore/restore.ui restore/prerestore.ui restore/brestore.ui
+FORMS += restore/restoretree.ui
+FORMS += run/run.ui run/runcmd.ui run/estimate.ui run/prune.ui
+FORMS += select/select.ui
+FORMS += medialist/medialist.ui mediaedit/mediaedit.ui joblist/joblist.ui
+FORMS += clients/clients.ui storage/storage.ui fileset/fileset.ui
+FORMS += joblog/joblog.ui jobs/jobs.ui
+FORMS += help/help.ui
+qwt {
+   FORMS += jobgraphs/jobplotcontrols.ui
+}
+
+# Main directory
+HEADERS += mainwin.h bat.h bat_conf.h qstd.h pages.h
+SOURCES += main.cpp bat_conf.cpp mainwin.cpp qstd.cpp pages.cpp
+
+# bcomm
+HEADERS += bcomm/dircomm.h
+SOURCES += bcomm/dircomm.cpp bcomm/dircomm_auth.cpp
+
+# Console
+HEADERS += console/console.h
+SOURCES += console/authenticate.cpp console/console.cpp
+
+# Restore
+HEADERS += restore/restore.h
+SOURCES += restore/prerestore.cpp restore/restore.cpp restore/brestore.cpp
+
+# Label dialog
+HEADERS += label/label.h
+SOURCES += label/label.cpp
+
+# Relabel dialog
+HEADERS += relabel/relabel.h
+SOURCES += relabel/relabel.cpp
+
+# Mount dialog
+HEADERS += mount/mount.h
+SOURCES += mount/mount.cpp
+
+# Run dialog
+HEADERS += run/run.h
+SOURCES += run/run.cpp run/runcmd.cpp run/estimate.cpp run/prune.cpp
+
+# Select dialog
+HEADERS += select/select.h
+SOURCES += select/select.cpp
+
+## MediaList
+HEADERS += medialist/medialist.h
+SOURCES += medialist/medialist.cpp
+
+## MediaEdit
+HEADERS += mediaedit/mediaedit.h
+SOURCES += mediaedit/mediaedit.cpp
+
+## JobList
+HEADERS += joblist/joblist.h
+SOURCES += joblist/joblist.cpp
+
+## Clients
+HEADERS += clients/clients.h
+SOURCES += clients/clients.cpp
+
+## Storage
+HEADERS += storage/storage.h
+SOURCES += storage/storage.cpp
+
+## Fileset
+HEADERS += fileset/fileset.h
+SOURCES += fileset/fileset.cpp
+
+## Job log
+HEADERS += joblog/joblog.h
+SOURCES += joblog/joblog.cpp
+
+## Jobs
+HEADERS += jobs/jobs.h
+SOURCES += jobs/jobs.cpp
+
+## RestoreTree
+HEADERS += restore/restoretree.h
+SOURCES += restore/restoretree.cpp
+
+## Job Step Graphs
+qwt {
+  HEADERS += jobgraphs/jobplot.h
+  SOURCES += jobgraphs/jobplot.cpp
+}
+
+# Help dialog
+HEADERS += help/help.h
+SOURCES += help/help.cpp
+
+INSTALLS += bins
+INSTALLS += confs
+
+QMAKE_EXTRA_TARGETS += depend
index a238ecec52a38687ebaea3e2bd361fcf74e0511f..16bf4f5c9ded4587b2d021ec01fa8b8e5d4c45b2 100644 (file)
@@ -536,7 +536,6 @@ static int tls_pem_callback(char *buf, int size, const void *userdata)
    (void)size;
    (void)userdata;
 #ifdef HAVE_TLS
-   const char *prompt = (const char *)userdata;
 # if defined(HAVE_WIN32)
 // sendit(prompt);
    if (win32_cgets(buf, size) == NULL) {
@@ -546,6 +545,7 @@ static int tls_pem_callback(char *buf, int size, const void *userdata)
       return strlen(buf);
    }
 # else
+   const char *prompt = (const char *)userdata;
    char *passwd;
 
    passwd = getpass(prompt);
index 63ca00100959adff57ae85e3fd58760e1f49d143..76415412e7692cc6b5c3eef31701a0e7b2ecae4c 100644 (file)
@@ -105,8 +105,8 @@ void Console::terminate()
    if (m_sock) {
       if (m_notifier) {
          m_notifier->setEnabled(false);
-         delete m_notifier;
-         m_notifier = NULL;
+//       delete m_notifier;
+//       m_notifier = NULL;
       }
       stopTimer();
       m_sock->close();
@@ -612,11 +612,27 @@ int Console::read()
    int stat = 0;
    while (m_sock) {
       for (;;) {
-         stat = bnet_wait_data_intr(m_sock, 1);
+//       bool enabled;
+//       if (mainWin->m_commDebug) Pmsg0(000, "bnet_wait_data_intr\n");
+         stat = m_sock->wait_data_intr(0, 50000);
          if (stat > 0) {
             break;
          } 
+//       if (mainWin->m_commDebug) Pmsg1(000, "wait status=%d\n", stat);
+#ifdef xxx
+         if (m_notifier) {
+            enabled = m_notifier->isEnabled();
+            if (enabled) {
+               m_notifier->setEnabled(false);
+            }
+         }
+#endif
          app->processEvents();
+#ifdef xxx
+         if (m_notifier && enabled) {
+            m_notifier->setEnabled(true);
+         }
+#endif
          if (m_api_set && m_messages_pending && m_notifier->isEnabled()) {
             write_dir(".messages");
             m_messages_pending = false;
@@ -748,6 +764,7 @@ void Console::read_dir(int /* fd */)
    while (read() >= 0) {
       display_text(msg());
    }
+   if (mainWin->m_commDebug) Pmsg0(000, "exit read_dir\n");
 }
 
 /*
@@ -840,7 +857,6 @@ static int tls_pem_callback(char *buf, int size, const void *userdata)
    (void)size;
    (void)userdata;
 #ifdef HAVE_TLS
-   const char *prompt = (const char *)userdata;
 # if defined(HAVE_WIN32)
 // sendit(prompt);
    if (win32_cgets(buf, size) == NULL) {
@@ -850,6 +866,7 @@ static int tls_pem_callback(char *buf, int size, const void *userdata)
       return strlen(buf);
    }
 # else
+   const char *prompt = (const char *)userdata;
    char *passwd;
 
    passwd = getpass(prompt);
index 343ebd01c16f1622b8cf26aeb3aae5a52baa37ff..33b4d0296bb391ea4b1e0ed0fca6e1400ae218a6 100644 (file)
@@ -54,6 +54,8 @@
 #include "jobgraphs/jobplot.h"
 #endif
 
+extern bool trace;
+
 /* 
  * Daemon message callback
  */
@@ -64,6 +66,10 @@ void message_callback(int /* type */, char *msg)
 
 MainWin::MainWin(QWidget *parent) : QMainWindow(parent)
 {
+#ifdef HAVE_WIN32
+   my_name_is(0, NULL, "bat");
+   set_trace(true);
+#endif
    m_isClosing = false;
    m_dtformat = "yyyy-MM-dd HH:mm:ss";
    mainWin = this;
diff --git a/bacula/src/qt-console/make-win32 b/bacula/src/qt-console/make-win32
new file mode 100755 (executable)
index 0000000..4de01cf
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+#  Used to build the Win32 version of bat
+#
+rm -f debug/bat.exe
+if test -e ../config.h ; then
+   mv -f ../config.h ../config.h.orig
+fi
+qmake -spec win32 -unix -o Makefile.mingw32 bat.pro.mingw32
+make -j3 -f Makefile.mingw32 $1
+if test -e ../config.h.orig ; then
+   mv -f ../config.h.orig ../config.h
+fi
+if test -d ../win32/release; then
+   cp -f debug/bat.exe ../win32/release
+fi
diff --git a/bacula/src/qt-console/win32-x-g++/qmake.conf b/bacula/src/qt-console/win32-x-g++/qmake.conf
deleted file mode 100644 (file)
index db2114a..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-#
-# qmake configuration for win32-g++
-#
-# Written for MinGW
-#
-
-MAKEFILE_GENERATOR     = MINGW
-TEMPLATE               = app
-CONFIG                 += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header
-QT                     += core gui
-DEFINES                        += UNICODE QT_LARGEFILE_SUPPORT
-QMAKE_COMPILER_DEFINES  += __GNUC__ WIN32
-
-QMAKE_EXT_OBJ           = .o
-QMAKE_EXT_RES           = _res.o
-
-QMAKE_CC               = ../../../cross-tools/mingw32/bin/mingw32-gcc
-QMAKE_LEX              = flex
-QMAKE_LEXFLAGS         =
-QMAKE_YACC             = byacc
-QMAKE_YACCFLAGS                = -d
-QMAKE_CFLAGS           = -DHAVE_MINGW -DHAVE_WIN32
-QMAKE_CFLAGS_DEPS      = -M
-QMAKE_CFLAGS_WARN_ON   = -Wall
-QMAKE_CFLAGS_WARN_OFF  = -w
-QMAKE_CFLAGS_RELEASE   = -O2
-QMAKE_CFLAGS_DEBUG     = -g
-QMAKE_CFLAGS_YACC      = -Wno-unused -Wno-parentheses
-
-QMAKE_CXX              = ../../../cross-tools/mingw32/bin/mingw32-g++
-QMAKE_CXXFLAGS         = $$QMAKE_CFLAGS -DHAVE_MINGW -DHAVE_WIN32 -DHAVE_ZLIB_H -DHAVE_LIBZ -DHAVE_CRYPTO -DHAVE_OPENSSL -DHAVE_TLS 
-QMAKE_CXXFLAGS_DEPS    = $$QMAKE_CFLAGS_DEPS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
-QMAKE_CXXFLAGS_WARN_OFF        = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG   = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_YACC    = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_THREAD  = $$QMAKE_CFLAGS_THREAD
-QMAKE_CXXFLAGS_RTTI_ON = -frtti
-QMAKE_CXXFLAGS_RTTI_OFF        = -fno-rtti
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
-
-QMAKE_INCDIR           = ../../../depkgs-mingw32/include/pthreads ../../../depkgs-mingw32/include/ ../win32/compat 
-QMAKE_INCDIR_QT                = ../../../depkgs-mingw32/include/qt
-QMAKE_LIBDIR_QT                = ../../../depkgs-mingw32/lib/qt
-
-QMAKE_RUN_CC           = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
-QMAKE_RUN_CC_IMP       = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
-QMAKE_RUN_CXX          = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
-QMAKE_RUN_CXX_IMP      = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
-
-QMAKE_LINK             = ../../../cross-tools/mingw32/bin/mingw32-g++
-QMAKE_LFLAGS           = -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import  -mno-cygwin -m32 -fno-strict-aliasing -Wl,-enable-runtime-pseudo-reloc -mwindows
-
-QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl
-QMAKE_LFLAGS_EXCEPTIONS_OFF =
-QMAKE_LFLAGS_RELEASE   = -Wl,-s
-QMAKE_LFLAGS_DEBUG     =
-QMAKE_LFLAGS_CONSOLE   = -Wl,-subsystem,console
-QMAKE_LFLAGS_WINDOWS   = -Wl,-subsystem,windows
-QMAKE_LFLAGS_DLL        = -shared
-QMAKE_LINK_OBJECT_MAX  = 10
-QMAKE_LINK_OBJECT_SCRIPT= object_script
-
-
-QMAKE_LIBS             = -lwsock32
-QMAKE_LIBS_CORE         = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
-QMAKE_LIBS_GUI          = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32
-QMAKE_LIBS_NETWORK      = -lws2_32
-QMAKE_LIBS_OPENGL       = -lopengl32 -lglu32 -lgdi32 -luser32
-QMAKE_LIBS_COMPAT       = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
-QMAKE_LIBS_QT_ENTRY     = -lmingw32 -lqtmain
-
-#!isEmpty(QMAKE_SH) {
-    MINGW_IN_SHELL      = 1
-       QMAKE_DIR_SEP           = /
-       QMAKE_COPY              = cp
-       QMAKE_COPY_DIR          = cp -r
-       QMAKE_MOVE              = mv
-       QMAKE_DEL_FILE          = rm -f
-       QMAKE_MKDIR             = mkdir -p
-       QMAKE_DEL_DIR           = rm -rf
-    QMAKE_CHK_DIR_EXISTS = test -d
-
-QMAKE_MOC              = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
-QMAKE_UIC              = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
-QMAKE_IDC              = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
-
-QMAKE_IDL              = midl
-QMAKE_LIB              = ../../../cross-tools/mingw32/bin/mingw32-ar -ru
-QMAKE_RC               = ../../../cross-tools/mingw32/bin/mingw32-windres
-QMAKE_ZIP              = zip -r -9
-
-QMAKE_STRIP            = ../../../cross-tools/mingw32/bin/mingw32-strip
-QMAKE_STRIPFLAGS_LIB   += --strip-unneeded
-load(qt_config)
diff --git a/bacula/src/qt-console/win32-x-g++/qplatformdefs.h b/bacula/src/qt-console/win32-x-g++/qplatformdefs.h
deleted file mode 100644 (file)
index b01b8a6..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** This file may be used under the terms of the GNU General Public
-** License version 2.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of
-** this file.  Please review the following information to ensure GNU
-** General Public Licensing requirements will be met:
-** http://trolltech.com/products/qt/licenses/licensing/opensource/
-**
-** If you are unsure which license is appropriate for your use, please
-** review the following information:
-** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
-** or contact the sales department at sales@trolltech.com.
-**
-** In addition, as a special exception, Trolltech gives you certain
-** additional rights. These rights are described in the Trolltech GPL
-** Exception version 1.0, which can be found at
-** http://www.trolltech.com/products/qt/gplexception/ and in the file
-** GPL_EXCEPTION.txt in this package.
-**
-** In addition, as a special exception, Trolltech, as the sole copyright
-** holder for Qt Designer, grants users of the Qt/Eclipse Integration
-** plug-in the right for the Qt/Eclipse Integration to link to
-** functionality provided by Qt Designer and its related libraries.
-**
-** Trolltech reserves all rights not expressly granted herein.
-** 
-** Trolltech ASA (c) 2007
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-****************************************************************************/
-
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-#ifdef UNICODE
-#ifndef _UNICODE
-#define _UNICODE
-#endif
-#endif
-
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-#include <tchar.h>
-#include <io.h>
-#include <direct.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <windows.h>
-#include <limits.h>
-
-#if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500)
-typedef enum {
-    NameUnknown                  = 0, 
-    NameFullyQualifiedDN  = 1, 
-    NameSamCompatible    = 2, 
-    NameDisplay                  = 3, 
-    NameUniqueId         = 6, 
-    NameCanonical        = 7, 
-    NameUserPrincipal    = 8, 
-    NameCanonicalEx      = 9, 
-    NameServicePrincipal  = 10, 
-    NameDnsDomain        = 12
-} EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT;
-#endif
-
-#define Q_FS_FAT
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF             struct _stati64         // non-ANSI defs
-#define QT_STATBUF4TSTAT       struct _stati64         // non-ANSI defs
-#define QT_STAT                        ::_stati64
-#define QT_FSTAT               ::_fstati64
-#else
-#define QT_STATBUF             struct _stat            // non-ANSI defs
-#define QT_STATBUF4TSTAT       struct _stat            // non-ANSI defs
-#define QT_STAT                        ::_stat
-#define QT_FSTAT               ::_fstat
-#endif
-#define QT_STAT_REG            _S_IFREG
-#define QT_STAT_DIR            _S_IFDIR
-#define QT_STAT_MASK           _S_IFMT
-#if defined(_S_IFLNK)
-#  define QT_STAT_LNK          _S_IFLNK
-#endif
-#define QT_FILENO              _fileno
-#define QT_OPEN                        ::_open
-#define QT_CLOSE               ::_close
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK               ::_lseeki64
-#ifndef UNICODE
-#define QT_TSTAT               ::_stati64
-#else
-#define QT_TSTAT               ::_wstati64
-#endif
-#else
-#define QT_LSEEK               ::_lseek
-#ifndef UNICODE
-#define QT_TSTAT               ::_stat
-#else
-#define QT_TSTAT               ::_wstat
-#endif
-#endif
-#define QT_READ                        ::_read
-#define QT_WRITE               ::_write
-#define QT_ACCESS              ::_access
-#define QT_GETCWD              ::_getcwd
-#define QT_CHDIR               ::_chdir
-#define QT_MKDIR               ::_mkdir
-#define QT_RMDIR               ::_rmdir
-#define QT_OPEN_LARGEFILE       0
-#define QT_OPEN_RDONLY         _O_RDONLY
-#define QT_OPEN_WRONLY         _O_WRONLY
-#define QT_OPEN_RDWR           _O_RDWR
-#define QT_OPEN_CREAT          _O_CREAT
-#define QT_OPEN_TRUNC          _O_TRUNC
-#define QT_OPEN_APPEND         _O_APPEND
-#if defined(O_TEXT)
-# define QT_OPEN_TEXT          _O_TEXT
-# define QT_OPEN_BINARY                _O_BINARY
-#endif
-
-#define QT_FOPEN                ::fopen
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FSEEK                ::fseeko64
-#define QT_FTELL                ::ftello64
-#else
-#define QT_FSEEK                ::fseek
-#define QT_FTELL                ::ftell
-#endif
-#define QT_FGETPOS              ::fgetpos
-#define QT_FSETPOS              ::fsetpos
-#define QT_FPOS_T               fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_OFF_T                off64_t
-#else
-#define QT_OFF_T                long
-#endif
-
-#define QT_SIGNAL_ARGS         int
-
-#define QT_VSNPRINTF           ::_vsnprintf
-#define QT_SNPRINTF            ::_snprintf
-
-# define F_OK  0
-# define X_OK  1
-# define W_OK  2
-# define R_OK  4
-
-
-#endif // QPLATFORMDEFS_H
diff --git a/bacula/src/qt-console/win32/qmake.conf b/bacula/src/qt-console/win32/qmake.conf
new file mode 100644 (file)
index 0000000..0799397
--- /dev/null
@@ -0,0 +1,97 @@
+#
+# qmake configuration for win32-g++
+#
+# Written for MinGW
+#
+
+MAKEFILE_GENERATOR      = MINGW
+TEMPLATE                = app
+CONFIG                  += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header
+QT                      += core gui
+DEFINES                 += UNICODE QT_LARGEFILE_SUPPORT
+QMAKE_COMPILER_DEFINES  += __GNUC__ WIN32
+
+QMAKE_EXT_OBJ           = .o
+QMAKE_EXT_RES           = _res.o
+
+QMAKE_CC                = ../../../cross-tools/mingw32/bin/mingw32-gcc
+QMAKE_LEX               = flex
+QMAKE_LEXFLAGS          =
+QMAKE_YACC              = byacc
+QMAKE_YACCFLAGS         = -d
+QMAKE_CFLAGS            = -DHAVE_MINGW -DHAVE_WIN32
+QMAKE_CFLAGS_DEPS       = -M
+QMAKE_CFLAGS_WARN_ON    = -Wall
+QMAKE_CFLAGS_WARN_OFF   = -w
+QMAKE_CFLAGS_RELEASE    = -O2
+QMAKE_CFLAGS_DEBUG      = -g
+QMAKE_CFLAGS_YACC       = -Wno-unused -Wno-parentheses
+
+QMAKE_CXX               = ../../../cross-tools/mingw32/bin/mingw32-g++
+QMAKE_CXXFLAGS          = $$QMAKE_CFLAGS -DHAVE_MINGW -DHAVE_WIN32 -DHAVE_ZLIB_H -DHAVE_LIBZ -DHAVE_CRYPTO -DHAVE_OPENSSL -DHAVE_TLS 
+QMAKE_CXXFLAGS_DEPS     = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON  = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE  = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG    = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_YACC     = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD   = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_RTTI_ON  = -frtti
+QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
+QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
+
+QMAKE_INCDIR            = ../../../depkgs-mingw32/include/pthreads ../../../depkgs-mingw32/include/ ../win32/compat 
+QMAKE_INCDIR_QT         = ../../../depkgs-mingw32/include/qt
+QMAKE_LIBDIR_QT         = ../../../depkgs-mingw32/lib/qt
+
+QMAKE_RUN_CC            = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CC_IMP        = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+QMAKE_RUN_CXX           = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CXX_IMP       = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+QMAKE_LINK              = ../../../cross-tools/mingw32/bin/mingw32-g++
+QMAKE_LFLAGS            = -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import  -mno-cygwin -m32 -fno-strict-aliasing -Wl,-enable-runtime-pseudo-reloc
+
+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl
+QMAKE_LFLAGS_EXCEPTIONS_OFF =
+QMAKE_LFLAGS_RELEASE    = -Wl,-s
+QMAKE_LFLAGS_DEBUG      =
+QMAKE_LFLAGS_CONSOLE    = -Wl,-subsystem,console
+QMAKE_LFLAGS_WINDOWS    = -Wl,-subsystem,windows
+QMAKE_LFLAGS_DLL        = -shared
+QMAKE_LINK_OBJECT_MAX   = 10
+QMAKE_LINK_OBJECT_SCRIPT= object_script
+
+
+QMAKE_LIBS              = -lwsock32
+QMAKE_LIBS_CORE         = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
+QMAKE_LIBS_GUI          = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32
+QMAKE_LIBS_NETWORK      = -lws2_32
+QMAKE_LIBS_OPENGL       = -lopengl32 -lglu32 -lgdi32 -luser32
+QMAKE_LIBS_COMPAT       = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
+QMAKE_LIBS_QT_ENTRY     = -lmingw32 -lqtmain
+
+MINGW_IN_SHELL          = 1
+QMAKE_DIR_SEP           = /
+QMAKE_COPY              = cp
+QMAKE_COPY_DIR          = cp -r
+QMAKE_MOVE              = mv
+QMAKE_DEL_FILE          = rm -f
+QMAKE_MKDIR             = mkdir -p
+QMAKE_DEL_DIR           = rm -rf
+QMAKE_RCC               = rcc
+QMAKE_CHK_DIR_EXISTS    = test -d
+
+QMAKE_MOC               = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
+QMAKE_UIC               = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
+QMAKE_IDC               = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
+
+QMAKE_IDL               = midl
+QMAKE_LIB               = ../../../cross-tools/mingw32/bin/mingw32-ar -ru
+QMAKE_RC                = ../../../cross-tools/mingw32/bin/mingw32-windres
+QMAKE_ZIP               = zip -r -9
+
+QMAKE_STRIP             = ../../../cross-tools/mingw32/bin/mingw32-strip
+QMAKE_STRIPFLAGS_LIB    += --strip-unneeded
+load(qt_config)
diff --git a/bacula/src/qt-console/win32/qplatformdefs.h b/bacula/src/qt-console/win32/qplatformdefs.h
new file mode 100644 (file)
index 0000000..b01b8a6
--- /dev/null
@@ -0,0 +1,161 @@
+/****************************************************************************
+**
+** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License version 2.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of
+** this file.  Please review the following information to ensure GNU
+** General Public Licensing requirements will be met:
+** http://trolltech.com/products/qt/licenses/licensing/opensource/
+**
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
+** or contact the sales department at sales@trolltech.com.
+**
+** In addition, as a special exception, Trolltech gives you certain
+** additional rights. These rights are described in the Trolltech GPL
+** Exception version 1.0, which can be found at
+** http://www.trolltech.com/products/qt/gplexception/ and in the file
+** GPL_EXCEPTION.txt in this package.
+**
+** In addition, as a special exception, Trolltech, as the sole copyright
+** holder for Qt Designer, grants users of the Qt/Eclipse Integration
+** plug-in the right for the Qt/Eclipse Integration to link to
+** functionality provided by Qt Designer and its related libraries.
+**
+** Trolltech reserves all rights not expressly granted herein.
+** 
+** Trolltech ASA (c) 2007
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#ifdef UNICODE
+#ifndef _UNICODE
+#define _UNICODE
+#endif
+#endif
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+#include <tchar.h>
+#include <io.h>
+#include <direct.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <windows.h>
+#include <limits.h>
+
+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500)
+typedef enum {
+    NameUnknown                  = 0, 
+    NameFullyQualifiedDN  = 1, 
+    NameSamCompatible    = 2, 
+    NameDisplay                  = 3, 
+    NameUniqueId         = 6, 
+    NameCanonical        = 7, 
+    NameUserPrincipal    = 8, 
+    NameCanonicalEx      = 9, 
+    NameServicePrincipal  = 10, 
+    NameDnsDomain        = 12
+} EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT;
+#endif
+
+#define Q_FS_FAT
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF             struct _stati64         // non-ANSI defs
+#define QT_STATBUF4TSTAT       struct _stati64         // non-ANSI defs
+#define QT_STAT                        ::_stati64
+#define QT_FSTAT               ::_fstati64
+#else
+#define QT_STATBUF             struct _stat            // non-ANSI defs
+#define QT_STATBUF4TSTAT       struct _stat            // non-ANSI defs
+#define QT_STAT                        ::_stat
+#define QT_FSTAT               ::_fstat
+#endif
+#define QT_STAT_REG            _S_IFREG
+#define QT_STAT_DIR            _S_IFDIR
+#define QT_STAT_MASK           _S_IFMT
+#if defined(_S_IFLNK)
+#  define QT_STAT_LNK          _S_IFLNK
+#endif
+#define QT_FILENO              _fileno
+#define QT_OPEN                        ::_open
+#define QT_CLOSE               ::_close
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_LSEEK               ::_lseeki64
+#ifndef UNICODE
+#define QT_TSTAT               ::_stati64
+#else
+#define QT_TSTAT               ::_wstati64
+#endif
+#else
+#define QT_LSEEK               ::_lseek
+#ifndef UNICODE
+#define QT_TSTAT               ::_stat
+#else
+#define QT_TSTAT               ::_wstat
+#endif
+#endif
+#define QT_READ                        ::_read
+#define QT_WRITE               ::_write
+#define QT_ACCESS              ::_access
+#define QT_GETCWD              ::_getcwd
+#define QT_CHDIR               ::_chdir
+#define QT_MKDIR               ::_mkdir
+#define QT_RMDIR               ::_rmdir
+#define QT_OPEN_LARGEFILE       0
+#define QT_OPEN_RDONLY         _O_RDONLY
+#define QT_OPEN_WRONLY         _O_WRONLY
+#define QT_OPEN_RDWR           _O_RDWR
+#define QT_OPEN_CREAT          _O_CREAT
+#define QT_OPEN_TRUNC          _O_TRUNC
+#define QT_OPEN_APPEND         _O_APPEND
+#if defined(O_TEXT)
+# define QT_OPEN_TEXT          _O_TEXT
+# define QT_OPEN_BINARY                _O_BINARY
+#endif
+
+#define QT_FOPEN                ::fopen
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FSEEK                ::fseeko64
+#define QT_FTELL                ::ftello64
+#else
+#define QT_FSEEK                ::fseek
+#define QT_FTELL                ::ftell
+#endif
+#define QT_FGETPOS              ::fgetpos
+#define QT_FSETPOS              ::fsetpos
+#define QT_FPOS_T               fpos_t
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_OFF_T                off64_t
+#else
+#define QT_OFF_T                long
+#endif
+
+#define QT_SIGNAL_ARGS         int
+
+#define QT_VSNPRINTF           ::_vsnprintf
+#define QT_SNPRINTF            ::_snprintf
+
+# define F_OK  0
+# define X_OK  1
+# define W_OK  2
+# define R_OK  4
+
+
+#endif // QPLATFORMDEFS_H
index 68688ef9bf00cefb44be3bcb870a7d6e7f7c925a..26b3f5bdfe32a4001e89c15f055c6615666ecfc9 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.4.1"
-#define BDATE   "15 July 2008"
-#define LSMDATE "15Jul08"
+#define BDATE   "19 July 2008"
+#define LSMDATE "19Jul08"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2008"       /* year for copyright messages in progs */
index 0818935b9ba99ff909afb024b93d9cde0bffc474..6892d96c645e176d4d7b4caf17ed412505e4dfd7 100644 (file)
@@ -220,12 +220,12 @@ _Z12write_nbytesP5BSOCKPci
 _Z13bnet_get_peerP5BSOCKPci
 _Z13bnet_strerrorP5BSOCK
 _Z13is_bnet_errorP5BSOCK
-_Z14bnet_wait_dataP5BSOCKi
 _Z15bnet_tls_clientP11TLS_ContextP5BSOCKP5alist
 _Z15bnet_tls_serverP11TLS_ContextP5BSOCKP5alist
 _Z17bnet_host2ipaddrsPKciPS0_
 _Z17bnet_set_blockingP5BSOCK
 _Z17bnet_sig_to_asciiP5BSOCK
+_Z14bnet_wait_dataP5BSOCKi
 _Z19bnet_wait_data_intrP5BSOCKi
 _Z20bnet_set_buffer_sizeP5BSOCKji
 _Z20bnet_set_nonblockingP5BSOCK
@@ -281,7 +281,6 @@ _Z9bsnprintfPciPKcz
 _Z9new_bsockv
 _ZN5BSOCK10free_bsockEv
 _ZN5BSOCK12set_blockingEv
-_ZN5BSOCK14wait_data_intrEi
 _ZN5BSOCK15set_buffer_sizeEji
 _ZN5BSOCK15set_nonblockingEv
 _ZN5BSOCK16restore_blockingEi
@@ -299,7 +298,8 @@ _ZN5BSOCK7destroyEv
 _ZN5BSOCK8fin_initEP3JCRiPKcS3_iP8sockaddr
 _ZN5BSOCK8get_peerEPci
 _ZN5BSOCK9bstrerrorEv
-_ZN5BSOCK9wait_dataEi
+_ZN5BSOCK9wait_dataEii
+_ZN5BSOCK14wait_data_intrEii
  
 ; bsys.o
 _Z10b_strerroriPcj
index a7a3729a4f8b598551bde43ff6aa9f02770f7f13..5349e6763fbe2f87334092c79a5c598bc3c43324 100644 (file)
@@ -1,6 +1,9 @@
               Technical notes on version 2.4
 
 General:
+19Jul08
+kes  Do partial integration of the Win32 bat build created by Eric.
+kes  Fix bat not to block.
 15Jul08
 kes  Ensure that SD tried to mount a volume not in an autochanger
      at least once before asking for operator intervention.