Add include files to get prototype declarations, and fix bugs found.
[unix-history] / usr / src / lib / libc / gen / timezone.c
index 78de7e5..6c32c97 100644 (file)
@@ -6,14 +6,18 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)timezone.c 5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)timezone.c 5.10 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <sys/time.h>
 #include <stdio.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <sys/time.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <tzfile.h>
 
 #include <tzfile.h>
 
+char *_tztab();
+
 /*
  * timezone --
  *     The arguments are the number of minutes of time you are westward
 /*
  * timezone --
  *     The arguments are the number of minutes of time you are westward
@@ -31,7 +35,6 @@ timezone(zone, dst)
 {
        register char   *beg,
                        *end;
 {
        register char   *beg,
                        *end;
-       char    *getenv(), *index(), *strncpy(), *_tztab();
 
        if (beg = getenv("TZNAME")) {           /* set in environment */
                if (end = index(beg, ',')) {    /* "PST,PDT" */
 
        if (beg = getenv("TZNAME")) {           /* set in environment */
                if (end = index(beg, ',')) {    /* "PST,PDT" */