Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
0a1ed443
Commit
0a1ed443
authored
Mar 30, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add configure checks to see if 'using namespace std' and
'#include <string>' work in the local C++ compiler.
parent
a1916daf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
5 deletions
+35
-5
src/Makefile.global.in
src/Makefile.global.in
+2
-2
src/configure.in
src/configure.in
+25
-2
src/include/config.h.in
src/include/config.h.in
+8
-1
No files found.
src/Makefile.global.in
View file @
0a1ed443
...
...
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.6
7 2000/03/08 01:58:15 momjian
Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.6
8 2000/03/30 05:29:20 tgl
Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
...
...
@@ -105,7 +105,7 @@ ODBCINST= $(POSTGRESDIR)
# (that is, prepend '#', don't set it to "0" or "no").
# Compile libpq++
@HAVECXX@
HAVE_Cplusplus
=
@HAVECXX@
# Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
# multi-byte types to generate a bus error.
...
...
src/configure.in
View file @
0a1ed443
...
...
@@ -488,7 +488,7 @@ AC_SUBST(USE_ODBC)
AC_SUBST(MULTIBYTE)
dnl Check for C++ support (allow override if needed)
HAVECXX='
HAVE_Cplusplus=
true'
HAVECXX='true'
AC_ARG_WITH(CXX,
[ --with-CXX=compiler use specific C++ compiler
--without-CXX prevent building C++ code ],
...
...
@@ -498,7 +498,7 @@ AC_ARG_WITH(CXX,
AC_MSG_ERROR([*** You must supply an argument to the --with-CC option.])
;;
n | no)
HAVECXX='
HAVE_Cplusplus=
false'
HAVECXX='false'
;;
esac
CXX="$withval"
...
...
@@ -506,6 +506,29 @@ AC_ARG_WITH(CXX,
[ AC_PROG_CXX])
AC_SUBST(HAVECXX)
if test "$HAVECXX" = 'true' ; then
AC_LANG_CPLUSPLUS
dnl check whether "using namespace std" works on this C++ compiler
AC_MSG_CHECKING([for namespace std in C++])
AC_TRY_COMPILE([#include <stdio.h>
#include <stdlib.h>
using namespace std;
], [],
[AC_DEFINE(HAVE_NAMESPACE_STD) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
dnl check whether "#include <string>" works on this C++ compiler
AC_MSG_CHECKING([for include <string> in C++])
AC_TRY_COMPILE([#include <stdio.h>
#include <stdlib.h>
#include <string>
], [],
[AC_DEFINE(HAVE_CXX_STRING_HEADER) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
fi
dnl make sure we revert to C compiler, not C++, for subsequent tests
AC_LANG_C
...
...
src/include/config.h.in
View file @
0a1ed443
...
...
@@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
* $Id: config.h.in,v 1.11
0 2000/03/17 05:29:06
tgl Exp $
* $Id: config.h.in,v 1.11
1 2000/03/30 05:29:21
tgl Exp $
*/
#ifndef CONFIG_H
...
...
@@ -529,6 +529,13 @@ extern void srandom(unsigned int seed);
/* Define if POSIX signal interface is available */
#undef USE_POSIX_SIGNALS
/* Define if C++ compiler accepts "using namespace std" */
#undef HAVE_NAMESPACE_STD
/* Define if C++ compiler accepts "#include <string>" */
#undef HAVE_CXX_STRING_HEADER
/*
* Pull in OS-specific declarations (using link created by configure)
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment