Skip to content

Commit

Permalink
Remove obsolete timezone() function.
Browse files Browse the repository at this point in the history
Add timezone and daylight symbols for XSI compatibility.
  • Loading branch information
millert committed Apr 7, 2015
1 parent 514a545 commit c9da469
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 204 deletions.
7 changes: 5 additions & 2 deletions include/time.h
@@ -1,4 +1,4 @@
/* $OpenBSD: time.h,v 1.27 2015/03/17 19:31:30 millert Exp $ */
/* $OpenBSD: time.h,v 1.28 2015/04/07 01:47:04 millert Exp $ */
/* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */

/*
Expand Down Expand Up @@ -135,6 +135,10 @@ size_t strftime(char *__restrict, size_t, const char *__restrict,
__attribute__ ((__bounded__(__string__,1,2)));
time_t time(time_t *);

#if __XPG_VISIBLE >= 300
extern int daylight;
extern long timezone;
#endif
#if __XPG_VISIBLE >= 400
char *strptime(const char *__restrict, const char *__restrict,
struct tm *__restrict);
Expand Down Expand Up @@ -166,7 +170,6 @@ int clock_getcpuclockid(pid_t, clockid_t *);
#endif

#if __BSD_VISIBLE
char *timezone(int, int);
void tzsetwall(void);
time_t timelocal(struct tm *);
time_t timegm(struct tm *);
Expand Down
6 changes: 3 additions & 3 deletions lib/libc/gen/Makefile.inc
@@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.67 2015/02/06 05:51:06 doug Exp $
# $OpenBSD: Makefile.inc,v 1.68 2015/04/07 01:47:04 millert Exp $

# gen sources
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/gen ${LIBCSRCDIR}/gen
Expand All @@ -21,7 +21,7 @@ SRCS+= alarm.c assert.c auth_subr.c authenticate.c \
setprogname.c setjmperr.c setmode.c setproctitle.c shm_open.c \
siginterrupt.c siglist.c signal.c signame.c \
sigsetops.c sleep.c statvfs.c strtofflags.c sysconf.c sysctl.c \
syslog.c syslog_r.c telldir.c time.c times.c timezone.c \
syslog.c syslog_r.c telldir.c time.c times.c \
tolower_.c ttyname.c \
ttyslot.c toupper_.c ualarm.c uname.c unvis.c usleep.c \
utime.c valloc.c vis.c wait.c wait3.c waitpid.c warn.c \
Expand Down Expand Up @@ -56,7 +56,7 @@ MAN+= __tfork_thread.3 alarm.3 auth_subr.3 authenticate.3 basename.3 clock.3 \
scandir.3 setjmp.3 setmode.3 setproctitle.3 shm_open.3 \
siginterrupt.3 signal.3 \
sigsetops.3 sleep.3 statvfs.3 sysconf.3 sysctl.3 strtofflags.3 \
syslog.3 time.3 times.3 timezone.3 toascii.3 tolower.3 toupper.3 \
syslog.3 time.3 times.3 toascii.3 tolower.3 toupper.3 \
ttyname.3 ualarm.3 uname.3 unvis.3 usleep.3 utime.3 valloc.3 vis.3

MLINKS+=__tfork_thread.3 __tfork.2
Expand Down
74 changes: 0 additions & 74 deletions lib/libc/gen/timezone.3

This file was deleted.

122 changes: 0 additions & 122 deletions lib/libc/gen/timezone.c

This file was deleted.

4 changes: 2 additions & 2 deletions lib/libc/time/localtime.c
@@ -1,4 +1,4 @@
/* $OpenBSD: localtime.c,v 1.51 2015/02/16 17:51:48 tedu Exp $ */
/* $OpenBSD: localtime.c,v 1.52 2015/04/07 01:47:04 millert Exp $ */
/*
** This file is in the public domain, so clarified as of
** 1996-06-05 by Arthur David Olson.
Expand Down Expand Up @@ -198,7 +198,7 @@ char * tzname[2] = {
static struct tm tm;

#ifdef USG_COMPAT
time_t timezone = 0;
long timezone = 0;
int daylight = 0;
#endif /* defined USG_COMPAT */

Expand Down
3 changes: 2 additions & 1 deletion lib/libc/time/private.h
@@ -1,4 +1,4 @@
/* $OpenBSD: private.h,v 1.36 2015/03/13 17:23:37 deraadt Exp $ */
/* $OpenBSD: private.h,v 1.37 2015/04/07 01:47:04 millert Exp $ */
#ifndef PRIVATE_H

#define PRIVATE_H
Expand All @@ -14,6 +14,7 @@
#define PCTS 1
#define ALL_STATE 1
#define STD_INSPIRED 1
#define USG_COMPAT 1

/*
** This header is for use ONLY with the time conversion code.
Expand Down

0 comments on commit c9da469

Please sign in to comment.