[fedfs-utils] [PATCH 2/4] Remove use of __DATE__ and __TIME__ when building

Chuck Lever chuck.lever at oracle.com
Wed Mar 19 10:45:03 PDT 2014


From: NeilBrown <neilb at suse.de>

Use of __DATE__ and __TIME__ makes it impossible to recompile after
possibly changing context, and see the context made any real change in
the resulting build.
The Open Build Service can do this (to optimise rebuilds) and so
discourages the use of __DATE__ and __TIME__

This patch removes the __DATE__ and __TIME__ leaving just the VERSION.

Signed-off-by: NeilBrown <neilb at suse.de>
---
 src/fedfsd/main.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/fedfsd/main.c b/src/fedfsd/main.c
index f6ca61f..4980dc3 100644
--- a/src/fedfsd/main.c
+++ b/src/fedfsd/main.c
@@ -164,9 +164,7 @@ int main(int argc, char **argv)
 			gid = grp->gr_gid;
 			break;
 		case '?':
-			fprintf(stderr, "Version " VERSION
-					", built on %s at %s\n\n",
-					__DATE__, __TIME__);
+			fprintf(stderr, "Version " VERSION "\n\n");
 			fedfsd_usage(progname);
 			break;
 		case 'o':
@@ -230,8 +228,7 @@ int main(int argc, char **argv)
 		}
 	}
 
-	xlog(L_NOTICE, "Version " VERSION " (built %s at %s) starting",
-			__DATE__, __TIME__);
+	xlog(L_NOTICE, "Version " VERSION " starting");
 
 	if (!fedfsd_set_up_authenticators())
 		exit(EXIT_FAILURE);




More information about the fedfs-utils-devel mailing list