Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit30debec

Browse files
committed
Hello!
Here are two new patches for the Win32 support.1) The patch based on the one from Hiroshi Inoue [Inoue@tpf.co.jp], toloadWinsock.dll from libpq.dll.2) A patch for psql.c to remove the call to WSAStartup(), since it isnotrequired when it's done in libpq.dll.I'm still looking for the possibility of having a crypt() function inlibpq.dll too, the same way getopt was included. Any chance of gettingthisbefore 6.4, or should we wait for the next one?//Magnus
1 parentcb4292e commit30debec

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

‎src/backend/commands/vacuum.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.84 1998/10/07 22:31:50 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.85 1998/10/08 00:10:46 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -558,7 +558,6 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
558558
vacrelstats->num_tuples,vacrelstats->hasindex,vacrelstats);
559559

560560
/* next command frees attribute stats */
561-
562561
CommitTransactionCommand();
563562
}
564563

‎src/bin/psql/psql.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.161 1998/09/21 02:25:23 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.162 1998/10/08 00:10:47 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -2724,18 +2724,6 @@ main(int argc, char **argv)
27242724

27252725
char*home=NULL;/* Used to store $HOME */
27262726

2727-
#ifdefWIN32
2728-
{
2729-
WSADATAwsaData;
2730-
2731-
if (WSAStartup(MAKEWORD(1,1),&wsaData))
2732-
{
2733-
fprintf(stderr,"Failed to start winsock: %i\n",WSAGetLastError());
2734-
exit(1);
2735-
}
2736-
}
2737-
#endif
2738-
27392727
MemSet(&settings,0,sizeofsettings);
27402728
settings.opt.align=1;
27412729
settings.opt.header=1;

‎src/interfaces/libpq/libpqdll.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
#defineWIN32_LEAN_AND_MEAN
22
#include<windows.h>
3+
#include<winsock.h>
4+
35
BOOLWINAPI
46
DllMain(HINSTANCEhinstDLL,DWORDfdwReason,
57
LPVOIDlpReserved)
68
{
9+
WSADATAwsaData;
10+
switch (fdwReason) {
11+
caseDLL_PROCESS_ATTACH:
12+
if (WSAStartup(MAKEWORD(1,1),&wsaData))
13+
{
14+
/* No really good way to do error handling here,
15+
* since we don't know how we were loaded */
16+
return FALSE;
17+
}
18+
break;
19+
caseDLL_PROCESS_DETACH:
20+
WSACleanup();
21+
break;
22+
}
23+
724
return TRUE;
825
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp