From: | Kurt Harriman <harriman(at)acm(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Patch: Remove gcc dependency in definition of inline functions |
Date: | 2009-11-29 19:11:04 |
Message-ID: | 4B12C748.1090100@acm.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
The attached patch is offered for the 2010-01 commitfest.
It's also available in my git repository in the "submitted" branch:
http://git.postgresql.org/gitweb?p=users/harriman/share.git;a=shortlog;h=refs/heads/submitted
In palloc.h and pg_list.h, some inline functions are defined if
allowed by the compiler. Previously the test was gcc-specific.
This patch enables inlining on more platforms, relying on the
Autoconf-generated "configure" script to determine whether
the compiler supports inline functions.
Depending on the compiler, the keyword for defining an inline
function might be spelled as inline, __inline, or __inline__,
or none of these. "configure" finds out, and except in the
first case, puts a suitable "#define inline" into pg_config.h.
This hasn't changed.
What's new is that "configure" will add "#define HAVE_INLINE 1"
into pg_config.h if it detects that the compiler accepts inline
function definitions. palloc.h and pg_list.h will condition
their inline function definitions on HAVE_INLINE instead of
the gcc-specific __GNUC__.
After applying the patch, run these commands to update
the configure script and pg_config.h.in:
autoconf; autoheader
(Does anybody still use a C compiler that doesn't support
inline functions?)
Regards,
... kurt
Attachment | Content-Type | Size |
---|---|---|
inline-across-platforms.patch | text/plain | 4.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Boszormenyi Zoltan | 2009-11-29 19:56:41 | Re: draft RFC: concept for partial, wal-based replication |
Previous Message | Pavel Stehule | 2009-11-29 18:58:35 | Re: Timezones (in 8.5?) |