]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/findlib/match.c
Fix header file includes.
[bacula/bacula] / bacula / src / findlib / match.c
index 27014d54b5e465986354a539e3ecea27dee444e7..2e5bc262407655b0c1e7a433b86fbc85eab575e7 100644 (file)
    Copyright (C) 2001-2005 Kern Sibbald
 
    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.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    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.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
@@ -44,7 +39,7 @@
 #endif
 
 /* Fold case in fnmatch() on Win32 */
-#ifdef WIN32
+#ifdef HAVE_WIN32
 static const int fnmode = FNM_CASEFOLD;
 #else
 static const int fnmode = 0;
@@ -54,7 +49,6 @@ static const int fnmode = 0;
 #undef bmalloc
 #define bmalloc(x) sm_malloc(__FILE__, __LINE__, x)
 
-extern const int win32_client;
 
 int
 match_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt, bool), void *his_pkt)
@@ -185,8 +179,11 @@ void add_fname_to_include_list(FF_PKT *ff, int prefixed, const char *fname)
             inc->level = *++rp - '0';
             Dmsg1(200, "Compression level=%d\n", inc->level);
             break;
+         case 'K':
+            inc->options |= FO_NOATIME;
+            break;
          default:
-            Emsg1(M_ERROR, 0, "Unknown include/exclude option: %c\n", *rp);
+            Emsg1(M_ERROR, 0, _("Unknown include/exclude option: %c\n"), *rp);
             break;
          }
       }
@@ -215,7 +212,7 @@ void add_fname_to_include_list(FF_PKT *ff, int prefixed, const char *fname)
          break;
       }
    }
-#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32)
+#if defined(HAVE_WIN32)
    /* Convert any \'s into /'s */
    for (p=inc->fname; *p; p++) {
       if (*p == '\\') {
@@ -249,7 +246,7 @@ void add_fname_to_exclude_list(FF_PKT *ff, const char *fname)
 
    Dmsg1(20, "Add name to exclude: %s\n", fname);
 
-#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32)
+#if defined(HAVE_WIN32)
    if (strchr(fname, '/') || strchr(fname, '\\')) {
 #else
    if (strchr(fname, '/')) {
@@ -265,7 +262,7 @@ void add_fname_to_exclude_list(FF_PKT *ff, const char *fname)
    exc->next = *list;
    exc->len = len;
    strcpy(exc->fname, fname);
-#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32)
+#if defined(HAVE_WIN32)
    /* Convert any \'s into /'s */
    for (char *p=exc->fname; *p; p++) {
       if (*p == '\\') {
@@ -368,13 +365,15 @@ int file_is_excluded(FF_PKT *ff, const char *file)
 {
    const char *p;
 
+#if defined(HAVE_WIN32)
    /*
     *  ***NB*** this removes the drive from the exclude
     *  rule.  Why?????
     */
-   if (win32_client && file[1] == ':') {
+   if (file[1] == ':') {
       file += 2;
    }
+#endif
 
    if (file_in_excluded_list(ff->excluded_paths_list, file)) {
       return 1;