--- pgsql\src\bin\psql\print.c Fri Nov 01 14:12:19 2002 +++ pgsql.nw\src\bin\psql\print.c Sat Nov 02 17:29:18 2002 @@ -982,6 +982,7 @@ if (opt->format != PRINT_HTML && border > 2) border = 2; +#ifndef N_PLAT_NLM if (fout == stdout) { int col_count = 0, @@ -1009,6 +1010,7 @@ output = PageOutput(lines, opt->pager); } else +#endif output = fout; /* print the stuff */ --- pgsql\src\bin\psql\help.c Thu Oct 24 01:33:50 2002 +++ pgsql.nw\src\bin\psql\help.c Fri Nov 01 22:37:37 2002 @@ -53,7 +53,7 @@ const char *env; const char *user; -#ifndef WIN32 +#if !defined(WIN32) && !defined(N_PLAT_NLM) struct passwd *pw = NULL; #endif @@ -61,6 +61,7 @@ user = getenv("PGUSER"); if (!user) { +#ifndef N_PLAT_NLM #ifndef WIN32 pw = getpwuid(geteuid()); if (pw) @@ -77,6 +78,9 @@ if (GetUserName(buf, &bufsize)) user = buf; #endif /* WIN32 */ +#else + user = "?"; +#endif } /* If this " is the start of the string then it ought to end there to fit in 80 columns >> " */ @@ -105,6 +109,9 @@ puts(_(" -E display queries that internal commands generate")); puts(_(" -q run quietly (no messages, only query output)")); puts(_(" -o FILENAME send query results to file (or |pipe)")); +#ifdef N_PLAT_NLM + pressanykey(); +#endif puts(_(" -n disable enhanced command line editing (readline)")); puts(_(" -s single step mode (confirm each query)")); puts(_(" -S single line mode (end of line terminates SQL command)")); --- pgsql\src\bin\psql\command.c Wed Oct 23 19:23:56 2002 +++ pgsql.nw\src\bin\psql\command.c Fri Nov 01 21:49:16 2002 @@ -283,7 +283,7 @@ dir = opt; else { -#ifndef WIN32 +#if !defined(WIN32) && !defined(N_PLAT_NLM) struct passwd *pw; pw = getpwuid(geteuid()); @@ -1605,7 +1605,7 @@ if (!error) error = !editFile(fname); -#ifndef WIN32 +#if !defined(WIN32) && !defined(N_PLAT_NLM) if (!error && stat(fname, &after) != 0) { psql_error("%s: %s\n", fname, strerror(errno)); --- pgsql\src\interfaces\libpq\fe-auth.c Wed Sep 04 20:31:46 2002 +++ pgsql.nw\src\interfaces\libpq\fe-auth.c Fri Nov 01 17:18:37 2002 @@ -547,7 +547,7 @@ char salt[3]; StrNCpy(salt, conn->cryptSalt, 3); - crypt_pwd = crypt(password, salt); + crypt_pwd = (char *) crypt(password, salt); break; } case AUTH_REQ_PASSWORD: @@ -722,10 +722,16 @@ if (GetUserName(username, &namesize)) name = username; #else +#ifndef N_PLAT_NLM struct passwd *pw = getpwuid(geteuid()); if (pw) name = pw->pw_name; +#else + char username[128]; + sprintf (username, "postgres"); + name = username; +#endif #endif }