--- ../sal/osl/unx/system.h.orig Tue Aug 20 08:54:55 2002 +++ ../sal/osl/unx/system.h Sat Apr 19 22:09:15 2003 @@ -203,25 +203,25 @@ # include # include # include +# include # include # include +# include +# include +# include +# include +# include # include # include # define IORESOURCE_TRANSFER_BSD # include -# if BYTE_ORDER == LITTLE_ENDIAN -# define _LITTLE_ENDIAN -# elif BYTE_ORDER == BIG_ENDIAN -# define _BIG_ENDIAN -# elif BYTE_ORDER == PDP_ENDIAN -# define _PDP_ENDIAN -# endif -# define sched_yield() pthread_yield() -# define pthread_testcancel() # define NO_PTHREAD_RTL -# define NO_PTHREAD_PRIORITY -# define CMD_ARG_PRG __progname -# define CMD_ARG_ENV environ +/* __progname isn't sufficient here. We need the full path as well + * for e.g. setup and __progname only points to the binary name. + */ +# define CMD_ARG_PRG_IS_DEFINED +# define CMD_ARG_PRG *((struct ps_strings *)PS_STRINGS)->ps_argvstr +# define CMD_ARG_ENV environ #endif #ifdef SCO @@ -547,12 +547,14 @@ #endif #ifdef NO_PTHREAD_RTL +#if !defined FREEBSD || (__FreeBSD_version < 500112) struct passwd *getpwent_r(struct passwd *pwd, char *buffer, int buflen); extern struct spwd *getspnam_r(const char *name, struct spwd *result, char *buffer, int buflen); struct tm *localtime_r(const time_t *timep, struct tm *buffer); struct tm *gmtime_r(const time_t *timep, struct tm *buffer); +#endif /* !defined FREEBSD || (__FreeBSD_version < 500112) */ struct hostent *gethostbyname_r(const char *name, struct hostent *result, char *buffer, int buflen, int *h_errnop); #endif