mutt stable branch with some hacks
1/* ultrix doesn't have strdup */
2
3#include <string.h>
4#include <stdlib.h>
5
6char *strdup (const char *s) /* __MEM_CHECKED__ */
7{
8 char *d;
9
10 if (s == NULL)
11 return NULL;
12
13 if ((d = malloc (strlen (s) + 1)) == NULL) /* __MEM_CHECKED__ */
14 return NULL;
15
16 memcpy (d, s, strlen (s) + 1);
17 return d;
18}
19