Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rob Latham
mpich-CVS
Commits
3dab807e
Commit
3dab807e
authored
Sep 26, 2007
by
gropp
Browse files
Fix for strdup when memory tracing is enabled
parent
ae932c13
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/include/mpimem.h
View file @
3dab807e
...
...
@@ -9,6 +9,9 @@
/* Make sure that we have the definitions for the malloc routines and size_t */
#include <stdlib.h>
/* strdup is often declared in string.h, so if we plan to redefine strdup,
we need to include string first. That is done below, only in the
case where we redefine strdup */
#if defined(__cplusplus)
extern
"C"
{
...
...
@@ -218,6 +221,10 @@ int MPIU_Str_get_string(char **str_ptr, char *val, int maxlen);
#if defined(strdup) || defined(__strdup)
#undef strdup
#endif
/* We include string.h first, so that if it contains a definition of
strdup, we won't have an obscure failure when a file include string.h
later in the compilation process. */
#include <string.h>
/* The ::: should cause the compiler to choke; the string
will give the explanation */
#define strdup(a) 'Error use MPIU_Strdup' :::
...
...
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