Print this page
make: unifdef for other OSes (undefined)


  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 #if defined(linux)
  58 #include <ctype.h>                /* isspace */
  59 #else
  60 #include <unistd.h>               /* close() */
  61 #endif
  62 
  63 
  64 /*
  65  * Defined macros
  66  */
  67 #ifndef S5EMUL
  68 #undef BITSPERBYTE
  69 #define BITSPERBYTE     8
  70 #endif
  71 
  72 /*
  73  * Defines for all the different archive formats.  See next comment
  74  * block for justification for not using <ar.h>s versions.
  75  */
  76 #define AR_5_MAGIC              "<ar>"            /* 5.0 format magic string */
  77 #define AR_5_MAGIC_LENGTH       4               /* 5.0 format string length */
  78 
  79 #define AR_PORT_MAGIC           "!<arch>\n"       /* Port. (6.0) magic string */
  80 #define AR_PORT_MAGIC_LENGTH    8               /* Port. (6.0) string length */
  81 #define AR_PORT_END_MAGIC       "`\n"           /* Port. (6.0) end of header */




  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  */
  63 #ifndef S5EMUL
  64 #undef BITSPERBYTE
  65 #define BITSPERBYTE     8
  66 #endif
  67 
  68 /*
  69  * Defines for all the different archive formats.  See next comment
  70  * block for justification for not using <ar.h>s versions.
  71  */
  72 #define AR_5_MAGIC              "<ar>"            /* 5.0 format magic string */
  73 #define AR_5_MAGIC_LENGTH       4               /* 5.0 format string length */
  74 
  75 #define AR_PORT_MAGIC           "!<arch>\n"       /* Port. (6.0) magic string */
  76 #define AR_PORT_MAGIC_LENGTH    8               /* Port. (6.0) string length */
  77 #define AR_PORT_END_MAGIC       "`\n"           /* Port. (6.0) end of header */