patches/binutils-2.23.2-musl.diff: factor out texinfo part
[rofl0r-mmix-cross.git] / patches / elfutils-add_ar.h.patch
blob099e9c12b003e9df96ea9d4f52bcab11635a93c4
1 diff -Naur elfutils-0.152-orig/libelf/ar.h elfutils-0.152/libelf/ar.h
2 --- elfutils-0.152-orig/libelf/ar.h 1970-01-01 00:00:00.000000000 +0000
3 +++ elfutils-0.152/libelf/ar.h 2012-01-25 02:50:23.018153231 +0000
4 @@ -0,0 +1,55 @@
5 +/* archive file definition for GNU software
7 + Copyright 2001, 2008, 2010 Free Software Foundation, Inc.
9 + This program is free software; you can redistribute it and/or modify
10 + it under the terms of the GNU General Public License as published by
11 + the Free Software Foundation; either version 3 of the License, or
12 + (at your option) any later version.
14 + This program is distributed in the hope that it will be useful,
15 + but WITHOUT ANY WARRANTY; without even the implied warranty of
16 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 + GNU General Public License for more details.
19 + You should have received a copy of the GNU General Public License
20 + along with this program; if not, write to the Free Software
21 + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
22 + MA 02110-1301, USA. */
24 +/* So far this is correct for BSDish archives. Don't forget that
25 + files must begin on an even byte boundary. */
27 +#ifndef __GNU_AR_H__
28 +#define __GNU_AR_H__
30 +/* Note that the usual '\n' in magic strings may translate to different
31 + characters, as allowed by ANSI. '\012' has a fixed value, and remains
32 + compatible with existing BSDish archives. */
34 +#define ARMAG "!<arch>\012" /* For COFF and a.out archives. */
35 +#define ARMAGB "!<bout>\012" /* For b.out archives. */
36 +#define ARMAGT "!<thin>\012" /* For thin archives. */
37 +#define SARMAG 8
38 +#define ARFMAG "`\012"
40 +/* The ar_date field of the armap (__.SYMDEF) member of an archive
41 + must be greater than the modified date of the entire file, or
42 + BSD-derived linkers complain. We originally write the ar_date with
43 + this offset from the real file's mod-time. After finishing the
44 + file, we rewrite ar_date if it's not still greater than the mod date. */
46 +#define ARMAP_TIME_OFFSET 60
48 +struct ar_hdr
50 + char ar_name[16]; /* Name of this member. */
51 + char ar_date[12]; /* File mtime. */
52 + char ar_uid[6]; /* Owner uid; printed as decimal. */
53 + char ar_gid[6]; /* Owner gid; printed as decimal. */
54 + char ar_mode[8]; /* File mode, printed as octal. */
55 + char ar_size[10]; /* File size, printed as decimal. */
56 + char ar_fmag[2]; /* Should contain ARFMAG. */
57 +};
59 +#endif /* __GNU_AR_H__ */
60 diff -Naur elfutils-0.152-orig/libelf/common.h elfutils-0.152/libelf/common.h
61 --- elfutils-0.152-orig/libelf/common.h 2010-06-29 04:09:31.000000000 +0000
62 +++ elfutils-0.152/libelf/common.h 2012-01-25 02:51:08.920226535 +0000
63 @@ -51,7 +51,7 @@
64 #ifndef _COMMON_H
65 #define _COMMON_H 1
67 -#include <ar.h>
68 +#include "ar.h"
69 #include <byteswap.h>
70 #include <endian.h>
71 #include <stdlib.h>
72 diff -Naur elfutils-0.152-orig/libelf/libelfP.h elfutils-0.152/libelf/libelfP.h
73 --- elfutils-0.152-orig/libelf/libelfP.h 2010-06-29 04:09:31.000000000 +0000
74 +++ elfutils-0.152/libelf/libelfP.h 2012-01-25 02:51:26.660867311 +0000
75 @@ -55,7 +55,7 @@
76 # include <config.h>
77 #endif
79 -#include <ar.h>
80 +#include "ar.h"
81 #include <gelf.h>
83 #include <errno.h>