[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#863909: linux/a.out.h: should use #ifdef __linux__ not #ifdef linux, etc



Package: linux-libc-dev
Version: 4.11-1~exp2
Severity: normal
File: /usr/include/linux/a.out.h
Tags: upstream, patch

linux/a.out.h contains a number of uses of "deprecated
system-specific predefined macros" that will not be defined
when the compiler is used in a strict conformance mode, see
https://gcc.gnu.org/onlinedocs/gcc-6.3.0/cpp/System-specific-Predefined-Macros.html
for details.

This would only be a minor problem, except that it causes the GCC build
process to copy the header, "fix" it, and install the "fixed" copy in a
private directory that is searched before /usr/include.  It is desirable
for GCC not to do this to any headers, because it means updates to the
original are silently ignored until the GCC package is itself updated.

Please apply the attached patch.  It would be best if it were installed
to all actively maintained Debian kernels.  I will submit it upstream.

zw

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (501, 'unstable'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'testing'), (101, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- no debconf information
--- a/linux/a.out.h	2017-06-01 16:33:49.558497923 -0400
+++ b/linux/a.out.h	2017-06-01 16:35:42.559478580 -0400
@@ -115,21 +115,21 @@
 /* Address of data segment in memory after it is loaded.
    Note that it is up to you to define SEGMENT_SIZE
    on machines not listed here.  */
-#if defined(vax) || defined(hp300) || defined(pyr)
+#if defined(__vax__) || defined(__hp300__) || defined(__pyr__)
 #define SEGMENT_SIZE page_size
 #endif
-#ifdef	sony
+#ifdef	__sony__
 #define	SEGMENT_SIZE	0x2000
 #endif	/* Sony.  */
-#ifdef is68k
+#ifdef __is68k__
 #define SEGMENT_SIZE 0x20000
 #endif
-#if defined(m68k) && defined(PORTAR)
+#if defined(__m68k__) && defined(__PORTAR__)
 #define PAGE_SIZE 0x400
 #define SEGMENT_SIZE PAGE_SIZE
 #endif
 
-#ifdef linux
+#ifdef __linux__
 #include <unistd.h>
 #if defined(__i386__) || defined(__mc68000__)
 #define SEGMENT_SIZE	1024
@@ -256,7 +256,7 @@
   unsigned int r_extern:1;
   /* Four bits that aren't used, but when writing an object file
      it is desirable to clear them.  */
-#ifdef NS32K
+#ifdef __NS32K__
   unsigned r_bsr:1;
   unsigned r_disp:1;
   unsigned r_pad:2;

Reply to: