|
43 | 43 | * Portions Copyright (c) 1994, Regents of the University of California
|
44 | 44 | * Portions taken from FreeBSD.
|
45 | 45 | *
|
46 |
| - * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.24 2004/05/0516:09:31 tgl Exp $ |
| 46 | + * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.25 2004/05/0521:18:29 tgl Exp $ |
47 | 47 | *
|
48 | 48 | *-------------------------------------------------------------------------
|
49 | 49 | */
|
@@ -263,24 +263,6 @@ xstrdup(const char *s)
|
263 | 263 | returnresult;
|
264 | 264 | }
|
265 | 265 |
|
266 |
| -/* |
267 |
| - * unsetenv() doesn't exist everywhere, so emulate it with this ugly |
268 |
| - * but well-tested technique (borrowed from backend's variable.c). |
269 |
| - */ |
270 |
| -staticvoid |
271 |
| -pg_unsetenv(constchar*varname) |
272 |
| -{ |
273 |
| -char*envstr=xmalloc(strlen(varname)+2); |
274 |
| - |
275 |
| -/* First, override any existing setting by forcibly defining the var */ |
276 |
| -sprintf(envstr,"%s=",varname); |
277 |
| -putenv(envstr); |
278 |
| - |
279 |
| -/* Now we can clobber the variable definition this way: */ |
280 |
| -strcpy(envstr,"="); |
281 |
| -putenv(envstr); |
282 |
| -} |
283 |
| - |
284 | 266 | /*
|
285 | 267 | * delete a directory tree recursively
|
286 | 268 | * assumes path points to a valid directory
|
@@ -1260,10 +1242,10 @@ bootstrap_template1(char *short_version)
|
1260 | 1242 | snprintf(cmd,sizeof(cmd),"LC_CTYPE=%s",lc_ctype);
|
1261 | 1243 | putenv(xstrdup(cmd));
|
1262 | 1244 |
|
1263 |
| -pg_unsetenv("LC_ALL"); |
| 1245 | +unsetenv("LC_ALL"); |
1264 | 1246 |
|
1265 | 1247 | /* Also ensure backend isn't confused by this environment var: */
|
1266 |
| -pg_unsetenv("PGCLIENTENCODING"); |
| 1248 | +unsetenv("PGCLIENTENCODING"); |
1267 | 1249 |
|
1268 | 1250 | snprintf(cmd,sizeof(cmd),
|
1269 | 1251 | "\"%s/postgres\" -boot -x1 %s %s template1",
|
|