Skip to content

Commit

Permalink
* version.h (VERSION): Bump to 2.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrich Drepper committed Apr 11, 2008
1 parent fd490ac commit 1db5b6f
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 184 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
2008-04-10 Ulrich Drepper <drepper@redhat.com>

* version.h (VERSION): Bump to 2.8.

* timzeone/asia: Update from tzdata2008b.
* timezone/backward: Likewise.
* timezone/europe: Likewise.
Expand Down
96 changes: 13 additions & 83 deletions timezone/private.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#ifndef lint
#ifndef NOID
static char privatehid[] = "@(#)private.h 8.3";
static char privatehid[] = "@(#)private.h 8.6";
#endif /* !defined NOID */
#endif /* !defined lint */

Expand All @@ -48,10 +48,6 @@ static char privatehid[] = "@(#)private.h 8.3";
#define HAVE_SETTIMEOFDAY 3
#endif /* !defined HAVE_SETTIMEOFDAY */

#ifndef HAVE_STRERROR
#define HAVE_STRERROR 1
#endif /* !defined HAVE_STRERROR */

#ifndef HAVE_SYMLINK
#define HAVE_SYMLINK 1
#endif /* !defined HAVE_SYMLINK */
Expand Down Expand Up @@ -109,17 +105,15 @@ static char privatehid[] = "@(#)private.h 8.3";
#endif /* !defined WEXITSTATUS */

#if HAVE_UNISTD_H
#include "unistd.h" /* for F_OK and R_OK */
#include "unistd.h" /* for F_OK, R_OK, and other POSIX goodness */
#endif /* HAVE_UNISTD_H */

#if !HAVE_UNISTD_H
#ifndef F_OK
#define F_OK 0
#endif /* !defined F_OK */
#ifndef R_OK
#define R_OK 4
#endif /* !defined R_OK */
#endif /* !HAVE_UNISTD_H */

/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
Expand Down Expand Up @@ -164,92 +158,28 @@ typedef long int_fast64_t;
** Workarounds for compilers/systems.
*/

/*
** If your compiler lacks prototypes, "#define P(x) ()".
*/

#ifndef P
#define P(x) x
#endif /* !defined P */

/*
** SunOS 4.1.1 headers lack EXIT_SUCCESS.
*/

#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#endif /* !defined EXIT_SUCCESS */

/*
** SunOS 4.1.1 headers lack EXIT_FAILURE.
*/

#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif /* !defined EXIT_FAILURE */

/*
** SunOS 4.1.1 headers lack FILENAME_MAX.
*/

#ifndef FILENAME_MAX

#ifndef MAXPATHLEN
#ifdef unix
#include "sys/param.h"
#endif /* defined unix */
#endif /* !defined MAXPATHLEN */

#ifdef MAXPATHLEN
#define FILENAME_MAX MAXPATHLEN
#endif /* defined MAXPATHLEN */
#ifndef MAXPATHLEN
#define FILENAME_MAX 1024 /* Pure guesswork */
#endif /* !defined MAXPATHLEN */

#endif /* !defined FILENAME_MAX */

/*
** SunOS 4.1.1 libraries lack remove.
*/

#ifndef remove
extern int unlink P((const char * filename));
#define remove unlink
#endif /* !defined remove */

/*
** Some ancient errno.h implementations don't declare errno.
** But some newer errno.h implementations define it as a macro.
** Fix the former without affecting the latter.
*/

#ifndef errno
extern int errno;
#endif /* !defined errno */

/*
** Some time.h implementations don't declare asctime_r.
** Others might define it as a macro.
** Fix the former without affecting the latter.
*/

#ifndef asctime_r
extern char * asctime_r();
extern char * asctime_r(struct tm const *, char *);
#endif

/*
** Private function declarations.
*/

char * icalloc P((int nelem, int elsize));
char * icatalloc P((char * old, const char * new));
char * icpyalloc P((const char * string));
char * imalloc P((int n));
void * irealloc P((void * pointer, int size));
void icfree P((char * pointer));
void ifree P((char * pointer));
const char * scheck P((const char * string, const char * format));
char * icalloc(int nelem, int elsize);
char * icatalloc(char * old, const char * new);
char * icpyalloc(const char * string);
char * imalloc(int n);
void * irealloc(void * pointer, int size);
void icfree(char * pointer);
void ifree(char * pointer);
const char * scheck(const char * string, const char * format);

/*
** Finally, some convenience items.
Expand Down Expand Up @@ -337,8 +267,8 @@ const char * scheck P((const char * string, const char * format));
#if HAVE_INCOMPATIBLE_CTIME_R
#undef asctime_r
#undef ctime_r
char *asctime_r P((struct tm const *, char *));
char *ctime_r P((time_t const *, char *));
char *asctime_r(struct tm const *, char *);
char *ctime_r(time_t const *, char *);
#endif /* HAVE_INCOMPATIBLE_CTIME_R */

#ifndef YEARSPERREPEAT
Expand Down
35 changes: 17 additions & 18 deletions timezone/zdump.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
static char elsieid[] = "@(#)zdump.c 8.4";
static char elsieid[] = "@(#)zdump.c 8.6";

/*
** This code has been made independent of the rest of the time
Expand Down Expand Up @@ -88,6 +88,9 @@ static char elsieid[] = "@(#)zdump.c 8.4";
#define SECSPERNYEAR (SECSPERDAY * DAYSPERNYEAR)
#define SECSPERLYEAR (SECSPERNYEAR + SECSPERDAY)

#ifndef HAVE_GETTEXT
#define HAVE_GETTEXT 0
#endif
#if HAVE_GETTEXT
#include "locale.h" /* for setlocale */
#include "libintl.h"
Expand Down Expand Up @@ -129,13 +132,9 @@ static char elsieid[] = "@(#)zdump.c 8.4";
#define TZ_DOMAIN "tz"
#endif /* !defined TZ_DOMAIN */

#ifndef P
#define P(x) x
#endif /* !defined P */

extern char ** environ;
extern int getopt P((int argc, char * const argv[],
const char * options));
extern int getopt(int argc, char * const argv[],
const char * options);
extern char * optarg;
extern int optind;
extern char * tzname[2];
Expand All @@ -146,15 +145,15 @@ static size_t longest;
static char * progname;
static int warned;

static char * abbr P((struct tm * tmp));
static void abbrok P((const char * abbrp, const char * zone));
static long delta P((struct tm * newp, struct tm * oldp));
static void dumptime P((const struct tm * tmp));
static time_t hunt P((char * name, time_t lot, time_t hit));
static void setabsolutes P((void));
static void show P((char * zone, time_t t, int v));
static const char * tformat P((void));
static time_t yeartot P((long y));
static char * abbr(struct tm * tmp);
static void abbrok(const char * abbrp, const char * zone);
static long delta(struct tm * newp, struct tm * oldp);
static void dumptime(const struct tm * tmp);
static time_t hunt(char * name, time_t lot, time_t hit);
static void setabsolutes(void);
static void show(char * zone, time_t t, int v);
static const char * tformat(void);
static time_t yeartot(long y);

#ifndef TYPECHECK
#define my_localtime localtime
Expand Down Expand Up @@ -394,7 +393,7 @@ _("%s: usage is %s [ --version ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"),
}

static void
setabsolutes()
setabsolutes(void)
{
if (0.5 == (time_t) 0.5) {
/*
Expand Down Expand Up @@ -592,7 +591,7 @@ struct tm * tmp;
*/

static const char *
tformat()
tformat(void)
{
if (0.5 == (time_t) 0.5) { /* floating */
if (sizeof (time_t) > sizeof (double))
Expand Down
Loading

0 comments on commit 1db5b6f

Please sign in to comment.