This is 2 FreeBSD specific fixes, already commited to xemacs-21.4.
lib-src/ChangeLog
2005-02-24 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.
--- lib-src/fakemail.c.orig Wed Jan 26 11:53:28 2005
+++ lib-src/fakemail.c Thu Feb 24 16:45:49 2005
@@ -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 ();
+#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 ()), \
src/Changelog
2005-02-24 Andrey Slusar <anrays(a)gmail.com>
* unexelf.c: define `Elfw(type)' for FreeBSD alpha and amd64.
--- src/unexelf.c.orig Mon Sep 20 22:20:05 2004
+++ src/unexelf.c Thu Feb 24 16:53:52 2005
@@ -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
--
Regards,
Andrey.
Show replies by date