[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A macro to check for data type alignment
From: |
Akim Demaille |
Subject: |
Re: A macro to check for data type alignment |
Date: |
Wed, 13 Feb 2002 13:42:38 +0100 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Common Lisp, i386-debian-linux) |
[Sorry, I forgot to CC to Paul]
| Since you asked for contribution of specific macros, I have picked out a
| few macros from our project that could be of general applicability. I'll
| just show you the macro right now; if you want to have it I'll supply a
| real patch and documentation updates.
|
| Here is a macro that checks whether the gettimeofday() function takes only
| 1 argument (normal is 2, the second argument is the time zone). This is
| the case on some SVR4 systems. If this is found to be the case, the macro
| inserts of definition
|
| #define gettimeofday(a,b) gettimeofday(a)
|
| into config.h. Thus gettimezone can be used consistently throughout the
| code without changes. (The use of the second argument is obsolete on
| modern systems, so there are not real problems to be expected from
| ignoring it.)
Thanks for the contribution!
I'm somewhat against using AC_DEFINE to replace functions (but until
we can provide more convenient, I'll just shut up 1:), and against
AC_FUNC which replaces without saying. Please, submit an
AC_REPLACE_FUNC_GETTIMEOFDAY.
Since there appears to be some debate about it, I'd like Paul's
insight on this function. In particular, I shall repeat I don't like
AC_DEFINE here. It seems to me that AC_REPLACE_FUNC is appropriate
here, with a real implementation of the POSIX guy.