aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/win32
Commit message (Collapse)AuthorAge
* Remove Win32 file, moved to /port.Bruce Momjian2006-06-08
| | | | Magnus Hagander
* Prepare code to be built by MSVC:Bruce Momjian2006-06-07
| | | | | | | | | | 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
* Remove sema.c, superseded by win32_sema.c.Tom Lane2006-04-29
|
* Suppress a couple of minor compiler warnings, per Magnus.Tom Lane2006-04-09
|
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-05
|
* Check that SID is enabled while checking for Windows admin privileges.Tom Lane2006-02-10
| | | | Magnus
* Re-run pgindent, fixing a problem where comment lines after a blankBruce Momjian2005-11-22
| | | | | | | | | comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
* Fix Windows setitimer() emulation to not depend on delivering an APCTom Lane2005-10-25
| | | | | | to the main thread. This allows removal of WaitForSingleObjectEx() calls from the main thread, thereby allowing us to re-enable Qingqing Zhou's CHECK_FOR_INTERRUPTS performance improvement. Qingqing, Magnus, et al.
* Improve performance of CHECK_FOR_INTERRUPTS() macro on Windows by not doingTom Lane2005-10-21
| | | | | | | a kernel call unless there's some evidence of a pending signal. This should bring its performance on Windows into line with the Unix version. Problem diagnosis and patch by Qingqing Zhou. Minor stylistic tweaks by moi ... if it's broken, it's my fault.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Recognize ERROR_SHARING_VIOLATION (translate to EACCES), increase logTom Lane2005-10-07
| | | | | | level for unrecognized win32 error codes to LOG, and make messages conform to style guide. Per old suggestion from Qingqing Zhou, which seems to have gotten lost in the shuffle.
* Tag appropriate files for rc3PostgreSQL Daemon2004-12-31
| | | | | | | | Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
* Fix Win32 problems with signals and sockets, by making the forkexec codeTom Lane2004-11-17
| | | | | | even uglier than it was already :-(. Also, on Windows only, use temporary shared memory segments instead of ordinary files to pass over critical variable values from postmaster to child processes. Magnus Hagander
* Use dynamically-sized buffers in pgwin32_is_service().Tom Lane2004-11-16
| | | | Magnus Hagander
* > I think in addition the system global name "sharemem.1" should be made moreBruce Momjian2004-11-12
| | | | | | | > pg specific, like "PostgreSQL.1". I have not done this since a new compile > would not detect a running old beta. But now would be the time (or never). Zeugswetter Andreas
* Clarify some error messagesPeter Eisentraut2004-11-09
|
* Message style revisionsPeter Eisentraut2004-10-12
|
* Here is a patch to fix win32 ssl builds. Summary of changes:Bruce Momjian2004-10-06
| | | | | | | | | | | | | | | | | | | | | * Links with -leay32 and -lssleay32 instead of crypto and ssl. On win32, "crypto and ssl" is only used for static linking. * Initializes SSL in the backend and not just in the postmaster. We cannot pass the SSL context from the postmaster through the parameter file, because it contains function pointers. * Split one error check in be-secure.c. Previously we could not tell which of three calls actually failed. The previous code also returned incorrect error messages if SSL_accept() failed - that function needs to use SSL_get_error() on the return value, can't just use the error queue. * Since the win32 implementation uses non-blocking sockets "behind the scenes" in order to deliver signals correctly, implements a version of SSL_accept() that can handle this. Also, add a wait function in case SSL_read or SSL_write() needs more data. Magnus Hagander
* Fix places where WaitForxxx can block, to eliminate failure to detectTom Lane2004-09-07
| | | | deadlock on Win32. Magnus Hagander
* Another pgindent run with lib typedefs added.Bruce Momjian2004-08-30
|
* Pgindent run for 8.0.Bruce Momjian2004-08-29
|
* Update copyright to 2004.Bruce Momjian2004-08-29
|
* >>> I understand your disliking of non-posix stuff. OTOH,Bruce Momjian2004-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | >>GetLastError will >>> give much more details than errno. >> >>How much more, really? That mapping table gave me the impression that >>the win32 error codes aren't all that much more detailed than errno... > >The mapping table is not complete. My winerror.h from the SDK >lists 2209 >error codes, whereas errno.h lists 42... > >I still don't think we'll get that much more stuff. Right now, >the Win32 >code paths that actually use the more advanced functions already write >out the error number in case something happens. We can keep doing that >for the other paths (ereport the error *number* when the mapping does >not have a match). The map to errno will catch almost all cases, I >think. And in the corner cases we can do with just the number, and use >"net helpmsg" to get the actual message when checking... Here's an attempt on this. new file goes in backend/port/win32. Magnus Hagander
* Use dynamic buffer for token buffer in win32 admin checkBruce Momjian2004-08-28
| | | | Magnus Hagander
* Fix Windows emulation of kill(pid, 0). This will now succeed, but onlyTom Lane2004-08-27
| | | | | if the target PID is a PG postmaster or backend --- for our purposes that is actually better than the Unix behavior. Per Dave Page and Andrew Dunstan.
* Replace direct fprintf(stderr) calls by write_stderr(), and cause thisTom Lane2004-06-24
| | | | | | | routine to do something appropriate on Win32. Also, add a security check on Win32 that parallels the can't-run-as-root check on Unix. Magnus Hagander
* Cleanup for Win32 pgkill.Bruce Momjian2004-05-27
|
* Move pgkill out into /port so pg_ctl can use it on Win32.Bruce Momjian2004-05-27
|
* Per discussion earlier today, here is a fix that lets ereport() on win32Bruce Momjian2004-04-22
| | | | | | report socket errors. Magnus Hagander
* * Most changes are to fix warnings issued when compiling win32Bruce Momjian2004-04-19
| | | | | | | | | | | | | | | | | | | | | * removed a few redundant defines * get_user_name safe under win32 * rationalized pipe read EOF for win32 (UPDATED PATCH USED) * changed all backend instances of sleep() to pg_usleep - except for the SLEEP_ON_ASSERT in assert.c, as it would exceed a 32-bit long [Note to patcher: If a SLEEP_ON_ASSERT of 2000 seconds is acceptable, please replace with pg_usleep(2000000000L)] I added a comment to that part of the code: /* * It would be nice to use pg_usleep() here, but only does 2000 sec * or 33 minutes, which seems too short. */ sleep(1000000); Claudio Natoli
* Here's an attempt at new socket and signal code for win32.Bruce Momjian2004-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It works on the principle of turning sockets into non-blocking, and then emulate blocking behaviour on top of that, while allowing signals to run. Signals are now implemented using an event instead of APCs, thus getting rid of the issue of APCs not being compatible with "old style" sockets functions. It also moves the win32 specific code away from pqsignal.h/c into port/win32, and also removes the "thread style workaround" of the APC issue previously in place. In order to make things work, a few things are also changed in pgstat.c: 1) There is now a separate pipe to the collector and the bufferer. This is required because the pipe will otherwise only be signalled in one of the processes when the postmaster goes down. The MS winsock code for select() must have some kind of workaround for this behaviour, but I have found no stable way of doing that. You really are not supposed to use the same socket from more than one process (unless you use WSADuplicateSocket(), in which case the docs specifically say that only one will be flagged). 2) The check for "postmaster death" is moved into a separate select() call after the main loop. The previous behaviour select():ed on the postmaster pipe, while later explicitly saying "we do NOT check for postmaster exit inside the loop". The issue was that the code relies on the same select() call seeing both the postmaster pipe *and* the pgstat pipe go away. This does not always happen, and it appears that useing WSAEventSelect() makes it even more common that it does not. Since it's only called when the process exits, I don't think using a separate select() call will have any significant impact on how the stats collector works. Magnus Hagander
* Here is a patch that implements setitimer() on win32. With this patchBruce Momjian2004-02-18
| | | | | | | | | | | applied, deadlock detection and statement_timeout now works. The file timer.c goes into src/backend/port/win32/. The patch also removes two lines of "printf debugging" accidentally left in pqsignal.h, in the console control handler. Magnus Hagander
* Add CVS ID tags to port/win32/files.Bruce Momjian2004-02-12
|
* Briefly,Bruce Momjian2004-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure + Makefile changes * shared memory attaching in EXEC_BACKEND case (+ minor fix for apparent cygwin bug under cygwin/EXEC_BACKEND case only) * PATH env var separator differences * missing win32 rand functions added * placeholder replacements for sync etc under port.h To those who are really interested, and there are a few of you: the attached patch + file will allow the source base to be compiled (and, for some definition, "run") under MingW, with the following caveats (I wanted to first properly fix all but the last of these, but y'all won't quit asking for a patch :-): * child death: SIGCHLD not yet sent, so as a minimum, you'll need to put in some sort of delay after StartupDatabase, and handle setting StartupPID to 0 etc (ie. the stuff the reaper() signal function is supposed to do) * dirmod.c: comment out the elog calls * dfmgr.c: some hackage required to substitute_libpath_macro * slru/xact.c: comment out the errno checking after the readdir (fixed by next version of MingW) Again, this is only if you *really* want to see postgres compile and start, and is a nice leg-up for working on the other Win32 TODO list items. Just don't expect too much else from it at this point... Claudio Natoli
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* Update copyrights to 2003.Bruce Momjian2003-08-04
|
* pgindent run.Bruce Momjian2003-08-04
|
* Allow Win32 to compile under MinGW. Major changes are:Bruce Momjian2003-05-15
| | | | | | | | | | | | | | | Win32 port is now called 'win32' rather than 'win' add -lwsock32 on Win32 make gethostname() be only used when kerberos4 is enabled use /port/getopt.c new /port/opendir.c routines disable GUC unix_socket_group on Win32 convert some keywords.c symbols to KEYWORD_P to prevent conflict create new FCNTL_NONBLOCK macro to turn off socket blocking create new /include/port.h file that has /port prototypes, move out of c.h new /include/port/win32_include dir to hold missing include files work around ERROR being defined in Win32 includes
* Add Win32 Makefile for IPC stuff.Bruce Momjian2003-04-24
|
* Add Win32 shmem/sema prototypes.Bruce Momjian2003-04-24
|
* pgindent new Win32 files.Bruce Momjian2003-04-24
|
* Add shared memory and semaphore routines for Win32.Bruce Momjian2003-04-24
| | | | Also update copyright to be ours, with approval from Jan.
* Remove win32 port directory. Forgot to do it earlier.Bruce Momjian1997-02-28
|
* Remove machine.h, since it wasn't doing anything that config.h wasn'tMarc G. Fournier1997-02-09
| | | | | | already doing Removed only reference to a machine.h I could find in c.h, to win32/machine.h
* Convert NEED_{RINT,CBRT,ISINF} to HAVE_* in prepration for configure...Marc G. Fournier1997-01-24
|
* Remove most compile-time options, add a few runtime options to make up for it.Bryan Henderson1996-11-14
| | | | | | | In particular, no more compiled-in default for PGDATA or LIBDIR. Commands that need them need either invocation options or environment variables. PGPORT default is hardcoded as 5432, but overrideable with options or environment variables.
* Simplify make files, add full dependencies.Bryan Henderson1996-10-27
|
* Centralize more of the defines from backend/port under config.hMarc G. Fournier1996-10-18
| | | | | Further ports should *really* avoid backend/port and make use of config.h
* Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01Marc G. Fournier1996-07-09