]> git.sur5r.net Git - bacula/bacula/commitdiff
Add win32 directory
authorKern Sibbald <kern@sibbald.com>
Tue, 10 Feb 2004 13:47:35 +0000 (13:47 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 10 Feb 2004 13:47:35 +0000 (13:47 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1036 91ce42f0-d328-0410-95d8-f526ca767f89

104 files changed:
bacula/src/stored/dev.c
bacula/src/win32/License.txt [new file with mode: 0644]
bacula/src/win32/bacula.nsi [new file with mode: 0644]
bacula/src/win32/baculafd/GNUmakefile [new file with mode: 0644]
bacula/src/win32/baculafd/StdAfx.cpp [new file with mode: 0644]
bacula/src/win32/baculafd/StdAfx.h [new file with mode: 0644]
bacula/src/win32/baculafd/baculafd.dsp [new file with mode: 0644]
bacula/src/win32/baculafd/baculafd.dsw [new file with mode: 0644]
bacula/src/win32/baculafd/baculafd.mak [new file with mode: 0644]
bacula/src/win32/build.bat [new file with mode: 0755]
bacula/src/win32/compat/alloca.h [new file with mode: 0644]
bacula/src/win32/compat/arpa/inet.h [new file with mode: 0644]
bacula/src/win32/compat/compat.cpp [new file with mode: 0644]
bacula/src/win32/compat/compat.h [new file with mode: 0644]
bacula/src/win32/compat/dirent.h [new file with mode: 0644]
bacula/src/win32/compat/getopt.c [new file with mode: 0644]
bacula/src/win32/compat/getopt.h [new file with mode: 0644]
bacula/src/win32/compat/grp.h [new file with mode: 0644]
bacula/src/win32/compat/mswinver.h [new file with mode: 0644]
bacula/src/win32/compat/netdb.h [new file with mode: 0644]
bacula/src/win32/compat/netinet/in.h [new file with mode: 0644]
bacula/src/win32/compat/print.cpp [new file with mode: 0644]
bacula/src/win32/compat/pwd.h [new file with mode: 0644]
bacula/src/win32/compat/sched.h [new file with mode: 0644]
bacula/src/win32/compat/stdint.h [new file with mode: 0644]
bacula/src/win32/compat/strings.h [new file with mode: 0644]
bacula/src/win32/compat/sys/file.h [new file with mode: 0644]
bacula/src/win32/compat/sys/ioctl.h [new file with mode: 0644]
bacula/src/win32/compat/sys/socket.h [new file with mode: 0644]
bacula/src/win32/compat/sys/time.h [new file with mode: 0644]
bacula/src/win32/compat/sys/wait.h [new file with mode: 0644]
bacula/src/win32/compat/syslog.h [new file with mode: 0644]
bacula/src/win32/compat/unistd.h [new file with mode: 0644]
bacula/src/win32/compat/winconfig.h [new file with mode: 0644]
bacula/src/win32/compat/winhost.h [new file with mode: 0644]
bacula/src/win32/console/ReadMe.txt [new file with mode: 0644]
bacula/src/win32/console/StdAfx.cpp [new file with mode: 0644]
bacula/src/win32/console/StdAfx.h [new file with mode: 0644]
bacula/src/win32/console/console.cpp [new file with mode: 0644]
bacula/src/win32/console/console.dsp [new file with mode: 0644]
bacula/src/win32/console/console.dsw [new file with mode: 0644]
bacula/src/win32/filed/authenticate.cpp [new file with mode: 0644]
bacula/src/win32/filed/backup.cpp [new file with mode: 0644]
bacula/src/win32/filed/estimate.cpp [new file with mode: 0644]
bacula/src/win32/filed/filed.cpp [new file with mode: 0644]
bacula/src/win32/filed/filed_conf.cpp [new file with mode: 0644]
bacula/src/win32/filed/heartbeat.cpp [new file with mode: 0644]
bacula/src/win32/filed/job.cpp [new file with mode: 0644]
bacula/src/win32/filed/restore.cpp [new file with mode: 0644]
bacula/src/win32/filed/status.cpp [new file with mode: 0644]
bacula/src/win32/filed/verify.cpp [new file with mode: 0644]
bacula/src/win32/filed/verify_vol.cpp [new file with mode: 0644]
bacula/src/win32/findlib/attribs.cpp [new file with mode: 0644]
bacula/src/win32/findlib/bfile.cpp [new file with mode: 0644]
bacula/src/win32/findlib/create_file.cpp [new file with mode: 0644]
bacula/src/win32/findlib/enable_priv.cpp [new file with mode: 0644]
bacula/src/win32/findlib/find.cpp [new file with mode: 0644]
bacula/src/win32/findlib/find_one.cpp [new file with mode: 0644]
bacula/src/win32/findlib/makepath.cpp [new file with mode: 0644]
bacula/src/win32/findlib/match.cpp [new file with mode: 0644]
bacula/src/win32/findlib/save-cwd.cpp [new file with mode: 0644]
bacula/src/win32/findlib/winapi.cpp [new file with mode: 0644]
bacula/src/win32/lib/alist.cpp [new file with mode: 0644]
bacula/src/win32/lib/alloc.cpp [new file with mode: 0644]
bacula/src/win32/lib/attr.cpp [new file with mode: 0644]
bacula/src/win32/lib/base64.cpp [new file with mode: 0644]
bacula/src/win32/lib/bget_msg.cpp [new file with mode: 0644]
bacula/src/win32/lib/bnet.cpp [new file with mode: 0644]
bacula/src/win32/lib/bnet_pkt.cpp [new file with mode: 0644]
bacula/src/win32/lib/bnet_server.cpp [new file with mode: 0644]
bacula/src/win32/lib/bpipe.cpp [new file with mode: 0644]
bacula/src/win32/lib/bshm.cpp [new file with mode: 0644]
bacula/src/win32/lib/bsys.cpp [new file with mode: 0644]
bacula/src/win32/lib/btime.cpp [new file with mode: 0644]
bacula/src/win32/lib/cram-md5.cpp [new file with mode: 0644]
bacula/src/win32/lib/crc32.cpp [new file with mode: 0644]
bacula/src/win32/lib/daemon.cpp [new file with mode: 0644]
bacula/src/win32/lib/dlist.cpp [new file with mode: 0644]
bacula/src/win32/lib/edit.cpp [new file with mode: 0644]
bacula/src/win32/lib/events.cpp [new file with mode: 0644]
bacula/src/win32/lib/fnmatch.cpp [new file with mode: 0644]
bacula/src/win32/lib/hmac.cpp [new file with mode: 0644]
bacula/src/win32/lib/htable.cpp [new file with mode: 0644]
bacula/src/win32/lib/idcache.cpp [new file with mode: 0644]
bacula/src/win32/lib/jcr.cpp [new file with mode: 0644]
bacula/src/win32/lib/lex.cpp [new file with mode: 0644]
bacula/src/win32/lib/md5.cpp [new file with mode: 0644]
bacula/src/win32/lib/mem_pool.cpp [new file with mode: 0644]
bacula/src/win32/lib/message.cpp [new file with mode: 0644]
bacula/src/win32/lib/parse_conf.cpp [new file with mode: 0644]
bacula/src/win32/lib/queue.cpp [new file with mode: 0644]
bacula/src/win32/lib/rwlock.cpp [new file with mode: 0644]
bacula/src/win32/lib/scan.cpp [new file with mode: 0644]
bacula/src/win32/lib/semlock.cpp [new file with mode: 0644]
bacula/src/win32/lib/serial.cpp [new file with mode: 0644]
bacula/src/win32/lib/sha1.cpp [new file with mode: 0644]
bacula/src/win32/lib/signal.cpp [new file with mode: 0644]
bacula/src/win32/lib/smartall.cpp [new file with mode: 0644]
bacula/src/win32/lib/tree.cpp [new file with mode: 0644]
bacula/src/win32/lib/util.cpp [new file with mode: 0644]
bacula/src/win32/lib/var.cpp [new file with mode: 0644]
bacula/src/win32/lib/watchdog.cpp [new file with mode: 0644]
bacula/src/win32/lib/workq.cpp [new file with mode: 0644]
bacula/src/win32/util.nsh [new file with mode: 0644]

index 146be7862441b6f1b5ef4389f31b23f83333e435..d004f023d09e34a552aab7cbfbd849556cac05aa 100644 (file)
@@ -429,9 +429,28 @@ eod_dev(DEVICE *dev)
       return 0;
    }
 #ifdef MTEOM
+
+   if (dev_cap(dev, CAP_FASTFSF) && !dev_cap(dev, CAP_EOM)) {
+      struct mtget mt_stat;
+      Dmsg0(200,"PAPED using FAST FSF for EOM\n");
+      if (ioctl(dev->fd, MTIOCGET, (char *)&mt_stat) == 0 && mt_stat.mt_fileno <= 0) {
+       if (!rewind_dev(dev)) {
+         return 0;
+       }
+      }
+      mt_com.mt_op = MTFSF;
+      mt_com.mt_count = INT32_MAX;    /* use big positive number */
+      if (mt_com.mt_count < 0) {
+        mt_com.mt_count = INT16_MAX; /* brain damaged system */
+      }
+   }
+
    if (dev_cap(dev, CAP_EOM)) {
+      Dmsg0(200,"PAPED using EOM for EOM\n");
       mt_com.mt_op = MTEOM;
       mt_com.mt_count = 1;
+   }
+   if(dev_cap(dev, CAP_FASTFSF) || dev_cap(dev, CAP_EOM)) {
       if ((stat=ioctl(dev->fd, MTIOCTOP, (char *)&mt_com)) < 0) {
          Dmsg1(50, "ioctl error: %s\n", strerror(dev->dev_errno));
         clrerror_dev(dev, mt_com.mt_op);
@@ -440,6 +459,7 @@ eod_dev(DEVICE *dev)
            dev->dev_name, strerror(dev->dev_errno));
         return 0;
       }
+
       if (ioctl(dev->fd, MTIOCGET, (char *)&mt_stat) < 0) {
         dev->dev_errno = errno;
          Mmsg2(&dev->errmsg, _("ioctl MTIOCGET error on %s. ERR=%s.\n"),
diff --git a/bacula/src/win32/License.txt b/bacula/src/win32/License.txt
new file mode 100644 (file)
index 0000000..19cc8b1
--- /dev/null
@@ -0,0 +1,19 @@
+Copyright Â© 2002-2004
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software.  If you use this software
+   in a product, an acknowledgment in the product documentation would be
+   appreciated but is not required.
+
+2.  Altered versions must be plainly marked as such, and must not be
+    misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any distribution.
diff --git a/bacula/src/win32/bacula.nsi b/bacula/src/win32/bacula.nsi
new file mode 100644 (file)
index 0000000..5de4a6d
--- /dev/null
@@ -0,0 +1,160 @@
+;NSIS Modern User Interface version 1.63
+;Start Menu Folder Selection Example Script
+;Written by Joost Verburg
+
+!define MUI_PRODUCT "Bacula" ;Define your own software name here
+!define MUI_VERSION "1.32f-3" ;Define your own software version here
+
+!include "MUI.nsh"
+!include "util.nsh"
+
+;--------------------------------
+;Configuration
+
+  ;General
+  OutFile "bacula-install.exe"
+
+  ;Folder selection page
+  InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"
+  
+  ;Remember install folder
+  InstallDirRegKey HKCU "Software\${MUI_PRODUCT}" ""
+  
+  ;$9 is being used to store the Start Menu Folder.
+  ;Do not use this variable in your script (or Push/Pop it)!
+
+  ;To change this variable, use MUI_STARTMENUPAGE_VARIABLE.
+  ;Have a look at the Readme for info about other options (default folder,
+  ;registry).
+
+  ;Remember the Start Menu Folder
+  !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" 
+  !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${MUI_PRODUCT}" 
+  !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
+
+  !define TEMP $R0
+  
+;--------------------------------
+;Modern UI Configuration
+
+  !define MUI_LICENSEPAGE
+  !define MUI_COMPONENTSPAGE
+  !define MUI_DIRECTORYPAGE
+  !define MUI_STARTMENUPAGE
+  
+  !define MUI_ABORTWARNING
+  
+  !define MUI_UNINSTALLER
+  !define MUI_UNCONFIRMPAGE
+  
+;--------------------------------
+;Languages
+  !insertmacro MUI_LANGUAGE "English"
+  
+;--------------------------------
+;Language Strings
+
+  ;Description
+  LangString DESC_SecCopyUI ${LANG_ENGLISH} "Install Bacula client on this system."
+
+;--------------------------------
+;Data
+  
+  LicenseData "License.txt"
+
+;--------------------------------
+;Installer Sections
+
+Section "Bacula File Service" SecCopyUI
+
+  ;ADD YOUR OWN STUFF HERE!
+
+  SetOutPath "$INSTDIR"
+  File baculafd\Release\bacula-fd.exe
+  File pthreads\pthreadVCE.dll
+  IfFileExists "$INSTDIR\bacula-fd.conf" sconf 
+  File bacula-fd.conf
+  goto doDir
+  sconf:
+  File /oname=bacula-fd.conf.N bacula-fd.conf
+  doDir:
+  CreateDirectory "$INSTDIR\working"
+  
+  ;Store install folder
+  WriteRegStr HKCU "Software\${MUI_PRODUCT}" "" $INSTDIR
+  
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN
+    
+    ;Create shortcuts
+    CreateDirectory "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}"
+    CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
+    Call IsNT
+    Pop $R0
+    StrCmp $R0 "false" do98sc
+
+    CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Start Service.lnk" "$SYSDIR\net.exe" "start bacula" "$INSTDIR\bacula-fd.exe" 2
+    CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Stop Service.lnk" "$SYSDIR\net.exe" "stop bacula" "$INSTDIR\bacula-fd.exe" 3
+   goto scend
+    do98sc:
+
+    CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Start Service.lnk" "$INSTDIR\bacula-fd.exe" "-c bacula-fd.conf" "$INSTDIR\bacula-fd.exe" 2
+    CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Stop Service.lnk" "$INSTDIR\bacula-fd.exe" "/kill" "$INSTDIR\bacula-fd.exe" 3
+   scend:
+  !insertmacro MUI_STARTMENU_WRITE_END
+
+  ;Create uninstaller
+  WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+  ; Install service
+  ExecWait '"$INSTDIR\bacula-fd.exe" /install -c "$INSTDIR\bacula-fd.conf"'
+
+SectionEnd
+
+;Display the Finish header
+;Insert this macro after the sections if you are not using a finish page
+!insertmacro MUI_SECTIONS_FINISHHEADER
+
+;--------------------------------
+;Descriptions
+
+!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
+!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
+!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
+;--------------------------------
+;Uninstaller Section
+
+Section "Uninstall"
+
+  ;ADD YOUR OWN STUFF HERE!
+  ExecWait   '"$INSTDIR\bacula-fd.exe" /kill'
+  Sleep 1000
+  ExecWait   '"$INSTDIR\bacula-fd.exe" /remove'
+  Sleep 1000
+
+  Delete "$INSTDIR\bacula-fd.exe"
+  Delete "$INSTDIR\bacula-fd.conf.N"
+  Delete "$INSTDIR\pthreadVCE.dll"
+  Delete "$INSTDIR\Uninstall.exe"
+  RMDir  "$INSTDIR\working"  
+  ;Remove shortcut
+  ReadRegStr ${TEMP} "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
+  
+  StrCmp ${TEMP} "" noshortcuts
+  
+    Delete "$SMPROGRAMS\${TEMP}\Uninstall.lnk"
+    Delete "$SMPROGRAMS\${TEMP}\Start Service.lnk"
+    Delete "$SMPROGRAMS\${TEMP}\Stop Service.lnk"
+    RMDir "$SMPROGRAMS\${TEMP}" ;Only if empty, so it won't delete other shortcuts
+    
+  noshortcuts:
+
+  RMDir "$INSTDIR"
+
+  DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
+
+  ;Display the Finish header
+  !insertmacro MUI_UNFINISHHEADER
+
+SectionEnd
\ No newline at end of file
diff --git a/bacula/src/win32/baculafd/GNUmakefile b/bacula/src/win32/baculafd/GNUmakefile
new file mode 100644 (file)
index 0000000..1f4d92d
--- /dev/null
@@ -0,0 +1,5 @@
+default:
+       env MAKEFLAGS= nmake CFG="baculafd - Win32 Release" /f baculafd.mak
+clean:
+       env MAKEFLAGS= nmake CFG="baculafd - Win32 Release" /f baculafd.mak clean
+
diff --git a/bacula/src/win32/baculafd/StdAfx.cpp b/bacula/src/win32/baculafd/StdAfx.cpp
new file mode 100644 (file)
index 0000000..3bbf8ec
--- /dev/null
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+//     baculaService.pch will be the pre-compiled header
+//     stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/bacula/src/win32/baculafd/StdAfx.h b/bacula/src/win32/baculafd/StdAfx.h
new file mode 100644 (file)
index 0000000..b48aad0
--- /dev/null
@@ -0,0 +1,30 @@
+// stdafx.h : include file for standard system include files,
+//  or project specific include files that are used frequently, but
+//      are changed infrequently
+//
+
+#if !defined(AFX_STDAFX_H__566FE838_69B8_4101_923D_4BAE2C46AD51__INCLUDED_)
+#define AFX_STDAFX_H__566FE838_69B8_4101_923D_4BAE2C46AD51__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define VC_EXTRALEAN           // Exclude rarely-used stuff from Windows headers
+
+#include <afx.h>
+#include <afxwin.h>         // MFC core and standard components
+#include <afxext.h>         // MFC extensions
+#include <afxdtctl.h>          // MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h>                    // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <iostream>
+
+// TODO: reference additional headers your program requires here
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__566FE838_69B8_4101_923D_4BAE2C46AD51__INCLUDED_)
diff --git a/bacula/src/win32/baculafd/baculafd.dsp b/bacula/src/win32/baculafd/baculafd.dsp
new file mode 100644 (file)
index 0000000..2115fdd
--- /dev/null
@@ -0,0 +1,505 @@
+# Microsoft Developer Studio Project File - Name="baculafd" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
+\r
+CFG=baculafd - Win32 Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "baculafd.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "baculafd.mak" CFG="baculafd - Win32 Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "baculafd - Win32 Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baculafd - Win32 Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+RSC=rc.exe\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 2\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release"\r
+# PROP BASE Intermediate_Dir "Release"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 1\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release"\r
+# PROP Intermediate_Dir "Release"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c\r
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "../compat" /I "../.." /I "../pthreads" /I "../zlib" /I "." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_WIN32" /FD /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386\r
+# ADD LINK32 wsock32.lib pthreadVCE.lib zlib.lib /nologo /subsystem:windows /pdb:none /machine:I386 /nodefaultlib:"MSVCRT.lib" /out:"Release/bacula-fd.exe" /libpath:"../pthreads" /libpath:"../zlib"\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 2\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug"\r
+# PROP BASE Intermediate_Dir "Debug"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 2\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug"\r
+# PROP Intermediate_Dir "Debug"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c\r
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../compat" /I "../.." /I "../pthreads" /I "../zlib" /I "." /D "_DEBUG" /D "_WINMAIN_" /D "PTW32_BUILD" /D "_AFXDLL" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_WIN32" /FR /FD /GZ /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 wsock32.lib pthreadVCE.lib zlib.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386 /out:"Debug/bacula-fd.exe" /libpath:"../pthreads" /libpath:"../zlib"\r
+# SUBTRACT LINK32 /nodefaultlib\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "baculafd - Win32 Release"\r
+# Name "baculafd - Win32 Debug"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\alist.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\alloc.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\attr.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\findlib\attribs.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\filed\authenticate.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\filed\backup.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\base64.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\findlib\bfile.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\bget_msg.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\bnet.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\bnet_server.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\bshm.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\bsys.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\btime.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\compat.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE="..\lib\cram-md5.cpp"\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\crc32.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\findlib\create_file.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\daemon.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\dlist.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\edit.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\findlib\enable_priv.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\filed\estimate.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\filed\filed.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\filed\filed_conf.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\findlib\find.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\findlib\find_one.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\fnmatch.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\getopt.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\filed\heartbeat.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\hmac.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\htable.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\idcache.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\jcr.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\filed\job.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\lex.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\findlib\makepath.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\findlib\match.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\md5.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\mem_pool.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\message.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\parse_conf.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\print.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\queue.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\filed\restore.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\rwlock.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE="..\findlib\save-cwd.cpp"\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\scan.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\semlock.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\serial.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\sha1.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\signal.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\smartall.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\filed\status.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\StdAfx.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\timers.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\tree.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\util.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\var.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\filed\verify.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\filed\verify_vol.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\watchdog.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winabout.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\findlib\winapi.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winevents.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winmain.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winres.rc\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winservice.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winstat.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\wintray.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\lib\workq.cpp\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files"\r
+\r
+# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\alloca.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\compat.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\config.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\dirent.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\getopt.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\grp.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\host.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\mswinver.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\netdb.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\pwd.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\sched.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\StdAfx.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\stdint.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\strings.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\syslog.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\compat\unistd.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winabout.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winbacula.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winevents.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winres.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winservice.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\winstat.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\filed\win32\wintray.h\r
+# End Source File\r
+# End Group\r
+# Begin Group "Resource Files"\r
+\r
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\filed\win32\bacula.bmp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\filed\win32\bacula.ico\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\filed\win32\error.ico\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\filed\win32\idle.ico\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\filed\win32\running.ico\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\filed\win32\saving.ico\r
+# End Source File\r
+# End Group\r
+# Begin Source File\r
+\r
+SOURCE=.\ReadMe.txt\r
+# End Source File\r
+# End Target\r
+# End Project\r
diff --git a/bacula/src/win32/baculafd/baculafd.dsw b/bacula/src/win32/baculafd/baculafd.dsw
new file mode 100644 (file)
index 0000000..93d7af8
--- /dev/null
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00\r
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
+\r
+###############################################################################\r
+\r
+Project: "baculafd"=.\baculafd.dsp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
+Global:\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<3>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
diff --git a/bacula/src/win32/baculafd/baculafd.mak b/bacula/src/win32/baculafd/baculafd.mak
new file mode 100644 (file)
index 0000000..8341ae1
--- /dev/null
@@ -0,0 +1,1882 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on baculafd.dsp\r
+!IF "$(CFG)" == ""\r
+CFG=baculafd - Win32 Debug\r
+!MESSAGE No configuration specified. Defaulting to baculafd - Win32 Debug.\r
+!ENDIF \r
+\r
+!IF "$(CFG)" != "baculafd - Win32 Release" && "$(CFG)" != "baculafd - Win32 Debug"\r
+!MESSAGE Invalid configuration "$(CFG)" specified.\r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "baculafd.mak" CFG="baculafd - Win32 Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "baculafd - Win32 Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baculafd - Win32 Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE \r
+!ERROR An invalid configuration is specified.\r
+!ENDIF \r
+\r
+!IF "$(OS)" == "Windows_NT"\r
+NULL=\r
+!ELSE \r
+NULL=nul\r
+!ENDIF \r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+OUTDIR=.\Release\r
+INTDIR=.\Release\r
+# Begin Custom Macros\r
+OutDir=.\Release\r
+# End Custom Macros\r
+\r
+ALL : "$(OUTDIR)\bacula-fd.exe"\r
+\r
+\r
+CLEAN :\r
+       -@erase "$(INTDIR)\alist.obj"\r
+       -@erase "$(INTDIR)\alloc.obj"\r
+       -@erase "$(INTDIR)\attr.obj"\r
+       -@erase "$(INTDIR)\attribs.obj"\r
+       -@erase "$(INTDIR)\authenticate.obj"\r
+       -@erase "$(INTDIR)\backup.obj"\r
+       -@erase "$(INTDIR)\base64.obj"\r
+       -@erase "$(INTDIR)\bfile.obj"\r
+       -@erase "$(INTDIR)\bget_msg.obj"\r
+       -@erase "$(INTDIR)\bnet.obj"\r
+       -@erase "$(INTDIR)\bnet_server.obj"\r
+       -@erase "$(INTDIR)\bshm.obj"\r
+       -@erase "$(INTDIR)\bsys.obj"\r
+       -@erase "$(INTDIR)\btime.obj"\r
+       -@erase "$(INTDIR)\compat.obj"\r
+       -@erase "$(INTDIR)\cram-md5.obj"\r
+       -@erase "$(INTDIR)\crc32.obj"\r
+       -@erase "$(INTDIR)\create_file.obj"\r
+       -@erase "$(INTDIR)\daemon.obj"\r
+       -@erase "$(INTDIR)\dlist.obj"\r
+       -@erase "$(INTDIR)\edit.obj"\r
+       -@erase "$(INTDIR)\enable_priv.obj"\r
+       -@erase "$(INTDIR)\estimate.obj"\r
+       -@erase "$(INTDIR)\filed.obj"\r
+       -@erase "$(INTDIR)\filed_conf.obj"\r
+       -@erase "$(INTDIR)\find.obj"\r
+       -@erase "$(INTDIR)\find_one.obj"\r
+       -@erase "$(INTDIR)\fnmatch.obj"\r
+       -@erase "$(INTDIR)\getopt.obj"\r
+       -@erase "$(INTDIR)\heartbeat.obj"\r
+       -@erase "$(INTDIR)\hmac.obj"\r
+       -@erase "$(INTDIR)\htable.obj"\r
+       -@erase "$(INTDIR)\idcache.obj"\r
+       -@erase "$(INTDIR)\jcr.obj"\r
+       -@erase "$(INTDIR)\job.obj"\r
+       -@erase "$(INTDIR)\lex.obj"\r
+       -@erase "$(INTDIR)\makepath.obj"\r
+       -@erase "$(INTDIR)\match.obj"\r
+       -@erase "$(INTDIR)\md5.obj"\r
+       -@erase "$(INTDIR)\mem_pool.obj"\r
+       -@erase "$(INTDIR)\message.obj"\r
+       -@erase "$(INTDIR)\parse_conf.obj"\r
+       -@erase "$(INTDIR)\print.obj"\r
+       -@erase "$(INTDIR)\queue.obj"\r
+       -@erase "$(INTDIR)\restore.obj"\r
+       -@erase "$(INTDIR)\rwlock.obj"\r
+       -@erase "$(INTDIR)\save-cwd.obj"\r
+       -@erase "$(INTDIR)\scan.obj"\r
+       -@erase "$(INTDIR)\semlock.obj"\r
+       -@erase "$(INTDIR)\serial.obj"\r
+       -@erase "$(INTDIR)\sha1.obj"\r
+       -@erase "$(INTDIR)\signal.obj"\r
+       -@erase "$(INTDIR)\smartall.obj"\r
+       -@erase "$(INTDIR)\status.obj"\r
+       -@erase "$(INTDIR)\StdAfx.obj"\r
+       -@erase "$(INTDIR)\timers.obj"\r
+       -@erase "$(INTDIR)\tree.obj"\r
+       -@erase "$(INTDIR)\util.obj"\r
+       -@erase "$(INTDIR)\var.obj"\r
+       -@erase "$(INTDIR)\vc60.idb"\r
+       -@erase "$(INTDIR)\verify.obj"\r
+       -@erase "$(INTDIR)\verify_vol.obj"\r
+       -@erase "$(INTDIR)\watchdog.obj"\r
+       -@erase "$(INTDIR)\winabout.obj"\r
+       -@erase "$(INTDIR)\winapi.obj"\r
+       -@erase "$(INTDIR)\winevents.obj"\r
+       -@erase "$(INTDIR)\winmain.obj"\r
+       -@erase "$(INTDIR)\winres.res"\r
+       -@erase "$(INTDIR)\winservice.obj"\r
+       -@erase "$(INTDIR)\winstat.obj"\r
+       -@erase "$(INTDIR)\wintray.obj"\r
+       -@erase "$(INTDIR)\workq.obj"\r
+       -@erase "$(OUTDIR)\bacula-fd.exe"\r
+\r
+"$(OUTDIR)" :\r
+    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"\r
+\r
+CPP=cl.exe\r
+CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "../compat" /I "../.." /I "../pthreads" /I "../zlib" /I "." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_WIN32" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c \r
+\r
+.c{$(INTDIR)}.obj::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+.cpp{$(INTDIR)}.obj::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+.cxx{$(INTDIR)}.obj::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+.c{$(INTDIR)}.sbr::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+.cpp{$(INTDIR)}.sbr::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+.cxx{$(INTDIR)}.sbr::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+RSC=rc.exe\r
+RSC_PROJ=/l 0x409 /fo"$(INTDIR)\winres.res" /d "NDEBUG" \r
+BSC32=bscmake.exe\r
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\baculafd.bsc" \r
+BSC32_SBRS= \\r
+       \r
+LINK32=link.exe\r
+LINK32_FLAGS=wsock32.lib pthreadVCE.lib zlib.lib /nologo /subsystem:windows /pdb:none /machine:I386 /nodefaultlib:"MSVCRT.lib" /out:"$(OUTDIR)\bacula-fd.exe" /libpath:"../pthreads" /libpath:"../zlib" \r
+LINK32_OBJS= \\r
+       "$(INTDIR)\compat.obj" \\r
+       "$(INTDIR)\getopt.obj" \\r
+       "$(INTDIR)\print.obj" \\r
+       "$(INTDIR)\authenticate.obj" \\r
+       "$(INTDIR)\backup.obj" \\r
+       "$(INTDIR)\estimate.obj" \\r
+       "$(INTDIR)\filed.obj" \\r
+       "$(INTDIR)\filed_conf.obj" \\r
+       "$(INTDIR)\heartbeat.obj" \\r
+       "$(INTDIR)\job.obj" \\r
+       "$(INTDIR)\restore.obj" \\r
+       "$(INTDIR)\status.obj" \\r
+       "$(INTDIR)\verify.obj" \\r
+       "$(INTDIR)\verify_vol.obj" \\r
+       "$(INTDIR)\attribs.obj" \\r
+       "$(INTDIR)\bfile.obj" \\r
+       "$(INTDIR)\create_file.obj" \\r
+       "$(INTDIR)\enable_priv.obj" \\r
+       "$(INTDIR)\find.obj" \\r
+       "$(INTDIR)\find_one.obj" \\r
+       "$(INTDIR)\makepath.obj" \\r
+       "$(INTDIR)\match.obj" \\r
+       "$(INTDIR)\save-cwd.obj" \\r
+       "$(INTDIR)\winapi.obj" \\r
+       "$(INTDIR)\alist.obj" \\r
+       "$(INTDIR)\alloc.obj" \\r
+       "$(INTDIR)\attr.obj" \\r
+       "$(INTDIR)\base64.obj" \\r
+       "$(INTDIR)\bget_msg.obj" \\r
+       "$(INTDIR)\bnet.obj" \\r
+       "$(INTDIR)\bnet_server.obj" \\r
+       "$(INTDIR)\bshm.obj" \\r
+       "$(INTDIR)\bsys.obj" \\r
+       "$(INTDIR)\btime.obj" \\r
+       "$(INTDIR)\cram-md5.obj" \\r
+       "$(INTDIR)\crc32.obj" \\r
+       "$(INTDIR)\daemon.obj" \\r
+       "$(INTDIR)\dlist.obj" \\r
+       "$(INTDIR)\edit.obj" \\r
+       "$(INTDIR)\fnmatch.obj" \\r
+       "$(INTDIR)\hmac.obj" \\r
+       "$(INTDIR)\htable.obj" \\r
+       "$(INTDIR)\idcache.obj" \\r
+       "$(INTDIR)\jcr.obj" \\r
+       "$(INTDIR)\lex.obj" \\r
+       "$(INTDIR)\md5.obj" \\r
+       "$(INTDIR)\mem_pool.obj" \\r
+       "$(INTDIR)\message.obj" \\r
+       "$(INTDIR)\parse_conf.obj" \\r
+       "$(INTDIR)\queue.obj" \\r
+       "$(INTDIR)\rwlock.obj" \\r
+       "$(INTDIR)\scan.obj" \\r
+       "$(INTDIR)\semlock.obj" \\r
+       "$(INTDIR)\serial.obj" \\r
+       "$(INTDIR)\sha1.obj" \\r
+       "$(INTDIR)\signal.obj" \\r
+       "$(INTDIR)\smartall.obj" \\r
+       "$(INTDIR)\timers.obj" \\r
+       "$(INTDIR)\tree.obj" \\r
+       "$(INTDIR)\util.obj" \\r
+       "$(INTDIR)\var.obj" \\r
+       "$(INTDIR)\watchdog.obj" \\r
+       "$(INTDIR)\workq.obj" \\r
+       "$(INTDIR)\StdAfx.obj" \\r
+       "$(INTDIR)\winabout.obj" \\r
+       "$(INTDIR)\winevents.obj" \\r
+       "$(INTDIR)\winmain.obj" \\r
+       "$(INTDIR)\winres.res" \\r
+       "$(INTDIR)\winservice.obj" \\r
+       "$(INTDIR)\winstat.obj" \\r
+       "$(INTDIR)\wintray.obj"\r
+\r
+"$(OUTDIR)\bacula-fd.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)\r
+    $(LINK32) @<<\r
+  $(LINK32_FLAGS) $(LINK32_OBJS)\r
+<<\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+OUTDIR=.\Debug\r
+INTDIR=.\Debug\r
+# Begin Custom Macros\r
+OutDir=.\Debug\r
+# End Custom Macros\r
+\r
+ALL : "$(OUTDIR)\bacula-fd.exe" "$(OUTDIR)\baculafd.bsc"\r
+\r
+\r
+CLEAN :\r
+       -@erase "$(INTDIR)\alist.obj"\r
+       -@erase "$(INTDIR)\alist.sbr"\r
+       -@erase "$(INTDIR)\alloc.obj"\r
+       -@erase "$(INTDIR)\alloc.sbr"\r
+       -@erase "$(INTDIR)\attr.obj"\r
+       -@erase "$(INTDIR)\attr.sbr"\r
+       -@erase "$(INTDIR)\attribs.obj"\r
+       -@erase "$(INTDIR)\attribs.sbr"\r
+       -@erase "$(INTDIR)\authenticate.obj"\r
+       -@erase "$(INTDIR)\authenticate.sbr"\r
+       -@erase "$(INTDIR)\backup.obj"\r
+       -@erase "$(INTDIR)\backup.sbr"\r
+       -@erase "$(INTDIR)\base64.obj"\r
+       -@erase "$(INTDIR)\base64.sbr"\r
+       -@erase "$(INTDIR)\bfile.obj"\r
+       -@erase "$(INTDIR)\bfile.sbr"\r
+       -@erase "$(INTDIR)\bget_msg.obj"\r
+       -@erase "$(INTDIR)\bget_msg.sbr"\r
+       -@erase "$(INTDIR)\bnet.obj"\r
+       -@erase "$(INTDIR)\bnet.sbr"\r
+       -@erase "$(INTDIR)\bnet_server.obj"\r
+       -@erase "$(INTDIR)\bnet_server.sbr"\r
+       -@erase "$(INTDIR)\bshm.obj"\r
+       -@erase "$(INTDIR)\bshm.sbr"\r
+       -@erase "$(INTDIR)\bsys.obj"\r
+       -@erase "$(INTDIR)\bsys.sbr"\r
+       -@erase "$(INTDIR)\btime.obj"\r
+       -@erase "$(INTDIR)\btime.sbr"\r
+       -@erase "$(INTDIR)\compat.obj"\r
+       -@erase "$(INTDIR)\compat.sbr"\r
+       -@erase "$(INTDIR)\cram-md5.obj"\r
+       -@erase "$(INTDIR)\cram-md5.sbr"\r
+       -@erase "$(INTDIR)\crc32.obj"\r
+       -@erase "$(INTDIR)\crc32.sbr"\r
+       -@erase "$(INTDIR)\create_file.obj"\r
+       -@erase "$(INTDIR)\create_file.sbr"\r
+       -@erase "$(INTDIR)\daemon.obj"\r
+       -@erase "$(INTDIR)\daemon.sbr"\r
+       -@erase "$(INTDIR)\dlist.obj"\r
+       -@erase "$(INTDIR)\dlist.sbr"\r
+       -@erase "$(INTDIR)\edit.obj"\r
+       -@erase "$(INTDIR)\edit.sbr"\r
+       -@erase "$(INTDIR)\enable_priv.obj"\r
+       -@erase "$(INTDIR)\enable_priv.sbr"\r
+       -@erase "$(INTDIR)\estimate.obj"\r
+       -@erase "$(INTDIR)\estimate.sbr"\r
+       -@erase "$(INTDIR)\filed.obj"\r
+       -@erase "$(INTDIR)\filed.sbr"\r
+       -@erase "$(INTDIR)\filed_conf.obj"\r
+       -@erase "$(INTDIR)\filed_conf.sbr"\r
+       -@erase "$(INTDIR)\find.obj"\r
+       -@erase "$(INTDIR)\find.sbr"\r
+       -@erase "$(INTDIR)\find_one.obj"\r
+       -@erase "$(INTDIR)\find_one.sbr"\r
+       -@erase "$(INTDIR)\fnmatch.obj"\r
+       -@erase "$(INTDIR)\fnmatch.sbr"\r
+       -@erase "$(INTDIR)\getopt.obj"\r
+       -@erase "$(INTDIR)\getopt.sbr"\r
+       -@erase "$(INTDIR)\heartbeat.obj"\r
+       -@erase "$(INTDIR)\heartbeat.sbr"\r
+       -@erase "$(INTDIR)\hmac.obj"\r
+       -@erase "$(INTDIR)\hmac.sbr"\r
+       -@erase "$(INTDIR)\htable.obj"\r
+       -@erase "$(INTDIR)\htable.sbr"\r
+       -@erase "$(INTDIR)\idcache.obj"\r
+       -@erase "$(INTDIR)\idcache.sbr"\r
+       -@erase "$(INTDIR)\jcr.obj"\r
+       -@erase "$(INTDIR)\jcr.sbr"\r
+       -@erase "$(INTDIR)\job.obj"\r
+       -@erase "$(INTDIR)\job.sbr"\r
+       -@erase "$(INTDIR)\lex.obj"\r
+       -@erase "$(INTDIR)\lex.sbr"\r
+       -@erase "$(INTDIR)\makepath.obj"\r
+       -@erase "$(INTDIR)\makepath.sbr"\r
+       -@erase "$(INTDIR)\match.obj"\r
+       -@erase "$(INTDIR)\match.sbr"\r
+       -@erase "$(INTDIR)\md5.obj"\r
+       -@erase "$(INTDIR)\md5.sbr"\r
+       -@erase "$(INTDIR)\mem_pool.obj"\r
+       -@erase "$(INTDIR)\mem_pool.sbr"\r
+       -@erase "$(INTDIR)\message.obj"\r
+       -@erase "$(INTDIR)\message.sbr"\r
+       -@erase "$(INTDIR)\parse_conf.obj"\r
+       -@erase "$(INTDIR)\parse_conf.sbr"\r
+       -@erase "$(INTDIR)\print.obj"\r
+       -@erase "$(INTDIR)\print.sbr"\r
+       -@erase "$(INTDIR)\queue.obj"\r
+       -@erase "$(INTDIR)\queue.sbr"\r
+       -@erase "$(INTDIR)\restore.obj"\r
+       -@erase "$(INTDIR)\restore.sbr"\r
+       -@erase "$(INTDIR)\rwlock.obj"\r
+       -@erase "$(INTDIR)\rwlock.sbr"\r
+       -@erase "$(INTDIR)\save-cwd.obj"\r
+       -@erase "$(INTDIR)\save-cwd.sbr"\r
+       -@erase "$(INTDIR)\scan.obj"\r
+       -@erase "$(INTDIR)\scan.sbr"\r
+       -@erase "$(INTDIR)\semlock.obj"\r
+       -@erase "$(INTDIR)\semlock.sbr"\r
+       -@erase "$(INTDIR)\serial.obj"\r
+       -@erase "$(INTDIR)\serial.sbr"\r
+       -@erase "$(INTDIR)\sha1.obj"\r
+       -@erase "$(INTDIR)\sha1.sbr"\r
+       -@erase "$(INTDIR)\signal.obj"\r
+       -@erase "$(INTDIR)\signal.sbr"\r
+       -@erase "$(INTDIR)\smartall.obj"\r
+       -@erase "$(INTDIR)\smartall.sbr"\r
+       -@erase "$(INTDIR)\status.obj"\r
+       -@erase "$(INTDIR)\status.sbr"\r
+       -@erase "$(INTDIR)\StdAfx.obj"\r
+       -@erase "$(INTDIR)\StdAfx.sbr"\r
+       -@erase "$(INTDIR)\timers.obj"\r
+       -@erase "$(INTDIR)\timers.sbr"\r
+       -@erase "$(INTDIR)\tree.obj"\r
+       -@erase "$(INTDIR)\tree.sbr"\r
+       -@erase "$(INTDIR)\util.obj"\r
+       -@erase "$(INTDIR)\util.sbr"\r
+       -@erase "$(INTDIR)\var.obj"\r
+       -@erase "$(INTDIR)\var.sbr"\r
+       -@erase "$(INTDIR)\vc60.idb"\r
+       -@erase "$(INTDIR)\vc60.pdb"\r
+       -@erase "$(INTDIR)\verify.obj"\r
+       -@erase "$(INTDIR)\verify.sbr"\r
+       -@erase "$(INTDIR)\verify_vol.obj"\r
+       -@erase "$(INTDIR)\verify_vol.sbr"\r
+       -@erase "$(INTDIR)\watchdog.obj"\r
+       -@erase "$(INTDIR)\watchdog.sbr"\r
+       -@erase "$(INTDIR)\winabout.obj"\r
+       -@erase "$(INTDIR)\winabout.sbr"\r
+       -@erase "$(INTDIR)\winapi.obj"\r
+       -@erase "$(INTDIR)\winapi.sbr"\r
+       -@erase "$(INTDIR)\winevents.obj"\r
+       -@erase "$(INTDIR)\winevents.sbr"\r
+       -@erase "$(INTDIR)\winmain.obj"\r
+       -@erase "$(INTDIR)\winmain.sbr"\r
+       -@erase "$(INTDIR)\winres.res"\r
+       -@erase "$(INTDIR)\winservice.obj"\r
+       -@erase "$(INTDIR)\winservice.sbr"\r
+       -@erase "$(INTDIR)\winstat.obj"\r
+       -@erase "$(INTDIR)\winstat.sbr"\r
+       -@erase "$(INTDIR)\wintray.obj"\r
+       -@erase "$(INTDIR)\wintray.sbr"\r
+       -@erase "$(INTDIR)\workq.obj"\r
+       -@erase "$(INTDIR)\workq.sbr"\r
+       -@erase "$(OUTDIR)\bacula-fd.exe"\r
+       -@erase "$(OUTDIR)\baculafd.bsc"\r
+\r
+"$(OUTDIR)" :\r
+    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"\r
+\r
+CPP=cl.exe\r
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../compat" /I "../.." /I "../pthreads" /I "../zlib" /I "." /D "_DEBUG" /D "_WINMAIN_" /D "PTW32_BUILD" /D "_AFXDLL" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_WIN32" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c \r
+\r
+.c{$(INTDIR)}.obj::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+.cpp{$(INTDIR)}.obj::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+.cxx{$(INTDIR)}.obj::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+.c{$(INTDIR)}.sbr::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+.cpp{$(INTDIR)}.sbr::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+.cxx{$(INTDIR)}.sbr::\r
+   $(CPP) @<<\r
+   $(CPP_PROJ) $< \r
+<<\r
+\r
+RSC=rc.exe\r
+RSC_PROJ=/l 0x409 /fo"$(INTDIR)\winres.res" /d "_DEBUG" /d "_AFXDLL" \r
+BSC32=bscmake.exe\r
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\baculafd.bsc" \r
+BSC32_SBRS= \\r
+       "$(INTDIR)\compat.sbr" \\r
+       "$(INTDIR)\getopt.sbr" \\r
+       "$(INTDIR)\print.sbr" \\r
+       "$(INTDIR)\authenticate.sbr" \\r
+       "$(INTDIR)\backup.sbr" \\r
+       "$(INTDIR)\estimate.sbr" \\r
+       "$(INTDIR)\filed.sbr" \\r
+       "$(INTDIR)\filed_conf.sbr" \\r
+       "$(INTDIR)\heartbeat.sbr" \\r
+       "$(INTDIR)\job.sbr" \\r
+       "$(INTDIR)\restore.sbr" \\r
+       "$(INTDIR)\status.sbr" \\r
+       "$(INTDIR)\verify.sbr" \\r
+       "$(INTDIR)\verify_vol.sbr" \\r
+       "$(INTDIR)\attribs.sbr" \\r
+       "$(INTDIR)\bfile.sbr" \\r
+       "$(INTDIR)\create_file.sbr" \\r
+       "$(INTDIR)\enable_priv.sbr" \\r
+       "$(INTDIR)\find.sbr" \\r
+       "$(INTDIR)\find_one.sbr" \\r
+       "$(INTDIR)\makepath.sbr" \\r
+       "$(INTDIR)\match.sbr" \\r
+       "$(INTDIR)\save-cwd.sbr" \\r
+       "$(INTDIR)\winapi.sbr" \\r
+       "$(INTDIR)\alist.sbr" \\r
+       "$(INTDIR)\alloc.sbr" \\r
+       "$(INTDIR)\attr.sbr" \\r
+       "$(INTDIR)\base64.sbr" \\r
+       "$(INTDIR)\bget_msg.sbr" \\r
+       "$(INTDIR)\bnet.sbr" \\r
+       "$(INTDIR)\bnet_server.sbr" \\r
+       "$(INTDIR)\bshm.sbr" \\r
+       "$(INTDIR)\bsys.sbr" \\r
+       "$(INTDIR)\btime.sbr" \\r
+       "$(INTDIR)\cram-md5.sbr" \\r
+       "$(INTDIR)\crc32.sbr" \\r
+       "$(INTDIR)\daemon.sbr" \\r
+       "$(INTDIR)\dlist.sbr" \\r
+       "$(INTDIR)\edit.sbr" \\r
+       "$(INTDIR)\fnmatch.sbr" \\r
+       "$(INTDIR)\hmac.sbr" \\r
+       "$(INTDIR)\htable.sbr" \\r
+       "$(INTDIR)\idcache.sbr" \\r
+       "$(INTDIR)\jcr.sbr" \\r
+       "$(INTDIR)\lex.sbr" \\r
+       "$(INTDIR)\md5.sbr" \\r
+       "$(INTDIR)\mem_pool.sbr" \\r
+       "$(INTDIR)\message.sbr" \\r
+       "$(INTDIR)\parse_conf.sbr" \\r
+       "$(INTDIR)\queue.sbr" \\r
+       "$(INTDIR)\rwlock.sbr" \\r
+       "$(INTDIR)\scan.sbr" \\r
+       "$(INTDIR)\semlock.sbr" \\r
+       "$(INTDIR)\serial.sbr" \\r
+       "$(INTDIR)\sha1.sbr" \\r
+       "$(INTDIR)\signal.sbr" \\r
+       "$(INTDIR)\smartall.sbr" \\r
+       "$(INTDIR)\timers.sbr" \\r
+       "$(INTDIR)\tree.sbr" \\r
+       "$(INTDIR)\util.sbr" \\r
+       "$(INTDIR)\var.sbr" \\r
+       "$(INTDIR)\watchdog.sbr" \\r
+       "$(INTDIR)\workq.sbr" \\r
+       "$(INTDIR)\StdAfx.sbr" \\r
+       "$(INTDIR)\winabout.sbr" \\r
+       "$(INTDIR)\winevents.sbr" \\r
+       "$(INTDIR)\winmain.sbr" \\r
+       "$(INTDIR)\winservice.sbr" \\r
+       "$(INTDIR)\winstat.sbr" \\r
+       "$(INTDIR)\wintray.sbr"\r
+\r
+"$(OUTDIR)\baculafd.bsc" : "$(OUTDIR)" $(BSC32_SBRS)\r
+    $(BSC32) @<<\r
+  $(BSC32_FLAGS) $(BSC32_SBRS)\r
+<<\r
+\r
+LINK32=link.exe\r
+LINK32_FLAGS=wsock32.lib pthreadVCE.lib zlib.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386 /out:"$(OUTDIR)\bacula-fd.exe" /libpath:"../pthreads" /libpath:"../zlib" \r
+LINK32_OBJS= \\r
+       "$(INTDIR)\compat.obj" \\r
+       "$(INTDIR)\getopt.obj" \\r
+       "$(INTDIR)\print.obj" \\r
+       "$(INTDIR)\authenticate.obj" \\r
+       "$(INTDIR)\backup.obj" \\r
+       "$(INTDIR)\estimate.obj" \\r
+       "$(INTDIR)\filed.obj" \\r
+       "$(INTDIR)\filed_conf.obj" \\r
+       "$(INTDIR)\heartbeat.obj" \\r
+       "$(INTDIR)\job.obj" \\r
+       "$(INTDIR)\restore.obj" \\r
+       "$(INTDIR)\status.obj" \\r
+       "$(INTDIR)\verify.obj" \\r
+       "$(INTDIR)\verify_vol.obj" \\r
+       "$(INTDIR)\attribs.obj" \\r
+       "$(INTDIR)\bfile.obj" \\r
+       "$(INTDIR)\create_file.obj" \\r
+       "$(INTDIR)\enable_priv.obj" \\r
+       "$(INTDIR)\find.obj" \\r
+       "$(INTDIR)\find_one.obj" \\r
+       "$(INTDIR)\makepath.obj" \\r
+       "$(INTDIR)\match.obj" \\r
+       "$(INTDIR)\save-cwd.obj" \\r
+       "$(INTDIR)\winapi.obj" \\r
+       "$(INTDIR)\alist.obj" \\r
+       "$(INTDIR)\alloc.obj" \\r
+       "$(INTDIR)\attr.obj" \\r
+       "$(INTDIR)\base64.obj" \\r
+       "$(INTDIR)\bget_msg.obj" \\r
+       "$(INTDIR)\bnet.obj" \\r
+       "$(INTDIR)\bnet_server.obj" \\r
+       "$(INTDIR)\bshm.obj" \\r
+       "$(INTDIR)\bsys.obj" \\r
+       "$(INTDIR)\btime.obj" \\r
+       "$(INTDIR)\cram-md5.obj" \\r
+       "$(INTDIR)\crc32.obj" \\r
+       "$(INTDIR)\daemon.obj" \\r
+       "$(INTDIR)\dlist.obj" \\r
+       "$(INTDIR)\edit.obj" \\r
+       "$(INTDIR)\fnmatch.obj" \\r
+       "$(INTDIR)\hmac.obj" \\r
+       "$(INTDIR)\htable.obj" \\r
+       "$(INTDIR)\idcache.obj" \\r
+       "$(INTDIR)\jcr.obj" \\r
+       "$(INTDIR)\lex.obj" \\r
+       "$(INTDIR)\md5.obj" \\r
+       "$(INTDIR)\mem_pool.obj" \\r
+       "$(INTDIR)\message.obj" \\r
+       "$(INTDIR)\parse_conf.obj" \\r
+       "$(INTDIR)\queue.obj" \\r
+       "$(INTDIR)\rwlock.obj" \\r
+       "$(INTDIR)\scan.obj" \\r
+       "$(INTDIR)\semlock.obj" \\r
+       "$(INTDIR)\serial.obj" \\r
+       "$(INTDIR)\sha1.obj" \\r
+       "$(INTDIR)\signal.obj" \\r
+       "$(INTDIR)\smartall.obj" \\r
+       "$(INTDIR)\timers.obj" \\r
+       "$(INTDIR)\tree.obj" \\r
+       "$(INTDIR)\util.obj" \\r
+       "$(INTDIR)\var.obj" \\r
+       "$(INTDIR)\watchdog.obj" \\r
+       "$(INTDIR)\workq.obj" \\r
+       "$(INTDIR)\StdAfx.obj" \\r
+       "$(INTDIR)\winabout.obj" \\r
+       "$(INTDIR)\winevents.obj" \\r
+       "$(INTDIR)\winmain.obj" \\r
+       "$(INTDIR)\winres.res" \\r
+       "$(INTDIR)\winservice.obj" \\r
+       "$(INTDIR)\winstat.obj" \\r
+       "$(INTDIR)\wintray.obj"\r
+\r
+"$(OUTDIR)\bacula-fd.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)\r
+    $(LINK32) @<<\r
+  $(LINK32_FLAGS) $(LINK32_OBJS)\r
+<<\r
+\r
+!ENDIF \r
+\r
+\r
+!IF "$(NO_EXTERNAL_DEPS)" != "1"\r
+!IF EXISTS("baculafd.dep")\r
+!INCLUDE "baculafd.dep"\r
+!ELSE \r
+!MESSAGE Warning: cannot find "baculafd.dep"\r
+!ENDIF \r
+!ENDIF \r
+\r
+\r
+!IF "$(CFG)" == "baculafd - Win32 Release" || "$(CFG)" == "baculafd - Win32 Debug"\r
+SOURCE=..\lib\alist.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\alist.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\alist.obj"  "$(INTDIR)\alist.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\alloc.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\alloc.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\alloc.obj"  "$(INTDIR)\alloc.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\attr.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\attr.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\attr.obj"   "$(INTDIR)\attr.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\findlib\attribs.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\attribs.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\attribs.obj"        "$(INTDIR)\attribs.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\filed\authenticate.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\authenticate.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\authenticate.obj"   "$(INTDIR)\authenticate.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\filed\backup.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\backup.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\backup.obj" "$(INTDIR)\backup.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\base64.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\base64.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\base64.obj" "$(INTDIR)\base64.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\findlib\bfile.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\bfile.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\bfile.obj"  "$(INTDIR)\bfile.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\bget_msg.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\bget_msg.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\bget_msg.obj"       "$(INTDIR)\bget_msg.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\bnet.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\bnet.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\bnet.obj"   "$(INTDIR)\bnet.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\bnet_server.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\bnet_server.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\bnet_server.obj"    "$(INTDIR)\bnet_server.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\bshm.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\bshm.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\bshm.obj"   "$(INTDIR)\bshm.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\bsys.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\bsys.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\bsys.obj"   "$(INTDIR)\bsys.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\btime.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\btime.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\btime.obj"  "$(INTDIR)\btime.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\compat\compat.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\compat.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\compat.obj" "$(INTDIR)\compat.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE="..\lib\cram-md5.cpp"\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\cram-md5.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\cram-md5.obj"       "$(INTDIR)\cram-md5.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\crc32.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\crc32.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\crc32.obj"  "$(INTDIR)\crc32.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\findlib\create_file.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\create_file.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\create_file.obj"    "$(INTDIR)\create_file.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\daemon.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\daemon.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\daemon.obj" "$(INTDIR)\daemon.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\dlist.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\dlist.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\dlist.obj"  "$(INTDIR)\dlist.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\edit.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\edit.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\edit.obj"   "$(INTDIR)\edit.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\findlib\enable_priv.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\enable_priv.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\enable_priv.obj"    "$(INTDIR)\enable_priv.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\filed\estimate.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\estimate.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\estimate.obj"       "$(INTDIR)\estimate.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\filed\filed.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\filed.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\filed.obj"  "$(INTDIR)\filed.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\filed\filed_conf.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\filed_conf.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\filed_conf.obj"     "$(INTDIR)\filed_conf.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\findlib\find.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\find.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\find.obj"   "$(INTDIR)\find.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\findlib\find_one.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\find_one.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\find_one.obj"       "$(INTDIR)\find_one.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\fnmatch.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\fnmatch.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\fnmatch.obj"        "$(INTDIR)\fnmatch.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\compat\getopt.c\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\getopt.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\getopt.obj" "$(INTDIR)\getopt.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\filed\heartbeat.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\heartbeat.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\heartbeat.obj"      "$(INTDIR)\heartbeat.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\hmac.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\hmac.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\hmac.obj"   "$(INTDIR)\hmac.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\htable.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\htable.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\htable.obj" "$(INTDIR)\htable.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\idcache.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\idcache.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\idcache.obj"        "$(INTDIR)\idcache.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\jcr.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\jcr.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\jcr.obj"    "$(INTDIR)\jcr.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\filed\job.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\job.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\job.obj"    "$(INTDIR)\job.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\lex.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\lex.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\lex.obj"    "$(INTDIR)\lex.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\findlib\makepath.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\makepath.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\makepath.obj"       "$(INTDIR)\makepath.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\findlib\match.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\match.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\match.obj"  "$(INTDIR)\match.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\md5.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\md5.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\md5.obj"    "$(INTDIR)\md5.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\mem_pool.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\mem_pool.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\mem_pool.obj"       "$(INTDIR)\mem_pool.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\message.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\message.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\message.obj"        "$(INTDIR)\message.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\parse_conf.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\parse_conf.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\parse_conf.obj"     "$(INTDIR)\parse_conf.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\compat\print.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\print.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\print.obj"  "$(INTDIR)\print.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\queue.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\queue.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\queue.obj"  "$(INTDIR)\queue.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\filed\restore.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\restore.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\restore.obj"        "$(INTDIR)\restore.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\rwlock.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\rwlock.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\rwlock.obj" "$(INTDIR)\rwlock.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE="..\findlib\save-cwd.cpp"\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\save-cwd.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\save-cwd.obj"       "$(INTDIR)\save-cwd.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\scan.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\scan.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\scan.obj"   "$(INTDIR)\scan.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\semlock.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\semlock.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\semlock.obj"        "$(INTDIR)\semlock.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\serial.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\serial.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\serial.obj" "$(INTDIR)\serial.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\sha1.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\sha1.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\sha1.obj"   "$(INTDIR)\sha1.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\signal.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\signal.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\signal.obj" "$(INTDIR)\signal.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\smartall.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\smartall.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\smartall.obj"       "$(INTDIR)\smartall.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\filed\status.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\status.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\status.obj" "$(INTDIR)\status.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=.\StdAfx.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\StdAfx.obj" : $(SOURCE) "$(INTDIR)"\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\StdAfx.obj" "$(INTDIR)\StdAfx.sbr" : $(SOURCE) "$(INTDIR)"\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\timers.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\timers.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\timers.obj" "$(INTDIR)\timers.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\tree.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\tree.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\tree.obj"   "$(INTDIR)\tree.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\util.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\util.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\util.obj"   "$(INTDIR)\util.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\var.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\var.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\var.obj"    "$(INTDIR)\var.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\filed\verify.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\verify.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\verify.obj" "$(INTDIR)\verify.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\filed\verify_vol.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\verify_vol.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\verify_vol.obj"     "$(INTDIR)\verify_vol.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\watchdog.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\watchdog.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\watchdog.obj"       "$(INTDIR)\watchdog.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\..\filed\win32\winabout.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\winabout.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\winabout.obj"       "$(INTDIR)\winabout.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\findlib\winapi.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\winapi.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\winapi.obj" "$(INTDIR)\winapi.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\..\filed\win32\winevents.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\winevents.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\winevents.obj"      "$(INTDIR)\winevents.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\..\filed\win32\winmain.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\winmain.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\winmain.obj"        "$(INTDIR)\winmain.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\..\filed\win32\winres.rc\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\winres.res" : $(SOURCE) "$(INTDIR)"\r
+       $(RSC) /l 0x409 /fo"$(INTDIR)\winres.res" /i "C:\home\csh\sourceforge\bacula\src\filed\win32" /d "NDEBUG" $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\winres.res" : $(SOURCE) "$(INTDIR)"\r
+       $(RSC) /l 0x409 /fo"$(INTDIR)\winres.res" /i "C:\home\csh\sourceforge\bacula\src\filed\win32" /d "_DEBUG" /d "_AFXDLL" $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\..\filed\win32\winservice.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\winservice.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\winservice.obj"     "$(INTDIR)\winservice.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\..\filed\win32\winstat.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\winstat.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\winstat.obj"        "$(INTDIR)\winstat.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\..\filed\win32\wintray.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\wintray.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\wintray.obj"        "$(INTDIR)\wintray.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+SOURCE=..\lib\workq.cpp\r
+\r
+!IF  "$(CFG)" == "baculafd - Win32 Release"\r
+\r
+\r
+"$(INTDIR)\workq.obj" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "baculafd - Win32 Debug"\r
+\r
+\r
+"$(INTDIR)\workq.obj"  "$(INTDIR)\workq.sbr" : $(SOURCE) "$(INTDIR)"\r
+       $(CPP) $(CPP_PROJ) $(SOURCE)\r
+\r
+\r
+!ENDIF \r
+\r
+\r
+!ENDIF \r
+\r
diff --git a/bacula/src/win32/build.bat b/bacula/src/win32/build.bat
new file mode 100755 (executable)
index 0000000..84d08d1
--- /dev/null
@@ -0,0 +1,14 @@
+REM build release if cygwin make not available.
+
+cd zlib
+nmake /f win32\Makefile.msc
+cd ..
+cd pthreads
+nmake VCE
+cd ..
+cd baculafd
+nmake CFG="baculafd - Win32 Release" /f baculafd.mak
+cd ..
+makensis bacula.nsi
+
+
diff --git a/bacula/src/win32/compat/alloca.h b/bacula/src/win32/compat/alloca.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bacula/src/win32/compat/arpa/inet.h b/bacula/src/win32/compat/arpa/inet.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bacula/src/win32/compat/compat.cpp b/bacula/src/win32/compat/compat.cpp
new file mode 100644 (file)
index 0000000..447971c
--- /dev/null
@@ -0,0 +1,1028 @@
+//                              -*- Mode: C++ -*- 
+// compat.cpp -- compatibilty layer to make bacula-fd run
+//               natively under windows
+//
+// Copyright (C)2004 Raider Solutions, Inc
+// 
+//   This program is free software; you can redistribute it and/or
+//   modify it under the terms of the GNU General Public License as
+//   published by the Free Software Foundation; either version 2 of
+//   the License, or (at your option) any later version.
+//
+//   This program is distributed in the hope that it will be useful,
+//   but WITHOUT ANY WARRANTY; without even the implied warranty of
+//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+//   General Public License for more details.
+//
+//   You should have received a copy of the GNU General Public
+//   License along with this program; if not, write to the Free
+//   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+//   MA 02111-1307, USA.
+//
+// Author          : Christopher S. Hull
+// Created On      : Sat Jan 31 15:55:00 2004
+// Last Modified By: Christopher S. Hull
+// Last Modified On: Mon Feb  9 12:18:04 2004
+// Update Count    : 474
+// $Id$
+
+#include <stdio.h>
+
+#include "compat.h"
+#include "pthread.h"
+
+extern void d_msg(char *file, int line, int level, char *fmt,...);
+extern DWORD   g_platform_id;
+
+
+extern "C" void
+cygwin_conv_to_win32_path(const char *name, char *win32_name)
+{
+    while (*name) {
+       if (*name == '/')
+           *win32_name++ = '\\';
+       else
+           *win32_name++ = *name;
+       name++;
+    }
+    if (win32_name[-1] == '\\')
+       win32_name[-1] = 0;
+    else
+       *win32_name = 0;
+}
+
+
+int
+open(const char *file, int flags, int mode)
+{
+    DWORD access = 0;
+    DWORD shareMode = 0;
+    DWORD create = 0;
+    DWORD msflags = 0;
+    HANDLE foo;
+    const char *remap = file;
+
+    if (flags & O_WRONLY) access = GENERIC_WRITE;
+    else if (flags & O_RDWR) access = GENERIC_READ|GENERIC_WRITE;
+    else access = GENERIC_READ;
+    
+    if (flags & O_CREAT) create = CREATE_NEW;
+    else create = OPEN_EXISTING;
+    
+    if (flags & O_TRUNC) create = TRUNCATE_EXISTING;
+    
+    if (!(flags & O_EXCL))
+       shareMode = FILE_SHARE_DELETE|FILE_SHARE_READ|FILE_SHARE_WRITE;
+    
+    if (flags & O_APPEND)
+    {
+       printf("open...APPEND not implemented yet.");
+       exit(-1);
+    }
+    
+    foo = CreateFile(file, access, shareMode, NULL, create, msflags, NULL);
+    if (INVALID_HANDLE_VALUE == foo)
+       return(int) -1;
+
+    return (int)foo;
+
+}
+
+
+int
+close(int fd)
+{
+    if (!CloseHandle((HANDLE)fd))
+       return -1;
+
+    return 0;
+}
+
+int
+write(int fd, const void *data, int32_t len)
+{
+    BOOL status;
+    DWORD bwrite;
+    status = WriteFile((HANDLE)fd, data, len, &bwrite, NULL);
+    if (status) return bwrite;
+    return -1;
+}
+
+
+int
+read(int fd, void *data, int32_t len)
+{
+    BOOL status;
+    DWORD bread;
+
+    status = ReadFile((HANDLE)fd, data, len, &bread, NULL);
+    if (status) return bread;
+
+    return -1;
+}
+
+int
+umask(int)
+{
+    return 0;
+}
+
+int
+chmod(const char *, mode_t)
+{
+    return 0;
+}
+
+int
+chown(const char *k, uid_t, gid_t)
+{
+    return 0;
+}
+
+int
+lchown(const char *k, uid_t, gid_t)
+{
+    return 0;
+}
+
+int
+utime(const char *, struct utimbuf *)
+{
+    return -1;
+}
+
+
+long int
+random(void)
+{
+    return rand();
+}
+
+void
+srandom(unsigned int seed)
+{
+    srand(seed);
+}
+// /////////////////////////////////////////////////////////////////
+// convert from Windows concept of time to Unix concept of time
+// /////////////////////////////////////////////////////////////////
+time_t
+cvt(const FILETIME &time)
+{
+    uint64_t mstime = time.dwHighDateTime;
+    mstime <<= 32;
+    mstime |= time.dwLowDateTime;
+
+    mstime /= 10000000;                // convert to seconds.
+    mstime -= 3234336I64*3600I64;              // difference between jan 1, 1601 and jan, 1 1970
+
+    return (time_t) (mstime & 0xffffffff);
+}
+
+static const char *
+errorString(void)
+{
+    LPVOID lpMsgBuf;
+
+    FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+                 FORMAT_MESSAGE_FROM_SYSTEM |
+                 FORMAT_MESSAGE_IGNORE_INSERTS,
+                 NULL,
+                 GetLastError(),
+                 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default lang
+                 (LPTSTR) &lpMsgBuf,
+                 0,
+                 NULL);
+
+    return (const char *) lpMsgBuf;
+}
+
+static int
+statDir(const char *file, struct stat *sb)
+{
+    WIN32_FIND_DATA info;      // window's file info
+    sb->st_mode |= S_IFDIR;
+
+    if (file[1] == ':' && file[2] == 0)
+    {
+       d_msg(__FILE__, __LINE__, 99, "faking ROOT attrs(%s).\n", file);
+       sb->st_mode |= S_IREAD|S_IEXEC|S_IWRITE;
+       time(&sb->st_ctime);
+       time(&sb->st_mtime);
+       time(&sb->st_atime);
+       return 0;
+    }
+    HANDLE h = FindFirstFile(file, &info);
+
+    if (h == INVALID_HANDLE_VALUE) {
+       const char *err = errorString();
+       d_msg(__FILE__, __LINE__, 99, "FindFirstFile(%s):%s\n", file, err);
+       LocalFree((void *)err);
+       errno = GetLastError();
+       return -1;
+    }
+
+    sb->st_mode |= (S_IREAD | S_IEXEC);
+    if (!(info.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
+       sb->st_mode |= S_IWRITE;
+    
+    if (info.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)
+       sb->st_mode |= S_IRGRP;
+    if (info.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
+       sb->st_mode |= S_IROTH;
+    sb->st_size = info.nFileSizeHigh;
+    sb->st_size <<= 32;
+    sb->st_size |= info.nFileSizeLow;
+    sb->st_blksize = 4096;
+    sb->st_blocks = (uint32_t)(sb->st_size + 4095)/4096;
+    sb->st_atime = cvt(info.ftLastAccessTime);
+    sb->st_mtime = cvt(info.ftLastWriteTime);
+    sb->st_ctime = cvt(info.ftCreationTime);
+
+    return 0;
+}
+
+static int
+stat2(const char *file, struct stat *sb)
+{
+    BY_HANDLE_FILE_INFORMATION info;
+    HANDLE h;
+    int rval = 0;
+    char tmpbuf[1024];
+    cygwin_conv_to_win32_path(file, tmpbuf);
+
+    DWORD attr = GetFileAttributes(tmpbuf);
+
+    if (attr == -1) {
+       const char *err = errorString();
+       d_msg(__FILE__, __LINE__, 99, "GetFileAttrubtes(%s): %s\n", tmpbuf, err);
+       LocalFree((void *)err);
+       errno = GetLastError();
+       return -1;
+    }
+    
+    if (attr & FILE_ATTRIBUTE_DIRECTORY) 
+       return statDir(tmpbuf, sb);
+
+    sb->st_mode |= S_IFREG;
+    
+    h = CreateFile(tmpbuf, GENERIC_READ,
+                  FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
+
+    if (h == INVALID_HANDLE_VALUE) {
+       const char *err = errorString();
+       d_msg(__FILE__, __LINE__, 99, "Cannot open file for stat (%s):%s\n", tmpbuf, err);
+       LocalFree((void *)err);
+       rval = -1;
+       errno = GetLastError();
+       goto error;
+    }
+    
+    if (!GetFileInformationByHandle(h, &info)) {
+       const char *err = errorString();
+       d_msg(__FILE__, __LINE__, 99, "GetfileInformationByHandle(%s): %s\n", tmpbuf, err);
+       LocalFree((void *)err);
+       rval = -1;
+       errno = GetLastError();
+       goto error;
+    }
+    
+    sb->st_dev = info.dwVolumeSerialNumber;
+    sb->st_ino = info.nFileIndexHigh;
+    sb->st_ino <<= 32;
+    sb->st_ino |= info.nFileIndexLow;
+    sb->st_nlink = (short)info.nNumberOfLinks;
+    sb->st_mode |= (S_IREAD | S_IEXEC);
+    if (!(info.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
+       sb->st_mode |= S_IWRITE;
+
+    if (info.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)
+       sb->st_mode |= S_IRGRP;
+    if (info.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
+       sb->st_mode |= S_IROTH;
+    sb->st_size = info.nFileSizeHigh;
+    sb->st_size <<= 32;
+    sb->st_size |= info.nFileSizeLow;
+    sb->st_blksize = 4096;
+    sb->st_blocks = (uint32_t)(sb->st_size + 4095)/4096;
+    sb->st_atime = cvt(info.ftLastAccessTime);
+    sb->st_mtime = cvt(info.ftLastWriteTime);
+    sb->st_ctime = cvt(info.ftCreationTime);
+
+error:
+    CloseHandle(h);
+    return rval;
+}
+int
+stat(const char *file, struct stat *sb)
+{
+    WIN32_FILE_ATTRIBUTE_DATA data;
+    errno = 0;
+
+    memset(sb, 0, sizeof(*sb));
+
+    if (g_platform_id == VER_PLATFORM_WIN32_WINDOWS)
+       return stat2(file, sb);
+
+    if (!GetFileAttributesEx(file, GetFileExInfoStandard, &data))
+       return stat2(file, sb);
+
+    if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+       sb->st_mode |= S_IFDIR;
+    else
+       sb->st_mode |= S_IFREG;
+
+    sb->st_nlink = 1;
+    sb->st_mode |= (S_IREAD | S_IEXEC);
+    if (!(data.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
+       sb->st_mode |= S_IWRITE;
+
+    if (data.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)
+       sb->st_mode |= S_IRGRP;
+    if (data.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
+       sb->st_mode |= S_IROTH;
+    sb->st_size = data.nFileSizeHigh;
+    sb->st_size <<= 32;
+    sb->st_size |= data.nFileSizeLow;
+    sb->st_blksize = 4096;
+    sb->st_blocks = (uint32_t)(sb->st_size + 4095)/4096;
+    sb->st_atime = cvt(data.ftLastAccessTime);
+    sb->st_mtime = cvt(data.ftLastWriteTime);
+    sb->st_ctime = cvt(data.ftCreationTime);
+    return 0;
+}
+
+int
+lstat(const char *file, struct stat *sb)
+{
+    return stat(file, sb);
+}
+void
+sleep(int sec)
+{
+    Sleep(sec * 1000);
+}    
+
+int
+geteuid(void)
+{
+    return 0;
+}
+
+int
+execvp(const char *, char *[]) {
+    return -1;
+}
+
+int
+dup2(int, int)
+{
+    return -1;
+}
+
+int
+fork(void)
+{
+    return -1;
+}
+
+int
+pipe(int[])
+{
+    return -1;
+}
+
+int
+waitpid(int, int*, int)
+{
+    return -1;
+}
+
+int
+readlink(const char *, char *, int)
+{
+    return -1;
+}
+
+int
+lseek(int fd, int offset, int whence)
+{
+    DWORD method = 0;
+    switch (whence) {
+    case SEEK_SET :
+       method = FILE_BEGIN;
+       break;
+    case SEEK_CUR:
+       method = FILE_CURRENT;
+       break;
+    case SEEK_END:
+       method = FILE_END;
+       break;
+    default:
+       return -1;
+    }
+    
+    return SetFilePointer((HANDLE)fd, (DWORD)offset, NULL, method);
+}
+
+int
+strcasecmp(const char *s1, const char *s2)
+{
+    register int ch1, ch2;
+    
+    if (s1==s2)
+       return 0;       /* strings are equal if same object. */
+    else if (!s1)
+       return -1;
+    else if (!s2)
+       return 1;
+    do
+    {
+       ch1 = *s1;
+       ch2 = *s2;
+       s1++;
+       s2++;
+    } while (ch1 != 0 && tolower(ch1) == tolower(ch2));
+    
+  return(ch1 - ch2);
+}
+
+int
+strncasecmp(const char *s1, const char *s2, int len)
+{
+    register int ch1, ch2;
+    
+    if (s1==s2)
+       return 0;       /* strings are equal if same object. */
+    else if (!s1)
+       return -1;
+    else if (!s2)
+       return 1;
+    do
+    {
+       ch1 = *s1;
+       ch2 = *s2;
+       s1++;
+       s2++;
+    } while (len-- && ch1 != 0 && tolower(ch1) == tolower(ch2));
+    
+    return(ch1 - ch2);
+}
+
+int
+gettimeofday(struct timeval *tv, struct timezone *)
+{
+    SYSTEMTIME now;
+    FILETIME tmp;
+    GetSystemTime(&now);
+
+    if (tv == NULL) return -1;
+    if (!SystemTimeToFileTime(&now, &tmp)) return -1;
+
+    int64_t _100nsec = tmp.dwHighDateTime;
+    _100nsec <<= 32;
+    _100nsec |= tmp.dwLowDateTime;
+    _100nsec -= (3234336I64*3600I64 * 10000000I64);
+    tv->tv_sec =(long) (_100nsec / 10000000);
+    tv->tv_usec = (long) ((_100nsec % 10000000)/10);
+    return 0;
+    
+}
+
+int
+syslog(int, const char *, const char *)
+{
+    return 0;
+}
+
+struct passwd *
+getpwuid(uid_t)
+{
+    return NULL;
+}
+struct group *
+getgrgid(uid_t)
+{
+    return NULL;
+}
+
+
+// implement opendir/readdir/closedir on top of window's API
+typedef struct _dir
+{
+    WIN32_FIND_DATA data;      // window's file info
+    const char *spec;          // the directory we're traversing
+    HANDLE     dirh;           // the search handle
+    BOOL       valid;          // the info in data field is valid
+    UINT32     offset;         // pseudo offset for d_off
+} _dir;
+
+DIR *
+opendir(const char *path)
+{
+    _dir *rval = NULL;
+    if (path == NULL) return NULL;
+    
+    rval = (_dir *)malloc(sizeof(_dir));
+    if (rval == NULL) return NULL;
+    char *tspec = (char *)malloc(strlen(path)+16);
+    if (tspec == NULL) goto err1;
+    
+    if (g_platform_id != VER_PLATFORM_WIN32_WINDOWS) {
+       // allow path to be 32767 bytes
+       tspec[0] = '\\';
+       tspec[1] = '\\';
+       tspec[2] = '?';
+       tspec[3] = '\\';
+       tspec[4] = 0;
+       cygwin_conv_to_win32_path(path, tspec+4); 
+   }
+    else {
+       cygwin_conv_to_win32_path(path, tspec);
+    }
+    strcat(tspec, "\\*");
+    rval->spec = tspec;
+
+    rval->dirh = FindFirstFile(rval->spec, &rval->data);
+    d_msg(__FILE__, __LINE__,
+         99, "opendir(%s)\n\tspec=%s,\n\tFindFirstFile returns %d\n",
+         path, rval->spec, rval->dirh);
+
+    rval->offset = 0;
+    if (rval->dirh == INVALID_HANDLE_VALUE)
+       goto err;
+    rval->valid = 1;
+    d_msg(__FILE__, __LINE__,
+         99, "\tFirstFile=%s\n", rval->data.cFileName);
+    return (DIR *)rval;
+err:
+    free((void *)rval->spec);
+err1:
+    free(rval);
+    return NULL;
+}
+    
+int
+closedir(DIR *dirp)
+{
+    _dir *dp = (_dir *)dirp;
+    FindClose(dp->dirh);
+    free((void *)dp->spec);
+    free((void *)dp);
+    return 0;
+}
+
+/*
+  typedef struct _WIN32_FIND_DATA {
+    DWORD dwFileAttributes;
+    FILETIME ftCreationTime;
+    FILETIME ftLastAccessTime;
+    FILETIME ftLastWriteTime;
+    DWORD nFileSizeHigh;
+    DWORD nFileSizeLow;
+    DWORD dwReserved0;
+    DWORD dwReserved1;
+    TCHAR cFileName[MAX_PATH];
+    TCHAR cAlternateFileName[14];
+} WIN32_FIND_DATA, *PWIN32_FIND_DATA;
+*/
+
+static int
+copyin(struct dirent &dp, const char *fname)
+{
+    dp.d_ino = 0;
+    dp.d_reclen = 0;
+    char *cp = dp.d_name;
+    while (*fname) {
+       *cp++ = *fname++;
+       dp.d_reclen++;
+    }
+       *cp = 0;
+    return dp.d_reclen;
+}
+int
+readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
+{
+
+    _dir *dp = (_dir *)dirp;
+    if (dp->valid) {
+       entry->d_off = dp->offset;
+       dp->offset += copyin(*entry, dp->data.cFileName);
+       d_msg(__FILE__, __LINE__,
+             99, "readdir_r(%p, { d_name=\"%s\", d_reclen=%d, d_off=%d\n",
+             dirp, entry->d_name, entry->d_reclen, entry->d_off);
+    }
+    else
+       return -1;
+    dp->valid = FindNextFile(dp->dirh, &dp->data);
+    return 0;
+}
+
+
+int
+inet_aton(const char *a, struct in_addr *inp)
+{
+
+    const char *cp = a;
+    uint32_t acc = 0, tmp = 0;
+    int dotc = 0;
+    if (!isdigit(*a)) return 0;
+    while (*cp) {
+       if (isdigit(*cp))
+           tmp = (tmp * 10) + (*cp -'0');
+       else if (*cp == '.') {
+           if (tmp > 255) return 0;
+           acc = (acc << 8) + tmp;
+           dotc++;
+       }
+       else return 0;
+    }
+
+    if (dotc != 3) return 0;
+    inp->s_addr = acc;
+    return 1;
+}
+
+int
+nanosleep(const struct timespec *req, struct timespec *rem)
+{
+    if (rem)
+       rem->tv_sec = rem->tv_nsec = 0;
+    Sleep((req->tv_sec * 1000) + (req->tv_nsec/100000));
+    return 0;
+}
+
+void
+init_signals(void terminate(int sig))
+{
+
+}
+
+void
+init_stack_dump(void)
+{
+
+}
+
+
+long
+pathconf(const char *path, int name)
+{
+    switch(name) {
+    case _PC_PATH_MAX :
+       if (strncmp(path, "\\\\?\\", 4) == 0)
+           return 32767;
+    case _PC_NAME_MAX :
+       return 255;
+    }
+
+    return -1;
+}
+
+int
+WSA_Init(void)
+{
+    WORD wVersionRequested = MAKEWORD( 1, 1);
+    WSADATA wsaData;
+    
+    int err = WSAStartup(wVersionRequested, &wsaData);
+    
+    
+    if (err != 0)
+    {
+       printf("Can not start Windows Sockets\n");
+       return -1;
+    }
+
+    return 0;
+}
+
+
+int
+win32_chdir(const char *dir)
+{
+    if (0 == SetCurrentDirectory(dir)) return -1;
+    return 0;
+}
+
+char *
+win32_getcwd(char *buf, int maxlen)
+{
+   int n =  GetCurrentDirectory(maxlen, buf);
+
+   if (n == 0 || n > maxlen) return NULL;
+
+   if (n+1 > maxlen) return NULL;
+   if (n != 3) {
+       buf[n] = '\\';
+       buf[n+1] = 0;
+   }
+   
+   return buf;
+}
+
+#include "mswinver.h"
+
+char WIN_VERSION_LONG[64];
+char WIN_VERSION[32];
+
+class winver {
+public:
+    winver(void);
+};
+
+static winver INIT;                    // cause constructor to be called before main()
+
+winver::winver(void)
+{
+    const char *version = "";
+    const char *platform = "";
+    OSVERSIONINFO osvinfo;
+    osvinfo.dwOSVersionInfoSize = sizeof(osvinfo);
+
+    // Get the current OS version
+    if (!GetVersionEx(&osvinfo)) {
+       version = "Unknown";
+       platform = "Unknown";
+    }
+    else
+       switch (_mkversion(osvinfo.dwPlatformId, osvinfo.dwMajorVersion, osvinfo.dwMinorVersion))
+       {
+       case MS_WINDOWS_95: (version =  "Windows 95"); break;
+       case MS_WINDOWS_98: (version =  "Windows 98"); break;
+       case MS_WINDOWS_ME: (version =  "Windows ME"); break;
+       case MS_WINDOWS_NT4:(version =  "Windows NT 4.0"); platform = "NT"; break;
+       case MS_WINDOWS_2K: (version =  "Windows 2000");platform = "NT"; break;
+       case MS_WINDOWS_XP: (version =  "Windows XP");platform = "NT"; break;
+       case MS_WINDOWS_S2003: (version =  "Windows Server 2003");platform = "NT"; break;
+       }
+
+    strcpy(WIN_VERSION_LONG, version);
+    snprintf(WIN_VERSION, sizeof(WIN_VERSION), "%s %d.%d.%d",
+            platform, osvinfo.dwMajorVersion, osvinfo.dwMinorVersion, osvinfo.dwBuildNumber);
+    
+}
+
+
+
+
+
+#define BUFSIZE 4096 
+HANDLE hChildStdinRd, hChildStdinWr, hChildStdinWrDup, 
+   hChildStdoutRd, hChildStdoutWr, hChildStdoutRdDup, 
+   hInputFile, hSaveStdin, hSaveStdout; 
+BOOL CreateChildProcess(VOID); 
+VOID WriteToPipe(VOID); 
+VOID ReadFromPipe(VOID); 
+VOID ErrorExit(LPTSTR); 
+VOID ErrMsg(LPTSTR, BOOL); 
+
+const char *getArgv0(const char *cmdline)
+{
+    const char *cp = cmdline;
+
+    while (*cp && !isspace(*cp)) cp++;
+
+    int len = cp - cmdline;
+    char *rval = (char *)malloc(len+1);
+
+    cp = cmdline;
+    while (len--)
+       *rval++ = *cp++;
+
+    *rval = 0;
+    return rval;
+}
+
+HANDLE
+CreateChildProcess(const char *cmdline) 
+{ 
+   PROCESS_INFORMATION piProcInfo; 
+   STARTUPINFO siStartInfo;
+   BOOL bFuncRetn = FALSE; 
+// Set up members of the PROCESS_INFORMATION structure. 
+   ZeroMemory( &piProcInfo, sizeof(PROCESS_INFORMATION) );
+// Set up members of the STARTUPINFO structure. 
+   ZeroMemory( &siStartInfo, sizeof(STARTUPINFO) );
+   siStartInfo.cb = sizeof(STARTUPINFO); 
+// Create the child process. 
+
+   const char *exeName = getArgv0(cmdline);
+   if (exeName[1] != ':'
+       || (strchr(cmdline, '/') == NULL
+          && strchr(cmdline, '\\') == NULL))
+   {
+       char buf[1024];
+       char *file;
+       DWORD rval = SearchPath(NULL,
+                              exeName,
+                              ".exe",
+                              sizeof(buf),
+                              buf,
+                              &file);
+       if (rval == 0)
+          return INVALID_HANDLE_VALUE;
+       if (rval > sizeof(buf))
+          return INVALID_HANDLE_VALUE;
+       free((void *)exeName);
+       exeName = strdup(buf);
+   }
+
+   char *cmdLine = strdup(cmdline);
+   
+   bFuncRetn = CreateProcess(exeName, 
+                            cmdLine,       // command line 
+                            NULL,          // process security attributes 
+                            NULL,          // primary thread security attributes 
+                            TRUE,          // handles are inherited 
+                            0,             // creation flags 
+                            NULL,          // use parent's environment 
+                            NULL,          // use parent's current directory 
+                            &siStartInfo,  // STARTUPINFO pointer 
+                            &piProcInfo);  // receives PROCESS_INFORMATION
+   free((void *)exeName);
+   free((void *)cmdLine);
+   
+   if (bFuncRetn == 0) {
+       ErrorExit("CreateProcess failed\n");
+       return INVALID_HANDLE_VALUE;
+   }
+
+   CloseHandle(piProcInfo.hThread);
+   return piProcInfo.hProcess;
+}
+void
+ErrorExit (LPTSTR lpszMessage) 
+{ 
+    d_msg(__FILE__, __LINE__, 0, "%s", lpszMessage);
+} 
+
+/*
+typedef struct s_bpipe {
+   pid_t worker_pid;
+   time_t worker_stime;
+   int wait;
+   btimer_t *timer_id;
+   FILE *rfd;
+   FILE *wfd;
+} BPIPE;
+*/
+
+#include "bacula.h"
+#include "jcr.h"
+extern "C" {
+int __cdecl _open_osfhandle(long, int);
+}
+BPIPE *
+open_bpipe(char *prog, int wait, char *mode)
+{
+    HANDLE hChildStdinRd, hChildStdinWr, hChildStdinWrDup, 
+       hChildStdoutRd, hChildStdoutWr, hChildStdoutRdDup, 
+       hInputFile, hSaveStdin, hSaveStdout; 
+
+
+    SECURITY_ATTRIBUTES saAttr; 
+    BOOL fSuccess; 
+
+    hChildStdinRd = hChildStdinWr = hChildStdinWrDup = 
+       hChildStdoutRd = hChildStdoutWr = hChildStdoutRdDup = 
+       hInputFile = hSaveStdin = hSaveStdout = INVALID_HANDLE_VALUE;
+    
+    BPIPE *bpipe = (BPIPE *)malloc(sizeof(BPIPE));
+    memset((void *)bpipe, 0, sizeof(BPIPE));
+
+    int mode_read = (mode[0] == 'r');
+    int mode_write = (mode[0] == 'w' || mode[1] == 'w');
+
+   
+    // Set the bInheritHandle flag so pipe handles are inherited. 
+   
+   saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); 
+   saAttr.bInheritHandle = TRUE; 
+   saAttr.lpSecurityDescriptor = NULL; 
+
+   // Save the handle to the current STDOUT. 
+   hSaveStdout = GetStdHandle(STD_OUTPUT_HANDLE); 
+   
+
+   if (mode_read) {
+       // Create a pipe for the child process's STDOUT. 
+       if (! CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &saAttr, 0)) {
+          ErrorExit("Stdout pipe creation failed\n");
+          goto cleanup;
+       }
+       
+       // Set a write handle to the pipe to be STDOUT. 
+       if (! SetStdHandle(STD_OUTPUT_HANDLE, hChildStdoutWr))
+       {
+          ErrorExit("Redirecting STDOUT failed");
+          goto cleanup;
+       }
+       // Create noninheritable read handle and close the inheritable read 
+       // handle. 
+       
+       fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdoutRd,
+                                 GetCurrentProcess(), &hChildStdoutRdDup , 0,
+                                 FALSE,
+                                 DUPLICATE_SAME_ACCESS);
+       if( !fSuccess ) {
+          ErrorExit("DuplicateHandle failed");
+          goto cleanup;
+       }
+
+       CloseHandle(hChildStdoutRd);
+   }
+
+   if (mode_write) {
+// Save the handle to the current STDIN. 
+       
+       hSaveStdin = GetStdHandle(STD_INPUT_HANDLE); 
+       
+// Create a pipe for the child process's STDIN. 
+       
+       if (! CreatePipe(&hChildStdinRd, &hChildStdinWr, &saAttr, 0)) {
+          ErrorExit("Stdin pipe creation failed\n");
+          goto cleanup;
+       }
+       
+// Set a read handle to the pipe to be STDIN. 
+       
+       if (! SetStdHandle(STD_INPUT_HANDLE, hChildStdinRd)) {
+          ErrorExit("Redirecting Stdin failed");
+          goto cleanup;
+       }
+       
+// Duplicate the write handle to the pipe so it is not inherited. 
+       
+       fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdinWr, 
+                                 GetCurrentProcess(), &hChildStdinWrDup, 0, 
+                                 FALSE,                  // not inherited 
+                                 DUPLICATE_SAME_ACCESS); 
+       if (!fSuccess) {
+          ErrorExit("DuplicateHandle failed");
+          goto cleanup;
+       }
+       
+       CloseHandle(hChildStdinWr); 
+   }
+
+   bpipe->worker_pid = (pid_t)CreateChildProcess(prog);
+
+   bpipe->wait = wait;
+   bpipe->worker_stime = time(NULL);
+
+   if (mode_read) {
+       SetStdHandle(STD_OUTPUT_HANDLE, hSaveStdout);
+       int rfd = _open_osfhandle((long)hChildStdoutRdDup, O_RDONLY);
+       bpipe->rfd = fdopen(rfd, "r");
+   }
+   if (mode_write) {
+       SetStdHandle(STD_INPUT_HANDLE, hSaveStdin);
+       int wfd = _open_osfhandle((long)hChildStdinWrDup, O_WRONLY);
+       bpipe->wfd = fdopen(wfd, "w");
+   }
+
+   if (wait > 0) {
+       bpipe->timer_id = start_child_timer(bpipe->worker_pid, wait);
+   }
+
+
+   return bpipe;
+
+cleanup: 
+   free((void *) bpipe);
+   return NULL;
+}
+
+int kill(int pid, int signal)
+{
+    int rval = 0;
+    if (!TerminateProcess((HANDLE)pid, (UINT) signal))
+       rval = -1;
+
+    CloseHandle((HANDLE)pid);
+    return rval;
+}
+
+int close_bpipe(BPIPE *bpipe)
+{
+
+    return 0;
+}
+
+int close_wpipe(BPIPE *bpipe)
+{
+
+    return 0;
+}
diff --git a/bacula/src/win32/compat/compat.h b/bacula/src/win32/compat/compat.h
new file mode 100644 (file)
index 0000000..443a674
--- /dev/null
@@ -0,0 +1,292 @@
+/*                               -*- Mode: C -*- 
+ * compat.h -- 
+// Copyright (C)2004 Raider Solutions, Inc.
+// 
+//   This program is free software; you can redistribute it and/or
+//   modify it under the terms of the GNU General Public License as
+//   published by the Free Software Foundation; either version 2 of
+//   the License, or (at your option) any later version.
+//
+//   This program is distributed in the hope that it will be useful,
+//   but WITHOUT ANY WARRANTY; without even the implied warranty of
+//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+//   General Public License for more details.
+//
+//   You should have received a copy of the GNU General Public
+//   License along with this program; if not, write to the Free
+//   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+//   MA 02111-1307, USA.
+ * 
+ * 
+ * Author          : Christopher S. Hull
+ * Created On      : Fri Jan 30 13:00:51 2004
+ * Last Modified By: Christopher S. Hull
+ * Last Modified On: Mon Feb  9 12:08:07 2004
+ * Update Count    : 201
+ * $Id$
+ */
+
+
+#ifndef __COMPAT_H_
+#define __COMPAT_H_
+#include <stdio.h>
+#include <basetsd.h>
+#include <stdarg.h>
+#include <sys/types.h>
+
+#include <process.h>
+#include <direct.h>
+#include <winsock2.h>
+#include <windows.h>
+#include <wincon.h>
+#include <winbase.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <conio.h>
+//#include <io.h>
+#include <process.h>
+#include <errno.h>
+#include <string.h>
+#include <time.h>
+#include <signal.h>
+#include <malloc.h>
+#include <setjmp.h>
+#include <direct.h>
+#include <ctype.h>
+#include <fcntl.h>
+
+#include "getopt.h"
+
+#ifdef HAVE_CYGWIN
+#error should not be used under cygwin...
+#else
+#define HAVE_WIN32 1
+#endif
+typedef UINT64 u_int64_t;
+typedef UINT64 uint64_t;
+typedef INT64 int64_t;
+typedef UINT32 uint32_t;
+typedef long int32_t;
+typedef INT64 intmax_t;
+typedef unsigned char uint8_t;
+typedef float float32_t;
+typedef unsigned short uint16_t;
+typedef signed short int16_t;
+typedef long time_t;
+typedef long _off_t;
+typedef signed char int8_t;
+typedef int BOOL;
+#define bool BOOL
+typedef double float64_t;
+
+typedef UINT32 u_int32_t;
+typedef unsigned char u_int8_t;
+typedef unsigned short u_int16_t;
+
+#undef uint32_t
+
+void sleep(int);
+
+typedef UINT32 key_t;
+typedef UINT32 uid_t;
+typedef UINT32 gid_t;
+typedef UINT32 mode_t;
+typedef UINT32 ssize_t;
+
+
+typedef void DIR;
+
+
+struct dirent {
+    uint64_t   d_ino;
+    uint32_t   d_off;
+    uint16_t   d_reclen;
+    char       d_name[256];
+};
+
+#ifndef __cplusplus
+#ifndef true
+#define true 1
+#endif
+#ifndef false
+#define false 0
+#endif
+#endif
+
+struct timezone {
+    int foo;
+};
+
+int strcasecmp(const char*, const char *);
+int strncasecmp(const char*, const char *, int);
+int gettimeofday(struct timeval *, struct timezone *);
+
+#define ETIMEDOUT 55
+
+struct stat
+{
+    _dev_t     st_dev;
+    uint64_t   st_ino;
+    uint16_t   st_mode;
+    int16_t    st_nlink;
+    uint32_t   st_uid;
+    uint32_t   st_gid;
+    _dev_t     st_rdev;
+    uint64_t   st_size;
+    time_t     st_atime;
+    time_t     st_mtime;
+    time_t     st_ctime;
+    uint32_t   st_blksize;
+    uint64_t   st_blocks;
+};
+
+#define S_IFMT         0170000         /* file type mask */
+#define S_IFDIR        0040000         /* directory */
+#define S_IFCHR        0020000         /* character special */
+#define S_IFIFO        0010000         /* pipe */
+#define S_IFREG        0100000         /* regular */
+#define S_IREAD        0000400         /* read permission, owner */
+#define S_IWRITE       0000200         /* write permission, owner */
+#define S_IEXEC        0000100         /* execute/search permission, owner */
+
+#define S_IRUSR                S_IREAD
+#define S_IWUSR                S_IWRITE
+#define S_IXUSR                S_IEXEC
+
+#define S_IRGRP                000040
+#define S_IWGRP         000020
+#define S_IXGRP         000010
+
+#define S_IROTH                00004
+#define S_IWOTH         00002
+#define S_IXOTH         00001
+
+#define S_IRWXO                000007
+#define S_IRWXG                000070
+#define S_ISUID                004000
+#define S_ISGID                002000
+#define S_ISVTX                001000
+
+
+#define S_ISREG(x)  (((x) & S_IFREG) == S_IFREG)
+#define S_ISDIR(x)  (((x) & S_IFDIR) == S_IFDIR)
+#define S_ISCHR(x) 0
+#define S_ISBLK(x) 0
+#define S_ISFIFO(x) 0
+#define S_ISSOCK(x) 0
+#define S_ISLNK(x)     0
+
+#define SIGUSR2 9999
+
+int umask(int);
+int lchown(const char *, uid_t uid, gid_t gid);
+int chown(const char *, uid_t uid, gid_t gid);
+int chmod(const char *, mode_t mode);
+int utime(const char *filename, struct utimbuf *buf);
+int open(const char *, int, int);
+int lseek(int, int, int);
+int read(int fd, void *, int32_t nbytes);
+int write(int fd, const void *, int32_t nbytes);
+int close(int fd);
+int inet_aton(const char *cp, struct in_addr *inp);
+int kill(int pid, int signo);
+int pipe(int []);
+int fork();
+int dup2(int, int);
+int waitpid(int, int *, int);
+#define WNOHANG 0
+#define WIFEXITED(x) 0
+#define WEXITSTATUS(x) x
+#define WIFSIGNALED(x) 0
+
+#define SIGKILL 9
+
+#define HAVE_OLD_SOCKOPT
+
+
+#define vsnprintf __vsnprintf
+int __vsnprintf(char *s, size_t count, const char *format, va_list args);
+
+#define vsprintf __vsprintf
+int __vsprintf(char *s, const char *format, va_list args);
+
+#define snprintf __snprintf
+int __snprintf(char *str, size_t count, const char *fmt, ...);
+
+#define sprintf __sprintf
+int __sprintf(char *str, const char *fmt, ...);
+
+
+int readdir(unsigned int fd, struct dirent *dirp, unsigned int count);
+int nanosleep(const struct timespec*, struct timespec *);
+
+struct tm *localtime_r(const time_t *, struct tm *);
+struct tm *gmtime_r(const time_t *, struct tm *);
+long int random(void);
+void srandom(unsigned int seed);
+int lstat(const char *, struct stat *);
+long pathconf(const char *, int);
+int readlink(const char *, char *, int);
+#define _PC_PATH_MAX 1
+#define _PC_NAME_MAX 2
+
+
+
+int geteuid();
+DIR *opendir(const char *name);
+int closedir(DIR *dir);
+
+struct passwd {
+    char *foo;
+};
+
+struct group {
+    char *foo;
+};
+
+struct passwd *getpwuid(uid_t);
+struct group *getgrgid(uid_t);
+
+#define R_OK 04
+#define W_OK 02
+
+
+struct sigaction {
+    int sa_flags;
+    void (*sa_handler)(int);
+};
+#define sigfillset(x)
+#define sigaction(a, b, c)
+
+#define mkdir(p, m) _mkdir(p)
+#define chdir win32_chdir
+
+int stat(const char *, struct stat *);
+int syslog(int, const char *, const char *);
+#define LOG_DAEMON 0
+#define LOG_ERR 0
+
+#ifdef __cplusplus
+#define access _access
+extern "C" _CRTIMP int __cdecl _access(const char *, int);
+int execvp(const char *, char *[]);
+extern "C" void *  __cdecl _alloca(size_t);
+#endif
+
+#define getpid _getpid
+
+#define getppid() 0
+#define gethostid() 0
+#define getuid() 0
+#define getgid() 0
+
+#define getcwd win32_getcwd
+#define chdir win32_chdir
+char *win32_getcwd(char *buf, int maxlen);
+int win32_chdir(const char *buf);
+
+int WSA_Init(void);
+
+#endif /* __COMPAT_H_ */
+
diff --git a/bacula/src/win32/compat/dirent.h b/bacula/src/win32/compat/dirent.h
new file mode 100644 (file)
index 0000000..7273fef
--- /dev/null
@@ -0,0 +1 @@
+#include "compat.h"
diff --git a/bacula/src/win32/compat/getopt.c b/bacula/src/win32/compat/getopt.c
new file mode 100644 (file)
index 0000000..566b8ef
--- /dev/null
@@ -0,0 +1,736 @@
+/* Getopt for GNU.
+   NOTE: getopt is now part of the C library, so if you don't know what
+   "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
+   before changing it!
+
+   Copyright (C) 1987, 88, 89, 90, 91, 92, 1993
+       Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by the
+   Free Software Foundation; either version 2, or (at your option) any
+   later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+
+/* NOTE!!!  AIX requires this to be the first thing in the file.
+   Do not put ANYTHING before it!  */
+#if !defined (__GNUC__) && defined (_AIX)
+ #pragma alloca
+#endif
+
+#include <string.h> //for strncmp
+#if defined (WIN32)
+#include <malloc.h>
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef __GNUC__
+#define alloca __builtin_alloca
+#else /* not __GNUC__ */
+#if defined (HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__))))
+#include <alloca.h>
+#else
+#if !defined (_AIX) && !defined (WIN32)
+char *alloca ();
+#endif
+#endif /* alloca.h */
+#endif /* not __GNUC__ */
+
+#if !__STDC__ && !defined(const) && IN_GCC
+#define const
+#endif
+
+/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.  */
+#ifndef _NO_PROTO
+#define _NO_PROTO
+#endif
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+   actually compiling the library itself.  This code is part of the GNU C
+   Library, but also included in many other GNU distributions.  Compiling
+   and linking in this code is a waste when using the GNU C library
+   (especially if it is a shared library).  Rather than having every GNU
+   program understand `configure --with-gnu-libc' and omit the object files,
+   it is simpler to just do this in the source for each such file.  */
+
+#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
+
+
+/* This needs to come after some library #include
+   to get __GNU_LIBRARY__ defined.  */
+#ifdef __GNU_LIBRARY__
+#undef alloca
+/* Don't include stdlib.h for non-GNU C libraries because some of them
+   contain conflicting prototypes for getopt.  */
+#include <stdlib.h>
+#else  /* Not GNU C library.  */
+#define        __alloca        alloca
+#endif /* GNU C library.  */
+
+/* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a
+   long-named option.  Because this is not POSIX.2 compliant, it is
+   being phased out.  */
+/* #define GETOPT_COMPAT */
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+   but it behaves differently for the user, since it allows the user
+   to intersperse the options with the other arguments.
+
+   As `getopt' works, it permutes the elements of ARGV so that,
+   when it is done, all the options precede everything else.  Thus
+   all application programs are extended to handle flexible argument order.
+
+   Setting the environment variable POSIXLY_CORRECT disables permutation.
+   Then the behavior is completely standard.
+
+   GNU application programs can use a third alternative mode in which
+   they can distinguish the relative order of options and other arguments.  */
+
+#include "getopt.h"
+
+/* For communication from `getopt' to the caller.
+   When `getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+char *optarg = 0;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `getopt'.
+
+   On entry to `getopt', zero means this is the first call; initialize.
+
+   When `getopt' returns EOF, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+/* XXX 1003.2 says this must be 1 before any call.  */
+int optind = 0;
+
+/* The next char to be scanned in the option-element
+   in which the last option character we returned was found.
+   This allows us to pick up the scan where we left off.
+
+   If this is zero, or a null string, it means resume the scan
+   by advancing to the next ARGV-element.  */
+
+static char *nextchar;
+
+/* Callers store zero here to inhibit the error message
+   for unrecognized options.  */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+   This must be initialized on some systems to avoid linking in the
+   system's own getopt implementation.  */
+
+int optopt = '?';
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+   If the caller did not specify anything,
+   the default is REQUIRE_ORDER if the environment variable
+   POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+   REQUIRE_ORDER means don't recognize them as options;
+   stop option processing when the first non-option is seen.
+   This is what Unix does.
+   This mode of operation is selected by either setting the environment
+   variable POSIXLY_CORRECT, or using `+' as the first character
+   of the list of option characters.
+
+   PERMUTE is the default.  We permute the contents of ARGV as we scan,
+   so that eventually all the non-options are at the end.  This allows options
+   to be given in any order, even with programs that were not written to
+   expect this.
+
+   RETURN_IN_ORDER is an option available to programs that were written
+   to expect options and other ARGV-elements in any order and that care about
+   the ordering of the two.  We describe each non-option ARGV-element
+   as if it were the argument of an option with character code 1.
+   Using `-' as the first character of the list of option characters
+   selects this mode of operation.
+
+   The special argument `--' forces an end of option-scanning regardless
+   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
+   `--' can cause `getopt' to return EOF with `optind' != ARGC.  */
+
+static enum
+{
+  REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+} ordering;
+\f
+#ifdef __GNU_LIBRARY__
+/* We want to avoid inclusion of string.h with non-GNU libraries
+   because there are many ways it can cause trouble.
+   On some systems, it contains special magic macros that don't work
+   in GCC.  */
+#include <string.h>
+#define        my_index        strchr
+#define        my_bcopy(src, dst, n)   memcpy ((dst), (src), (n))
+#else
+
+/* Avoid depending on library functions or files
+   whose names are inconsistent.  */
+
+char *getenv ();
+
+static char *
+my_index (str, chr)
+     const char *str;
+     int chr;
+{
+  while (*str)
+    {
+      if (*str == chr)
+       return (char *) str;
+      str++;
+    }
+  return 0;
+}
+
+static void
+my_bcopy (from, to, size)
+     const char *from;
+     char *to;
+     int size;
+{
+  int i;
+  for (i = 0; i < size; i++)
+    to[i] = from[i];
+}
+#endif                         /* GNU C library.  */
+\f
+/* Handle permutation of arguments.  */
+
+/* Describe the part of ARGV that contains non-options that have
+   been skipped.  `first_nonopt' is the index in ARGV of the first of them;
+   `last_nonopt' is the index after the last of them.  */
+
+static int first_nonopt;
+static int last_nonopt;
+
+/* Exchange two adjacent subsequences of ARGV.
+   One subsequence is elements [first_nonopt,last_nonopt)
+   which contains all the non-options that have been skipped so far.
+   The other is elements [last_nonopt,optind), which contains all
+   the options processed since those non-options were skipped.
+
+   `first_nonopt' and `last_nonopt' are relocated so that they describe
+   the new indices of the non-options in ARGV after they are moved.  */
+
+static void
+exchange (argv)
+     char **argv;
+{
+  int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *);
+  char **temp = (char **) __alloca (nonopts_size);
+
+  /* Interchange the two blocks of data in ARGV.  */
+
+  my_bcopy ((char *) &argv[first_nonopt], (char *) temp, nonopts_size);
+  my_bcopy ((char *) &argv[last_nonopt], (char *) &argv[first_nonopt],
+           (optind - last_nonopt) * sizeof (char *));
+  my_bcopy ((char *) temp,
+           (char *) &argv[first_nonopt + optind - last_nonopt],
+           nonopts_size);
+
+  /* Update records for the slots the non-options now occupy.  */
+
+  first_nonopt += (optind - last_nonopt);
+  last_nonopt = optind;
+}
+\f
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+   given in OPTSTRING.
+
+   If an element of ARGV starts with '-', and is not exactly "-" or "--",
+   then it is an option element.  The characters of this element
+   (aside from the initial '-') are option characters.  If `getopt'
+   is called repeatedly, it returns successively each of the option characters
+   from each of the option elements.
+
+   If `getopt' finds another option character, it returns that character,
+   updating `optind' and `nextchar' so that the next call to `getopt' can
+   resume the scan with the following option character or ARGV-element.
+
+   If there are no more option characters, `getopt' returns `EOF'.
+   Then `optind' is the index in ARGV of the first ARGV-element
+   that is not an option.  (The ARGV-elements have been permuted
+   so that those that are not options now come last.)
+
+   OPTSTRING is a string containing the legitimate option characters.
+   If an option character is seen that is not listed in OPTSTRING,
+   return '?' after printing an error message.  If you set `opterr' to
+   zero, the error message is suppressed but we still return '?'.
+
+   If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+   so the following text in the same ARGV-element, or the text of the following
+   ARGV-element, is returned in `optarg'.  Two colons mean an option that
+   wants an optional arg; if there is text in the current ARGV-element,
+   it is returned in `optarg', otherwise `optarg' is set to zero.
+
+   If OPTSTRING starts with `-' or `+', it requests different methods of
+   handling the non-option ARGV-elements.
+   See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+   Long-named options begin with `--' instead of `-'.
+   Their names may be abbreviated as long as the abbreviation is unique
+   or is an exact match for some defined option.  If they have an
+   argument, it follows the option name in the same ARGV-element, separated
+   from the option name by a `=', or else the in next ARGV-element.
+   When `getopt' finds a long-named option, it returns 0 if that option's
+   `flag' field is nonzero, the value of the option's `val' field
+   if the `flag' field is zero.
+
+   The elements of ARGV aren't really const, because we permute them.
+   But we pretend they're const in the prototype to be compatible
+   with other systems.
+
+   LONGOPTS is a vector of `struct option' terminated by an
+   element containing a name which is zero.
+
+   LONGIND returns the index in LONGOPT of the long-named option found.
+   It is only valid when a long-named option has been found by the most
+   recent call.
+
+   If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+   long-named options.  */
+
+int
+_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
+     int argc;
+     char *const *argv;
+     const char *optstring;
+     const struct option *longopts;
+     int *longind;
+     int long_only;
+{
+  int option_index;
+
+  optarg = 0;
+
+  /* Initialize the internal data when the first call is made.
+     Start processing options with ARGV-element 1 (since ARGV-element 0
+     is the program name); the sequence of previously skipped
+     non-option ARGV-elements is empty.  */
+
+  if (optind == 0)
+    {
+      first_nonopt = last_nonopt = optind = 1;
+
+      nextchar = NULL;
+
+      /* Determine how to handle the ordering of options and nonoptions.  */
+
+      if (optstring[0] == '-')
+       {
+         ordering = RETURN_IN_ORDER;
+         ++optstring;
+       }
+      else if (optstring[0] == '+')
+       {
+         ordering = REQUIRE_ORDER;
+         ++optstring;
+       }
+      else if (getenv ("POSIXLY_CORRECT") != NULL)
+       ordering = REQUIRE_ORDER;
+      else
+       ordering = PERMUTE;
+    }
+
+  if (nextchar == NULL || *nextchar == '\0')
+    {
+      if (ordering == PERMUTE)
+       {
+         /* If we have just processed some options following some non-options,
+            exchange them so that the options come first.  */
+
+         if (first_nonopt != last_nonopt && last_nonopt != optind)
+           exchange ((char **) argv);
+         else if (last_nonopt != optind)
+           first_nonopt = optind;
+
+         /* Now skip any additional non-options
+            and extend the range of non-options previously skipped.  */
+
+         while (optind < argc
+                && (argv[optind][0] != '-' || argv[optind][1] == '\0')
+#ifdef GETOPT_COMPAT
+                && (longopts == NULL
+                    || argv[optind][0] != '+' || argv[optind][1] == '\0')
+#endif                         /* GETOPT_COMPAT */
+                )
+           optind++;
+         last_nonopt = optind;
+       }
+
+      /* Special ARGV-element `--' means premature end of options.
+        Skip it like a null option,
+        then exchange with previous non-options as if it were an option,
+        then skip everything else like a non-option.  */
+
+      if (optind != argc && !strcmp (argv[optind], "--"))
+       {
+         optind++;
+
+         if (first_nonopt != last_nonopt && last_nonopt != optind)
+           exchange ((char **) argv);
+         else if (first_nonopt == last_nonopt)
+           first_nonopt = optind;
+         last_nonopt = argc;
+
+         optind = argc;
+       }
+
+      /* If we have done all the ARGV-elements, stop the scan
+        and back over any non-options that we skipped and permuted.  */
+
+      if (optind == argc)
+       {
+         /* Set the next-arg-index to point at the non-options
+            that we previously skipped, so the caller will digest them.  */
+         if (first_nonopt != last_nonopt)
+           optind = first_nonopt;
+         return EOF;
+       }
+
+      /* If we have come to a non-option and did not permute it,
+        either stop the scan or describe it to the caller and pass it by.  */
+
+      if ((argv[optind][0] != '-' || argv[optind][1] == '\0')
+#ifdef GETOPT_COMPAT
+         && (longopts == NULL
+             || argv[optind][0] != '+' || argv[optind][1] == '\0')
+#endif                         /* GETOPT_COMPAT */
+         )
+       {
+         if (ordering == REQUIRE_ORDER)
+           return EOF;
+         optarg = argv[optind++];
+         return 1;
+       }
+
+      /* We have found another option-ARGV-element.
+        Start decoding its characters.  */
+
+      nextchar = (argv[optind] + 1
+                 + (longopts != NULL && argv[optind][1] == '-'));
+    }
+
+  if (longopts != NULL
+      && ((argv[optind][0] == '-'
+          && (argv[optind][1] == '-' || long_only))
+#ifdef GETOPT_COMPAT
+         || argv[optind][0] == '+'
+#endif                         /* GETOPT_COMPAT */
+         ))
+    {
+      const struct option *p;
+      char *s = nextchar;
+      int exact = 0;
+      int ambig = 0;
+      const struct option *pfound = NULL;
+      int indfound = 0 ;
+
+      while (*s && *s != '=')
+       s++;
+
+      /* Test all options for either exact match or abbreviated matches.  */
+      for (p = longopts, option_index = 0; p->name;
+          p++, option_index++)
+       if (!strncmp (p->name, nextchar, s - nextchar))
+         {
+           if ((size_t)(s - nextchar) == strlen (p->name))
+             {
+               /* Exact match found.  */
+               pfound = p;
+               indfound = option_index;
+               exact = 1;
+               break;
+             }
+           else if (pfound == NULL)
+             {
+               /* First nonexact match found.  */
+               pfound = p;
+               indfound = option_index;
+             }
+           else
+             /* Second nonexact match found.  */
+             ambig = 1;
+         }
+
+      if (ambig && !exact)
+       {
+         if (opterr)
+           fprintf (stderr, "%s: option `%s' is ambiguous\n",
+                    argv[0], argv[optind]);
+         nextchar += strlen (nextchar);
+         optind++;
+         return '?';
+       }
+
+      if (pfound != NULL)
+       {
+         option_index = indfound;
+         optind++;
+         if (*s)
+           {
+             /* Don't test has_arg with >, because some C compilers don't
+                allow it to be used on enums.  */
+             if (pfound->has_arg)
+               optarg = s + 1;
+             else
+               {
+                 if (opterr)
+                   {
+                     if (argv[optind - 1][1] == '-')
+                       /* --option */
+                       fprintf (stderr,
+                                "%s: option `--%s' doesn't allow an argument\n",
+                                argv[0], pfound->name);
+                     else
+                       /* +option or -option */
+                       fprintf (stderr,
+                            "%s: option `%c%s' doesn't allow an argument\n",
+                            argv[0], argv[optind - 1][0], pfound->name);
+                   }
+                 nextchar += strlen (nextchar);
+                 return '?';
+               }
+           }
+         else if (pfound->has_arg == 1)
+           {
+             if (optind < argc)
+               optarg = argv[optind++];
+             else
+               {
+                 if (opterr)
+                   fprintf (stderr, "%s: option `%s' requires an argument\n",
+                            argv[0], argv[optind - 1]);
+                 nextchar += strlen (nextchar);
+                 return optstring[0] == ':' ? ':' : '?';
+               }
+           }
+         nextchar += strlen (nextchar);
+         if (longind != NULL)
+           *longind = option_index;
+         if (pfound->flag)
+           {
+             *(pfound->flag) = pfound->val;
+             return 0;
+           }
+         return pfound->val;
+       }
+      /* Can't find it as a long option.  If this is not getopt_long_only,
+        or the option starts with '--' or is not a valid short
+        option, then it's an error.
+        Otherwise interpret it as a short option.  */
+      if (!long_only || argv[optind][1] == '-'
+#ifdef GETOPT_COMPAT
+         || argv[optind][0] == '+'
+#endif                         /* GETOPT_COMPAT */
+         || my_index (optstring, *nextchar) == NULL)
+       {
+         if (opterr)
+           {
+             if (argv[optind][1] == '-')
+               /* --option */
+               fprintf (stderr, "%s: unrecognized option `--%s'\n",
+                        argv[0], nextchar);
+             else
+               /* +option or -option */
+               fprintf (stderr, "%s: unrecognized option `%c%s'\n",
+                        argv[0], argv[optind][0], nextchar);
+           }
+         nextchar = (char *) "";
+         optind++;
+         return '?';
+       }
+    }
+
+  /* Look at and handle the next option-character.  */
+
+  {
+    char c = *nextchar++;
+    char *temp = my_index (optstring, c);
+
+    /* Increment `optind' when we start to process its last character.  */
+    if (*nextchar == '\0')
+      ++optind;
+
+    if (temp == NULL || c == ':')
+      {
+       if (opterr)
+         {
+#if 0
+           if (c < 040 || c >= 0177)
+             fprintf (stderr, "%s: unrecognized option, character code 0%o\n",
+                      argv[0], c);
+           else
+             fprintf (stderr, "%s: unrecognized option `-%c'\n", argv[0], c);
+#else
+           /* 1003.2 specifies the format of this message.  */
+           fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c);
+#endif
+         }
+       optopt = c;
+       return '?';
+      }
+    if (temp[1] == ':')
+      {
+       if (temp[2] == ':')
+         {
+           /* This is an option that accepts an argument optionally.  */
+           if (*nextchar != '\0')
+             {
+               optarg = nextchar;
+               optind++;
+             }
+           else
+             optarg = 0;
+           nextchar = NULL;
+         }
+       else
+         {
+           /* This is an option that requires an argument.  */
+           if (*nextchar != '\0')
+             {
+               optarg = nextchar;
+               /* If we end this ARGV-element by taking the rest as an arg,
+                  we must advance to the next element now.  */
+               optind++;
+             }
+           else if (optind == argc)
+             {
+               if (opterr)
+                 {
+#if 0
+                   fprintf (stderr, "%s: option `-%c' requires an argument\n",
+                            argv[0], c);
+#else
+                   /* 1003.2 specifies the format of this message.  */
+                   fprintf (stderr, "%s: option requires an argument -- %c\n",
+                            argv[0], c);
+#endif
+                 }
+               optopt = c;
+               if (optstring[0] == ':')
+                 c = ':';
+               else
+                 c = '?';
+             }
+           else
+             /* We already incremented `optind' once;
+                increment it again when taking next ARGV-elt as argument.  */
+             optarg = argv[optind++];
+           nextchar = NULL;
+         }
+      }
+    return c;
+  }
+}
+
+int
+getopt (argc, argv, optstring)
+     int argc;
+     char *const *argv;
+     const char *optstring;
+{
+  return _getopt_internal (argc, argv, optstring,
+                          (const struct option *) 0,
+                          (int *) 0,
+                          0);
+}
+
+#endif /* _LIBC or not __GNU_LIBRARY__.  */
+\f
+#ifdef TEST
+
+/* Compile with -DTEST to make an executable for use in testing
+   the above definition of `getopt'.  */
+
+int
+main (argc, argv)
+     int argc;
+     char **argv;
+{
+  int c;
+  int digit_optind = 0;
+
+  while (1)
+    {
+      int this_option_optind = optind ? optind : 1;
+
+      c = getopt (argc, argv, "abc:d:0123456789");
+      if (c == EOF)
+       break;
+
+      switch (c)
+       {
+       case '0':
+       case '1':
+       case '2':
+       case '3':
+       case '4':
+       case '5':
+       case '6':
+       case '7':
+       case '8':
+       case '9':
+         if (digit_optind != 0 && digit_optind != this_option_optind)
+           printf ("digits occur in two different argv-elements.\n");
+         digit_optind = this_option_optind;
+         printf ("option %c\n", c);
+         break;
+
+       case 'a':
+         printf ("option a\n");
+         break;
+
+       case 'b':
+         printf ("option b\n");
+         break;
+
+       case 'c':
+         printf ("option c with value `%s'\n", optarg);
+         break;
+
+       case '?':
+         break;
+
+       default:
+         printf ("?? getopt returned character code 0%o ??\n", c);
+       }
+    }
+
+  if (optind < argc)
+    {
+      printf ("non-option ARGV-elements: ");
+      while (optind < argc)
+       printf ("%s ", argv[optind++]);
+      printf ("\n");
+    }
+
+  exit (0);
+}
+
+#endif /* TEST */
diff --git a/bacula/src/win32/compat/getopt.h b/bacula/src/win32/compat/getopt.h
new file mode 100644 (file)
index 0000000..78318e7
--- /dev/null
@@ -0,0 +1,114 @@
+/* Declarations for getopt.
+   Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by the
+   Free Software Foundation; either version 2, or (at your option) any
+   later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+
+#ifndef _GETOPT_H
+#define _GETOPT_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+   When `getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `getopt'.
+
+   On entry to `getopt', zero means this is the first call; initialize.
+
+   When `getopt' returns EOF, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+   for unrecognized options.  */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized.  */
+
+extern int optopt;
+
+/* Describe the long-named options requested by the application.
+   The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+   of `struct option' terminated by an element containing a name which is
+   zero.
+
+   The field `has_arg' is:
+   no_argument         (or 0) if the option does not take an argument,
+   required_argument   (or 1) if the option requires an argument,
+   optional_argument   (or 2) if the option takes an optional argument.
+
+   If the field `flag' is not NULL, it points to a variable that is set
+   to the value given in the field `val' when the option is found, but
+   left unchanged if the option is not found.
+
+   To have a long-named option do something other than set an `int' to
+   a compiled-in constant, such as set a value from `optarg', set the
+   option's `flag' field to zero and its `val' field to a nonzero
+   value (the equivalent single-letter option character, if there is
+   one).  For long options that have a zero `flag' field, `getopt'
+   returns the contents of the `val' field.  */
+
+struct option
+{
+#if    __STDC__
+  const char *name;
+#else
+  char *name;
+#endif
+  /* has_arg can't be an enum because some compilers complain about
+     type mismatches in all the code that assumes it is an int.  */
+  int has_arg;
+  int *flag;
+  int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'.  */
+
+#define        no_argument             0
+#define required_argument      1
+#define optional_argument      2
+
+extern int getopt (int argc, char *const *argv, const char *shortopts);
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+                       const struct option *longopts, int *longind);
+extern int getopt_long_only (int argc, char *const *argv,
+                            const char *shortopts,
+                            const struct option *longopts, int *longind);
+
+/* Internal only.  Users should not call this directly.  */
+extern int _getopt_internal (int argc, char *const *argv,
+                            const char *shortopts,
+                            const struct option *longopts, int *longind,
+                            int long_only);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GETOPT_H */
diff --git a/bacula/src/win32/compat/grp.h b/bacula/src/win32/compat/grp.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bacula/src/win32/compat/mswinver.h b/bacula/src/win32/compat/mswinver.h
new file mode 100644 (file)
index 0000000..c30ecdc
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef __MSWINVER_H_
+#define __MSWINVER_H_
+
+#include "winbase.h"
+
+#define MS_MAJOR_WINDOWS_3     3
+#define MS_MAJOR_WINDOWS_95    4
+#define MS_MAJOR_WINDOWS_98    4
+#define MS_MAJOR_WINDOWS_ME    4
+#define MS_MAJOR_WINDOWS_NT4   4
+#define MS_MAJOR_WINDOWS_2K    5
+#define MS_MAJOR_WINDOWS_XP    5
+#define MS_MAJOR_WINDOWS_S2003 5
+
+
+#define MS_MINOR_WINDOWS_3     51
+#define MS_MINOR_WINDOWS_95    0
+#define MS_MINOR_WINDOWS_98    10
+#define MS_MINOR_WINDOWS_ME    90
+#define MS_MINOR_WINDOWS_NT4   0
+#define MS_MINOR_WINDOWS_2K    0
+#define MS_MINOR_WINDOWS_XP    1
+#define MS_MINOR_WINDOWS_S2003 2
+
+
+#define _mkversion(p, m, r) (((p)<<24)|((m)<<8)|(r))
+
+#define MS_WINDOWS_95  _mkversion(VER_PLATFORM_WIN32_WINDOWS, MS_MAJOR_WINDOWS_95, MS_MINOR_WINDOWS_95)
+#define MS_WINDOWS_98  _mkversion(VER_PLATFORM_WIN32_WINDOWS, MS_MAJOR_WINDOWS_98, MS_MINOR_WINDOWS_98)
+#define MS_WINDOWS_ME  _mkversion(VER_PLATFORM_WIN32_WINDOWS, MS_MAJOR_WINDOWS_ME, MS_MINOR_WINDOWS_ME)
+#define MS_WINDOWS_NT4  _mkversion(VER_PLATFORM_WIN32_NT, MS_MAJOR_WINDOWS_NT4, MS_MINOR_WINDOWS_NT4)
+#define MS_WINDOWS_2K  _mkversion(VER_PLATFORM_WIN32_NT, MS_MAJOR_WINDOWS_2K, MS_MINOR_WINDOWS_2K)
+#define MS_WINDOWS_XP  _mkversion(VER_PLATFORM_WIN32_NT, MS_MAJOR_WINDOWS_XP, MS_MINOR_WINDOWS_XP)
+#define MS_WINDOWS_S2003  _mkversion(VER_PLATFORM_WIN32_NT, MS_MAJOR_WINDOWS_S2003, MS_MINOR_WINDOWS_S2003)
+
+
+#endif
diff --git a/bacula/src/win32/compat/netdb.h b/bacula/src/win32/compat/netdb.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bacula/src/win32/compat/netinet/in.h b/bacula/src/win32/compat/netinet/in.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bacula/src/win32/compat/print.cpp b/bacula/src/win32/compat/print.cpp
new file mode 100644 (file)
index 0000000..789cf2d
--- /dev/null
@@ -0,0 +1,736 @@
+/**************************************************************
+ * Original:
+ * Patrick Powell Tue Apr 11 09:48:21 PDT 1995
+ * A bombproof version of doprnt(dopr) included.
+ * Sigh.  This sort of thing is always nasty do deal with.  Note that
+ * the version here does not include floating point...
+ *
+ * snprintf() is used instead of sprintf() as it does limit checks
+ * for string length.  This covers a nasty loophole.
+ *
+ * The other functions are there to prevent NULL pointers from
+ * causing nast effects.
+ *
+ * More Recently:
+ *  Brandon Long <blong@fiction.net> 9/15/96 for mutt 0.43
+ *  This was ugly.  It is still ugly.  I opted out of floating point
+ *  numbers, but the formatter understands just about everything
+ *  from the normal C string format, at least as far as I can tell from
+ *  the Solaris 2.5 printf(3S) man page.
+ *
+ *  Brandon Long <blong@fiction.net> 10/22/97 for mutt 0.87.1
+ *    Ok, added some minimal floating point support, which means this
+ *    probably requires libm on most operating systems.         Don't yet
+ *    support the exponent(e, E) and sigfig(g, G).  Also, fmtint()
+ *    was pretty badly broken, it just wasn't being exercised in ways
+ *    which showed it, so that's been fixed.  Also, formated the code
+ *    to mutt conventions, and removed dead code left over from the
+ *    original.         Also, there is now a builtin-test, just compile with:
+ *          gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
+ *    and run snprintf for results.
+ * 
+ *  Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
+ *    The PGP code was using unsigned hexadecimal formats. 
+ *    Unfortunately, unsigned formats simply didn't work.
+ *
+ *  Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
+ *    The original code assumed that both snprintf() and vsnprintf() were
+ *    missing. Some systems only have snprintf() but not vsnprintf(), so
+ *    the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF.
+ *
+ *  Ben Lindstrom <mouring@eviladmin.org> 09/27/00 for OpenSSH
+ *    Welcome to the world of %lld and %qd support.  With other
+ *    long long support.  This is needed for sftp-server to work
+ *    right.
+ *
+ *  Ben Lindstrom <mouring@eviladmin.org> 02/12/01 for OpenSSH
+ *    Removed all hint of VARARGS stuff and banished it to the void, 
+ *    and did a bit of KNF style work to make things a bit more
+ *    acceptable.  Consider stealing from mutt or enlightenment.
+ **************************************************************/
+
+#include "compat.h"
+
+typedef void (prfun)(char *, size_t *, size_t, int);
+
+int 
+dopr(char *buffer, size_t maxlen, const char *format, va_list args, prfun);
+
+
+static void 
+fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, 
+       int min, int max, prfun);
+
+static void 
+fmtint(char *buffer, size_t *currlen, size_t maxlen, INT64 value, int base, 
+       int min, int max, int flags, prfun);
+
+static void 
+fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue, 
+      int min, int max, int flags, prfun);
+
+static void
+dopr_outch(char *buffer, size_t *currlen, size_t maxlen, int c);
+
+/*
+ * dopr(): poor man's version of doprintf
+ */
+
+#define MAX(a,b) ((a)>(b)?(a):(b))
+
+/* format read states */
+#define DP_S_DEFAULT 0
+#define DP_S_FLAGS   1
+#define DP_S_MIN     2
+#define DP_S_DOT     3
+#define DP_S_MAX     4
+#define DP_S_MOD     5
+#define DP_S_CONV    6
+#define DP_S_DONE    7
+
+/* format flags - Bits */
+#define DP_F_MINUS     (1 << 0)
+#define DP_F_PLUS      (1 << 1)
+#define DP_F_SPACE     (1 << 2)
+#define DP_F_NUM       (1 << 3)
+#define DP_F_ZERO      (1 << 4)
+#define DP_F_UP                (1 << 5)
+#define DP_F_UNSIGNED  (1 << 6)
+
+/* Conversion Flags */
+#define DP_C_SHORT     1
+#define DP_C_LONG      2
+#define DP_C_LDOUBLE   3
+#define DP_C_LONG_LONG 4
+
+#define char_to_int(p) (p - '0')
+#define abs_val(p)     (p < 0 ? -p : p)
+
+static const char digitval[] = "0123456789abcdef0123456789ABCDEF";
+
+int
+dopr(char *buffer, size_t maxlen, const char *format, va_list args, prfun outch)
+{
+    char *strvalue;
+    char ch;
+    INT64 value;
+    long double fvalue;
+    int min = 0;
+    int max = -1;
+    int state = DP_S_DEFAULT;
+    int flags = 0;
+    int cflags = 0;
+    size_t currlen = 0;
+  
+    ch = *format++;
+
+    while (state != DP_S_DONE)
+    {
+       if ((ch == '\0') || (currlen >= maxlen)) 
+           state = DP_S_DONE;
+
+       switch (state)
+       {
+       case DP_S_DEFAULT:
+           if (ch == '%') 
+               state = DP_S_FLAGS;
+           else 
+               outch(buffer, &currlen, maxlen, ch);
+           ch = *format++;
+           break;
+       case DP_S_FLAGS:
+           switch (ch)
+           {
+           case '-':
+               flags |= DP_F_MINUS;
+               ch = *format++;
+               break;
+           case '+':
+               flags |= DP_F_PLUS;
+               ch = *format++;
+               break;
+           case ' ':
+               flags |= DP_F_SPACE;
+               ch = *format++;
+               break;
+           case '#':
+               flags |= DP_F_NUM;
+               ch = *format++;
+               break;
+           case '0':
+               flags |= DP_F_ZERO;
+               ch = *format++;
+               break;
+           default:
+               state = DP_S_MIN;
+               break;
+           }
+           break;
+       case DP_S_MIN:
+           if (isdigit((unsigned char)ch))
+           {
+               min = 10*min + char_to_int(ch);
+               ch = *format++;
+           }
+           else if (ch == '*')
+           {
+               min = va_arg(args, int);
+               ch = *format++;
+               state = DP_S_DOT;
+           }
+           else 
+               state = DP_S_DOT;
+           break;
+       case DP_S_DOT:
+           if (ch == '.')
+           {
+               state = DP_S_MAX;
+               ch = *format++;
+           }
+           else 
+               state = DP_S_MOD;
+           break;
+       case DP_S_MAX:
+           if (isdigit((unsigned char)ch))
+           {
+               if (max < 0)
+                   max = 0;
+               max = 10*max + char_to_int(ch);
+               ch = *format++;
+           }
+           else if (ch == '*')
+           {
+               max = va_arg(args, int);
+               ch = *format++;
+               state = DP_S_MOD;
+           }
+           else 
+               state = DP_S_MOD;
+           break;
+       case DP_S_MOD:
+           switch (ch)
+           {
+           case 'h':
+               cflags = DP_C_SHORT;
+               ch = *format++;
+               break;
+           case 'l':
+               cflags = DP_C_LONG;
+               ch = *format++;
+               if (ch == 'l')
+               {
+                   cflags = DP_C_LONG_LONG;
+                   ch = *format++;
+               }
+               break;
+           case 'q':
+               cflags = DP_C_LONG_LONG;
+               ch = *format++;
+               break;
+           case 'L':
+               cflags = DP_C_LDOUBLE;
+               ch = *format++;
+               break;
+           default:
+               break;
+           }
+           state = DP_S_CONV;
+           break;
+       case DP_S_CONV:
+           switch (ch)
+           {
+           case 'b':
+               flags |= DP_F_UNSIGNED;
+               if (cflags == DP_C_SHORT) 
+                   value = va_arg(args, unsigned int);
+               else if (cflags == DP_C_LONG)
+                   value = va_arg(args, unsigned long int);
+               else if (cflags == DP_C_LONG_LONG)
+                   value = va_arg(args, UINT64);
+               else
+                   value = va_arg(args, unsigned int);
+               fmtint(buffer, &currlen, maxlen, value, 2, min, max, flags, outch);
+               break;
+           case 'd':
+           case 'i':
+               if (cflags == DP_C_SHORT) 
+                   value = va_arg(args, int);
+               else if (cflags == DP_C_LONG)
+                   value = va_arg(args, long int);
+               else if (cflags == DP_C_LONG_LONG)
+                   value = va_arg(args, INT64);
+               else
+                   value = va_arg(args, int);
+               fmtint(buffer, &currlen, maxlen, value, 10, min, max, flags, outch);
+               break;
+           case 'o':
+               flags |= DP_F_UNSIGNED;
+               if (cflags == DP_C_SHORT)
+                   value = va_arg(args, unsigned int);
+               else if (cflags == DP_C_LONG)
+                   value = va_arg(args, unsigned long int);
+               else if (cflags == DP_C_LONG_LONG)
+                   value = va_arg(args, UINT64);
+               else
+                   value = va_arg(args, unsigned int);
+               fmtint(buffer, &currlen, maxlen, value, 8, min, max, flags, outch);
+               break;
+           case 'u':
+               flags |= DP_F_UNSIGNED;
+               if (cflags == DP_C_SHORT)
+                   value = va_arg(args, unsigned int);
+               else if (cflags == DP_C_LONG)
+                   value = va_arg(args, unsigned long int);
+               else if (cflags == DP_C_LONG_LONG)
+                   value = va_arg(args, UINT64);
+               else
+                   value = va_arg(args, unsigned int);
+               fmtint(buffer, &currlen, maxlen, value, 10, min, max, flags, outch);
+               break;
+           case 'X':
+               flags |= DP_F_UP;
+           case 'x':
+               flags |= DP_F_UNSIGNED;
+               if (cflags == DP_C_SHORT)
+                   value = va_arg(args, unsigned int);
+               else if (cflags == DP_C_LONG)
+                   value = va_arg(args, unsigned long int);
+               else if (cflags == DP_C_LONG_LONG)
+                   value = va_arg(args, UINT64);
+               else
+                   value = va_arg(args, unsigned int);
+               fmtint(buffer, &currlen, maxlen, value, 16, min, max, flags, outch);
+               break;
+           case 'f':
+               if (cflags == DP_C_LDOUBLE)
+                   fvalue = va_arg(args, long double);
+               else
+                   fvalue = va_arg(args, double);
+               /* um, floating point? */
+               fmtfp(buffer, &currlen, maxlen, fvalue, min, max, flags, outch);
+               break;
+           case 'E':
+               flags |= DP_F_UP;
+           case 'e':
+               if (cflags == DP_C_LDOUBLE)
+                   fvalue = va_arg(args, long double);
+               else
+                   fvalue = va_arg(args, double);
+               break;
+           case 'G':
+               flags |= DP_F_UP;
+           case 'g':
+               if (cflags == DP_C_LDOUBLE)
+                   fvalue = va_arg(args, long double);
+               else
+                   fvalue = va_arg(args, double);
+               break;
+           case 'c':
+               outch(buffer, &currlen, maxlen, va_arg(args, int));
+               break;
+           case 's':
+               strvalue = va_arg(args, char *);
+               if (max < 0) 
+                   max = maxlen; /* ie, no max */
+               fmtstr(buffer, &currlen, maxlen, strvalue, flags, min, max, outch);
+               break;
+           case 'p':
+               strvalue = (char *) va_arg(args, void *);
+               flags |= DP_F_UNSIGNED;
+               fmtint(buffer, &currlen, maxlen, (long) strvalue, 16, min, max,
+                      flags, outch);
+               break;
+           case 'n':
+               if (cflags == DP_C_SHORT)
+               {
+                   short int *num;
+                   num = va_arg(args, short int *);
+                   *num = currlen;
+               }
+               else if (cflags == DP_C_LONG)
+               {
+                   long int *num;
+                   num = va_arg(args, long int *);
+                   *num = currlen;
+               }
+               else if (cflags == DP_C_LONG_LONG)
+               {
+                   INT64 *num;
+                   num = va_arg(args, INT64 *);
+                   *num = currlen;
+               }
+               else
+               {
+                   int *num;
+                   num = va_arg(args, int *);
+                   *num = currlen;
+               }
+               break;
+           case '%':
+               outch(buffer, &currlen, maxlen, ch);
+               break;
+           case 'w': /* not supported yet, treat as next char */
+               ch = *format++;
+               break;
+           default: /* Unknown, skip */
+               break;
+           }
+           ch = *format++;
+           state = DP_S_DEFAULT;
+           flags = cflags = min = 0;
+           max = -1;
+           break;
+       case DP_S_DONE:
+           break;
+       default: /* hmm? */
+           break; /* some picky compilers need this */
+       }
+    }
+    outch(buffer, &currlen, maxlen, -1);
+    return currlen;
+}
+
+static void
+fmtstr(char *buffer, size_t *currlen, size_t maxlen, 
+       char *value, int flags, int min, int max, prfun outch)
+{
+    int padlen, strln;    /* amount to pad */
+    int cnt = 0;
+  
+    if (value == NULL) 
+       value = "<NULL>";
+
+    for (strln = 0; value[strln]; ++strln); /* strlen */
+    padlen = min - strln;
+    if (padlen < 0) 
+       padlen = 0;
+    if (flags & DP_F_MINUS) 
+       padlen = -padlen; /* Left Justify */
+
+    while ((padlen > 0) && (cnt < max))
+    {
+       outch(buffer, currlen, maxlen, ' ');
+       --padlen;
+       ++cnt;
+    }
+    while (*value && (cnt < max))
+    {
+       outch(buffer, currlen, maxlen, *value++);
+       ++cnt;
+    }
+    while ((padlen < 0) && (cnt < max))
+    {
+       outch(buffer, currlen, maxlen, ' ');
+       ++padlen;
+       ++cnt;
+    }
+}
+
+/* Have to handle DP_F_NUM(ie 0x and 0 alternates) */
+
+static void 
+fmtint(char *buffer, size_t *currlen, size_t maxlen, 
+       INT64 value, int base, int min, int max, int flags, prfun outch)
+{
+    UINT64 uvalue;
+    char convert[20];
+    int signvalue = 0;
+    int place = 0;
+    int spadlen = 0; /* amount to space pad */
+    int zpadlen = 0; /* amount to zero pad */
+    int caps = 0;
+    
+    if (max < 0)
+       max = 0;
+    
+    uvalue = value;
+
+    if (!(flags & DP_F_UNSIGNED))
+    {
+       if (value < 0)
+       {
+           signvalue = '-';
+           uvalue = -value;
+       }
+       else if (flags & DP_F_PLUS)  /* Do a sign(+/i) */
+           signvalue = '+';
+       else if (flags & DP_F_SPACE)
+           signvalue = ' ';
+    }
+  
+    if (flags & DP_F_UP) 
+       caps = 16; /* Should characters be upper case? */
+
+    do
+    {
+       convert[place++] = digitval[(uvalue%base)+caps];
+       uvalue = (uvalue / (unsigned)base);
+    } while (uvalue && (place < 20));
+
+    if (place == 20) 
+       place--;
+
+    convert[place] = 0;
+
+    zpadlen = max - place;
+    spadlen = min - MAX(max, place) - (signvalue ? 1 : 0);
+
+    if (zpadlen < 0)
+       zpadlen = 0;
+    if (spadlen < 0)
+       spadlen = 0;
+    if (flags & DP_F_ZERO)
+    {
+       zpadlen = MAX(zpadlen, spadlen);
+       spadlen = 0;
+    }
+    if (flags & DP_F_MINUS) 
+       spadlen = -spadlen; /* Left Justifty */
+
+
+    /* Spaces */
+    while (spadlen > 0)
+    {
+       outch(buffer, currlen, maxlen, ' ');
+       --spadlen;
+    }
+
+    /* Sign */
+    if (signvalue) 
+       outch(buffer, currlen, maxlen, signvalue);
+
+    /* Zeros */
+    if (zpadlen > 0)
+    {
+       while (zpadlen > 0)
+       {
+           outch(buffer, currlen, maxlen, '0');
+           --zpadlen;
+       }
+    }
+
+    /* Digits */
+    while (place > 0) 
+       outch(buffer, currlen, maxlen, convert[--place]);
+  
+    /* Left Justified spaces */
+    while (spadlen < 0)
+    {
+       outch(buffer, currlen, maxlen, ' ');
+       ++spadlen;
+    }
+}
+
+static long double 
+pow10(int exp)
+{
+    long double result = 1;
+
+    while (exp)
+    {
+       result *= 10;
+       exp--;
+    }
+  
+    return result;
+}
+
+static long 
+round(long double value)
+{
+    long intpart = (long)value;
+
+    value -= intpart;
+    if (value >= 0.5)
+       intpart++;
+
+    return intpart;
+}
+
+static void 
+fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue, 
+      int min, int max, int flags, prfun outch)
+{
+    char iconvert[20];
+    char fconvert[20];
+    int signvalue = 0;
+    int iplace = 0;
+    int fplace = 0;
+    int padlen = 0; /* amount to pad */
+    int zpadlen = 0; 
+    long intpart;
+    long fracpart;
+    long double ufvalue;
+  
+    /* 
+     * AIX manpage says the default is 0, but Solaris says the default
+     * is 6, and sprintf on AIX defaults to 6
+     */
+    if (max < 0)
+       max = 6;
+
+    ufvalue = abs_val(fvalue);
+
+    if (fvalue < 0)
+       signvalue = '-';
+    else if (flags & DP_F_PLUS)         /* Do a sign(+/i) */
+       signvalue = '+';
+    else if (flags & DP_F_SPACE)
+       signvalue = ' ';
+
+    intpart = (long)ufvalue;
+
+    /* 
+     * Sorry, we only support 9 digits past the decimal because of our 
+     * conversion method
+     */
+    if (max > 9)
+       max = 9;
+
+    /* We "cheat" by converting the fractional part to integer by
+     * multiplying by a factor of 10
+     */
+    fracpart = round((pow10 (max)) * (ufvalue - intpart));
+
+    if (fracpart >= pow10 (max))
+    {
+       intpart++;
+       fracpart -= (long)pow10 (max);
+    }
+
+    /* Convert integer part */
+    do
+    {
+       iconvert[iplace++] = digitval[intpart % 10];
+       intpart = (intpart / 10);
+    } while (intpart && (iplace < 20));
+
+    if (iplace == 20) 
+       iplace--;
+
+    iconvert[iplace] = 0;
+
+    /* Convert fractional part */
+    do
+    {
+       fconvert[fplace++] = digitval[fracpart % 10];
+       fracpart = (fracpart / 10);
+    } while (fracpart && (fplace < 20));
+
+    if (fplace == 20) 
+       fplace--;
+
+    fconvert[fplace] = 0;
+
+    /* -1 for decimal point, another -1 if we are printing a sign */
+    padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); 
+    zpadlen = max - fplace;
+    if (zpadlen < 0)
+       zpadlen = 0;
+    if (padlen < 0) 
+       padlen = 0;
+    if (flags & DP_F_MINUS) 
+       padlen = -padlen; /* Left Justifty */
+
+    if ((flags & DP_F_ZERO) && (padlen > 0))
+    {
+       if (signvalue)
+       {
+           outch(buffer, currlen, maxlen, signvalue);
+           --padlen;
+           signvalue = 0;
+       }
+       while (padlen > 0)
+       {
+           outch(buffer, currlen, maxlen, '0');
+           --padlen;
+       }
+    }
+
+    while (padlen > 0)
+    {
+       outch(buffer, currlen, maxlen, ' ');
+       --padlen;
+    }
+
+    if (signvalue) 
+       outch(buffer, currlen, maxlen, signvalue);
+
+    while (iplace > 0) 
+       outch(buffer, currlen, maxlen, iconvert[--iplace]);
+
+    /*
+     * Decimal point.  This should probably use locale to find the correct
+     * char to print out.
+     */
+    outch(buffer, currlen, maxlen, '.');
+
+    while (fplace > 0) 
+       outch(buffer, currlen, maxlen, fconvert[--fplace]);
+
+    while (zpadlen > 0)
+    {
+       outch(buffer, currlen, maxlen, '0');
+       --zpadlen;
+    }
+
+    while (padlen < 0)
+    {
+       outch(buffer, currlen, maxlen, ' ');
+       ++padlen;
+    }
+}
+
+static void 
+dopr_outch(char *buffer, size_t *currlen, size_t maxlen, int c)
+{
+    if (c == -1)
+    {
+       if (*currlen < maxlen - 1) 
+           buffer[*currlen] = '\0';
+       else 
+           buffer[maxlen - 1] = '\0';
+    }
+    else if (*currlen < maxlen)
+       buffer[(*currlen)++] = c;
+}
+
+int
+__sprintf(char *str, const char *fmt, ...) 
+{
+    int rval;
+    va_list ap;
+    va_start(ap, fmt);
+    rval = vsnprintf(str, 128*1024, fmt, ap);
+    va_end(ap);
+    return rval;
+}
+
+
+int 
+__snprintf(char *str, size_t count, const char *fmt, ...)
+{
+    int rval;
+    va_list ap;
+
+    va_start(ap, fmt);
+    rval = vsnprintf(str, count, fmt, ap);
+    va_end(ap);
+
+    return rval;
+}
+
+int
+__vsprintf(char *s, const char *format, va_list args)
+{
+    s[0] = 0;
+    return dopr(s, 0xfffff, format, args, dopr_outch);
+}
+
+int
+__vsnprintf(char *s, size_t count, const char *format, va_list args)
+{
+    s[0] = 0;
+    return dopr(s, count, format, args, dopr_outch);
+}
+
diff --git a/bacula/src/win32/compat/pwd.h b/bacula/src/win32/compat/pwd.h
new file mode 100644 (file)
index 0000000..7273fef
--- /dev/null
@@ -0,0 +1 @@
+#include "compat.h"
diff --git a/bacula/src/win32/compat/sched.h b/bacula/src/win32/compat/sched.h
new file mode 100644 (file)
index 0000000..9208a52
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+ * Module: sched.h
+ *
+ * Purpose:
+ *      Provides an implementation of POSIX realtime extensions
+ *      as defined in 
+ *
+ *              POSIX 1003.1b-1993      (POSIX.1b)
+ *
+ * --------------------------------------------------------------------------
+ *
+ *      Pthreads-win32 - POSIX Threads Library for Win32
+ *      Copyright(C) 1998 John E. Bossom
+ *      Copyright(C) 1999,2003 Pthreads-win32 contributors
+ * 
+ *      Contact Email: rpj@callisto.canberra.edu.au
+ * 
+ *      The current list of contributors is contained
+ *      in the file CONTRIBUTORS included with the source
+ *      code distribution. The list can also be seen at the
+ *      following World Wide Web location:
+ *      http://sources.redhat.com/pthreads-win32/contributors.html
+ * 
+ *      This library is free software; you can redistribute it and/or
+ *      modify it under the terms of the GNU Lesser General Public
+ *      License as published by the Free Software Foundation; either
+ *      version 2 of the License, or (at your option) any later version.
+ * 
+ *      This library is distributed in the hope that it will be useful,
+ *      but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *      Lesser General Public License for more details.
+ * 
+ *      You should have received a copy of the GNU Lesser General Public
+ *      License along with this library in the file COPYING.LIB;
+ *      if not, write to the Free Software Foundation, Inc.,
+ *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+#ifndef _SCHED_H
+#define _SCHED_H
+
+#undef PTW32_LEVEL
+
+#if defined(_POSIX_SOURCE)
+#define PTW32_LEVEL 0
+/* Early POSIX */
+#endif
+
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309
+#undef PTW32_LEVEL
+#define PTW32_LEVEL 1
+/* Include 1b, 1c and 1d */
+#endif
+
+#if defined(INCLUDE_NP)
+#undef PTW32_LEVEL
+#define PTW32_LEVEL 2
+/* Include Non-Portable extensions */
+#endif
+
+#define PTW32_LEVEL_MAX 3
+
+#if !defined(PTW32_LEVEL)
+#define PTW32_LEVEL PTW32_LEVEL_MAX
+/* Include everything */
+#endif
+
+
+#if __GNUC__ && ! defined (__declspec)
+# error Please upgrade your GNU compiler to one that supports __declspec.
+#endif
+
+/*
+ * When building the DLL code, you should define PTW32_BUILD so that
+ * the variables/functions are exported correctly. When using the DLL,
+ * do NOT define PTW32_BUILD, and then the variables/functions will
+ * be imported correctly.
+ */
+#ifdef PTW32_BUILD
+# define PTW32_DLLPORT __declspec (dllexport)
+#else
+# define PTW32_DLLPORT __declspec (dllimport)
+#endif
+
+/*
+ * This is a duplicate of what is in the autoconf config.h,
+ * which is only used when building the pthread-win32 libraries.
+ */
+
+#ifndef PTW32_CONFIG_H
+#  if defined(WINCE)
+#    define NEED_ERRNO
+#    define NEED_SEM
+#  endif
+#  if defined(_UWIN) || defined(__MINGW32__)
+#    define HAVE_MODE_T
+#  endif
+#endif
+
+/*
+ *
+ */
+
+#if PTW32_LEVEL >= PTW32_LEVEL_MAX
+#ifdef NEED_ERRNO
+#include "need_errno.h"
+#else
+#include <errno.h>
+#endif
+#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
+
+#if defined(__MINGW32__) || defined(_UWIN)
+#if PTW32_LEVEL >= PTW32_LEVEL_MAX
+/* For pid_t */
+#  include <sys/types.h>
+/* Required by Unix 98 */
+#  include <time.h>
+#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
+#else
+typedef int pid_t;
+#endif
+
+/* Thread scheduling policies */
+
+enum {
+  SCHED_OTHER = 0,
+  SCHED_FIFO,
+  SCHED_RR,
+  SCHED_MIN   = SCHED_OTHER,
+  SCHED_MAX   = SCHED_RR
+};
+
+struct sched_param {
+  int sched_priority;
+};
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif                          /* __cplusplus */
+
+PTW32_DLLPORT int sched_yield (void);
+
+PTW32_DLLPORT int sched_get_priority_min (int policy);
+
+PTW32_DLLPORT int sched_get_priority_max (int policy);
+
+PTW32_DLLPORT int sched_setscheduler (pid_t pid, int policy);
+
+PTW32_DLLPORT int sched_getscheduler (pid_t pid);
+
+/*
+ * Note that this macro returns ENOTSUP rather than
+ * ENOSYS as might be expected. However, returning ENOSYS
+ * should mean that sched_get_priority_{min,max} are
+ * not implemented as well as sched_rr_get_interval.
+ * This is not the case, since we just don't support
+ * round-robin scheduling. Therefore I have chosen to
+ * return the same value as sched_setscheduler when
+ * SCHED_RR is passed to it.
+ */
+#define sched_rr_get_interval(_pid, _interval) \
+  ( errno = ENOTSUP, (int) -1 )
+
+
+#ifdef __cplusplus
+}                               /* End of extern "C" */
+#endif                          /* __cplusplus */
+
+#undef PTW32_LEVEL
+#undef PTW32_LEVEL_MAX
+
+#endif                          /* !_SCHED_H */
+
diff --git a/bacula/src/win32/compat/stdint.h b/bacula/src/win32/compat/stdint.h
new file mode 100644 (file)
index 0000000..7273fef
--- /dev/null
@@ -0,0 +1 @@
+#include "compat.h"
diff --git a/bacula/src/win32/compat/strings.h b/bacula/src/win32/compat/strings.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bacula/src/win32/compat/sys/file.h b/bacula/src/win32/compat/sys/file.h
new file mode 100644 (file)
index 0000000..3650805
--- /dev/null
@@ -0,0 +1,2 @@
+
+#include "compat.h"
diff --git a/bacula/src/win32/compat/sys/ioctl.h b/bacula/src/win32/compat/sys/ioctl.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bacula/src/win32/compat/sys/socket.h b/bacula/src/win32/compat/sys/socket.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bacula/src/win32/compat/sys/time.h b/bacula/src/win32/compat/sys/time.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bacula/src/win32/compat/sys/wait.h b/bacula/src/win32/compat/sys/wait.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bacula/src/win32/compat/syslog.h b/bacula/src/win32/compat/syslog.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/bacula/src/win32/compat/unistd.h b/bacula/src/win32/compat/unistd.h
new file mode 100644 (file)
index 0000000..7273fef
--- /dev/null
@@ -0,0 +1 @@
+#include "compat.h"
diff --git a/bacula/src/win32/compat/winconfig.h b/bacula/src/win32/compat/winconfig.h
new file mode 100644 (file)
index 0000000..e439f64
--- /dev/null
@@ -0,0 +1,622 @@
+/* src/config.h.  Generated by configure.  */
+/* autoconf/config.h.in.  Generated from autoconf/configure.in by autoheader.  */
+/* ------------------------------------------------------------------------- */
+/* --                     CONFIGURE SPECIFIED FEATURES                    -- */
+/* ------------------------------------------------------------------------- */
+
+/* Define if you want to use MySQL as Catalog database */
+/* #undef USE_MYSQL_DB */
+
+/* Define if you want SmartAlloc debug code enabled */
+#define SMARTALLOC 1
+
+/* Define to `int' if <sys/types.h> doesn't define.  */
+/* #undef daddr_t */
+
+/* Define to `int' if <sys/types.h> doesn't define.  */
+#define major_t int
+
+/* Define to `int' if <sys/types.h> doesn't define.  */
+#define minor_t int
+
+/* Define to `int' if <sys/types.h> doesn't define.  */
+/* #undef ssize_t */
+
+/* Define if you want to use MySQL */
+/* #undef HAVE_MYSQL */
+
+/* Defined if MySQL thread safe library is present */
+/* #undef HAVE_THREAD_SAFE_MYSQL */
+
+/* Define if you want to use embedded MySQL */
+/* #undef HAVE_EMBEDDED_MYSQL */
+
+/* Define if you want to use SQLite */
+/* #undef HAVE_SQLITE */
+
+/* Define if you want to use Berkeley DB */
+/* #undef HAVE_BERKELEY_DB */
+
+
+/* Define if you want to use PostgreSQL */
+/* #undef HAVE_PGSQL */
+
+/* Define if you want to use mSQL */
+/* #undef HAVE_MSQL */
+
+/* Define if you want to use iODBC */
+/* #undef HAVE_IODBC */
+
+/* Define if you want to use unixODBC */
+/* #undef HAVE_UNIXODBC */
+
+/* Define if you want to use Solid SQL Server */
+/* #undef HAVE_SOLID */
+
+/* Define if you want to use OpenLink ODBC (Virtuoso) */
+/* #undef HAVE_VIRT */
+
+/* Define if you want to use EasySoft ODBC */
+/* #undef HAVE_EASYSOFT */
+
+/* Define if you want to use Interbase SQL Server */
+/* #undef HAVE_IBASE */
+
+/* Define if you want to use Oracle 8 SQL Server */
+/* #undef HAVE_ORACLE8 */
+
+/* Define if you want to use Oracle 7 SQL Server */
+/* #undef HAVE_ORACLE7 */
+
+
+/* ------------------------------------------------------------------------- */
+/* --                     CONFIGURE DETECTED FEATURES                     -- */
+/* ------------------------------------------------------------------------- */
+
+/* Define if you need function prototypes */
+#define PROTOTYPES 1
+
+/* Define if you have XPointer typedef */
+/* #undef HAVE_XPOINTER */
+
+/* Define if you have _GNU_SOURCE getpt() */
+/* #undef HAVE_GETPT */
+
+/* Define if you have GCC */
+/* #undef HAVE_GCC 1 */
+
+/* Define if you have the Andrew File System.  */
+/* #undef AFS */
+
+/* Define If you want find -nouser and -nogroup to make tables of
+   used UIDs and GIDs at startup instead of using getpwuid or
+   getgrgid when needed.  Speeds up -nouser and -nogroup unless you
+   are running NIS or Hesiod, which make password and group calls
+   very expensive.  */
+/* #undef CACHE_IDS */
+
+/* Define to use SVR4 statvfs to get filesystem type.  */
+/* #undef FSTYPE_STATVFS */
+
+/* Define to use SVR3.2 statfs to get filesystem type.  */
+/* #undef FSTYPE_USG_STATFS */
+
+/* Define to use AIX3 statfs to get filesystem type.  */
+/* #undef FSTYPE_AIX_STATFS */
+
+/* Define to use 4.3BSD getmntent to get filesystem type.  */
+/* #undef FSTYPE_MNTENT 1 */
+
+/* Define to use 4.4BSD and OSF1 statfs to get filesystem type.  */
+/* #undef FSTYPE_STATFS */
+
+/* Define to use Ultrix getmnt to get filesystem type.  */
+/* #undef FSTYPE_GETMNT */
+
+/* Define to `unsigned long' if <sys/types.h> doesn't define.  */
+/* #undef dev_t */
+
+/* Define to `unsigned long' if <sys/types.h> doesn't define.  */
+/* #undef ino_t */
+
+/* Define to 1 if utime.h exists and declares struct utimbuf.  */
+/* #undef HAVE_UTIME_H 1 */
+
+#if (HAVE_MYSQL||HAVE_PGSQL||HAVE_MSQL||HAVE_IODBC||HAVE_UNIXODBC||HAVE_SOLID||HAVE_VIRT||HAVE_IBASE||HAVE_ORACLE8||HAVE_ORACLE7||HAVE_EASYSOFT)
+#define HAVE_SQL
+#endif
+
+/* Data types */
+#define HAVE_U_INT 1
+#define HAVE_INTXX_T 1
+#define HAVE_U_INTXX_T 1
+/* #undef HAVE_UINTXX_T */
+#define HAVE_INT64_T 1
+#define HAVE_U_INT64_T 1
+#define HAVE_INTMAX_T 1
+/* #undef HAVE_U_INTMAX_T */
+
+/* Define if you want TCP Wrappers support */
+/* #undef HAVE_LIBWRAP */
+
+/* Define if you have sys/bitypes.h */
+/* #undef HAVE_SYS_BITYPES_H */
+
+/* Directory for PID files */
+#define _PATH_BACULA_PIDDIR "/var/run"
+
+/* Define if you have zlib */
+#define HAVE_LIBZ 1 
+
+/* General libs */
+/* #undef LIBS */
+
+/* File daemon specif libraries */
+#define FDLIBS 1
+
+/* Path to Sendmail program */
+/* #undef SENDMAIL_PATH */
+
+/* What kind of signals we have */
+/*#define HAVE_POSIX_SIGNALS 1 */
+/* #undef HAVE_BSD_SIGNALS */
+/* #undef HAVE_USG_SIGHOLD */
+
+/* Operating systems */
+/* OSes */
+/* #undef HAVE_LINUX_OS */
+/* #undef HAVE_FREEBSD_OS */
+/* #undef HAVE_NETBSD_OS */
+/* #undef HAVE_OPENBSD_OS */
+/* #undef HAVE_BSDI_OS */
+/* #undef HAVE_HPUX_OS */
+/* #undef HAVE_SUN_OS */
+/* #undef HAVE_IRIX_OS */
+/* #undef HAVE_AIX_OS */
+/* #undef HAVE_SGI_OS */
+/* #define HAVE_CYGWIN 1 */
+/* #undef HAVE_OSF1_OS */
+/* #undef HAVE_DARWIN_OS */
+
+/* Set to correct scanf value for long long int */
+#define lld "lld"
+#define llu "llu"
+
+/*#define HAVE_READLINE 1 */
+
+/* #undef HAVE_GMP */
+
+/* #undef HAVE_CWEB */
+
+/* #define HAVE_FCHDIR 1 */
+
+/* #undef HAVE_GETOPT_LONG */
+
+/* #undef HAVE_LIBSM */
+
+/* Check for thread safe routines */
+/*#define HAVE_LOCALTIME_R 1 */
+/* #undef HAVE_READDIR_R */
+/*#define HAVE_STRERROR_R 1*/
+/* #undef HAVE_GETHOSTBYNAME_R */
+
+#define HAVE_STRTOLL 1
+/* #undef HAVE_INET_PTON */
+
+/*#define HAVE_SOCKLEN_T 1 */
+
+/* #undef HAVE_OLD_SOCKOPT */
+
+/* #undef HAVE_BIGENDIAN */
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+/* #undef CLOSEDIR_VOID */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#define HAVE_ALLOCA 1
+#define alloca _alloca
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#define HAVE_ALLOCA_H 1
+
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+/*#define HAVE_ARPA_NAMESER_H 1 */
+
+/* Define to 1 if you have the <assert.h> header file. */
+#define HAVE_ASSERT_H 1
+
+/* Define to 1 if you have the `chflags' function. */
+/* #undef HAVE_CHFLAGS */
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Define to 1 if you have the `fchdir' function. */
+/*#define HAVE_FCHDIR 1 */
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if your system has a working POSIX `fnmatch' function. */
+/*#define HAVE_FNMATCH 1 */
+
+/* Define to 1 if you have the `fork' function. */
+/*#define HAVE_FORK 1 */
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the `getdomainname' function. */
+/*#define HAVE_GETDOMAINNAME 1 */
+
+/* Define to 1 if you have the `gethostbyname_r' function. */
+/* #undef HAVE_GETHOSTBYNAME_R */
+
+/* Define to 1 if you have the `gethostid' function. */
+#define HAVE_GETHOSTID 1
+
+/* Define to 1 if you have the `gethostname' function. */
+#define HAVE_GETHOSTNAME 1
+
+/* Define to 1 if you have the `getmntent' function. */
+/*#define HAVE_GETMNTENT 1 */
+
+/* Define to 1 if you have the `getpid' function. */
+#define HAVE_GETPID 1
+#define getpid _getpid
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <grp.h> header file. */
+/*#define HAVE_GRP_H 1*/
+
+/* Define to 1 if you have the `inet_pton' function. */
+/* #undef HAVE_INET_PTON */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `lchown' function. */
+#define HAVE_LCHOWN 1
+
+/* Define to 1 if you have the <libc.h> header file. */
+/* #undef HAVE_LIBC_H */
+
+/* Define to 1 if you have the `inet' library (-linet). */
+/* #undef HAVE_LIBINET */
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+/* #undef HAVE_LIBNSL */
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
+/* #undef HAVE_LIBRESOLV */
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Define to 1 if you have the `sun' library (-lsun). */
+/* #undef HAVE_LIBSUN */
+
+/* Define to 1 if you have the `xnet' library (-lxnet). */
+/* #undef HAVE_LIBXNET */
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the `localtime_r' function. */
+#define HAVE_LOCALTIME_R 1
+
+/* Define to 1 if you have the `lstat' function. */
+#define HAVE_LSTAT 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <mtio.h> header file. */
+/* #undef HAVE_MTIO_H */
+
+/* Define to 1 if you have the `nanosleep' function. */
+#define HAVE_NANOSLEEP 1
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* Define to 1 if you have the <pwd.h> header file. */
+/*#define HAVE_PWD_H 1*/
+
+/* Define to 1 if you have the `readdir_r' function. */
+/* #undef HAVE_READDIR_R */
+
+/* Define to 1 if you have the <resolv.h> header file. */
+/*#define HAVE_RESOLV_H 1*/
+
+/* Define to 1 if you have the `select' function. */
+#define HAVE_SELECT 1
+
+/* Define to 1 if you have the `setenv' function. */
+#define HAVE_SETENV 1
+
+/* Define to 1 if you have the `setlocale' function. */
+#define HAVE_SETLOCALE 1
+
+/* Define to 1 if you have the `setpgid' function. */
+#define HAVE_SETPGID 1
+
+/* Define to 1 if you have the `setpgrp' function. */
+#define HAVE_SETPGRP 1
+
+/* Define to 1 if you have the `setsid' function. */
+#define HAVE_SETSID 1
+
+/* Define to 1 if you have the `signal' function. */
+/*#define HAVE_SIGNAL 1 */
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1 
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+/*#define HAVE_STDARG_H 1*/
+
+/* Define to 1 if you have the <stdint.h> header file. */
+/*#define HAVE_STDINT_H 1 */
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+#define HAVE_STRERROR_R 1
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strncmp' function. */
+#define HAVE_STRNCMP 1
+
+/* Define to 1 if you have the `strncpy' function. */
+#define HAVE_STRNCPY 1
+
+/* Define to 1 if you have the `strtoll' function. */
+#define HAVE_STRTOLL 1
+
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
+
+/* Define to 1 if `st_blocks' is member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_BLOCKS 1
+
+/* Define to 1 if `st_rdev' is member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_RDEV 1
+
+/* Define to 1 if `tm_zone' is member of `struct tm'. */
+/* #undef HAVE_STRUCT_TM_TM_ZONE */
+
+/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use
+   `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */
+#define HAVE_ST_BLKSIZE 1
+
+/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
+   `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
+#define HAVE_ST_BLOCKS 1
+
+/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use
+   `HAVE_STRUCT_STAT_ST_RDEV' instead. */
+#define HAVE_ST_RDEV 1
+
+/* Define to 1 if you have the <sys/byteorder.h> header file. */
+/* #undef HAVE_SYS_BYTEORDER_H */
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/mtio.h> header file. */
+#define HAVE_SYS_MTIO_H 1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+/* #undef HAVE_SYS_SOCKIO_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the `tcgetattr' function. */
+#define HAVE_TCGETATTR 1
+
+/* Define to 1 if you have the <termios.h> header file. */
+#define HAVE_TERMIOS_H 1
+
+/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+   `HAVE_STRUCT_TM_TM_ZONE' instead. */
+/* #undef HAVE_TM_ZONE */
+
+/* Define to 1 if you don't have `tm_zone' but do have the external array
+   `tzname'. */
+#define HAVE_TZNAME 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <varargs.h> header file. */
+/* #undef HAVE_VARARGS_H */
+
+/* Define to 1 if you have the `vfprintf' function. */
+#define HAVE_VFPRINTF 1
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#define HAVE_VSNPRINTF 1
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#define HAVE_ZLIB_H 1
+
+/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
+   */
+/* #undef MAJOR_IN_MKDEV */
+
+/* Define to 1 if `major', `minor', and `makedev' are declared in
+   <sysmacros.h>. */
+/* #undef MAJOR_IN_SYSMACROS */
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+/* #undef NO_MINUS_C_MINUS_O */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* Define to 1 if the `setpgrp' function takes no argument. */
+#define SETPGRP_VOID 1
+
+/* The size of a `char', as computed by sizeof. */
+#define SIZEOF_CHAR 1
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `int *', as computed by sizeof. */
+#define SIZEOF_INT_P 4
+
+/* The size of a `long int', as computed by sizeof. */
+#define SIZEOF_LONG_INT 4
+
+/* The size of a `long long int', as computed by sizeof. */
+#define SIZEOF_LONG_LONG_INT 8
+
+/* The size of a `short int', as computed by sizeof. */
+#define SIZEOF_SHORT_INT 2
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at run-time.
+        STACK_DIRECTION > 0 => grows toward higher addresses
+        STACK_DIRECTION < 0 => grows toward lower addresses
+        STACK_DIRECTION = 0 => direction of growth unknown */
+/* #undef STACK_DIRECTION */
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+/* #undef STAT_MACROS_BROKEN */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* #undef TM_IN_SYS_TIME */
+
+/* Define to 1 if the X Window System is missing or not being used. */
+/* #undef X_DISPLAY_MISSING */
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define to make fseeko etc. visible, on some hosts. */
+/* #undef _LARGEFILE_SOURCE */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `long' if <sys/types.h> does not define. */
+/* #undef daddr_t */
+
+/* Define to `unsigned long' if <sys/types.h> does not define. */
+/* #undef dev_t */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+/* #undef gid_t */
+
+/* Define to `unsigned long' if <sys/types.h> does not define. */
+/* #undef ino_t */
+
+/* Define to `int' if <sys/types.h> does not define. */
+#define major_t int
+
+/* Define to `int' if <sys/types.h> does not define. */
+#define minor_t int
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef mode_t */
+
+/* Define to `long' if <sys/types.h> does not define. */
+/* #undef off_t */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef pid_t */
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef ssize_t */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+/* #undef uid_t */
diff --git a/bacula/src/win32/compat/winhost.h b/bacula/src/win32/compat/winhost.h
new file mode 100644 (file)
index 0000000..4fe7307
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Define Host machine
+ *
+ *  Version $Id$
+ *
+ */
+/*
+   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2 of
+   the License, or (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public
+   License along with this program; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+   MA 02111-1307, USA.
+
+ */
+
+extern char WIN_VERSION_LONG[];
+extern char WIN_VERSION[];
+
+#define HOST_OS  WIN_VERSION_LONG
+#define DISTNAME "MVS"
+#define DISTVER  WIN_VERSION
diff --git a/bacula/src/win32/console/ReadMe.txt b/bacula/src/win32/console/ReadMe.txt
new file mode 100644 (file)
index 0000000..514964e
--- /dev/null
@@ -0,0 +1,34 @@
+========================================================================
+       CONSOLE APPLICATION : console
+========================================================================
+
+
+AppWizard has created this console application for you.  
+
+This file contains a summary of what you will find in each of the files that
+make up your console application.
+
+console.dsp
+    This file (the project file) contains information at the project level and
+    is used to build a single project or subproject. Other users can share the
+    project (.dsp) file, but they should export the makefiles locally.
+
+console.cpp
+    This is the main application source file.
+
+
+/////////////////////////////////////////////////////////////////////////////
+Other standard files:
+
+StdAfx.h, StdAfx.cpp
+    These files are used to build a precompiled header (PCH) file
+    named console.pch and a precompiled types file named StdAfx.obj.
+
+
+/////////////////////////////////////////////////////////////////////////////
+Other notes:
+
+AppWizard uses "TODO:" to indicate parts of the source code you
+should add to or customize.
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/bacula/src/win32/console/StdAfx.cpp b/bacula/src/win32/console/StdAfx.cpp
new file mode 100644 (file)
index 0000000..9d9c168
--- /dev/null
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+//     console.pch will be the pre-compiled header
+//     stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/bacula/src/win32/console/StdAfx.h b/bacula/src/win32/console/StdAfx.h
new file mode 100644 (file)
index 0000000..91cd457
--- /dev/null
@@ -0,0 +1,19 @@
+// stdafx.h : include file for standard system include files,
+//  or project specific include files that are used frequently, but
+//      are changed infrequently
+//
+
+#if !defined(AFX_STDAFX_H__35C63B87_45EF_4CD3_AFE9_2E4597342185__INCLUDED_)
+#define AFX_STDAFX_H__35C63B87_45EF_4CD3_AFE9_2E4597342185__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+
+// TODO: reference additional headers your program requires here
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__35C63B87_45EF_4CD3_AFE9_2E4597342185__INCLUDED_)
diff --git a/bacula/src/win32/console/console.cpp b/bacula/src/win32/console/console.cpp
new file mode 100644 (file)
index 0000000..f933569
--- /dev/null
@@ -0,0 +1,10 @@
+// console.cpp : Defines the entry point for the console application.
+//
+
+#include "stdafx.h"
+
+
+int main(int argc, char* argv[])
+{
+       return 0;
+}
diff --git a/bacula/src/win32/console/console.dsp b/bacula/src/win32/console/console.dsp
new file mode 100644 (file)
index 0000000..0f76770
--- /dev/null
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="console" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
+\r
+CFG=console - Win32 Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "console.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "console.mak" CFG="console - Win32 Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "console - Win32 Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "console - Win32 Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+RSC=rc.exe\r
+\r
+!IF  "$(CFG)" == "console - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release"\r
+# PROP BASE Intermediate_Dir "Release"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release"\r
+# PROP Intermediate_Dir "Release"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c\r
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
+\r
+!ELSEIF  "$(CFG)" == "console - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug"\r
+# PROP BASE Intermediate_Dir "Debug"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug"\r
+# PROP Intermediate_Dir "Debug"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ  /c\r
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ  /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
+# ADD RSC /l 0x409 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "console - Win32 Release"\r
+# Name "console - Win32 Debug"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+# Begin Source File\r
+\r
+SOURCE=.\console.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\StdAfx.cpp\r
+# ADD CPP /Yc"stdafx.h"\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files"\r
+\r
+# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
+# Begin Source File\r
+\r
+SOURCE=.\StdAfx.h\r
+# End Source File\r
+# End Group\r
+# Begin Group "Resource Files"\r
+\r
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+# End Group\r
+# Begin Source File\r
+\r
+SOURCE=.\ReadMe.txt\r
+# End Source File\r
+# End Target\r
+# End Project\r
diff --git a/bacula/src/win32/console/console.dsw b/bacula/src/win32/console/console.dsw
new file mode 100644 (file)
index 0000000..089fc6c
--- /dev/null
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00\r
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
+\r
+###############################################################################\r
+\r
+Project: "console"=.\console.dsp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
+Global:\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<3>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
diff --git a/bacula/src/win32/filed/authenticate.cpp b/bacula/src/win32/filed/authenticate.cpp
new file mode 100644 (file)
index 0000000..ed619b1
--- /dev/null
@@ -0,0 +1 @@
+#include "../../filed/authenticate.c"
diff --git a/bacula/src/win32/filed/backup.cpp b/bacula/src/win32/filed/backup.cpp
new file mode 100644 (file)
index 0000000..f86d25d
--- /dev/null
@@ -0,0 +1 @@
+#include "../../filed/backup.c"
diff --git a/bacula/src/win32/filed/estimate.cpp b/bacula/src/win32/filed/estimate.cpp
new file mode 100644 (file)
index 0000000..6563a7d
--- /dev/null
@@ -0,0 +1 @@
+#include "../../filed/estimate.c"
diff --git a/bacula/src/win32/filed/filed.cpp b/bacula/src/win32/filed/filed.cpp
new file mode 100644 (file)
index 0000000..f3b9ae0
--- /dev/null
@@ -0,0 +1 @@
+#include "../../filed/filed.c"
diff --git a/bacula/src/win32/filed/filed_conf.cpp b/bacula/src/win32/filed/filed_conf.cpp
new file mode 100644 (file)
index 0000000..a08eaf8
--- /dev/null
@@ -0,0 +1 @@
+#include "../../filed/filed_conf.c"
diff --git a/bacula/src/win32/filed/heartbeat.cpp b/bacula/src/win32/filed/heartbeat.cpp
new file mode 100644 (file)
index 0000000..6ac2850
--- /dev/null
@@ -0,0 +1 @@
+#include "../../filed/heartbeat.c"
diff --git a/bacula/src/win32/filed/job.cpp b/bacula/src/win32/filed/job.cpp
new file mode 100644 (file)
index 0000000..13c0b14
--- /dev/null
@@ -0,0 +1 @@
+#include "../../filed/job.c"
diff --git a/bacula/src/win32/filed/restore.cpp b/bacula/src/win32/filed/restore.cpp
new file mode 100644 (file)
index 0000000..927715a
--- /dev/null
@@ -0,0 +1 @@
+#include "../../filed/restore.c"
diff --git a/bacula/src/win32/filed/status.cpp b/bacula/src/win32/filed/status.cpp
new file mode 100644 (file)
index 0000000..9e17cd4
--- /dev/null
@@ -0,0 +1 @@
+#include "../../filed/status.c"
diff --git a/bacula/src/win32/filed/verify.cpp b/bacula/src/win32/filed/verify.cpp
new file mode 100644 (file)
index 0000000..da8d244
--- /dev/null
@@ -0,0 +1 @@
+#include "../../filed/verify.c"
diff --git a/bacula/src/win32/filed/verify_vol.cpp b/bacula/src/win32/filed/verify_vol.cpp
new file mode 100644 (file)
index 0000000..1c0767c
--- /dev/null
@@ -0,0 +1 @@
+#include "../../filed/verify_vol.c"
diff --git a/bacula/src/win32/findlib/attribs.cpp b/bacula/src/win32/findlib/attribs.cpp
new file mode 100644 (file)
index 0000000..b015eba
--- /dev/null
@@ -0,0 +1 @@
+#include "../../findlib/attribs.c"
diff --git a/bacula/src/win32/findlib/bfile.cpp b/bacula/src/win32/findlib/bfile.cpp
new file mode 100644 (file)
index 0000000..a60930b
--- /dev/null
@@ -0,0 +1 @@
+#include "../../findlib/bfile.c"
diff --git a/bacula/src/win32/findlib/create_file.cpp b/bacula/src/win32/findlib/create_file.cpp
new file mode 100644 (file)
index 0000000..7e7cf94
--- /dev/null
@@ -0,0 +1 @@
+#include "../../findlib/create_file.c"
diff --git a/bacula/src/win32/findlib/enable_priv.cpp b/bacula/src/win32/findlib/enable_priv.cpp
new file mode 100644 (file)
index 0000000..14bce31
--- /dev/null
@@ -0,0 +1 @@
+#include "../../findlib/enable_priv.c"
diff --git a/bacula/src/win32/findlib/find.cpp b/bacula/src/win32/findlib/find.cpp
new file mode 100644 (file)
index 0000000..b610c30
--- /dev/null
@@ -0,0 +1 @@
+#include "../../findlib/find.c"
diff --git a/bacula/src/win32/findlib/find_one.cpp b/bacula/src/win32/findlib/find_one.cpp
new file mode 100644 (file)
index 0000000..8a45ee1
--- /dev/null
@@ -0,0 +1 @@
+#include "../../findlib/find_one.c"
diff --git a/bacula/src/win32/findlib/makepath.cpp b/bacula/src/win32/findlib/makepath.cpp
new file mode 100644 (file)
index 0000000..2030466
--- /dev/null
@@ -0,0 +1 @@
+#include "../../findlib/makepath.c"
diff --git a/bacula/src/win32/findlib/match.cpp b/bacula/src/win32/findlib/match.cpp
new file mode 100644 (file)
index 0000000..8690e80
--- /dev/null
@@ -0,0 +1 @@
+#include "../../findlib/match.c"
diff --git a/bacula/src/win32/findlib/save-cwd.cpp b/bacula/src/win32/findlib/save-cwd.cpp
new file mode 100644 (file)
index 0000000..64da93a
--- /dev/null
@@ -0,0 +1 @@
+#include "../../findlib/save-cwd.c"
diff --git a/bacula/src/win32/findlib/winapi.cpp b/bacula/src/win32/findlib/winapi.cpp
new file mode 100644 (file)
index 0000000..3690c26
--- /dev/null
@@ -0,0 +1 @@
+#include "../../findlib/winapi.c"
diff --git a/bacula/src/win32/lib/alist.cpp b/bacula/src/win32/lib/alist.cpp
new file mode 100644 (file)
index 0000000..ce201a1
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/alist.c"
diff --git a/bacula/src/win32/lib/alloc.cpp b/bacula/src/win32/lib/alloc.cpp
new file mode 100644 (file)
index 0000000..cf28ee3
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/alloc.c"
diff --git a/bacula/src/win32/lib/attr.cpp b/bacula/src/win32/lib/attr.cpp
new file mode 100644 (file)
index 0000000..46b9e42
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/attr.c"
diff --git a/bacula/src/win32/lib/base64.cpp b/bacula/src/win32/lib/base64.cpp
new file mode 100644 (file)
index 0000000..fbd9e39
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/base64.c"
diff --git a/bacula/src/win32/lib/bget_msg.cpp b/bacula/src/win32/lib/bget_msg.cpp
new file mode 100644 (file)
index 0000000..f034b28
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/bget_msg.c"
diff --git a/bacula/src/win32/lib/bnet.cpp b/bacula/src/win32/lib/bnet.cpp
new file mode 100644 (file)
index 0000000..271a8f1
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/bnet.c"
diff --git a/bacula/src/win32/lib/bnet_pkt.cpp b/bacula/src/win32/lib/bnet_pkt.cpp
new file mode 100644 (file)
index 0000000..e1f2d96
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/bnet_pkt.c"
diff --git a/bacula/src/win32/lib/bnet_server.cpp b/bacula/src/win32/lib/bnet_server.cpp
new file mode 100644 (file)
index 0000000..bc42946
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/bnet_server.c"
diff --git a/bacula/src/win32/lib/bpipe.cpp b/bacula/src/win32/lib/bpipe.cpp
new file mode 100644 (file)
index 0000000..aa4d824
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/bpipe.c"
diff --git a/bacula/src/win32/lib/bshm.cpp b/bacula/src/win32/lib/bshm.cpp
new file mode 100644 (file)
index 0000000..3f30bd4
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/bshm.c"
diff --git a/bacula/src/win32/lib/bsys.cpp b/bacula/src/win32/lib/bsys.cpp
new file mode 100644 (file)
index 0000000..2778af4
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/bsys.c"
diff --git a/bacula/src/win32/lib/btime.cpp b/bacula/src/win32/lib/btime.cpp
new file mode 100644 (file)
index 0000000..9d59aa6
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/btime.c"
diff --git a/bacula/src/win32/lib/cram-md5.cpp b/bacula/src/win32/lib/cram-md5.cpp
new file mode 100644 (file)
index 0000000..0eac611
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/cram-md5.c"
diff --git a/bacula/src/win32/lib/crc32.cpp b/bacula/src/win32/lib/crc32.cpp
new file mode 100644 (file)
index 0000000..34f8178
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/crc32.c"
diff --git a/bacula/src/win32/lib/daemon.cpp b/bacula/src/win32/lib/daemon.cpp
new file mode 100644 (file)
index 0000000..4a28142
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/daemon.c"
diff --git a/bacula/src/win32/lib/dlist.cpp b/bacula/src/win32/lib/dlist.cpp
new file mode 100644 (file)
index 0000000..7b158a6
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/dlist.c"
diff --git a/bacula/src/win32/lib/edit.cpp b/bacula/src/win32/lib/edit.cpp
new file mode 100644 (file)
index 0000000..63d9bc1
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/edit.c"
diff --git a/bacula/src/win32/lib/events.cpp b/bacula/src/win32/lib/events.cpp
new file mode 100644 (file)
index 0000000..3539ce3
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/events.c"
diff --git a/bacula/src/win32/lib/fnmatch.cpp b/bacula/src/win32/lib/fnmatch.cpp
new file mode 100644 (file)
index 0000000..0bbb4e1
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/fnmatch.c"
diff --git a/bacula/src/win32/lib/hmac.cpp b/bacula/src/win32/lib/hmac.cpp
new file mode 100644 (file)
index 0000000..5f36052
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/hmac.c"
diff --git a/bacula/src/win32/lib/htable.cpp b/bacula/src/win32/lib/htable.cpp
new file mode 100644 (file)
index 0000000..c971a4b
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/htable.c"
diff --git a/bacula/src/win32/lib/idcache.cpp b/bacula/src/win32/lib/idcache.cpp
new file mode 100644 (file)
index 0000000..33e024f
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/idcache.c"
diff --git a/bacula/src/win32/lib/jcr.cpp b/bacula/src/win32/lib/jcr.cpp
new file mode 100644 (file)
index 0000000..bad09a8
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/jcr.c"
diff --git a/bacula/src/win32/lib/lex.cpp b/bacula/src/win32/lib/lex.cpp
new file mode 100644 (file)
index 0000000..70f60d3
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/lex.c"
diff --git a/bacula/src/win32/lib/md5.cpp b/bacula/src/win32/lib/md5.cpp
new file mode 100644 (file)
index 0000000..47f1571
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/md5.c"
diff --git a/bacula/src/win32/lib/mem_pool.cpp b/bacula/src/win32/lib/mem_pool.cpp
new file mode 100644 (file)
index 0000000..1faf062
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/mem_pool.c"
diff --git a/bacula/src/win32/lib/message.cpp b/bacula/src/win32/lib/message.cpp
new file mode 100644 (file)
index 0000000..d7c94f8
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/message.c"
diff --git a/bacula/src/win32/lib/parse_conf.cpp b/bacula/src/win32/lib/parse_conf.cpp
new file mode 100644 (file)
index 0000000..2e922a0
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/parse_conf.c"
diff --git a/bacula/src/win32/lib/queue.cpp b/bacula/src/win32/lib/queue.cpp
new file mode 100644 (file)
index 0000000..eb37587
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/queue.c"
diff --git a/bacula/src/win32/lib/rwlock.cpp b/bacula/src/win32/lib/rwlock.cpp
new file mode 100644 (file)
index 0000000..771a1bd
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/rwlock.c"
diff --git a/bacula/src/win32/lib/scan.cpp b/bacula/src/win32/lib/scan.cpp
new file mode 100644 (file)
index 0000000..6a40c6b
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/scan.c"
diff --git a/bacula/src/win32/lib/semlock.cpp b/bacula/src/win32/lib/semlock.cpp
new file mode 100644 (file)
index 0000000..dde33f4
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/semlock.c"
diff --git a/bacula/src/win32/lib/serial.cpp b/bacula/src/win32/lib/serial.cpp
new file mode 100644 (file)
index 0000000..4eb411b
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/serial.c"
diff --git a/bacula/src/win32/lib/sha1.cpp b/bacula/src/win32/lib/sha1.cpp
new file mode 100644 (file)
index 0000000..4fab5bc
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/sha1.c"
diff --git a/bacula/src/win32/lib/signal.cpp b/bacula/src/win32/lib/signal.cpp
new file mode 100644 (file)
index 0000000..107bae0
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/signal.c"
diff --git a/bacula/src/win32/lib/smartall.cpp b/bacula/src/win32/lib/smartall.cpp
new file mode 100644 (file)
index 0000000..9811b10
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/smartall.c"
diff --git a/bacula/src/win32/lib/tree.cpp b/bacula/src/win32/lib/tree.cpp
new file mode 100644 (file)
index 0000000..287e256
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/tree.c"
diff --git a/bacula/src/win32/lib/util.cpp b/bacula/src/win32/lib/util.cpp
new file mode 100644 (file)
index 0000000..787cd2d
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/util.c"
diff --git a/bacula/src/win32/lib/var.cpp b/bacula/src/win32/lib/var.cpp
new file mode 100644 (file)
index 0000000..7cbc98a
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/var.c"
diff --git a/bacula/src/win32/lib/watchdog.cpp b/bacula/src/win32/lib/watchdog.cpp
new file mode 100644 (file)
index 0000000..b683475
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/watchdog.c"
diff --git a/bacula/src/win32/lib/workq.cpp b/bacula/src/win32/lib/workq.cpp
new file mode 100644 (file)
index 0000000..023edb2
--- /dev/null
@@ -0,0 +1 @@
+#include "../../lib/workq.c"
diff --git a/bacula/src/win32/util.nsh b/bacula/src/win32/util.nsh
new file mode 100644 (file)
index 0000000..7477d03
--- /dev/null
@@ -0,0 +1,95 @@
+; GetWindowsVersion
+ ;
+ ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
+ ; Returns on top of stack
+ ;
+ ; Windows Version (95, 98, ME, NT x.x, 2000, XP, .NET Server)
+ ; or
+ ; '' (Unknown Windows Version)
+ ;
+ ; Usage:
+ ;   Call GetWindowsVersion
+ ;   Pop $R0
+ ;   ; at this point $R0 is "NT 4.0" or whatnot
+
+
+ Function IsNT
+   Push $R0
+   Push $R1
+   ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
+   StrCmp $R0 "" 0 lbl_winnt
+
+   StrCpy $R0 'false'
+   Goto lbl_done
+
+   lbl_winnt:
+    Strcpy $R0 'true'
+
+   lbl_done:
+   Pop $R1
+   Exch $R0
+ FunctionEnd
+ Function GetWindowsVersion
+   Push $R0
+   Push $R1
+   ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
+   StrCmp $R0 "" 0 lbl_winnt
+   ; we are not NT.
+   ReadRegStr $R0 HKLM SOFTWARE\Microsoft\Windows\CurrentVersion VersionNumber
+
+   StrCpy $R1 $R0 1
+   StrCmp $R1 '4' 0 lbl_error
+
+   StrCpy $R1 $R0 3
+
+   StrCmp $R1 '4.0' lbl_win32_95
+   StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
+
+   lbl_win32_95:
+     StrCpy $R0 '95'
+   Goto lbl_done
+
+   lbl_win32_98:
+     StrCpy $R0 '98'
+   Goto lbl_done
+
+   lbl_win32_ME:
+     StrCpy $R0 'ME'
+   Goto lbl_done
+
+   lbl_winnt:
+
+     StrCpy $R1 $R0 1
+
+     StrCmp $R1 '3' lbl_winnt_x
+     StrCmp $R1 '4' lbl_winnt_x
+
+     StrCpy $R1 $R0 3
+
+     StrCmp $R1 '5.0' lbl_winnt_2000
+     StrCmp $R1 '5.1' lbl_winnt_XP
+     StrCmp $R1 '5.2' lbl_winnt_dotNET lbl_error
+
+     lbl_winnt_x:
+       StrCpy $R0 "NT $R0" 6
+     Goto lbl_done
+
+     lbl_winnt_2000:
+       Strcpy $R0 '2000'
+     Goto lbl_done
+
+     lbl_winnt_XP:
+       Strcpy $R0 'XP'
+     Goto lbl_done
+
+     lbl_winnt_dotNET:
+       Strcpy $R0 '.NET Server'
+     Goto lbl_done
+
+   lbl_error:
+     Strcpy $R0 ''
+   lbl_done:
+   Pop $R1
+   Exch $R0
+ FunctionEnd