Changeset 2591 in kBuild for trunk/src/kmk/arscan.c
- Timestamp:
- Jun 17, 2012 8:45:31 PM (13 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk
- Property svn:ignore
-
old new 13 13 stamp-* 14 14 makebook* 15 15 16 .*gdbinit 17 .gdb_history 18 16 19 *.dep 17 20 *.dvi … … 31 34 *.pg 32 35 *.pgs 36 33 37 README 34 38 README.DOS 35 39 README.W32 40 README.OS2 36 41 aclocal.m4 37 42 autom4te.cache … … 52 57 config.h.W32 53 58 config.h-vms 59 54 60 loadavg 55 61 loadavg.c 56 62 make 63 57 64 .deps 58 65 .dep_segment 66 ID 67 TAGS 68 59 69 _* 60 70 sun4 … … 72 82 sol2 73 83 i486-linux 84 74 85 customs 86 75 87 install-sh 76 88 mkinstalldirs 89 90 .directive.asc
-
- Property svn:ignore
-
trunk/src/kmk/arscan.c
r2546 r2591 1 1 /* Library function for scanning an archive file. 2 2 Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software4 Foundation, Inc.3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 4 2010 Free Software Foundation, Inc. 5 5 This file is part of GNU Make. 6 6 … … 67 67 if (! (status & 1)) 68 68 { 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"), 70 70 status); 71 71 … … 82 82 * know if this causes problems in other VMS environments. 83 83 */ 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 } 85 106 #endif 86 107 … … 152 173 if (! (status & 1)) 153 174 { 154 error (NILF, _("lbr$ini_control failed with status = %d"),status);175 error (NILF, _("lbr$ini_control() failed with status = %d"), status); 155 176 return -2; 156 177 } 157 178 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; 159 181 libdesc.dsc$w_length = strlen (archive); 160 182 … … 251 273 }; 252 274 # endif 275 # define TOCHAR(_m) (_m) 253 276 #else 254 277 /* These should allow us to read Windows (VC++) libraries (according to Frank … … 267 290 # define ar_uid UserID 268 291 # define ar_gid GroupID 292 /* In Windows the member names have type BYTE so we must cast them. */ 293 # define TOCHAR(_m) ((char *)(_m)) 269 294 #endif 270 295 … … 610 635 611 636 #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)); 614 639 #else /* Xenix. */ 615 640 eltmode = (unsigned short int) member_header.ar_mode; … … 621 646 member_offset + AR_HDR_SIZE, eltsize, 622 647 #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)), 626 651 #else /* Xenix. */ 627 652 member_header.ar_date, … … 794 819 for (ui = 0; ui < sizeof ar_hdr.ar_date; ui++) 795 820 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); 797 822 #ifdef AIAMAG 798 823 ar_hdr.ar_date[strlen(ar_hdr.ar_date)] = ' ';
Note:
See TracChangeset
for help on using the changeset viewer.