History

uapi/linux/a.out.h: don't use deprecated system-specific predefines.

uapi/linux/a.out.h uses a number of predefined macros that are deprecated because they're in the application namespace (e.g. '#ifdef linux' instead of '#ifdef __linux__'). This patch either corrects or just removes them if they are not applicable to Linux. The primary reason this is worth bothering to fix, considering how obsolete a.out binary support is, is that the GCC build process considers this such a severe error that it will copy the header into a private directory and change the macro names, which causes future updates to the header to be masked. This header probably doesn't get updated very often anymore, but it is the _only_ uapi header that gets this treatment, so IMHO it is worth patching just to drive that number all the way to zero.

Zack Weinberg committed 9 years ago

Commit fbd57621 parent dbd18771 file · +1 −25Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/a.out.h+1−25
@@ -112,24 +112,7 @@ enum machine_type { · 111 unmodified lines
112#define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0)112#define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0)
113#endif113#endif
114 114
115/* Address of data segment in memory after it is loaded.115/* Address of data segment in memory after it is loaded. */
116 Note that it is up to you to define SEGMENT_SIZE
117 on machines not listed here. */
118#if defined(vax) || defined(hp300) || defined(pyr)
119#define SEGMENT_SIZE page_size
120#endif
121#ifdef sony
122#define SEGMENT_SIZE 0x2000
123#endif /* Sony. */
124#ifdef is68k
125#define SEGMENT_SIZE 0x20000
126#endif
127#if defined(m68k) && defined(PORTAR)
128#define PAGE_SIZE 0x400
129#define SEGMENT_SIZE PAGE_SIZE
130#endif
131
132#ifdef linux
133#ifndef __KERNEL__116#ifndef __KERNEL__
134#include <unistd.h>117#include <unistd.h>
135#endif118#endif
@@ -142,7 +125,6 @@ enum machine_type { · 6 unmodified lines
142#endif125#endif
143#endif126#endif
144#endif127#endif
145#endif
146 128
147#define _N_SEGMENT_ROUND(x) ALIGN(x, SEGMENT_SIZE)129#define _N_SEGMENT_ROUND(x) ALIGN(x, SEGMENT_SIZE)
148 130
@@ -260,13 +242,7 @@ struct relocation_info · 111 unmodified lines
260 unsigned int r_extern:1;242 unsigned int r_extern:1;
261 /* Four bits that aren't used, but when writing an object file243 /* Four bits that aren't used, but when writing an object file
262 it is desirable to clear them. */244 it is desirable to clear them. */
263#ifdef NS32K
264 unsigned r_bsr:1;
265 unsigned r_disp:1;
266 unsigned r_pad:2;
267#else
268 unsigned int r_pad:4;245 unsigned int r_pad:4;
269#endif
270};246};
271#endif /* no N_RELOCATION_INFO_DECLARED. */247#endif /* no N_RELOCATION_INFO_DECLARED. */
272 248