Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/libelf/dist Provide definitions of MALIGN() and...



details:   https://anonhg.NetBSD.org/src/rev/b3f327bc509d
branches:  trunk
changeset: 750163:b3f327bc509d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Dec 19 07:54:32 2009 +0000

description:
Provide definitions of MALIGN() and MALIGN64() for the __lint__ case.

diffstat:

 external/bsd/libelf/dist/libelf_align.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 7d59f32eb39c -r b3f327bc509d external/bsd/libelf/dist/libelf_align.c
--- a/external/bsd/libelf/dist/libelf_align.c   Sat Dec 19 07:52:59 2009 +0000
+++ b/external/bsd/libelf/dist/libelf_align.c   Sat Dec 19 07:54:32 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: libelf_align.c,v 1.2 2009/12/19 07:31:04 thorpej Exp $ */
+/*     $NetBSD: libelf_align.c,v 1.3 2009/12/19 07:54:32 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2006 Joseph Koshy
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 /* __FBSDID("$FreeBSD: src/lib/libelf/libelf_align.c,v 1.3.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $"); */
-__RCSID("$NetBSD: libelf_align.c,v 1.2 2009/12/19 07:31:04 thorpej Exp $");
+__RCSID("$NetBSD: libelf_align.c,v 1.3 2009/12/19 07:54:32 thorpej Exp $");
 
 #include <sys/types.h>
 
@@ -43,7 +43,16 @@
        int a64;
 };
 
-#ifdef __GNUC__
+#if defined(__lint__)
+#define        MALIGN(N)       {                                       \
+               .a32 = sizeof(Elf32_##N),                       \
+               .a64 = sizeof(Elf64_##N)                        \
+       }
+#define        MALIGN64(V)       {                                     \
+               .a32 = 0,                                       \
+               .a64 = sizeof(Elf64_##V)                        \
+       }
+#elif defined(__GNUC__)
 #define        MALIGN(N)       {                                       \
                .a32 = __alignof__(Elf32_##N),                  \
                .a64 = __alignof__(Elf64_##N)                   \



Home | Main Index | Thread Index | Old Index