9
#include <sys/signal.h>
15
extern char **environ;
16
static int was_mallocated = 0;
19
/* Compute the size of environ array including the final NULL */
20
for (size = 1; environ[size++];)
29
environ = malloc(size * sizeof(char *));
30
for (i = 0; i < size; i++)
34
environ = realloc(environ, (size + 1) * sizeof(char *));
35
environ[size - 1] = strcpy(malloc(strlen(name) + 1), name);
41
sigaddset(int *set, int signo)
43
*set |= sigmask(signo);
54
getcwd(char *buf, size_t size)