Print this page
make: avo_alloca.h works around a very old Solaris bug, delete it


  22  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  *      ar.c
  28  *
  29  *      Deal with the lib.a(member.o) and lib.a((entry-point)) notations
  30  *
  31  * Look inside archives for notations a(b) and a((b))
  32  *      a(b)    is file member   b  in archive a
  33  *      a((b))  is entry point   b  in object archive a
  34  *
  35  * For 6.0, create a make which can understand all archive
  36  * formats.  This is kind of tricky, and <ar.h> isnt any help.
  37  */
  38 
  39 /*
  40  * Included files
  41  */
  42 #include <avo/avo_alloca.h>               /* alloca() */
  43 #include <ar.h>
  44 #include <errno.h>                /* errno */
  45 #include <fcntl.h>                /* open() */
  46 #include <mk/defs.h>
  47 #include <mksh/misc.h>            /* retmem_mb() */
  48 
  49 struct ranlib {
  50         union {
  51                 off_t   ran_strx;       /* string table index of */
  52                 char    *ran_name;      /* symbol defined by */
  53         }       ran_un;
  54         off_t   ran_off;                /* library member at this offset */
  55 };
  56 
  57 #include <unistd.h>               /* close() */
  58 
  59 
  60 /*
  61  * Defined macros
  62  */




  22  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  *      ar.c
  28  *
  29  *      Deal with the lib.a(member.o) and lib.a((entry-point)) notations
  30  *
  31  * Look inside archives for notations a(b) and a((b))
  32  *      a(b)    is file member   b  in archive a
  33  *      a((b))  is entry point   b  in object archive a
  34  *
  35  * For 6.0, create a make which can understand all archive
  36  * formats.  This is kind of tricky, and <ar.h> isnt any help.
  37  */
  38 
  39 /*
  40  * Included files
  41  */
  42 #include <alloca.h>               /* alloca() */
  43 #include <ar.h>
  44 #include <errno.h>                /* errno */
  45 #include <fcntl.h>                /* open() */
  46 #include <mk/defs.h>
  47 #include <mksh/misc.h>            /* retmem_mb() */
  48 
  49 struct ranlib {
  50         union {
  51                 off_t   ran_strx;       /* string table index of */
  52                 char    *ran_name;      /* symbol defined by */
  53         }       ran_un;
  54         off_t   ran_off;                /* library member at this offset */
  55 };
  56 
  57 #include <unistd.h>               /* close() */
  58 
  59 
  60 /*
  61  * Defined macros
  62  */