1 /* macglue.h  -  Define couple of things that Mac evidently misses. ARG!
2  *
3  * Copyright (c) 1999 Sampo Kellomaki <sampo@iki.fi>, All Rights Reserved.
4  * License: This software may be distributed under the same license
5  *          terms as openssl (i.e. free, but mandatory attribution).
6  *          See file LICENSE for details.
7  *
8  * 26.9.1999, Created. --Sampo
9  */
10 
11 #ifdef __macintosh__
12 
13 #include <string.h>
14 #include <stdlib.h>
15 
16 /* Why do we have to reinvent the wheel? */
17 
18 static char*
strdup(const char * s)19 strdup(const char* s)
20 {
21 	char* x = malloc(strlen(s)+1);
22 	if (!x) return NULL;
23 	strcpy(x, s);
24 	return x;
25 }
26 
27 #endif
28 
29 /* EOF  -  macglue.h */
30