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
a534728a
Commit
a534728a
authored
Dec 26, 2010
by
Andrew Dunstan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only build in crashdump support on Windows if there's a working dbghelp.h.
parent
85cff3ce
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
147 additions
and
2 deletions
+147
-2
configure
configure
+123
-0
configure.in
configure.in
+10
-0
src/Makefile.global.in
src/Makefile.global.in
+3
-0
src/backend/main/main.c
src/backend/main/main.c
+1
-1
src/backend/port/win32/Makefile
src/backend/port/win32/Makefile
+4
-1
src/include/pg_config.h.in
src/include/pg_config.h.in
+3
-0
src/include/pg_config.h.win32
src/include/pg_config.h.win32
+3
-0
No files found.
configure
View file @
a534728a
...
@@ -667,6 +667,7 @@ PTHREAD_CFLAGS
...
@@ -667,6 +667,7 @@ PTHREAD_CFLAGS
PTHREAD_LIBS
PTHREAD_LIBS
PTHREAD_CC
PTHREAD_CC
acx_pthread_config
acx_pthread_config
have_win32_dbghelp
HAVE_IPV6
HAVE_IPV6
LIBOBJS
LIBOBJS
OSSP_UUID_LIBS
OSSP_UUID_LIBS
...
@@ -20926,6 +20927,128 @@ cat >>confdefs.h <<\_ACEOF
...
@@ -20926,6 +20927,128 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_SYMLINK 1
#define HAVE_SYMLINK 1
_ACEOF
_ACEOF
{
$as_echo
"
$as_me
:
$LINENO
: checking for MINIDUMP_TYPE"
>
&5
$as_echo_n
"checking for MINIDUMP_TYPE... "
>
&6
;
}
if
test
"
${
ac_cv_type_MINIDUMP_TYPE
+set
}
"
=
set
;
then
$as_echo_n
"(cached) "
>
&6
else
ac_cv_type_MINIDUMP_TYPE
=
no
cat
>
conftest.
$ac_ext
<<
_ACEOF
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <string.h>
#include <dbghelp.h>
int
main ()
{
if (sizeof (MINIDUMP_TYPE))
return 0;
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
if
{
(
ac_try
=
"
$ac_compile
"
case
"((
$ac_try
"
in
*
\"
*
|
*
\`
*
|
*
\\
*
)
ac_try_echo
=
\$
ac_try
;;
*
)
ac_try_echo
=
$ac_try
;;
esac
eval
ac_try_echo
=
"
\"\$
as_me:
$LINENO
:
$ac_try_echo
\"
"
$as_echo
"
$ac_try_echo
"
)
>
&5
(
eval
"
$ac_compile
"
)
2>conftest.er1
ac_status
=
$?
grep
-v
'^ *+'
conftest.er1
>
conftest.err
rm
-f
conftest.er1
cat
conftest.err
>
&5
$as_echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
test
-z
"
$ac_c_werror_flag
"
||
test
!
-s
conftest.err
}
&&
test
-s
conftest.
$ac_objext
;
then
cat
>
conftest.
$ac_ext
<<
_ACEOF
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <string.h>
#include <dbghelp.h>
int
main ()
{
if (sizeof ((MINIDUMP_TYPE)))
return 0;
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
if
{
(
ac_try
=
"
$ac_compile
"
case
"((
$ac_try
"
in
*
\"
*
|
*
\`
*
|
*
\\
*
)
ac_try_echo
=
\$
ac_try
;;
*
)
ac_try_echo
=
$ac_try
;;
esac
eval
ac_try_echo
=
"
\"\$
as_me:
$LINENO
:
$ac_try_echo
\"
"
$as_echo
"
$ac_try_echo
"
)
>
&5
(
eval
"
$ac_compile
"
)
2>conftest.er1
ac_status
=
$?
grep
-v
'^ *+'
conftest.er1
>
conftest.err
rm
-f
conftest.er1
cat
conftest.err
>
&5
$as_echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
test
-z
"
$ac_c_werror_flag
"
||
test
!
-s
conftest.err
}
&&
test
-s
conftest.
$ac_objext
;
then
:
else
$as_echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
ac_cv_type_MINIDUMP_TYPE
=
yes
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
else
$as_echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
fi
{
$as_echo
"
$as_me
:
$LINENO
: result:
$ac_cv_type_MINIDUMP_TYPE
"
>
&5
$as_echo
"
$ac_cv_type_MINIDUMP_TYPE
"
>
&6
;
}
if
test
"x
$ac_cv_type_MINIDUMP_TYPE
"
=
x
""
yes
;
then
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_MINIDUMP_TYPE 1
_ACEOF
pgac_minidump_type
=
yes
else
pgac_minidump_type
=
no
fi
fi
if
test
x
"
$pgac_minidump_type
"
=
x
"yes"
;
then
have_win32_dbghelp
=
yes
else
have_win32_dbghelp
=
no
fi
fi
if
test
"
$with_readline
"
=
yes
;
then
if
test
"
$with_readline
"
=
yes
;
then
...
...
configure.in
View file @
a534728a
...
@@ -1350,6 +1350,16 @@ if test "$PORTNAME" = "win32"; then
...
@@ -1350,6 +1350,16 @@ if test "$PORTNAME" = "win32"; then
AC_LIBOBJ(win32error)
AC_LIBOBJ(win32error)
AC_DEFINE([HAVE_SYMLINK], 1,
AC_DEFINE([HAVE_SYMLINK], 1,
[Define to 1 if you have the `symlink' function.])
[Define to 1 if you have the `symlink' function.])
AC_CHECK_TYPES(MINIDUMP_TYPE, [pgac_minidump_type=yes], [pgac_minidump_type=no], [
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <string.h>
#include <dbghelp.h>])
fi
if test x"$pgac_minidump_type" = x"yes" ; then
AC_SUBST(have_win32_dbghelp,yes)
else
AC_SUBST(have_win32_dbghelp,no)
fi
fi
if test "$with_readline" = yes; then
if test "$with_readline" = yes; then
...
...
src/Makefile.global.in
View file @
a534728a
...
@@ -363,6 +363,9 @@ ELF_SYSTEM= @ELF_SYS@
...
@@ -363,6 +363,9 @@ ELF_SYSTEM= @ELF_SYS@
# Backend stack size limit has to be hard-wired on Windows (it's in bytes)
# Backend stack size limit has to be hard-wired on Windows (it's in bytes)
WIN32_STACK_RLIMIT
=
4194304
WIN32_STACK_RLIMIT
=
4194304
# Set if we have a working win32 crashdump header
have_win32_dbghelp
=
@have_win32_dbghelp@
# Pull in platform-specific magic
# Pull in platform-specific magic
include
$(top_builddir)/src/Makefile.port
include
$(top_builddir)/src/Makefile.port
...
...
src/backend/main/main.c
View file @
a534728a
...
@@ -85,7 +85,7 @@ main(int argc, char *argv[])
...
@@ -85,7 +85,7 @@ main(int argc, char *argv[])
* If supported on the current platform, set up a handler to be called if
* If supported on the current platform, set up a handler to be called if
* the backend/postmaster crashes with a fatal signal or exception.
* the backend/postmaster crashes with a fatal signal or exception.
*/
*/
#if
def WIN32
#if
defined(WIN32) && defined(HAVE_MINIDUMP_TYPE)
pgwin32_install_crashdump_handler
();
pgwin32_install_crashdump_handler
();
#endif
#endif
...
...
src/backend/port/win32/Makefile
View file @
a534728a
...
@@ -12,6 +12,9 @@ subdir = src/backend/port/win32
...
@@ -12,6 +12,9 @@ subdir = src/backend/port/win32
top_builddir
=
../../../..
top_builddir
=
../../../..
include
$(top_builddir)/src/Makefile.global
include
$(top_builddir)/src/Makefile.global
OBJS
=
timer.o socket.o signal.o security.o mingwcompat.o crashdump.o
OBJS
=
timer.o socket.o signal.o security.o mingwcompat.o
ifeq
($(have_win32_dbghelp), yes)
OBJS
+=
crashdump.o
endif
include
$(top_srcdir)/src/backend/common.mk
include
$(top_srcdir)/src/backend/common.mk
src/include/pg_config.h.in
View file @
a534728a
...
@@ -342,6 +342,9 @@
...
@@ -342,6 +342,9 @@
/* Define to 1 if you have the <memory.h> header file. */
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
#undef HAVE_MEMORY_H
/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */
#undef HAVE_MINIDUMP_TYPE
/* Define to 1 if you have the <netinet/in.h> header file. */
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
#undef HAVE_NETINET_IN_H
...
...
src/include/pg_config.h.win32
View file @
a534728a
...
@@ -258,6 +258,9 @@
...
@@ -258,6 +258,9 @@
/* Define to 1 if you have the <memory.h> header file. */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
#define HAVE_MEMORY_H 1
/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */
#define HAVE_MINIDUMP_TYPE 1
/* Define to 1 if you have the <netinet/in.h> header file. */
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
#define HAVE_NETINET_IN_H 1
...
...
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