]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/bextract.c
Apply patch from Richard Mortimer to ensure that the number
[bacula/bacula] / bacula / src / stored / bextract.c
index 4d1cf2051d1c2fb84264cb29ae5ab6621346de63..8251f90e61f73f32f48a79a3374abbda7d4a0aac 100644 (file)
 #include "stored.h"
 #include "findlib/find.h"
 
-#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32)
-int win32_client = 1;
-#else
-int win32_client = 0;
-#endif
-
 static void do_extract(char *fname);
 static bool record_cb(DCR *dcr, DEV_RECORD *rec);
 
@@ -67,7 +61,7 @@ pthread_cond_t wait_device_release = PTHREAD_COND_INITIALIZER;
 static void usage()
 {
    fprintf(stderr, _(
-"Copyright (C) 2000-2005 Kern Sibbald.\n"
+"Copyright (C) 2000-%s Kern Sibbald.\n"
 "\nVersion: %s (%s)\n\n"
 "Usage: bextract <options> <bacula-archive-device-name> <directory-to-store-files>\n"
 "       -b <file>       specify a bootstrap file\n"
@@ -78,7 +72,7 @@ static void usage()
 "       -p              proceed inspite of I/O errors\n"
 "       -v              verbose\n"
 "       -V <volumes>    specify Volume names (separated by |)\n"
-"       -?              print this message\n\n"), VERSION, BDATE);
+"       -?              print this message\n\n"), BYEAR, VERSION, BDATE);
    exit(1);
 }
 
@@ -98,6 +92,8 @@ int main (int argc, char *argv[])
    my_name_is(argc, argv, "bextract");
    init_msg(NULL, NULL);              /* setup message handler */
 
+   OSDependentInit();
+
    ff = init_find_files();
    binit(&bfd);
 
@@ -122,7 +118,7 @@ int main (int argc, char *argv[])
          break;
 
       case 'e':                    /* exclude list */
-         if ((fd = fopen(optarg, "r")) == NULL) {
+         if ((fd = fopen(optarg, "rb")) == NULL) {
             berrno be;
             Pmsg2(0, _("Could not open exclude file: %s, ERR=%s\n"),
                optarg, be.strerror());
@@ -137,7 +133,7 @@ int main (int argc, char *argv[])
          break;
 
       case 'i':                    /* include list */
-         if ((fd = fopen(optarg, "r")) == NULL) {
+         if ((fd = fopen(optarg, "rb")) == NULL) {
             berrno be;
             Pmsg2(0, _("Could not open include file: %s, ERR=%s\n"),
                optarg, be.strerror());