3939 * Portions Copyright (c) 1994, Regents of the University of California
4040 * Portions taken from FreeBSD.
4141 *
42- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.47 2004/08/09 20:20:47 tgl Exp $
42+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.48 2004/08/11 11:06:23 petere Exp $
4343 *
4444 *-------------------------------------------------------------------------
4545 */
@@ -619,7 +619,7 @@ get_encoding_id(char *encoding_name)
619619exit (1 );
620620}
621621
622- #ifdef HAVE_LANGINFO_H
622+ #if defined( HAVE_LANGINFO_H ) && defined( CODESET )
623623/*
624624 * Checks whether the encoding selected for PostgreSQL and the
625625 * encoding used by the system locale match.
@@ -802,7 +802,7 @@ find_matching_encoding(const char *ctype)
802802free (sys );
803803return -1 ;
804804}
805- #endif /* HAVE_LANGINFO_H */
805+ #endif /* HAVE_LANGINFO_H&& CODESET */
806806
807807/*
808808 * get short version of VERSION
@@ -2322,7 +2322,7 @@ main(int argc, char *argv[])
23222322lc_time );
23232323}
23242324
2325- #ifdef HAVE_LANGINFO_H
2325+ #if defined( HAVE_LANGINFO_H ) && defined( CODESET )
23262326if (strcmp (lc_ctype ,"C" )!= 0 && strcmp (lc_ctype ,"POSIX" )!= 0 )
23272327{
23282328if (strlen (encoding )== 0 )
@@ -2346,7 +2346,7 @@ main(int argc, char *argv[])
23462346else
23472347check_encodings_match (atoi (encodingid ),lc_ctype );
23482348}
2349- #endif /* HAVE_LANGINFO_H */
2349+ #endif /* HAVE_LANGINFO_H&& CODESET */
23502350
23512351printf ("\n" );
23522352