boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

ar.h (1997B)


      1 /* -*-comment-start: "//";comment-end:""-*-
      2  * GNU Mes --- Maxwell Equations of Software
      3  * Copyright (C) 1996 Free Software Foundation, Inc.
      4  * Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
      5  *
      6  * This file is part of GNU Mes.
      7  *
      8  * GNU Mes is free software; you can redistribute it and/or modify it
      9  * under the terms of the GNU General Public License as published by
     10  * the Free Software Foundation; either version 3 of the License, or (at
     11  * your option) any later version.
     12  *
     13  * GNU Mes is distributed in the hope that it will be useful, but
     14  * WITHOUT ANY WARRANTY; without even the implied warranty of
     15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16  * GNU General Public License for more details.
     17  *
     18  * You should have received a copy of the GNU General Public License
     19  * along with GNU Mes.  If not, see <http://www.gnu.org/licenses/>.
     20  */
     21 #ifndef __MES_AR_H
     22 #define __MES_AR_H 1
     23 
     24 #if SYSTEM_LIBC
     25 #ifndef _GNU_SOURCE
     26 #define _GNU_SOURCE
     27 #endif
     28 #undef __MES_AR_H
     29 #include_next <ar.h>
     30 
     31 #else // ! SYSTEM_LIBC
     32 
     33 // Taken from GNU C Library 2.2.5
     34 
     35 /* Archive files start with the ARMAG identifying string.  Then follows a
     36    `struct ar_hdr', and as many bytes of member file data as its `ar_size'
     37    member indicates, for each member file.  */
     38 
     39 #define ARMAG	"!<arch>\n"     /* String that begins an archive file.  */
     40 #define SARMAG	8               /* Size of that string.  */
     41 
     42 #define ARFMAG	"`\n"           /* String in ar_fmag at end of each header.  */
     43 
     44 struct ar_hdr
     45 {
     46   char ar_name[16];             /* Member file name, sometimes / terminated. */
     47   char ar_date[12];             /* File date, decimal seconds since Epoch.  */
     48   char ar_uid[6], ar_gid[6];    /* User and group IDs, in ASCII decimal.  */
     49   char ar_mode[8];              /* File mode, in ASCII octal.  */
     50   char ar_size[10];             /* File size, in ASCII decimal.  */
     51   char ar_fmag[2];              /* Always contains ARFMAG.  */
     52 };
     53 
     54 #endif // ! SYSTEM_LIBC
     55 
     56 #endif // __MES_ARGZ_H