Mercurial > hg > xemacs-beta
changeset 2687:45609533aa75
[xemacs-hg @ 2005-03-25 16:34:53 by aidan]
Andrey Slusar's FreeBSD fixes for fakemail.c, unexelf.c, as sent in
86d5uq2e3i.fsf@santinel.home.ua .
author | aidan |
---|---|
date | Fri, 25 Mar 2005 16:35:00 +0000 |
parents | 263a354405ed |
children | 4bcb4e8e1567 |
files | lib-src/ChangeLog lib-src/fakemail.c src/ChangeLog src/unexelf.c |
diffstat | 4 files changed, 27 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/ChangeLog Fri Mar 25 16:15:56 2005 +0000 +++ b/lib-src/ChangeLog Fri Mar 25 16:35:00 2005 +0000 @@ -1,3 +1,9 @@ +2005-03-25 Andrey Slusar <anrays@gmail.com> + + * fakemail.c (CURRENT_USER): Define it if FreeBSD version is >= + 400000. Also, when FreeBSD version is >= 400000 geteuid returns + uid_t instead of unsigned short. + 2005-03-11 Stephen J. Turnbull <stephen@xemacs.org> * XEmacs 21.5.20 "cilantro" is released.
--- a/lib-src/fakemail.c Fri Mar 25 16:15:56 2005 +0000 +++ b/lib-src/fakemail.c Fri Mar 25 16:35:00 2005 +0000 @@ -149,9 +149,17 @@ extern char *malloc (), *realloc (); #endif +#if defined(__FreeBSD_version) && __FreeBSD_version >= 400000 +#define CURRENT_USER +#endif + #ifdef CURRENT_USER extern struct passwd *getpwuid (); -extern unsigned short geteuid (); +#if defined(__FreeBSD_version) && __FreeBSD_version >= 400000 +extern uid_t geteuid (); +#else +extern unsigned short geteuid (); +#endif static struct passwd *my_entry; #define cuserid(s) \ (my_entry = getpwuid ((int) geteuid ()), \
--- a/src/ChangeLog Fri Mar 25 16:15:56 2005 +0000 +++ b/src/ChangeLog Fri Mar 25 16:35:00 2005 +0000 @@ -1,3 +1,7 @@ +2005-02-24 Andrey Slusar <anrays@gmail.com> + + * unexelf.c: define `Elfw(type)' for FreeBSD alpha and amd64. + 2005-03-25 Marcus Crestani <crestani@xemacs.org> * device-x.c: Include process.h for egetenv.
--- a/src/unexelf.c Fri Mar 25 16:15:56 2005 +0000 +++ b/src/unexelf.c Fri Mar 25 16:35:00 2005 +0000 @@ -477,6 +477,14 @@ # include <sys/exec_elf.h> #endif +#if defined(__FreeBSD__) && (defined(__alpha__) || defined(__amd64__)) +# ifdef __STDC__ +# define ElfW(type) Elf64_##type +# else +# define ElfW(type) Elf64_/**/type +# endif +#endif + #if __GNU_LIBRARY__ - 0 >= 6 # include <link.h> /* get ElfW etc */ #endif