summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-10-08 00:26:58 +0000
committerJim Meyering <jim@meyering.net>1994-10-08 00:26:58 +0000
commit7938c50248b348f906034cf1b1577d74c0ef8c37 (patch)
tree24397566eda20ae73220cf902c8bd374680e3cc4
parent1fccac0f070ee00fcb7208c44c694f74064b3cb8 (diff)
downloadgnulib-SHELLUTILS.tar.gz
gnulib-SHELLUTILS.tar.bz2
GNU shell utilitiesSHELLUTILS-1_10qSHELLUTILS
-rw-r--r--lib/getdate.y6
-rw-r--r--lib/pathmax.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/getdate.y b/lib/getdate.y
index e77cc1f62d..77d63a9e9e 100644
--- a/lib/getdate.y
+++ b/lib/getdate.y
@@ -962,11 +962,13 @@ main (ac, av)
int ac;
char *av[];
{
- char buff[128];
- time_t d;
+ char buff[MAX_BUFF_LEN + 1];
+ time_t d;
(void)printf ("Enter date, or blank line to exit.\n\t> ");
(void)fflush (stdout);
+
+ buff[MAX_BUFF_LEN] = 0;
while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0]) {
d = get_date (buff, (struct timeb *)NULL);
if (d == -1)
diff --git a/lib/pathmax.h b/lib/pathmax.h
index b3e4656071..00fb0b514e 100644
--- a/lib/pathmax.h
+++ b/lib/pathmax.h
@@ -38,7 +38,7 @@
#endif
/* Don't include sys/param.h if it already has been. */
-#if defined(HAVE_SYS_PATH_MAX_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
+#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
#include <sys/param.h>
#endif

Return to:

Send suggestions and report system problems to the System administrator.