39
39
* Portions Copyright (c) 1994, Regents of the University of California
40
40
* Portions taken from FreeBSD.
41
41
*
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 $
43
43
*
44
44
*-------------------------------------------------------------------------
45
45
*/
@@ -619,7 +619,7 @@ get_encoding_id(char *encoding_name)
619
619
exit (1 );
620
620
}
621
621
622
- #ifdef HAVE_LANGINFO_H
622
+ #if defined( HAVE_LANGINFO_H ) && defined( CODESET )
623
623
/*
624
624
* Checks whether the encoding selected for PostgreSQL and the
625
625
* encoding used by the system locale match.
@@ -802,7 +802,7 @@ find_matching_encoding(const char *ctype)
802
802
free (sys );
803
803
return -1 ;
804
804
}
805
- #endif /* HAVE_LANGINFO_H */
805
+ #endif /* HAVE_LANGINFO_H&& CODESET */
806
806
807
807
/*
808
808
* get short version of VERSION
@@ -2322,7 +2322,7 @@ main(int argc, char *argv[])
2322
2322
lc_time );
2323
2323
}
2324
2324
2325
- #ifdef HAVE_LANGINFO_H
2325
+ #if defined( HAVE_LANGINFO_H ) && defined( CODESET )
2326
2326
if (strcmp (lc_ctype ,"C" )!= 0 && strcmp (lc_ctype ,"POSIX" )!= 0 )
2327
2327
{
2328
2328
if (strlen (encoding )== 0 )
@@ -2346,7 +2346,7 @@ main(int argc, char *argv[])
2346
2346
else
2347
2347
check_encodings_match (atoi (encodingid ),lc_ctype );
2348
2348
}
2349
- #endif /* HAVE_LANGINFO_H */
2349
+ #endif /* HAVE_LANGINFO_H&& CODESET */
2350
2350
2351
2351
printf ("\n" );
2352
2352