# HG changeset patch # User aidan # Date 1111768500 0 # Node ID 45609533aa75627d710123c6668d5db4b8e03852 # Parent 263a354405ed4bccc321811799113874eef7cb72 [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 . diff -r 263a354405ed -r 45609533aa75 lib-src/ChangeLog --- 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 + + * 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 * XEmacs 21.5.20 "cilantro" is released. diff -r 263a354405ed -r 45609533aa75 lib-src/fakemail.c --- 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 ()), \ diff -r 263a354405ed -r 45609533aa75 src/ChangeLog --- 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 + + * unexelf.c: define `Elfw(type)' for FreeBSD alpha and amd64. + 2005-03-25 Marcus Crestani * device-x.c: Include process.h for egetenv. diff -r 263a354405ed -r 45609533aa75 src/unexelf.c --- 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 #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 /* get ElfW etc */ #endif