]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
merge with 1.9.4g
authorJim Meyering <jim@meyering.net>
Mon, 25 Apr 1994 18:34:37 +0000 (18:34 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 25 Apr 1994 18:34:37 +0000 (18:34 +0000)
lib/getdate.y
src/test.c

index fd545d6ca09b34d48f5907863e99c9a6e54c6918..3159c6d9a0d73547dc5d557f2001092b746aedb9 100644 (file)
@@ -102,12 +102,6 @@ extern struct tm   *localtime();
 static int yylex ();
 static int yyerror ();
 
-#if    !defined(lint) && !defined(SABER)
-static char RCS[] =
-       "$Header: str2date.y,v 2.1 90/09/06 08:15:06 cronan Exp $";
-#endif /* !defined(lint) && !defined(SABER) */
-
-
 #define EPOCH          1970
 #define HOUR(x)                ((time_t)(x) * 60)
 #define SECSPERDAY     (24L * 60L * 60L)
@@ -904,7 +898,7 @@ get_date(p, now)
 
        if (! (tm = gmtime (&ftz.time)))
            return -1;
-       gmt = *tm;
+       gmt = *tm;      /* Make a copy, in case localtime modifies *tm.  */
 
        if (! (tm = localtime (&ftz.time)))
            return -1;
index 6cf8565f682c12200fb7e32dc52f5d5f0b9c3c42..a53362db8631888108a2a7e58b1707bf617bf428 100644 (file)
@@ -88,6 +88,9 @@ extern uid_t geteuid ();
 #define F_OK 0
 #endif /* R_OK */
 
+/* This name is used solely when printing --version information.  */
+#define COMMAND_NAME "test"
+
 /* The following few defines control the truth and false output of each stage.
    TRUE and FALSE are what we use to compute the final output value.
    SHELL_BOOLEAN is the form which returns truth or falseness in shell terms.
@@ -1122,7 +1125,7 @@ test_command (margc, margv)
 
   if (margv[0] && strcmp (margv[0], "[") == 0)
     {
-      parse_long_options (argc, argv, "test", usage);
+      parse_long_options (argc, argv, COMMAND_NAME, usage);
 
       --margc;
 
@@ -1139,7 +1142,7 @@ test_command (margc, margv)
   if (pos >= argc)
     test_exit (SHELL_BOOLEAN (FALSE));
 
-  parse_long_options (argc, argv, usage);
+  parse_long_options (argc, argv, COMMAND_NAME, usage);
   value = posixtest ();
 
   if (pos != argc)