Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
darshan
darshan
Commits
36d8e168
Commit
36d8e168
authored
Feb 13, 2020
by
Shane Snyder
Browse files
add autoconf test for fscanf redirect
parent
733cac5d
Changes
3
Hide whitespace changes
Inline
Side-by-side
darshan-runtime/configure
View file @
36d8e168
...
...
@@ -4832,6 +4832,38 @@ fi
# End of MPI-only checks
#
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for fscanf redirect"
>
&5
$as_echo_n
"checking for fscanf redirect... "
>
&6
;
}
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
main ()
{
int fscanf(FILE *stream, const char *format, ...) {return(0);}
int __isoc99_fscanf(FILE *stream, const char *format, ...) {return(0);}
;
return 0;
}
_ACEOF
if
ac_fn_c_try_compile
"
$LINENO
"
;
then
:
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: no"
>
&5
$as_echo
"no"
>
&6
;
}
else
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: yes"
>
&5
$as_echo
"yes"
>
&6
;
}
$as_echo
"#define HAVE_FSCANF_REDIRECT 1"
>>
confdefs.h
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
DARSHAN_VERSION
=
"3.2.0-pre1"
...
...
darshan-runtime/configure.in
View file @
36d8e168
...
...
@@ -481,6 +481,21 @@ AS_IF([$CC -show foo.c -o foo >& /dev/null],
# End of MPI-only checks
#
AC_MSG_CHECKING(for fscanf redirect)
AC_TRY_COMPILE(
[
#include <stdio.h>
],
[
int fscanf(FILE *stream, const char *format, ...) {return(0);}
int __isoc99_fscanf(FILE *stream, const char *format, ...) {return(0);}
],
AC_MSG_RESULT(no),
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_FSCANF_REDIRECT, 1, Define if fscanf is redirected to another function)
)
DARSHAN_VERSION="AC_PACKAGE_VERSION"
AC_SUBST(darshan_lib_path)
AC_SUBST(darshan_share_path)
...
...
darshan-runtime/darshan-runtime-config.h.in
View file @
36d8e168
...
...
@@ -6,6 +6,9 @@
/* Define if struct aiocb64 type is defined */
#undef HAVE_AIOCB64
/* Define if fscanf is redirected to another function */
#undef HAVE_FSCANF_REDIRECT
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
...
...
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