NOTE: This patch has been committed.
Andrey Slusar's FreeBSD fixes for fakemail.c, unexelf.c, as sent in
86d5uq2e3i.fsf(a)santinel.home.ua of a month ago. Excuse the delay, and thank
you, Andrey!
lib-src/ChangeLog addition:
2005-03-25 Andrey Slusar <anrays(a)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.
src/ChangeLog addition:
2005-02-24 Andrey Slusar <anrays(a)gmail.com>
* unexelf.c: define `Elfw(type)' for FreeBSD alpha and amd64.
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: src/unexelf.c lib-src/fakemail.c
Index: lib-src/fakemail.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/fakemail.c,v
retrieving revision 1.8
diff -u -u -r1.8 fakemail.c
--- lib-src/fakemail.c 2005/01/26 09:53:28 1.8
+++ lib-src/fakemail.c 2005/03/25 16:31:01
@@ -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 ()), \
Index: src/unexelf.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/unexelf.c,v
retrieving revision 1.16
diff -u -u -r1.16 unexelf.c
--- src/unexelf.c 2004/09/20 19:20:05 1.16
+++ src/unexelf.c 2005/03/25 16:31:02
@@ -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
--
“I, for instance, am gung-ho about open source because my family is being
held hostage in Rob Malda’s basement. But who fact-checks me, or Enderle,
when we say something in public? No-one!” -- Danny O’Brien