summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-07-08 05:47:52 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-08 05:25:02 -0700
commit7e489f3cc7f3eb738d2698dcf588bad0bdc12a8b (patch)
treec99e2e430e0f51f0526c467141e9dd2087c0fca4
parentc35f6bf8f735eaf35c950d7b7789f6b64ba2c8c0 (diff)
fix up OS X after dynamic volume changes
Note that contrib is not needed to be in toplevel Makefile as its not a separate target, rather stuff is "pulled in" from there. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac3
-rw-r--r--contrib/Makefile.am3
-rw-r--r--glusterfsd/src/glusterfsd.c9
-rw-r--r--libglusterfs/src/graph.c2
-rw-r--r--libglusterfs/src/logging.c7
-rw-r--r--libglusterfs/src/logging.h2
7 files changed, 8 insertions, 20 deletions
diff --git a/Makefile.am b/Makefile.am
index ce0adb8c7c9..4adf7cb3135 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
EXTRA_DIST = autogen.sh COPYING INSTALL README AUTHORS THANKS NEWS glusterfs.spec
-SUBDIRS = argp-standalone libglusterfs rpc xlators glusterfsd $(FUSERMOUNT_SUBDIR) doc extras contrib
+SUBDIRS = argp-standalone libglusterfs rpc xlators glusterfsd $(FUSERMOUNT_SUBDIR) doc extras
CLEANFILES =
diff --git a/configure.ac b/configure.ac
index fe88d5e3306..3957a8484c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,7 +120,6 @@ AC_CONFIG_FILES([Makefile
extras/benchmarking/Makefile
extras/volgen/Makefile
extras/volgen/glusterfs-volgen
- contrib/Makefile
contrib/fuse-util/Makefile
xlators/features/access-control/Makefile
xlators/features/access-control/src/Makefile
@@ -230,7 +229,7 @@ AC_ARG_ENABLE([fusermount],
BUILD_FUSERMOUNT="no"
if test "x$enable_fusermount" = "xyes"; then
- FUSERMOUNT_SUBDIR="contrib"
+ FUSERMOUNT_SUBDIR="contrib/fuse-util"
BUILD_FUSERMOUNT="yes"
AC_DEFINE(GF_FUSERMOUNT, 1, [Use our own fusermount])
fi
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
deleted file mode 100644
index a3d5cfbf855..00000000000
--- a/contrib/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-SUBDIRS = fuse-util
-
-CLEANFILES =
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index d1f9ae1513f..61e2fb7c3fd 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -651,12 +651,7 @@ generate_uuid ()
localtime_r (&tv.tv_sec, &now);
strftime (now_str, 32, "%Y/%m/%d-%H:%M:%S", &now);
- snprintf (tmp_str, 1024, "%s-%d-%s:%"
-#ifdef GF_DARWIN_HOST_OS
- PRId32,
-#else
- "ld",
-#endif
+ snprintf (tmp_str, 1024, "%s-%d-%s:%" GF_PRI_SUSECONDS,
hostname, getpid(), now_str, tv.tv_usec);
return gf_strdup (tmp_str);
@@ -1149,7 +1144,7 @@ daemonize (glusterfs_ctx_t *ctx)
if (cmd_args->debug_mode)
goto postfork;
- daemon (0, 0);
+ os_daemon (0, 0);
postfork:
ret = glusterfs_pidfile_update (ctx);
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c
index d5fcafd6810..a0c4c122fe7 100644
--- a/libglusterfs/src/graph.c
+++ b/libglusterfs/src/graph.c
@@ -416,7 +416,7 @@ fill_uuid (char *uuid, int size)
localtime_r (&tv.tv_sec, &now);
strftime (now_str, 32, "%Y/%m/%d-%H:%M:%S", &now);
- snprintf (uuid, size, "%s-%d-%s:%ld",
+ snprintf (uuid, size, "%s-%d-%s:%"GF_PRI_SUSECONDS,
hostname, getpid(), now_str, tv.tv_usec);
return;
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
index e7f61623133..d5a38e6b6b8 100644
--- a/libglusterfs/src/logging.c
+++ b/libglusterfs/src/logging.c
@@ -216,12 +216,7 @@ log:
strftime (timestr, 256, "%Y-%m-%d %H:%M:%S", tm);
snprintf (timestr + strlen (timestr), 256 - strlen (timestr),
-#ifdef GF_DARWIN_HOST_OS
- ".%"PRId32,
-#else
- ".%ld",
-#endif
- tv.tv_usec);
+ ".%"GF_PRI_SUSECONDS, tv.tv_usec);
basename = strrchr (file, '/');
if (basename)
diff --git a/libglusterfs/src/logging.h b/libglusterfs/src/logging.h
index 8c78a3ee1d6..fdb24dab9f6 100644
--- a/libglusterfs/src/logging.h
+++ b/libglusterfs/src/logging.h
@@ -34,10 +34,12 @@
#define GF_PRI_FSBLK "u"
#define GF_PRI_DEV PRId32
#define GF_PRI_NLINK PRIu16
+#define GF_PRI_SUSECONDS PRId32
#else
#define GF_PRI_FSBLK PRIu64
#define GF_PRI_DEV PRIu64
#define GF_PRI_NLINK PRIu32
+#define GF_PRI_SUSECONDS "ld"
#endif
#define GF_PRI_BLKSIZE PRId32
#define GF_PRI_SIZET "zu"