diff options
author | Jim Meyering <jim@meyering.net> | 1993-10-04 21:20:37 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1993-10-04 21:20:37 +0000 |
commit | 3134fad324dee63431db43cf9fc82072cb004770 (patch) | |
tree | bed6afd9e143b51ee02ee2aa84a81a020daf3e15 /lib | |
parent | ae0074289cd7d70cf8fb1d96f2625b2b9bb62b29 (diff) | |
download | coreutils-3134fad324dee63431db43cf9fc82072cb004770.tar.xz |
merge with 1.8.1a
Diffstat (limited to 'lib')
-rw-r--r-- | lib/getdate.y | 6 | ||||
-rw-r--r-- | lib/getopt.c | 6 | ||||
-rw-r--r-- | lib/getopt1.c | 6 | ||||
-rw-r--r-- | lib/strftime.c | 8 |
4 files changed, 22 insertions, 4 deletions
diff --git a/lib/getdate.y b/lib/getdate.y index cdc2b5565..ebfb7c91a 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -14,8 +14,12 @@ /* SUPPRESS 288 on yyerrlab *//* Label unused */ #ifdef HAVE_CONFIG_H +#if defined (emacs) || defined (CONFIG_BROKETS) +#include <config.h> +#else #include "config.h" #endif +#endif /* Since the code of getdate.y is not included in the Emacs executable itself, there is no need to #define static in this file. Even if @@ -115,7 +119,7 @@ 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 $"; + "$Header: /w/src/cvsroot/shellutils/lib/getdate.y,v 1.5 1993/09/08 18:23:16 meyering Exp $"; #endif /* !defined(lint) && !defined(SABER) */ diff --git a/lib/getopt.c b/lib/getopt.c index 49db99856..7a4673b8d 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -21,10 +21,14 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H +#if defined (emacs) || defined (CONFIG_BROKETS) /* We use <config.h> instead of "config.h" so that a compilation using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h - (which it would do because getopt.c was found in $srcdir). */ + (which it would do because it found this file in $srcdir). */ #include <config.h> +#else +#include "config.h" +#endif #endif #ifndef __STDC__ diff --git a/lib/getopt1.c b/lib/getopt1.c index 2b93f7835..f784b5757 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -17,10 +17,14 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H +#if defined (emacs) || defined (CONFIG_BROKETS) /* We use <config.h> instead of "config.h" so that a compilation using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h - (which it would do because getopt1.c was found in $srcdir). */ + (which it would do because it found this file in $srcdir). */ #include <config.h> +#else +#include "config.h" +#endif #endif #include "getopt.h" diff --git a/lib/strftime.c b/lib/strftime.c index a07571750..cfd41adbe 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -104,7 +104,13 @@ static char const * const months[] = /* Add character C to STRING and increment LENGTH, unless LENGTH would exceed MAX. */ -#define add_char(c) (length + 1 <= max) && (string[length++] = (c)) +#define add_char(c) \ + do \ + { \ + if (length + 1 <= max) \ + string[length++] = (c); \ + } \ + while (0) /* Add a 2 digit number to STRING, padding if specified. Return the number of characters added, up to MAX. */ |