handle sstem (sco 3) with glob but not glob.h
authorAndrew Tridgell <tridge@samba.org>
Wed, 9 Sep 1998 06:31:13 +0000 (06:31 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 9 Sep 1998 06:31:13 +0000 (06:31 +0000)
configure.in
rsync.h
util.c

index 3afb857..82f164e 100644 (file)
@@ -16,6 +16,7 @@ AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h unistd.h utime.h grp.h)
 AC_CHECK_HEADERS(compat.h sys/param.h ctype.h sys/wait.h sys/ioctl.h)
 AC_CHECK_HEADERS(sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h)
+AC_CHECK_HEADERS(glob.h)
 
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)
diff --git a/rsync.h b/rsync.h
index b294513..ef7ea88 100644 (file)
--- a/rsync.h
+++ b/rsync.h
 #include "lib/fnmatch.h"
 #endif
 
-#ifdef HAVE_GLOB
+#ifdef HAVE_GLOB_H
 #include <glob.h>
 #endif
 
diff --git a/util.c b/util.c
index 8b36474..6e0fbab 100644 (file)
--- a/util.c
+++ b/util.c
@@ -427,7 +427,7 @@ int lock_range(int fd, int offset, int len)
 
 static void glob_expand_one(char *s, char **argv, int *argc, int maxargs)
 {
-#ifndef HAVE_GLOB
+#if !(defined(HAVE_GLOB) && defined(HAVE_GLOB_H))
        if (!*s) s = ".";
        argv[*argc] = strdup(s);
        (*argc)++;