VirtualBox

Changeset 2591 in kBuild for trunk/src/kmk/arscan.c


Ignore:
Timestamp:
Jun 17, 2012 8:45:31 PM (13 years ago)
Author:
bird
Message:

kmk: Merged in changes from GNU make 3.82. Previous GNU make base version was gnumake-2008-10-28-CVS.

Location:
trunk/src/kmk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk

    • Property svn:ignore
      •  

        old new  
        1313stamp-*
        1414makebook*
         15
        1516.*gdbinit
         17.gdb_history
         18
        1619*.dep
        1720*.dvi
         
        3134*.pg
        3235*.pgs
         36
        3337README
        3438README.DOS
        3539README.W32
         40README.OS2
        3641aclocal.m4
        3742autom4te.cache
         
        5257config.h.W32
        5358config.h-vms
         59
        5460loadavg
        5561loadavg.c
        5662make
         63
        5764.deps
        5865.dep_segment
         66ID
         67TAGS
         68
        5969_*
        6070sun4
         
        7282sol2
        7383i486-linux
         84
        7485customs
         86
        7587install-sh
        7688mkinstalldirs
         89
         90.directive.asc
  • trunk/src/kmk/arscan.c

    r2546 r2591  
    11/* Library function for scanning an archive file.
    22Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
    4 Foundation, Inc.
     31998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
     42010 Free Software Foundation, Inc.
    55This file is part of GNU Make.
    66
     
    6767  if (! (status & 1))
    6868    {
    69       error (NILF, _("lbr$set_module failed to extract module info, status = %d"),
     69      error (NILF, _("lbr$set_module() failed to extract module info, status = %d"),
    7070             status);
    7171
     
    8282   * know if this causes problems in other VMS environments.
    8383   */
    84   val = decc$fix_time (&mhd->mhd$l_datim) + timezone - daylight*3600;
     84  {
     85    /* Modified by M. Gehre at 11-JAN-2008 because old formula is wrong:
     86     * val = decc$fix_time (&mhd->mhd$l_datim) + timezone - daylight*3600;
     87     * a) daylight specifies, if the timezone has daylight saving enabled, not
     88     *    if it is active
     89     * b) what we need is the information, if daylight saving was active, if
     90     *    the library module was replaced. This information we get using the
     91     *    localtime function
     92     */
     93
     94    struct tm *tmp;
     95
     96    /* Conversion from VMS time to C time */
     97    val = decc$fix_time (&mhd->mhd$l_datim);
     98
     99    /*
     100     * Conversion from local time (stored in library) to GMT (needed for gmake)
     101     * Note: The tm_gmtoff element is a VMS extension to the ANSI standard.
     102     */
     103    tmp = localtime (&val);
     104    val -= tmp->tm_gmtoff;
     105  }
    85106#endif
    86107
     
    152173  if (! (status & 1))
    153174    {
    154       error (NILF, _("lbr$ini_control failed with status = %d"),status);
     175      error (NILF, _("lbr$ini_control() failed with status = %d"), status);
    155176      return -2;
    156177    }
    157178
    158   libdesc.dsc$a_pointer = archive;
     179  /* there is no such descriptor with "const char *dsc$a_pointer" */
     180  libdesc.dsc$a_pointer = (char *)archive;
    159181  libdesc.dsc$w_length = strlen (archive);
    160182
     
    251273  };
    252274# endif
     275# define TOCHAR(_m)     (_m)
    253276#else
    254277/* These should allow us to read Windows (VC++) libraries (according to Frank
     
    267290# define ar_uid     UserID
    268291# define ar_gid     GroupID
     292/* In Windows the member names have type BYTE so we must cast them.  */
     293# define TOCHAR(_m)     ((char *)(_m))
    269294#endif
    270295
     
    610635
    611636#ifndef M_XENIX
    612         sscanf (member_header.ar_mode, "%o", &eltmode);
    613         eltsize = atol (member_header.ar_size);
     637        sscanf (TOCHAR (member_header.ar_mode), "%o", &eltmode);
     638        eltsize = atol (TOCHAR (member_header.ar_size));
    614639#else   /* Xenix.  */
    615640        eltmode = (unsigned short int) member_header.ar_mode;
     
    621646                       member_offset + AR_HDR_SIZE, eltsize,
    622647#ifndef M_XENIX
    623                        atol (member_header.ar_date),
    624                        atoi (member_header.ar_uid),
    625                        atoi (member_header.ar_gid),
     648                       atol (TOCHAR (member_header.ar_date)),
     649                       atoi (TOCHAR (member_header.ar_uid)),
     650                       atoi (TOCHAR (member_header.ar_gid)),
    626651#else   /* Xenix.  */
    627652                       member_header.ar_date,
     
    794819  for (ui = 0; ui < sizeof ar_hdr.ar_date; ui++)
    795820    ar_hdr.ar_date[ui] = ' ';
    796   sprintf (ar_hdr.ar_date, "%ld", (long int) statbuf.st_mtime);
     821  sprintf (TOCHAR (ar_hdr.ar_date), "%ld", (long int) statbuf.st_mtime);
    797822#ifdef AIAMAG
    798823  ar_hdr.ar_date[strlen(ar_hdr.ar_date)] = ' ';
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette