summaryrefslogtreecommitdiff
path: root/src/port
Commit message (Collapse)AuthorAgeFilesLines
* Reduce chatter from _dosmaperr() when used in FRONTEND code.Tom Lane2008-10-161-2/+2
| | | | ITAGAKI Takahiro
* Use CRITICAL_SECTION instead of Mutexes for thread-locking in libpq onMagnus Hagander2008-05-211-2/+2
| | | | | | | Windows, for better performance. Per suggestion from Andrew Chernow, but not his patch since the underlying code was changed to deal with return values.
* Add $PostgreSQL$ markers to a lot of files that were missing them.Andrew Dunstan2008-05-175-2/+17
| | | | | | | | | | This particular batch was just for *.c and *.h file. The changes were made with the following 2 commands: find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | while read file ; do head -n 1 < $file | grep -q '^/\*' && echo $file; done | xargs -l sed -i -e '1s/^\// /' -e '1i/*\n * $PostgreSQL:$ \n *' find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | xargs -l sed -i -e '1i/*\n * $PostgreSQL:$ \n */'
* Fix declarations of pthread functions, missed in recent commit.Tom Lane2008-05-161-3/+3
|
* Make the win32 implementation of getrusage() return EINVAL if beingMagnus Hagander2008-05-141-1/+8
| | | | | | | | | asked for anything other than RUSAGE_SELF, since it's not supported. This is never called anywhere in the code today, but might be in the future. Not backpatching, since it's not called anywhere today.
* Don't pull in pthreads header files in this file because we never use them.Magnus Hagander2008-04-221-7/+2
|
* Fix rmtree() so that it keeps going after failure to remove any individualTom Lane2008-04-181-31/+46
| | | | | | file; the idea is that we should clean up as much as we can, even if there's some problem removing one file. Make the error messages a bit less misleading, too. In passing, const-ify function arguments.
* Fix two race conditions between the pending unlink mechanism that was put inHeikki Linnakangas2008-04-181-3/+22
| | | | | | | | | | | | | | | | | | | | | place to prevent reusing relation OIDs before next checkpoint, and DROP DATABASE. First, if a database was dropped, bgwriter would still try to unlink the files that the rmtree() call by the DROP DATABASE command has already deleted, or is just about to delete. Second, if a database is dropped, and another database is created with the same OID, bgwriter would in the worst case delete a relation in the new database that happened to get the same OID as a dropped relation in the old database. To fix these race conditions: - make rmtree() ignore ENOENT errors. This fixes the 1st race condition. - make ForgetDatabaseFsyncRequests forget unlink requests as well. - force checkpoint on in dropdb on all platforms Since ForgetDatabaseFsyncRequests() is asynchronous, the 2nd change isn't enough on its own to fix the problem of dropping and creating a database with same OID, but forcing a checkpoint on DROP DATABASE makes it sufficient. Per Tom Lane's bug report and proposal. Backpatch to 8.3.
* Fix MinGW warnings re formats and unused variables. per ITAGAKI TakahiroAndrew Dunstan2008-04-161-19/+16
|
* A quick try at un-breaking the Cygwin build. Whether it needs theTom Lane2008-04-111-3/+6
| | | | | pgwin32_safestat remains to be determined, but in any case the current code is not tolerable.
* Create wrapper pgwin32_safestat() and redefine stat() to itMagnus Hagander2008-04-101-1/+35
| | | | | | | on win32, because the stat() function in the runtime cannot be trusted to always update the st_size field. Per report and research by Sergey Zubkovsky.
* Fix a number of places that were making file-type tests infelicitously.Tom Lane2008-03-312-8/+8
| | | | | | | | | | | | | | | | | The places that did, eg, (statbuf.st_mode & S_IFMT) == S_IFDIR were correct, but there is no good reason not to use S_ISDIR() instead, especially when that's what the other 90% of our code does. The places that did, eg, (statbuf.st_mode & S_IFDIR) were flat out *wrong* and would fail in various platform-specific ways, eg a symlink could be mistaken for a regular file on most Unixen. The actual impact of this is probably small, since the problem cases seem to always involve symlinks or sockets, which are unlikely to be found in the directories that PG code might be scanning. But it's clearly trouble waiting to happen, so patch all the way back anyway. (There seem to be no occurrences of the mistake in 7.4.)
* More README src cleanups.Bruce Momjian2008-03-211-0/+5
|
* Fix our printf implementation to follow spec: if a star parameterTom Lane2008-03-181-1/+7
| | | | | | | | | | | value for a precision is negative, act as though precision weren't specified at all, that is the whole .* part of the format spec should be ignored. Our previous coding took it as .0 which is certainly wrong. Per report from Kris Jurka and local testing. Possibly this should be back-patched, but it would be good to get some more testing first; in any case there are no known cases where there's really a problem on the backend side.
* Fix handling of restricted processes for Windows Vista (mainly),Magnus Hagander2008-02-291-1/+218
| | | | | | | | | by explicitly adding back the user to the DACL of the new process. This fixes the failure case when executing as the Administrator user, which had no permissions left at all after we dropped the Administrators group. Dave Page with some modifications from me
* Added --htmldir option to pg_config, equivalent to the new configure option.Peter Eisentraut2008-02-182-2/+12
|
* Stamp HEAD as 8.4devel.Tom Lane2008-02-131-2/+2
|
* Update copyrights in source tree to 2008.Bruce Momjian2008-01-0128-54/+54
|
* may -> mightPeter Eisentraut2007-12-281-2/+2
|
* Wording improvementsPeter Eisentraut2007-12-271-2/+2
|
* On win32, loop when opening files if sharing- och lock-violation errorsMagnus Hagander2007-12-201-5/+35
| | | | | occur. Hopefully, this will make it possible to recover from broken antivirus and/or backup software that locks our files.
* Use _dosmaperr() to deal with errors opening files in pgwin32_open().Magnus Hagander2007-11-301-17/+2
| | | | Per complaint from Alvaro and subsequent discussion.
* pgindent run for 8.3.Bruce Momjian2007-11-156-55/+55
|
* Add new encoding aliases for Solaris, per Zdenek Kotala.Alvaro Herrera2007-10-251-1/+3
|
* Use snprintf instead of wsprintf, and use getenv("APPDATA") instead ofMagnus Hagander2007-10-232-7/+11
| | | | | | | | | | | | | | SHGetFolderPath. This removes the direct dependency on shell32.dll and user32.dll, which eats a lot of "desktop heap" for each backend that's started. The desktop heap is a very limited resource, causing backends to no longer start once it's been exhausted. We still have indirect depdendencies on user32.dll through third party libraries, but those can't easily be removed. Dave Page
* Add missing entry for PG_WIN1250 encoding, per gripe from Pavel Stehule.Tom Lane2007-10-171-6/+5
| | | | | | Also enable translation of PG_WIN874, which certainly seems to have an obvious translation now, though maybe it did not at the time this table's ancestor was created.
* Add missing codepage numbers for Windows.Magnus Hagander2007-10-101-1/+12
| | | | Dave Page
* Teach chklocale.c how to extract encoding info from Windows localeTom Lane2007-10-031-7/+54
| | | | names. ITAGAKI Takahiro
* Teach chklocale.c about a few names for frontend-only encodings,Tom Lane2007-09-291-2/+21
| | | | | | since this will allow initdb to reject attempts to initdb in a locale that uses such an encoding. We'll probably find out more such names during beta ...
* On OS X, assume that an empty-string result for nl_langinfo(CODESET)Tom Lane2007-09-281-1/+18
| | | | means UTF-8. Per examination of /usr/share/locale in 10.4.10.
* Change initdb and CREATE DATABASE to actively reject attempts to createTom Lane2007-09-282-15/+264
| | | | | | | | | | | | databases with encodings that are incompatible with the server's LC_CTYPE locale, when we can determine that (which we can on most modern platforms, I believe). C/POSIX locale is compatible with all encodings, of course, so there is still some usefulness to CREATE DATABASE's ENCODING option, but this will insulate us against all sorts of recurring complaints caused by mismatched settings. I moved initdb's existing LC_CTYPE-to-encoding mapping knowledge into a new src/port/ file so it could be shared by CREATE DATABASE.
* Rename DLLIMPORT macro to PGDLLIMPORT to avoid conflict withMagnus Hagander2007-07-252-4/+4
| | | | third party includes (like tcl) that define DLLIMPORT.
* Get dirmod.c on the same page as port.h about whether we use pgsymlinkTom Lane2007-07-121-9/+10
| | | | | on Cygwin (answer: we don't). Also try to unwind the #ifdef spaghetti a little bit. Untested but hopefully I didn't break anything.
* Silence mingw compiler warningMagnus Hagander2007-04-181-1/+1
|
* Add O_DIRECT support on Windows.Magnus Hagander2007-04-131-4/+4
| | | | ITAGAKI Takahiro
* Update comment for new thread_test location.Bruce Momjian2007-04-031-2/+2
|
* Remove advertising clause from Berkeley BSD-licensed files, perBruce Momjian2007-03-266-34/+10
| | | | instructions from Berkeley.
* Code cleanup for function prototypes: change two K&R-style prototypesNeil Conway2007-03-182-12/+4
| | | | to ANSI-style, and change "()" -> "(void)". Patch from Stefan Huehner.
* Add comment to explain why O_EXCL and O_TRUNC can be ignored inBruce Momjian2007-02-131-1/+4
| | | | openFlagsToCreateFileFlags() in certain cases.
* Replace useless uses of := by = in makefiles.Peter Eisentraut2007-02-091-2/+2
|
* Add strlcat() from OpenBSD, to be used for replacing strncat and otherPeter Eisentraut2007-02-071-0/+55
| | | | strange coding practices.
* Use sizeof() for snprintf() buffer length.Bruce Momjian2007-01-291-2/+2
|
* Update process termination message to display signal number and nameBruce Momjian2007-01-291-4/+9
| | | | from exec.c and postmaster.c.
* Drat, can't fit an additional argument into log_error. Is it worth anTom Lane2007-01-281-4/+3
| | | | | sprintf pushup to be sure we can report something useful for out-of-range exitstatus?
* Clean up broken usage of HAVE_DECL_SYS_SIGLIST and inconsistent/poorlyTom Lane2007-01-281-6/+7
| | | | formatted error messages.
* Use autoconf build-in sys_siglist macro AC_DECL_SYS_SIGLIST, rather thanBruce Momjian2007-01-281-2/+2
| | | | create our own.
* Add signal.h for sys_siglist reference.Bruce Momjian2007-01-281-1/+2
|
* Use sys_siglist[] to print out signal names for signal exits, ratherBruce Momjian2007-01-281-4/+8
| | | | than just numbers.
* Remove newline from error message because URL is gone.Bruce Momjian2007-01-231-2/+2
|
* Back out use of FormatMessage(), does error values, not exceptionBruce Momjian2007-01-231-19/+3
| | | | | values. Point to /include/ntstatus.h for an exception list, rather than a URL.