You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Chuck Murcko <ch...@telebase.com> on 1995/11/21 01:34:21 UTC

problems w/patch 40a under IRIX

There's no member tm_zone in a tm struct under IRIX 5.3. The 40a patch should
take this into account. IRIX already maintains a valid $TZ environment
variable. Linux also used to not have tm_zone in its tm struct, but I'm not
sure if that's different now. Here's a crude suggestion (derived from
Randy's patch):

*** util_script.c.orig  Sun Nov 19 12:50:50 1995
--- util_script.c       Sun Nov 19 12:55:50 1995
***************
*** 103,112 ****
  {
      array_header *env_arr = table_elts (t);
      table_entry *elts = (table_entry *)env_arr->elts;
!     char **env = (char **)palloc (p, (env_arr->nelts + 1) *sizeof (char *));
!     int i, j;
!
!     for (i = 0, j = 0; i < env_arr->nelts; ++i) {
          if (!elts[i].key) continue;
        env[j++] = pstrcat (p, elts[i].key, "=", elts[i].val, NULL);
      }
--- 103,122 ----
  {
      array_header *env_arr = table_elts (t);
      table_entry *elts = (table_entry *)env_arr->elts;
!     char **env = (char **)palloc (p, (env_arr->nelts + 2) *sizeof (char *));
!     int i,j;
!     char *tz;
!     time_t ts;
!     struct tm *lt;
!
!     ts = time(NULL);
!     lt = localtime(&ts);
!#if !defined(IRIX) && !defined(LINUX)
!     tz = lt->tm_zone;
!#endif
!     j = 0;
!     if (tz != NULL) env[j++] = pstrcat(p, "TZ=", tz, NULL);
!     for (i = 0; i < env_arr->nelts; ++i) {
          if (!elts[i].key) continue;
        env[j++] = pstrcat (p, elts[i].key, "=", elts[i].val, NULL);
      }

chuck
Chuck Murcko	Telebase Systems, Inc.	Wayne PA	chuck@telebase.com
And now, on a lighter note:
Minors in Kansas City, Missouri, are not allowed to purchase cap
pistols; they may buy shotguns freely, however.