diff options
-rw-r--r-- | include/wolf/port/string.h | 8 | ||||
-rw-r--r-- | src/port/string.c | 4 | ||||
-rw-r--r-- | tests/port/test_strdup.c | 2 | ||||
-rw-r--r-- | tests/port/test_strerror_r.c | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/include/wolf/port/string.h b/include/wolf/port/string.h index 335ce7e..b611076 100644 --- a/include/wolf/port/string.h +++ b/include/wolf/port/string.h @@ -38,13 +38,13 @@ #endif #if !defined HAVE_STRDUP -extern char *wolf_strdup( const char * ); -#define stdrup wolf_strdup +extern char *wolf_port_strdup( const char * ); +#define stdrup wolf_port_strdup #endif #if !defined HAVE_STRERROR_R -extern int wolf_strerror_r( int num, char *buf, size_t buflen ); -#define strerror_r( errnum, buf, buflen ) wolf_strerror_r( errnum, buf, buflen ) +extern int wolf_port_strerror_r( int num, char *buf, size_t buflen ); +#define strerror_r( errnum, buf, buflen ) wolf_port_strerror_r( errnum, buf, buflen ) #endif /** @} */ /* @addtogroup wolf_port */ diff --git a/src/port/string.c b/src/port/string.c index 74cf31c..805f38a 100644 --- a/src/port/string.c +++ b/src/port/string.c @@ -26,7 +26,7 @@ #include <stdlib.h> /* for malloc, NULL */ -char *wolf_strdup( const char *s ) { +char *wolf_port_strdup( const char *s ) { char *d; d = (char *)malloc( strlen( s ) + 1 ); if( d == NULL ) return NULL; @@ -51,7 +51,7 @@ extern int dummy; /* prevent ISO C forbids an empty source file' warning */ #include <sys/types.h> /* for size_t */ #include <errno.h> /* for errno */ -int wolf_strerror_r( int num, char *buf, size_t buflen ) { +int wolf_port_strerror_r( int num, char *buf, size_t buflen ) { const char *msg; int len; diff --git a/tests/port/test_strdup.c b/tests/port/test_strdup.c index 9cc1be6..fd1c843 100644 --- a/tests/port/test_strdup.c +++ b/tests/port/test_strdup.c @@ -8,7 +8,7 @@ int main( void ) { const char *s = "test"; - char *d = wolf_strdup( s ); + char *d = wolf_port_strdup( s ); free( d ); exit( EXIT_SUCCESS ); } diff --git a/tests/port/test_strerror_r.c b/tests/port/test_strerror_r.c index 3f95f06..72b41c5 100644 --- a/tests/port/test_strerror_r.c +++ b/tests/port/test_strerror_r.c @@ -16,7 +16,7 @@ int main( void ) { for( i = 0; i < 255; i++ ) { errno = 0; *buf = '\0'; - res = wolf_strerror_r( i, buf, 1024 ); + res = wolf_port_strerror_r( i, buf, 1024 ); printf( "%d: %d \"%s\"\n", i, res, buf ); } exit( EXIT_SUCCESS ); |