00001 /* archive file definition for GNU software 00002 00003 Copyright 2001 Free Software Foundation, Inc. 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 00018 00019 /* So far this is correct for BSDish archives. Don't forget that 00020 files must begin on an even byte boundary. */ 00021 00022 #ifndef __GNU_AR_H__ 00023 #define __GNU_AR_H__ 00024 00025 /* Note that the usual '\n' in magic strings may translate to different 00026 characters, as allowed by ANSI. '\012' has a fixed value, and remains 00027 compatible with existing BSDish archives. */ 00028 00029 #define ARMAG "!<arch>\012" /* For COFF and a.out archives */ 00030 #define ARMAGB "!<bout>\012" /* For b.out archives */ 00031 #define SARMAG 8 00032 #define ARFMAG "`\012" 00033 00034 /* The ar_date field of the armap (__.SYMDEF) member of an archive 00035 must be greater than the modified date of the entire file, or 00036 BSD-derived linkers complain. We originally write the ar_date with 00037 this offset from the real file's mod-time. After finishing the 00038 file, we rewrite ar_date if it's not still greater than the mod date. */ 00039 00040 #define ARMAP_TIME_OFFSET 60 00041 00042 struct ar_hdr { 00043 char ar_name[16]; /* name of this member */ 00044 char ar_date[12]; /* file mtime */ 00045 char ar_uid[6]; /* owner uid; printed as decimal */ 00046 char ar_gid[6]; /* owner gid; printed as decimal */ 00047 char ar_mode[8]; /* file mode, printed as octal */ 00048 char ar_size[10]; /* file size, printed as decimal */ 00049 char ar_fmag[2]; /* should contain ARFMAG */ 00050 }; 00051 00052 #endif /* __GNU_AR_H__ */
1.5.6