summaryrefslogtreecommitdiff
path: root/src/include/getaddrinfo.h
Commit message (Collapse)AuthorAgeFilesLines
* Initial pgindent run with pg_bsd_indent version 2.0.Tom Lane2017-06-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new indent version includes numerous fixes thanks to Piotr Stefaniak. The main changes visible in this commit are: * Nicer formatting of function-pointer declarations. * No longer unexpectedly removes spaces in expressions using casts, sizeof, or offsetof. * No longer wants to add a space in "struct structname *varname", as well as some similar cases for const- or volatile-qualified pointers. * Declarations using PG_USED_FOR_ASSERTS_ONLY are formatted more nicely. * Fixes bug where comments following declarations were sometimes placed with no space separating them from the code. * Fixes some odd decisions for comments following case labels. * Fixes some cases where comments following code were indented to less than the expected column 33. On the less good side, it now tends to put more whitespace around typedef names that are not listed in typedefs.list. This might encourage us to put more effort into typedef name collection; it's not really a bug in indent itself. There are more changes coming after this round, having to do with comment indentation and alignment of lines appearing within parentheses. I wanted to limit the size of the diffs to something that could be reviewed without one's eyes completely glazing over, so it seemed better to split up the changes as much as practical. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
* Remove symbol WIN32_ONLY_COMPILERMagnus Hagander2017-04-111-1/+1
| | | | | | | This used to mean "Visual C++ except in those parts where Borland C++ was supported where it meant one of those". Now that we don't support Borland C++ anymore, simplify by using _MSC_VER which is the normal way to detect Visual C++.
* Remove support for bcc and msvc standalone libpq buildsMagnus Hagander2017-04-111-2/+0
| | | | | | | | | This removes the support for building just libpq using Borland C++ or Visual C++. This has not worked properly for years, and given the number of complaints it's clearly not worth the maintenance burden. Building libpq using the standard MSVC build system is of course still supported, along with mingw.
* Update copyright via script for 2017Bruce Momjian2017-01-031-1/+1
|
* Update copyright for 2016Bruce Momjian2016-01-021-1/+1
| | | | Backpatch certain files through 9.1
* Update copyright for 2015Bruce Momjian2015-01-061-1/+1
| | | | Backpatch certain files through 9.0
* Fix assorted issues in client host name lookup.Tom Lane2014-04-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code for matching clients to pg_hba.conf lines that specify host names (instead of IP address ranges) failed to complain if reverse DNS lookup failed; instead it silently didn't match, so that you might end up getting a surprising "no pg_hba.conf entry for ..." error, as seen in bug #9518 from Mike Blackwell. Since we don't want to make this a fatal error in situations where pg_hba.conf contains a mixture of host names and IP addresses (clients matching one of the numeric entries should not have to have rDNS data), remember the lookup failure and mention it as DETAIL if we get to "no pg_hba.conf entry". Apply the same approach to forward-DNS lookup failures, too, rather than treating them as immediate hard errors. Along the way, fix a couple of bugs that prevented us from detecting an rDNS lookup error reliably, and make sure that we make only one rDNS lookup attempt; formerly, if the lookup attempt failed, the code would try again for each host name entry in pg_hba.conf. Since more or less the whole point of this design is to ensure there's only one lookup attempt not one per entry, the latter point represents a performance bug that seems sufficient justification for back-patching. Also, adjust src/port/getaddrinfo.c so that it plays as well as it can with this code. Which is not all that well, since it does not have actual support for rDNS lookup, but at least it should return the expected (and required by spec) error codes so that the main code correctly perceives the lack of functionality as a lookup failure. It's unlikely that PG is still being used in production on any machines that require our getaddrinfo.c, so I'm not excited about working harder than this. To keep the code in the various branches similar, this includes back-patching commits c424d0d1052cb4053c8712ac44123f9b9a9aa3f2 and 1997f34db4687e671690ed054c8f30bb501b1168 into 9.2 and earlier. Back-patch to 9.1 where the facility for hostnames in pg_hba.conf was introduced.
* Update copyright for 2014Bruce Momjian2014-01-071-1/+1
| | | | | Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
* Update copyrights for 2013Bruce Momjian2013-01-011-1/+1
| | | | | Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
* Update copyright notices for year 2012.Bruce Momjian2012-01-011-1/+1
|
* Stamp copyrights for year 2011.Bruce Momjian2011-01-011-1/+1
|
* Remove cvs keywords from all files.Magnus Hagander2010-09-201-1/+1
|
* Update copyright for the year 2010.Bruce Momjian2010-01-021-2/+2
|
* Update copyright for 2009.Bruce Momjian2009-01-011-2/+2
|
* Update copyrights in source tree to 2008.Bruce Momjian2008-01-011-2/+2
|
* WSATYPE_NOT_FOUND was already defined for BCC so don't redefine itBruce Momjian2007-11-211-1/+3
| | | | (conflicting values).
* Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian2007-01-051-2/+2
| | | | back-stamped for this.
* pgindent run for 8.2.Bruce Momjian2006-10-041-3/+3
|
* WIN32 fixes:Bruce Momjian2006-07-061-1/+22
| | | | | | | | | I take out patch for this as a promise. This is client-build support of MS-VC6+. Fix for different getaddrinfo structure ordering on Win32 for IPv6. Hiroshi Saito
* Prepare code to be built by MSVC:Bruce Momjian2006-06-071-4/+2
| | | | | | | | | | o remove many WIN32_CLIENT_ONLY defines o add WIN32_ONLY_COMPILER define o add 3rd argument to open() for portability o add include/port/win32_msvc directory for system includes Magnus Hagander
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-051-2/+2
|
* Disble some Win32-specific code in win32-client-only builds:Bruce Momjian2005-12-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | I have the problem, when building by MS-VC6. An error occurs in the 8.1.0 present source codes. nmake -f win32.mak ..\..\port\getaddrinfo.c(244) : error C2065: 'WSA_NOT_ENOUGH_MEMORY' ..\..\port\getaddrinfo.c(342) : error C2065: 'WSATYPE_NOT_FOUND' This is used by winsock2.h. However, Construction of a windows base is winsock.h. Then, Since MinGW has special environment, this is right. but, it is not found in VC6. Furthermore, in getaddrinfo.c, IPV6-API is used by LoadLibraryA("ws2_32"); Referring to of dll the external memory generates this violation by VC6 specification. I considered whether the whole should have been converted into winsock2. However, Now, DLL of MinGW creation operates wonderfully as it is. That's right, it has pliability by replacement of simple DLL. Then, I propose the system using winsock(non IPV6) in construction of VC6. Hiroshi Saito
* Standard pgindent run for 8.1.Bruce Momjian2005-10-151-5/+5
|
* Fix bogus freeaddrinfo() call in WIN32 code, extend gai_strerror toTom Lane2005-08-251-2/+14
| | | | cover more error codes. Per Petr Jelinek.
* Fix a few macro definitions to ensure that unary minus is enclosed inNeil Conway2005-07-271-10/+10
| | | | | parentheses. This avoids possible operator precedence problems, and is consistent with most of the macro definitions in the tree.
* Some more missed copyright notices. Many of these look like theyTom Lane2005-01-011-2/+2
| | | | | should have been caught by the src/tools/copyright script ... why weren't they?
* Add new macro as shorthand for MS VC and Borland C++:Bruce Momjian2004-09-271-2/+2
| | | | | | + #if defined(_MSC_VER) || defined(__BORLANDC__) + #define WIN32_CLIENT_ONLY + #endif
* make sure the $Id tags are converted to $PostgreSQL as well ...PostgreSQL Daemon2003-11-291-1/+1
|
* Workaround for platforms that have getaddrinfo() without AI_NUMERICHOST.Tom Lane2003-08-141-2/+10
| | | | We don't actually need the flag, so just #define it as zero in such cases.
* Another pgindent run with updated typedefs.Bruce Momjian2003-08-081-5/+2
|
* Don't use HAVE_STRUCT_ADDRINFO as a guide to whether netdb.h definesTom Lane2003-08-071-16/+34
| | | | | macros like AI_NUMERICHOST; instead, test the macros individually. Should fix recent reports of trouble on AIX and Unixware.
* pgindent run.Bruce Momjian2003-08-041-18/+17
|
* Have a go at fixing various outstanding portability issues in code thatTom Lane2003-07-231-2/+1
| | | | | | | | | was modified for IPv6. Use a robust definition of struct sockaddr_storage, do a proper configure test to see if ss_len exists, don't assume that getnameinfo() will handle AF_UNIX sockets, don't trust getaddrinfo to return the protocol we ask for, etc. This incorporates several outstanding patches from Kurt Roeckx, but I'm to blame for anything that doesn't work ...
* Attached is the complete diff against current CVS.Bruce Momjian2003-06-121-1/+3
| | | | | | Compiles on BCC 5.5 and VC++ 6.0 (with warnings). Karl Waclawek
* Back out patch that got bundled into another patch.Bruce Momjian2003-06-121-3/+1
|
* New patch with corrected README attached.Bruce Momjian2003-06-121-1/+3
| | | | | | Also quickly added mention that it may be a qualified schema name. Rod Taylor
* IPv6 cleanups.Bruce Momjian2003-06-121-5/+20
| | | | | Kurt Roeckx Andrew Dunstan
* Whack getaddrinfo() patch around until it works, more or less, onTom Lane2003-04-021-10/+53
| | | | machines without IPv6. Or at least it works on HPUX 10.20 ...
* Simplify the socket handling code by supplying a replacement getaddrinfo()Peter Eisentraut2003-03-291-0/+43
function if the OS doesn't provide one.