CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
CHECK_SYMBOL_EXISTS(system stdlib.h HAVE_SYSTEM)
CHECK_SYMBOL_EXISTS(CreateProcess windows.h HAVE_CREATEPROCESS)
-CHECK_FUNCTION_EXISTS(stpcpy HAVE_STPCPY)
+CHECK_SYMBOL_EXISTS(stpcpy string.h HAVE_STPCPY)
CHECK_FUNCTION_EXISTS(sbrk HAVE_SBRK)
+CHECK_FUNCTION_EXISTS(getdelim HAVE_GETDELIM)
+CHECK_FUNCTION_EXISTS(getline HAVE_GETLINE)
### Configure build
#endif
#include "util.h"
#include "debug.h"
+#include "config.h"
void
strtoupper(char *dest, const char *src)
#endif
+#ifndef HAVE_GETDELIM
/**
* Read the part of a file up to a delimiter to a string.
* <p>
* @return Number of characters read (not including
the null terminator), or -1 on error or EOF.
*/
-int
+ssize_t
getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
{
int result;
return result;
}
+#endif
-int
+#ifndef HAVE_GETLINE
+ssize_t
getline (char **lineptr, size_t *n, FILE *stream)
{
return getdelim (lineptr, n, '\n', stream);
}
+#endif
#if defined(_UNICODE)
wchar_t* newSysString(const char *toconvert)