diff options
author | Paul Smith <psmith@gnu.org> | 1997-08-27 20:30:54 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1997-08-27 20:30:54 +0000 |
commit | be3fb0ae6d6870dbc1b4d03447afcf3b0fed3114 (patch) | |
tree | f27c2e1c6f3e1f7cc747cad0452734c4c917b208 /ar.c | |
parent | dd0c939e781596fec17f8c72cbe6e3559e703fd8 (diff) | |
download | gunmake-be3fb0ae6d6870dbc1b4d03447afcf3b0fed3114.tar.gz |
Updates for GNU make 3.75.92.
Diffstat (limited to 'ar.c')
-rw-r--r-- | ar.c | 116 |
1 files changed, 6 insertions, 110 deletions
@@ -1,5 +1,5 @@ /* Interface to `ar' archives for GNU Make. -Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,92,93,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -26,9 +26,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Defined in arscan.c. */ extern long int ar_scan PARAMS ((char *archive, long int (*function) (), long int arg)); -extern int ar_member_touch PARAMS ((char *arname, char *memname)); extern int ar_name_equal PARAMS ((char *name, char *mem, int truncated)); - +#ifndef VMS +extern int ar_member_touch PARAMS ((char *arname, char *memname)); +#endif /* Return nonzero if NAME is an archive-member reference, zero if not. An archive-member reference is a name like `lib(member)'. @@ -40,7 +41,7 @@ ar_name (name) char *name; { char *p = index (name, '('), *end = name + strlen (name) - 1; - + if (p == 0 || p == name || *end != ')') return 0; @@ -66,111 +67,7 @@ ar_parse_name (name, arname_p, memname_p) if (memname_p != 0) *memname_p = savestring (p + 1, end - (p + 1)); -} - -#ifdef VMS -#include <lbrdef.h> -#include <mhddef.h> -#include <credef.h> -#include <descrip.h> -#include <ctype.h> -#if __DECC -#include <lbr$routines.h> -#endif - -#define uppercasify(str) {char *str1; for (str1 = str; *str1; str1++) *str1 = _toupper(*str1);} - -#define LBR$_KEYNOTFND 2527330 /* This isn't in any .h file anywhere so I got it from a MACRO library */ - -time_t -ar_member_date (name) - char *name; -{ - static char *arname; - static char *memname; - char *p,*q; - long int val; - static struct { - struct mhddef mhd; - struct credef cre; - char garbage[256]; - } buf; - int func=LBR$C_READ, - type=LBR$C_TYP_OBJ, - rfa[2], - lidx, - status; - $DESCRIPTOR(bufdesc,(char *)&buf); - $DESCRIPTOR(libdesc,arname); - $DESCRIPTOR(moddesc,memname); - - /* This "file" is an archive member. */ - p = index (name, '('); - arname = savestring (name, p - name); - val = strlen (p) - 2; -/* - if (val > 15) - val = 15; -*/ - memname = savestring (p + 1, val); -#ifdef OLDWAY - p = rindex (memname, ')'); - if (p != 0) { - q = rindex(p,'.'); - if (q) - *q = '\0'; /* to get rid of extension */ - } -#endif - - q = rindex(memname,'.'); - if (q) - *q = '\0'; /* to get rid of extension */ - - uppercasify(memname); - - /* Make sure we know the modtime of the archive itself because - we are likely to be called just before commands to remake a - member are run, and they will change the archive itself. */ - (void) f_mtime (enter_file (arname)); - - libdesc.dsc$a_pointer = arname; - libdesc.dsc$w_length = strlen(arname); - moddesc.dsc$a_pointer = memname; - moddesc.dsc$w_length = strlen(memname); - - if (!((status = lbr$ini_control(&lidx,&func,&type,0)) & 1)) { - printf("Error in lbr$ini_control, %d\n",status); - return(-1); - } - - if (!((status = lbr$open(&lidx,&libdesc,0,0,0,0,0)) & 1)) { - printf("Error opening library %s to lookup member %s, %d\n",arname, memname ,status); - return(-1); - } - - if (!((status = lbr$lookup_key(&lidx,&moddesc,rfa)) & 1)) { - if (status != LBR$_KEYNOTFND) - printf("Error looking up module %s in library %s, %d\n",memname, arname ,status); - lbr$close(&lidx); - return(-1); - } - - if (!((status = lbr$set_module(&lidx,rfa,&bufdesc,&bufdesc,0)) & 1)) { - printf("Error getting module info, %d\n",status); - lbr$close(&lidx); - return(-1); - } - - lbr$close(&lidx); - - val = SHELL$FIX_TIME(&buf.mhd.mhd$l_datim); - - free (arname); - free (memname); - return (val <= 0 ? (time_t) -1 : (time_t) val); } - -#else static long int ar_member_date_1 PARAMS ((int desc, char *mem, int truncated, long int hdrpos, long int datapos, long int size, long int date, int uid, int gid, int mode, char *name)); @@ -232,13 +129,12 @@ ar_member_date_1 (desc, mem, truncated, { return ar_name_equal (name, mem, truncated) ? date : 0; } -#endif /* !VMS */ /* Set the archive-member NAME's modtime to now. */ #ifdef VMS int -ar_touch (name) +ar_touch (name) char *name; { error ("touch archive member is not available on VMS"); |