dnl AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_FUNCS(fgetpos memmove setegid srand48 strerror)
-AC_REPLACE_FUNCS(strcasecmp strdup setenv)
+AC_REPLACE_FUNCS(strcasecmp setenv)
AC_CHECK_FUNCS(snprintf vsnprintf)
AC_CHECK_FUNC(getopt)
{
outbuf = realloc (outbuf, (++outcount) * sizeof (var_t));
outbuf[outcount - 1].seen = 0;
- outbuf[outcount - 1].name = strdup (name);
+ outbuf[outcount - 1].name = p_strdup(name, str_len(name));
outbuf[outcount - 1].descr = NULL;
}
}
if (lold == 0)
- outbuf[outcount - 1].descr = strdup (s);
+ outbuf[outcount - 1].descr = p_strdup(s, str_len(s));
else {
outbuf[outcount - 1].descr =
realloc (outbuf[outcount - 1].descr, lold + lnew + 1);
+++ /dev/null
-/*
- * Copyright notice from original mutt:
- * [none]
- *
- * This file is part of mutt-ng, see http://www.muttng.org/.
- * It's licensed under the GNU General Public License,
- * please see the file GPL in the top level source directory.
- */
-
-/* ultrix doesn't have strdup */
-
-#include <string.h>
-#include <stdlib.h>
-
-char *strdup (const char *s)
-{ /* __MEM_CHECKED__ */
- char *d;
-
- if (s == NULL)
- return NULL;
-
- if ((d = malloc (str_len (s) + 1)) == NULL) /* __MEM_CHECKED__ */
- return NULL;
-
- memcpy (d, s, str_len (s) + 1);
- return d;
-}