Source-Changes-HG archive

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

[src/trunk]: src Wrap long #if defined(...) || ... and sort. NFCI.



details:   https://anonhg.NetBSD.org/src/rev/9df0a6ec7a5c
branches:  trunk
changeset: 367269:9df0a6ec7a5c
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Jun 21 06:47:37 2022 +0000

description:
Wrap long #if defined(...) || ... and sort.  NFCI.

diffstat:

 lib/csu/common/crt0-common.c      |  13 +++++++++----
 libexec/ld.elf_so/rtld.h          |  10 +++++++---
 tests/lib/csu/h_ifunc_static.c    |  10 +++++++---
 tests/libexec/ld.elf_so/t_ifunc.c |   9 +++++++--
 4 files changed, 30 insertions(+), 12 deletions(-)

diffs (107 lines):

diff -r 60cafdecd37e -r 9df0a6ec7a5c lib/csu/common/crt0-common.c
--- a/lib/csu/common/crt0-common.c      Tue Jun 21 06:41:39 2022 +0000
+++ b/lib/csu/common/crt0-common.c      Tue Jun 21 06:47:37 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0-common.c,v 1.25 2022/06/21 06:41:39 skrll Exp $ */
+/* $NetBSD: crt0-common.c,v 1.26 2022/06/21 06:47:37 skrll Exp $ */
 
 /*
  * Copyright (c) 1998 Christos Zoulas
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: crt0-common.c,v 1.25 2022/06/21 06:41:39 skrll Exp $");
+__RCSID("$NetBSD: crt0-common.c,v 1.26 2022/06/21 06:47:37 skrll Exp $");
 
 #include <sys/types.h>
 #include <sys/exec.h>
@@ -126,10 +126,15 @@
        }
 }
 
-#if defined(__x86_64__) || defined(__powerpc__) || defined(__sparc__)
+#if \
+    defined(__powerpc__) || \
+    defined(__sparc__) || \
+    defined(__x86_64__)
 #define HAS_IPLTA
 static void fix_iplta(void) __noinline;
-#elif defined(__i386__) || defined(__arm__)
+#elif \
+    defined(__arm__) || \
+    defined(__i386__)
 #define HAS_IPLT
 static void fix_iplt(void) __noinline;
 #endif
diff -r 60cafdecd37e -r 9df0a6ec7a5c libexec/ld.elf_so/rtld.h
--- a/libexec/ld.elf_so/rtld.h  Tue Jun 21 06:41:39 2022 +0000
+++ b/libexec/ld.elf_so/rtld.h  Tue Jun 21 06:47:37 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtld.h,v 1.142 2021/12/04 14:39:08 skrll Exp $  */
+/*     $NetBSD: rtld.h,v 1.143 2022/06/21 06:47:37 skrll Exp $  */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -302,8 +302,12 @@
        size_t          fini_arraysz;   /* # of entries in it */
        /* IRELATIVE relocations */
        size_t          ifunc_remaining;
-#if defined(__sparc__) || defined(__powerpc__) || defined(__arm__) || \
-    defined(__i386__) || defined(__x86_64__)
+#if \
+    defined(__arm__) || \
+    defined(__i386__) || \
+    defined(__powerpc__) || \
+    defined(__sparc__) || \
+    defined(__x86_64__)
 #define IFUNC_NONPLT
        /* On SPARC, the PLT variant is called JMP_IREL and counted above. */
        size_t          ifunc_remaining_nonplt;
diff -r 60cafdecd37e -r 9df0a6ec7a5c tests/lib/csu/h_ifunc_static.c
--- a/tests/lib/csu/h_ifunc_static.c    Tue Jun 21 06:41:39 2022 +0000
+++ b/tests/lib/csu/h_ifunc_static.c    Tue Jun 21 06:47:37 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: h_ifunc_static.c,v 1.5 2022/06/13 12:55:06 martin Exp $        */
+/*     $NetBSD: h_ifunc_static.c,v 1.6 2022/06/21 06:47:38 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -29,8 +29,12 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__arm__) || defined(__i386__) || \
-       defined(__x86_64__) || defined(__powerpc__) || defined(__sparc__)
+#if \
+    defined(__arm__) || \
+    defined(__i386__) || \
+    defined(__powerpc__) || \
+    defined(__sparc__) || \
+    defined(__x86_64__)
 #include <stdlib.h>
 #include <string.h>
 
diff -r 60cafdecd37e -r 9df0a6ec7a5c tests/libexec/ld.elf_so/t_ifunc.c
--- a/tests/libexec/ld.elf_so/t_ifunc.c Tue Jun 21 06:41:39 2022 +0000
+++ b/tests/libexec/ld.elf_so/t_ifunc.c Tue Jun 21 06:47:37 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ifunc.c,v 1.10 2022/06/13 19:49:33 skrll Exp $       */
+/*     $NetBSD: t_ifunc.c,v 1.11 2022/06/21 06:47:38 skrll Exp $       */
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -35,7 +35,12 @@
 
 #include "h_macros.h"
 
-#if defined(__arm__) || defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__sparc__)
+#if \
+    defined(__arm__) || \
+    defined(__i386__) || \
+    defined(__sparc__) || \
+    defined(__powerpc__) || \
+    defined(__x86_64__)
 #define        LINKER_SUPPORT 1
 #else
 #define        LINKER_SUPPORT 0



Home | Main Index | Thread Index | Old Index