summaryrefslogtreecommitdiff
path: root/config
AgeCommit message (Collapse)Author
2015-03-20Add, optional, support for 128bit integers.Andres Freund
We will, for the foreseeable future, not expose 128 bit datatypes to SQL. But being able to use 128bit math will allow us, in a later patch, to use 128bit accumulators for some aggregates; leading to noticeable speedups over using numeric. So far we only detect a gcc/clang extension that supports 128bit math, but no 128bit literals, and no *printf support. We might want to expand this in the future to further compilers; if there are any that that provide similar support. Discussion: 544BB5F1.50709@proxel.se Author: Andreas Karlsson, with significant editorializing by me Reviewed-By: Peter Geoghegan, Oskari Saarenmaa
2015-02-10Speed up CRC calculation using slicing-by-8 algorithm.Heikki Linnakangas
This speeds up WAL generation and replay. The new algorithm is significantly faster with large inputs, like full-page images or when inserting wide rows. It is slower with tiny inputs, i.e. less than 10 bytes or so, but the speedup with longer inputs more than make up for that. Even small WAL records at least have 24 byte header in the front. The output is identical to the current byte-at-a-time computation, so this does not affect compatibility. The new algorithm is only used for the CRC-32C variant, not the legacy version used in tsquery or the "traditional" CRC-32 used in hstore and ltree. Those are not as performance critical, and are usually only applied over small inputs, so it seems better to not carry around the extra lookup tables to speed up those rare cases. Abhijit Menon-Sen
2015-01-11Remove configure test for nonstandard variants of getpwuid_r().Tom Lane
We had code that supposed that some platforms might offer a nonstandard version of getpwuid_r() with only four arguments. However, the 5-argument definition has been standardized at least since the Single Unix Spec v2, which is our normal reference for what's portable across all Unix-oid platforms. (What's more, this wasn't the only pre-standardization version of getpwuid_r(); my old HPUX 10.20 box has still another signature.) So let's just get rid of the now-useless configure step.
2014-11-23Detect PG_PRINTF_ATTRIBUTE automatically.Noah Misch
This eliminates gobs of "unrecognized format function type" warnings under MinGW compilers predating GCC 4.4.
2014-09-25Add a basic atomic ops API abstracting away platform/architecture details.Andres Freund
Several upcoming performance/scalability improvements require atomic operations. This new API avoids the need to splatter compiler and architecture dependent code over all the locations employing atomic ops. For several of the potential usages it'd be problematic to maintain both, a atomics using implementation and one using spinlocks or similar. In all likelihood one of the implementations would not get tested regularly under concurrency. To avoid that scenario the new API provides a automatic fallback of atomic operations to spinlocks. All properties of atomic operations are maintained. This fallback - obviously - isn't as fast as just using atomic ops, but it's not bad either. For one of the future users the atomics ontop spinlocks implementation was actually slightly faster than the old purely spinlock using implementation. That's important because it reduces the fear of regressing older platforms when improving the scalability for new ones. The API, loosely modeled after the C11 atomics support, currently provides 'atomic flags' and 32 bit unsigned integers. If the platform efficiently supports atomic 64 bit unsigned integers those are also provided. To implement atomics support for a platform/architecture/compiler for a type of atomics 32bit compare and exchange needs to be implemented. If available and more efficient native support for flags, 32 bit atomic addition, and corresponding 64 bit operations may also be provided. Additional useful atomic operations are implemented generically ontop of these. The implementation for various versions of gcc, msvc and sun studio have been tested. Additional existing stub implementations for * Intel icc * HUPX acc * IBM xlc are included but have never been tested. These will likely require fixes based on buildfarm and user feedback. As atomic operations also require barriers for some operations the existing barrier support has been moved into the atomics code. Author: Andres Freund with contributions from Oskari Saarenmaa Reviewed-By: Amit Kapila, Robert Haas, Heikki Linnakangas and Álvaro Herrera Discussion: CA+TgmoYBW+ux5-8Ja=Mcyuy8=VXAnVRHp3Kess6Pn3DMXAPAEA@mail.gmail.com, 20131015123303.GH5300@awork2.anarazel.de, 20131028205522.GI20248@awork2.anarazel.de
2014-09-18Fix configure check for %z printf support after INT64_MODIFIER changes.Andres Freund
The PGAC_FUNC_SNPRINTF_SIZE_T_SUPPORT test was broken by ce486056ecd28050. Among others it made the UINT64_FORMAT macro to be defined in c.h, instead of directly being defined by configure. This lead to the replacement printf being used on all platforms for a while. Which seems to work, because this was only used due to different profiles ;) Fix by relying on INT64_MODIFIER instead.
2014-08-21Add #define INT64_MODIFIER for the printf length modifier for 64-bit ints.Heikki Linnakangas
We have had INT64_FORMAT and UINT64_FORMAT for a long time, but that's not good enough if you want something more exotic, like "%20lld". Abhijit Menon-Sen, per Andres Freund's suggestion.
2014-07-25Move PGAC_LDAP_SAFE to config/programs.m4.Noah Misch
This restores the style of keeping configure.in free of AC_DEFUN. Per gripe from Tom Lane.
2014-07-01Remove some useless code in the configure script.Tom Lane
Almost ten years ago, commit e48322a6d6cfce1ec52ab303441df329ddbc04d1 broke the logic in ACX_PTHREAD by looping through all the possible flags rather than stopping with the first one that would work. This meant that $acx_pthread_ok was no longer meaningful after the loop; it would usually be "no", whether or not we'd found working thread flags. The reason nobody noticed is that Postgres doesn't actually use any of the symbols set up by the code after the loop. Rather than complicate things some more to make it work as designed, let's just remove all that dead code, and thereby save a few cycles in each configure run.
2014-06-04Silence Bison deprecation warningsPeter Eisentraut
Bison >=3.0 issues warnings about %name-prefix="base_yy" instead of the now preferred %name-prefix "base_yy" but the latter doesn't work with Bison 2.3 or less. So for now we silence the deprecation warnings.
2014-05-30On OS X, link libpython normally, ignoring the "framework" framework.Tom Lane
As of Xcode 5.0, Apple isn't including the Python framework as part of the SDK-level files, which means that linking to it might fail depending on whether Xcode thinks you've selected a specific SDK version. According to their Tech Note 2328, they've basically deprecated the framework method of linking to libpython and are telling people to link to the shared library normally. (I'm pretty sure this is in direct contradiction to the advice they were giving a few years ago, but whatever.) Testing says that this approach works fine at least as far back as OS X 10.4.11, so let's just rip out the framework special case entirely. We do still need a special case to decide that OS X provides a shared library at all, unfortunately (I wonder why the distutils check doesn't work ...). But this is still less of a special case than before, so it's fine. Back-patch to all supported branches, since we'll doubtless be hearing about this more as more people update to recent Xcode.
2014-05-10Accept tcl 8.6 in configure's probe for tclsh.Tom Lane
Usually the search would find plain "tclsh" without any trouble, but some installations might only have the version-numbered flavor of that program. No compatibility problems have been reported with 8.6, so we might as well back-patch this to all active branches. Christoph Berg
2014-05-10Update config.guess and config.subTom Lane
2014-05-06pgindent run for 9.4Bruce Momjian
This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching.
2014-05-01Fix "quiet inline" configure test for newer clang compilers.Tom Lane
This test used to just define an unused static inline function and check whether that causes a warning. But newer clang versions warn about unused static inline functions when defined inside a .c file, but not when defined in an included header, which is the case we care about. Change the test to cope. Andres Freund
2014-01-23Allow use of "z" flag in our printf calls, and use it where appropriate.Tom Lane
Since C99, it's been standard for printf and friends to accept a "z" size modifier, meaning "whatever size size_t has". Up to now we've generally dealt with printing size_t values by explicitly casting them to unsigned long and using the "l" modifier; but this is really the wrong thing on platforms where pointers are wider than longs (such as Win64). So let's start using "z" instead. To ensure we can do that on all platforms, teach src/port/snprintf.c to understand "z", and add a configure test to force use of that implementation when the platform's version doesn't handle "z". Having done that, modify a bunch of places that were using the unsigned-long hack to use "z" instead. This patch doesn't pretend to have gotten everyplace that could benefit, but it catches many of them. I made an effort in particular to ensure that all uses of the same error message text were updated together, so as not to increase the number of translatable strings. It's possible that this change will result in format-string warnings from pre-C99 compilers. We might have to reconsider if there are any popular compilers that will warn about this; but let's start by seeing what the buildfarm thinks. Andres Freund, with a little additional work by me
2013-10-11Remove maintainer-check target, fold into normal buildPeter Eisentraut
make maintainer-check was obscure and rarely called in practice, and many breakages were missed. Fold everything that make maintainer-check used to do into the normal build. Specifically: - Call duplicate_oids when genbki.pl is called. - Check for tabs in SGML files when the documentation is built. - Run msgfmt with the -c option during the regular build. Add an additional configure check to see whether we are using the GNU version. (make maintainer-check probably used to fail with non-GNU msgfmt.) Keep maintainer-check as around as phony target for the time being in case anyone is calling it. But it won't do anything anymore.
2013-06-15Be consistent about #define'ing configure symbols as "1" not empty.Tom Lane
This is just neatnik-ism, since all the tests in the code are #ifdefs, but we shouldn't specify symbols as "Define to 1 ..." and then not actually define them that way.
2013-04-30Compiler optimizations for page checksum code.Simon Riggs
Ants Aasma and Jeff Davis
2013-04-27Update config.guess and config.subPeter Eisentraut
2013-01-13Improve handling of ereport(ERROR) and elog(ERROR).Tom Lane
In commit 71450d7fd6c7cf7b3e38ac56e363bff6a681973c, we added code to inform suitably-intelligent compilers that ereport() doesn't return if the elevel is ERROR or higher. This patch extends that to elog(), and also fixes a double-evaluation hazard that the previous commit created in ereport(), as well as reducing the emitted code size. The elog() improvement requires the compiler to support __VA_ARGS__, which should be available in just about anything nowadays since it's required by C99. But our minimum language baseline is still C89, so add a configure test for that. The previous commit assumed that ereport's elevel could be evaluated twice, which isn't terribly safe --- there are already counterexamples in xlog.c. On compilers that have __builtin_constant_p, we can use that to protect the second test, since there's no possible optimization gain if the compiler doesn't know the value of elevel. Otherwise, use a local variable inside the macros to prevent double evaluation. The local-variable solution is inferior because (a) it leads to useless code being emitted when elevel isn't constant, and (b) it increases the optimization level needed for the compiler to recognize that subsequent code is unreachable. But it seems better than not teaching non-gcc compilers about unreachability at all. Lastly, if the compiler has __builtin_unreachable(), we can use that instead of abort(), resulting in a noticeable code savings since no function call is actually emitted. However, it seems wise to do this only in non-assert builds. In an assert build, continue to use abort(), so that the behavior will be predictable and debuggable if the "impossible" happens. These changes involve making the ereport and elog macros emit do-while statement blocks not just expressions, which forces small changes in a few call sites. Andres Freund, Tom Lane, Heikki Linnakangas
2013-01-09Detect Windows perl linkage parameters in configure script.Andrew Dunstan
This means we can now construct a configure test for the library presence. Previously these parameters were only figured out at build time in plperl's GnuMakefile.
2013-01-06Fix plpython build on older versions of OS X.Tom Lane
Pre-Lion versions of Apple's linker don't allow space between -F and its argument. (Snow Leopard is nice enough to tell you that in so many words, but older versions just fail with very obscure link errors, as seen on buildfarm member locust for instance.) Oversight in commit fc8745070a53469a43ecbf999dc5692a36a649cc.
2013-01-05PL/Python: Make build on OS X more flexiblePeter Eisentraut
The PL/Python build on OS X was previously hardcoded to use the system installation of Python, ignoring whatever was specified to configure. Except that it would use the header files from configure, which could lead to mismatches. It was not possible to build against a custom Python installation. Now, we check in configure how the specified Python installation was built and use that, supporting framework and non-framework builds.
2012-10-09Rename USE_INLINE to PG_USE_INLINEAlvaro Herrera
The former name was too likely to conflict with symbols from external headers; and, as seen in recent buildfarm failures in member spoonbill, it has now happened at least in plpython.
2012-09-30Add infrastructure for compile-time assertions about variable types.Tom Lane
Currently, the macros only work with fairly recent gcc versions, but there is room to expand them to other compilers that have comparable features. Heavily revised and autoconfiscated version of a patch by Andres Freund.
2012-08-30Also check for Python platform-specific include directoryPeter Eisentraut
Python can be built to have two separate include directories: one for platform-independent files and one for platform-specific files. So far, this has apparently never mattered for a PL/Python build. But with the new multi-arch Python packages in Debian and Ubuntu, this is becoming the standard configuration on these platforms, so we must check these directories separately to be able to build there. Also add a bit of reporting in configure to be able to see better what is going on with this.
2012-08-22Fix install-strip on Mac OS XPeter Eisentraut
There was a hack put into install-sh to call strip with the correct options on Mac OS X. But that never worked, because configure disabled stripping on that platform altogether. So remove that dead code, and while we're at it, update install-sh to the latest upstream source (from Automake). Instead, set up the right strip options in programs.m4, so this now actually works the way it was originally intended.
2012-05-15Put back AC_REQUIRE([AC_STRUCT_TM]).Tom Lane
The BSD-ish members of the buildfarm all seem to think removing this was a bad idea. It looks to me like it resulted in omitting the system header inclusion necessary to detect the fields of struct tm correctly.
2012-05-14Remove unused AC_DEFINE symbolsPeter Eisentraut
ENABLE_DTRACE unused as of a7b7b07af340c73adee9959edf260695591a9496 HAVE_ERR_SET_MARK unused as of 4ed4b6c54e5fab24ab2624d80e26f7546edc88ad HAVE_FCVT unused as of 4553e1d80f824291932cfde30aa24a76dd8f1941 HAVE_STRUCT_SOCKADDR_UN unused as of b4cea00a1fc9d2270bfe9aeeee44915378d5f733 HAVE_SYSCONF unused as of f83356c7f574bc69969f29dc7b430b286a0cd9f4 TM_IN_SYS_TIME never used, obsolescent per Autoconf documentation
2012-05-08Update config.guess and config.subPeter Eisentraut
2012-03-22Fix configure's search for collateindex.pl.Tom Lane
PGAC_PATH_COLLATEINDEX supposed that it could use AC_PATH_PROGS to search for collateindex.pl, but that macro will only accept files that are marked executable, and at least some DocBook installations don't mark the script executable (a case the docs Makefile was already prepared for). Accept the script if it's present and readable in $DOCBOOKSTYLE/bin, and otherwise search the PATH as before. Having fixed that up, we don't need the fallback case that was in the docs Makefile, and instead can throw an understandable error if configure didn't find the script. Per recent trouble report from John Lumby.
2012-02-20Don't reject threaded Python on FreeBSD.Tom Lane
According to Chris Rees, this has worked for awhile, and the current FreeBSD port is removing the test anyway.
2011-12-10Enable compiling with the mingw-w64 32 bit compiler.Andrew Dunstan
Original patch by Lars Kanis, reviewed by Nishiyama Tomoaki and tweaked some by me. This compiler, or at least the latest version of it, is currently broken, and only passes the regression tests if built with -O0.
2011-11-29python.m4: Remove useless "import string" callsPeter Eisentraut
They have been unneeded since the use of the string module has been removed in a65ed83f8a6fbf35c1e563533ab8293a788b1fce.
2011-08-18Improve detection of Python 3.2 installationsPeter Eisentraut
Because of ABI tagging, the library version number might no longer be exactly the Python version number, so do extra lookups. This affects installations without a shared library, such as ActiveState's installer. Also update the way to detect the location of the 'config' directory, which can also be versioned. Ashesh Vashi
2011-05-26Adjust configure to use "+Olibmerrno" with HP-UX C compiler, if possible.Tom Lane
This is reported to be necessary on some versions of that OS. In service of this, cause PGAC_PROG_CC_CFLAGS_OPT to reject switches that result in compiler warnings, since on yet other versions of that OS, the switch does nothing except provoke a warning. Report and patch by Ibrar Ahmed, further tweaking by me.
2011-05-19Update config.guess and config.subPeter Eisentraut
2011-02-16Better support for thread-support flag detection with clangPeter Eisentraut
When testing the stderr produced by various thread-support flags, also run a compilation in addition to a link, because clang warns on certain flags when compiling but not when linking.
2011-02-08Per-column collation supportPeter Eisentraut
This adds collation support for columns and domains, a COLLATE clause to override it per expression, and B-tree index support. Peter Eisentraut reviewed by Pavel Stehule, Itagaki Takahiro, Robert Haas, Noah Misch
2011-01-31Enable building with the Mingw64 compiler.Andrew Dunstan
This can be used to build 64 bit Windows binaries, not only on 64 bit Windows but on supported cross-compiling hosts including 32 bit Windows, Cygwin, Darwin and Linux.
2010-11-23Remove useless whitespace at end of linesPeter Eisentraut
2010-10-25find -path is not portable, so use grep -v instead.Alvaro Herrera
Per previous failure of buildfarm member koi (which is no longer failing, alas).
2010-09-29Add/fix caching on some configure checksPeter Eisentraut
2010-09-24Prevent doc/src/sgml subdirs from being created, instead of deletingAlvaro Herrera
them after the fact. This is a more elegant fix for bug #5595.
2010-09-22Fix remaining stray references to CVS.Tom Lane
These are just cosmetic and don't seem worth back-patching far. I put them into 9.0 just because it was trivial to do so.
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-08-26Don't auto-create the subdirectories holding built documentation in a VPATHTom Lane
build tree. If we actually build the docs in the VPATH tree, those dirs will get created then; but if they're present and empty, they capture the vpathsearch searches in "make install", preventing installation of prebuilt docs that might exist in the source tree. Per bug #5595 from Dmtiriy Igrishin. Fix based on idea from Peter Eisentraut.
2010-08-19Remove extra newlines at end and beginning of files, add missing newlinesPeter Eisentraut
at end of files.
2010-05-25Replace self written 'long long int' configure test by standard ↵Michael Meskes
'AC_TYPE_LONG_LONG_INT' macro call.