From: Paul Eggert Date: Sat, 12 Feb 2011 10:05:38 +0000 (-0800) Subject: Port to Sun C 5.11, which has __attribute__ ((__aligned (N))). X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~921 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cec81b228b5a0e7850f23c97593352655ec56bf1;p=emacs.git Port to Sun C 5.11, which has __attribute__ ((__aligned (N))). * md5.h (ATTRIBUTE_ALIGNED): New macro. (struct md5_ctx): Use it. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4ef9778ca48..735f73b3544 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-02-12 Paul Eggert + Port to Sun C 5.11, which has __attribute__ ((__aligned (N))). + * md5.h (ATTRIBUTE_ALIGNED): New macro. + (struct md5_ctx): Use it. + Port to Solaris 10, which doesn't support FC_HINT_STYLE. * xftfont.c (FC_HINT_STYLE): #define to "hintstyle" if not defined. diff --git a/src/md5.h b/src/md5.h index 8ab73050379..22bcdfd7119 100644 --- a/src/md5.h +++ b/src/md5.h @@ -72,9 +72,10 @@ typedef u_int32_t md5_uint32; #endif -#ifndef __GNUC__ -#define __attribute__(X) -#define __alignof__(X) 1 +#if HAVE_ATTRIBUTE_ALIGNED +# define ATTRIBUTE_ALIGNED(N) __attribute__ ((__aligned__ (N))) +#else +# define ATTRIBUTE_ALIGNED(N) #endif /* Structure to save state of computation between the single steps. */ @@ -87,7 +88,7 @@ struct md5_ctx md5_uint32 total[2]; md5_uint32 buflen; - char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32)))); + char buffer[128] ATTRIBUTE_ALIGNED (__alignof__ (md5_uint32)); }; /* @@ -145,4 +146,3 @@ extern void *md5_buffer (const char *buffer, size_t len, void *resblock); #endif /* md5.h */ -