11 |
|
|
12 |
|
#include <string.h> |
13 |
|
#include <ctype.h> |
14 |
< |
#ifndef _WIN32 /* XXX was NIX, do we still compile on Amiga? */ |
14 |
> |
#ifndef RHAS_GETPWNAM |
15 |
|
#include <pwd.h> |
16 |
|
#include <sys/types.h> |
17 |
|
#endif |
33 |
|
int mode |
34 |
|
) |
35 |
|
{ |
36 |
< |
#ifndef _WIN32 /* XXX was NIX, do we still compile on Amiga? */ |
36 |
> |
#ifndef RHAS_GETPWNAM |
37 |
|
struct passwd *pwent; |
38 |
|
#endif |
39 |
|
static char pname[PATH_MAX]; |
64 |
|
strncat(pname, fname, sizeof(pname)-strlen(pname)-1); |
65 |
|
break; |
66 |
|
} |
67 |
< |
#ifndef _WIN32 /* XXX was NIX, do we still compile on Amiga? */ |
67 |
> |
#ifndef RHAS_GETPWNAM |
68 |
|
/* XXX Should we request our own home directory from the |
69 |
|
XXX system as well if the above fails? */ |
70 |
|
/* XXX In any case, we need do the same thing on Windows... */ |
171 |
|
unsetenv("HOMEDIR"); |
172 |
|
fp = getpath("~", getenv("PATH"), F_OK); |
173 |
|
printf(fmt, "~", "PATH", "F_OK", fp); |
174 |
< |
#ifndef _WIN32 /* XXX was NIX, do we still compile on Amiga? */ |
174 |
> |
#ifndef RHAS_GETPWNAM |
175 |
|
fp = getpath("~lp", getenv("PATH"), F_OK); |
176 |
|
printf(fmt, "~lp", "PATH", "F_OK", fp); |
177 |
|
#endif |