Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Feb 1999 23:25:12 +0900
From:      Takayuki TAMURA <ttathome@remus.dti.ne.jp>
To:        kai@slowfox.cs.uni-dortmund.de
Cc:        ports@FreeBSD.ORG
Subject:   Re: ports/10034: editors/emacs20 wouldn't compile, now doesn't run
Message-ID:  <19990212232512T.ttathome@remus.dti.ne.jp>
In-Reply-To: Your message of "Thu, 11 Feb 1999 18:39:32 %2B0100 (CET)" <199902111739.SAA48481@slowfox.cs.uni-dortmund.de>
References:  <199902111739.SAA48481@slowfox.cs.uni-dortmund.de>

next in thread | previous in thread | raw e-mail | index | archive | help
----Next_Part(Fri_Feb_12_23:22:10_1999_809)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This PR is essentially the same as ports/9776 (emacs20-dl breakage).

The problem is that `BSD_SYSTEM' is left undefined in "src/s/freebsd.h",
because FreeBSD 4.x is not expected there.
The file contains,

	#undef BSD_SYSTEM
	#if __FreeBSD__ == 1
	#define BSD_SYSTEM 199103
	#elif __FreeBSD__ == 2
	#define BSD_SYSTEM 199306
	#elif __FreeBSD__ == 3
	#define BSD_SYSTEM 199506
	#endif

So, I added the following and everything worked fine.

	#elif __FreeBSD__ == 4
	#define BSD_SYSTEM 199901

# The value is not significant, I believe :-)

I attached a patch for editors/emacs20, but it should be applied to
editors/emacs20-dl as well.


On Thu, 11 Feb 1999 18:39:32 +0100 (CET)
Kai Grossjohann <kai@slowfox.cs.uni-dortmund.de> wrote:

> >Environment:
> 
> FreeBSD slowfox.frob.org 4.0-CURRENT FreeBSD 4.0-CURRENT #9: Thu Feb 11 16:50:46 CET 1999     root@slowfox.frob.org:/usr/src/sys/compile/SLOWFOX  i386
> 
> >Description:
> 
> At first, Emacs wouldn't compile.  I then patched emacs-20.3/s/freebsd.h
> as follows:
> 
> *** BEGIN PATCH
> # diff -u freebsd.h.DIST freebsd.h
> --- freebsd.h.DIST      Thu Feb 11 17:14:37 1999
> +++ freebsd.h   Thu Feb 11 17:12:06 1999
> @@ -1,5 +1,8 @@
>  /* s/ file for freebsd system.  */
>  
> +/* kai: must define CURRENT_USER? */
> +#define CURRENT_USER
> +
>  /* Get the correct __FreeBSD_version, even if this is before that was
>     defined. */
>  #ifndef __FreeBSD__
> *** END PATCH
> 
> I also patched emacs-20.3/lib-src/fakemail.c as follows:
> 
> *** BEGIN PATCH
> # diff -u fakemail.c.DIST fakemail.c
> --- fakemail.c.DIST     Thu Feb 11 17:13:54 1999
> +++ fakemail.c  Thu Feb 11 17:13:24 1999
> @@ -147,8 +147,8 @@
>  extern int fclose (), pclose ();
>  
>  #ifdef CURRENT_USER
> -extern struct passwd *getpwuid ();
> -extern unsigned short geteuid ();
> +/*extern struct passwd *getpwuid ();*/
> +/*extern unsigned short geteuid ();*/
>  static struct passwd *my_entry;
>  #define cuserid(s)                             \
>  (my_entry = getpwuid (((int) geteuid ())),     \
> *** END PATCH
> 
> This allowed Emacs to compile.  Though I realize it didn't do
> much -- fakemail isn't used in BSD, like the sources say.
> Anyway.

Yes, fakemail becomes a stub if BSD_SYSTEM is defined.

> Emacs works fine in a TTY.  But in X, I get a blank window and
> nothing useful happens.  Enclosed you can find the truss output
> showing what appears to be an infloop. (I killed the whole thing
> before the window appeared because it is so long.)

I'm running -current as of 1999-02-05, but haven't seen the problem.
--------
Takayuki TAMURA
ttathome@remus.dti.ne.jp

----Next_Part(Fri_Feb_12_23:22:10_1999_809)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=ports-patch

--- editors/emacs20/patches/patch-cb.orig	Wed Jan 27 01:58:21 1999
+++ editors/emacs20/patches/patch-cb	Fri Feb 12 22:28:42 1999
@@ -1,5 +1,5 @@
 --- src/s/freebsd.h.orig	Wed Aug 19 16:25:36 1998
-+++ src/s/freebsd.h	Sun Jan  3 20:56:02 1999
++++ src/s/freebsd.h	Fri Feb 12 22:27:28 1999
 @@ -45,6 +45,13 @@
  #define LIBS_SYSTEM -lutil
  #define LIBS_TERMCAP -ltermcap
@@ -32,3 +32,12 @@
  #undef LIB_GCC
  #define LIB_GCC
  
+@@ -109,6 +123,8 @@
+ #define BSD_SYSTEM 199306
+ #elif __FreeBSD__ == 3
+ #define BSD_SYSTEM 199506
++#elif __FreeBSD__ == 4
++#define BSD_SYSTEM 199901
+ #endif
+ 
+ #define WAITTYPE int

----Next_Part(Fri_Feb_12_23:22:10_1999_809)----

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990212232512T.ttathome>