Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Signed-off-by: Zack Weinberg <zackw@panix.com>
[hch: removed dead conditionals]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Zack Weinberg and committed by
Linus Torvalds
fbd57629 dbd18777

+1 -25
+1 -25
include/uapi/linux/a.out.h
··· 112 112 #define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0) 113 113 #endif 114 114 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 115 + /* Address of data segment in memory after it is loaded. */ 133 116 #ifndef __KERNEL__ 134 117 #include <unistd.h> 135 118 #endif ··· 122 139 #ifndef SEGMENT_SIZE 123 140 #ifndef __KERNEL__ 124 141 #define SEGMENT_SIZE getpagesize() 125 - #endif 126 142 #endif 127 143 #endif 128 144 #endif ··· 242 260 unsigned int r_extern:1; 243 261 /* Four bits that aren't used, but when writing an object file 244 262 it is desirable to clear them. */ 245 - #ifdef NS32K 246 - unsigned r_bsr:1; 247 - unsigned r_disp:1; 248 - unsigned r_pad:2; 249 - #else 250 263 unsigned int r_pad:4; 251 - #endif 252 264 }; 253 265 #endif /* no N_RELOCATION_INFO_DECLARED. */ 254 266