Changeset 849:d7f940afd933 in freeDiameter
- Timestamp:
- Oct 22, 2012, 12:12:13 AM (12 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/CMakeLists.txt
r836 r849 63 63 # malloc.h ? 64 64 CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H) 65 66 # strndup ? Missing on OS X 67 CHECK_FUNCTION_EXISTS (strndup HAVE_STRNDUP) 65 68 66 69 -
include/freeDiameter/freeDiameter-host.h.in
r836 r849 43 43 #cmakedefine HAVE_AI_ADDRCONFIG 44 44 #cmakedefine HAVE_CLOCK_GETTIME 45 #cmakedefine HAVE_STRNDUP 45 46 46 47 #cmakedefine HOST_BIG_ENDIAN @HOST_BIG_ENDIAN@ -
include/freeDiameter/libfdproto.h
r836 r849 612 612 #endif /* HAVE_CLOCK_GETTIME */ 613 613 614 #ifndef HAVE_STRNDUP 615 char * strndup (char const *s, size_t n); 616 #endif /* HAVE_STRNDUP */ 614 617 615 618 -
libfdproto/portability.c
r837 r849 46 46 } 47 47 #endif /* HAVE_CLOCK_GETTIME */ 48 49 /* Replacement for strndup for the Mac OS */ 50 #ifndef HAVE_STRNDUP 51 char * strndup (char *str, size_t len) 52 { 53 char * output; 54 size_t outlen = strnlen (str, len); 55 CHECK_MALLOC_DO( output = malloc (outlen + 1), return NULL ); 56 57 output[outlen] = '\0'; 58 memcpy (output, str, outlen); 59 return output; 60 } 61 #endif /* HAVE_STRNDUP */
Note: See TracChangeset
for help on using the changeset viewer.