Skip to content

Commit 81cca21

Browse files
committed
Allow compilation when CODESET is not defined (OpenBSD).
1 parent 7a7ffe9 commit 81cca21

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bin/initdb/initdb.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
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)
619619
exit(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)
802802
free(sys);
803803
return -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[])
23222322
lc_time);
23232323
}
23242324

2325-
#ifdef HAVE_LANGINFO_H
2325+
#if defined(HAVE_LANGINFO_H) && defined(CODESET)
23262326
if (strcmp(lc_ctype, "C") != 0 && strcmp(lc_ctype, "POSIX") != 0)
23272327
{
23282328
if (strlen(encoding) == 0)
@@ -2346,7 +2346,7 @@ main(int argc, char *argv[])
23462346
else
23472347
check_encodings_match(atoi(encodingid), lc_ctype);
23482348
}
2349-
#endif /* HAVE_LANGINFO_H */
2349+
#endif /* HAVE_LANGINFO_H && CODESET */
23502350

23512351
printf("\n");
23522352

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy