__tzname[info->isdst] = &zone_names[info->idx];
__tzname[info->isdst] = __tzstring (&zone_names[info->idx]);
__tzfile_read (const char *file){  static const char default_tzdir[] = TZDIR;  size_t num_isstd, num_isgmt;  register FILE *f;  struct tzhead tzhead;  size_t chars;  register size_t i;  struct ttinfo *info;  __use_tzfile = 0;  if (transitions != NULL)    free ((void *) transitions);  transitions = NULL;  if (type_idxs != NULL)    free ((void *) type_idxs);  type_idxs = NULL;  if (types != NULL)    free ((void *) types);  types = NULL;  if (zone_names != NULL)    free ((void *) zone_names);  zone_names = NULL;  if (leaps != NULL)    free ((void *) leaps);  leaps = NULL;  if (file == NULL)    /* No user specification; use the site-wide default.  */    file = TZDEFAULT;  else if (*file == '\0')    /* User specified the empty string; use UTC explicitly.  */    file = "Universal";  else    {      /* We must not allow to read an arbitrary file in a setuid	 program.  So we fail for any file which is not in the	 directory hierachy starting at TZDIR	 and which is not the system wide default TZDEFAULT.  */      if (__libc_enable_secure	  && ((*file == '/'	       && memcmp (file, TZDEFAULT, sizeof TZDEFAULT)	       && memcmp (file, default_tzdir, sizeof (default_tzdir) - 1))	      || strstr (file, "../") != NULL))	/* This test is certainly a bit too restrictive but it should	   catch all critical cases.  */	return;    }  if (*file != '/')    {      const char *tzdir;      unsigned int len, tzdir_len;      char *new;      tzdir = __secure_getenv ("TZDIR");      if (tzdir == NULL || *tzdir == '\0')	{	  tzdir = default_tzdir;	  tzdir_len = sizeof (default_tzdir) - 1;	}      else	tzdir_len = strlen (tzdir);      len = strlen (file) + 1;      new = (char *) __alloca (tzdir_len + 1 + len);      memcpy (new, tzdir, tzdir_len);      new[tzdir_len] = '/';      memcpy (&new[tzdir_len + 1], file, len);      file = new;    }  f = fopen (file, "r");  if (f == NULL)    return;  if (fread ((void *) &tzhead, sizeof (tzhead), 1, f) != 1)    goto lose;  num_transitions = (size_t) decode (tzhead.tzh_timecnt);  num_types = (size_t) decode (tzhead.tzh_typecnt);  chars = (size_t) decode (tzhead.tzh_charcnt);  num_leaps = (size_t) decode (tzhead.tzh_leapcnt);  num_isstd = (size_t) decode (tzhead.tzh_ttisstdcnt);  num_isgmt = (size_t) decode (tzhead.tzh_ttisgmtcnt);  if (num_transitions > 0)    {      transitions = (time_t *) malloc (num_transitions * sizeof(time_t));      if (transitions == NULL)	goto lose;      type_idxs = (unsigned char *) malloc (num_transitions);      if (type_idxs == NULL)	goto lose;    }  if (num_types > 0)    {      types = (struct ttinfo *) malloc (num_types * sizeof (struct ttinfo));      if (types == NULL)	goto lose;    }  if (chars > 0)    {      zone_names = (char *) malloc (chars);      if (zone_names == NULL)	goto lose;    }  if (num_leaps > 0)    {      leaps = (struct leap *) malloc (num_leaps * sizeof (struct leap));      if (leaps == NULL)	goto lose;    }  if (sizeof (time_t) < 4)      abort ();  if (fread(transitions, 4, num_transitions, f) != num_transitions ||      fread(type_idxs, 1, num_transitions, f) != num_transitions)    goto lose;  /* Check for bogus indices in the data file, so we can hereafter     safely use type_idxs[T] as indices into `types' and never crash.  */  for (i = 0; i < num_transitions; ++i)    if (type_idxs[i] >= num_types)      goto lose;  if (BYTE_ORDER != BIG_ENDIAN || sizeof (time_t) != 4)    {      /* Decode the transition times, stored as 4-byte integers in	 network (big-endian) byte order.  We work from the end of	 the array so as not to clobber the next element to be	 processed when sizeof (time_t) > 4.  */      i = num_transitions;      while (i-- > 0)	transitions[i] = decode ((char *) transitions + i*4);    }  for (i = 0; i < num_types; ++i)    {      unsigned char x[4];      if (fread (x, 1, 4, f) != 4 ||	  fread (&types[i].isdst, 1, 1, f) != 1 ||	  fread (&types[i].idx, 1, 1, f) != 1)	goto lose;      if (types[i].idx >= chars) /* Bogus index in data file.  */	goto lose;      types[i].offset = (long int) decode (x);    }  if (fread (zone_names, 1, chars, f) != chars)    goto lose;  for (i = 0; i < num_leaps; ++i)    {      unsigned char x[4];      if (fread (x, 1, sizeof (x), f) != sizeof (x))	goto lose;      leaps[i].transition = (time_t) decode (x);      if (fread (x, 1, sizeof (x), f) != sizeof (x))	goto lose;      leaps[i].change = (long int) decode (x);    }  for (i = 0; i < num_isstd; ++i)    {      int c = getc (f);      if (c == EOF)	goto lose;      types[i].isstd = c != 0;    }  while (i < num_types)    types[i++].isstd = 0;  for (i = 0; i < num_isgmt; ++i)    {      int c = getc (f);      if (c == EOF)	goto lose;      types[i].isgmt = c != 0;    }  while (i < num_types)    types[i++].isgmt = 0;  fclose (f);  info = find_transition (0);  for (i = 0; i < num_types && i < sizeof (__tzname) / sizeof (__tzname[0]);       ++i)    __tzname[types[i].isdst] = &zone_names[types[i].idx];  if (info->isdst < sizeof (__tzname) / sizeof (__tzname[0]))    __tzname[info->isdst] = &zone_names[info->idx];  compute_tzname_max (chars);  __use_tzfile = 1;  return; lose:;  fclose(f);}