all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* linux compile fails on sys_error / stdio.h incompatible
@ 2003-05-08  4:09 Maureen
  0 siblings, 0 replies; 4+ messages in thread
From: Maureen @ 2003-05-08  4:09 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

 
This is what I'm getting ; 
 
 
make[1]: Entering directory `/hw/tools/ftp/emacs/emacs-21.2/lib-src'
gcc -c -D_BSD_SOURCE    -DHAVE_CONFIG_H    -I. -I../src
-I/hw/tools/ftp/emacs/emacs-21.2/lib-src
-I/hw/tools/ftp/emacs/emacs-21.2/lib-src/../src -D_BSD_SOURCE     -g -O2
-Demacs  /hw/tools/ftp/emacs/emacs-21.2/lib-src/movemail.c
/hw/tools/ftp/emacs/emacs-21.2/lib-src/movemail.c: In function `strerror':
/hw/tools/ftp/emacs/emacs-21.2/lib-src/movemail.c:947: conflicting types for
`sys_errlist'
/hw/tools/gnu/gcc/3.2.2/i686/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/stdi
o.h:563: previous declaration of `sys_errlist'
make[1]: *** [movemail.o] Error 1
make[1]: Leaving directory `/hw/tools/ftp/emacs/emacs-21.2/lib-src'
make: *** [lib-src] Error 2


[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux compile fails on sys_error / stdio.h incompatible
       [not found] <mailman.5736.1052367227.21513.help-gnu-emacs@gnu.org>
@ 2003-05-08 12:21 ` Benjamin Riefenstahl
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Riefenstahl @ 2003-05-08 12:21 UTC (permalink / raw)


Hi,


"Maureen" <mew@azulsystems.com> writes:
> /hw/tools/ftp/emacs/emacs-21.2/lib-src/movemail.c: In function `strerror':
> /hw/tools/ftp/emacs/emacs-21.2/lib-src/movemail.c:947: conflicting types for
> `sys_errlist'
> /hw/tools/gnu/gcc/3.2.2/i686/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/stdi
> o.h:563: previous declaration of `sys_errlist'

a) Is there any reason why you can't use the current 21.3?

b) Investigate why configure doesn't find strerror() in the system
headers.  It does on my machine here, as it should and if it finds
that, it shouldn't try to use it's own version.  I admit my machine is
linux-ppc, not i386. 


Hope this helps, benny

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: linux compile fails on sys_error / stdio.h incompatible
@ 2003-05-08 17:21 Maureen Woodyard
  0 siblings, 0 replies; 4+ messages in thread
From: Maureen Woodyard @ 2003-05-08 17:21 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]

 
Hi Benny,
 
Actually I compiled 21.2 to make sure the problem wasn't
with 21.3 - they both get the same error.
 
The problem appears to be the stdio.h in /usr/include defines
strerror differently from movemail.c. If I compile without 
movemail, it just fails with a similar error on emacsclient.
 
/usr/include/stdio.h
 
#ifdef  __USE_BSD
extern int sys_nerr;
extern __const char *__const sys_errlist[];
#endif
#ifdef  __USE_GNU
extern int _sys_nerr;
extern __const char *__const _sys_errlist[];
#endif

../emacs21.3/lib-src/movemail.c
 
strerror (errnum)
     int errnum;
{
  extern char *sys_errlist[];
  extern int sys_nerr;
  if (errnum >= 0 && errnum < sys_nerr)
    return sys_errlist[errnum];
  return (char *) "Unknown error";
}


	-----Original Message----- 
	From: Benjamin Riefenstahl [mailto:Benjamin.Riefenstahl@epost.de] 
	Sent: Thu 5/8/2003 5:21 AM 
	To: help-gnu-emacs@gnu.org 
	Cc: 
	Subject: Re: linux compile fails on sys_error / stdio.h incompatible
	
	

	Hi,
	
	
	"Maureen" <mew@azulsystems.com> writes:
	> /hw/tools/ftp/emacs/emacs-21.2/lib-src/movemail.c: In function
`strerror':
	> /hw/tools/ftp/emacs/emacs-21.2/lib-src/movemail.c:947: conflicting
types for
	> `sys_errlist'
	>
/hw/tools/gnu/gcc/3.2.2/i686/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/stdi
	> o.h:563: previous declaration of `sys_errlist'
	
	a) Is there any reason why you can't use the current 21.3?
	
	b) Investigate why configure doesn't find strerror() in the system
	headers.  It does on my machine here, as it should and if it finds
	that, it shouldn't try to use it's own version.  I admit my machine
is
	linux-ppc, not i386.
	
	
	Hope this helps, benny
	
	_______________________________________________
	Help-gnu-emacs mailing list
	Help-gnu-emacs@gnu.org
	http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
	


[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux compile fails on sys_error / stdio.h incompatible
       [not found] <mailman.5777.1052414811.21513.help-gnu-emacs@gnu.org>
@ 2003-05-09 15:10 ` Benjamin Riefenstahl
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Riefenstahl @ 2003-05-09 15:10 UTC (permalink / raw)


Hi Maureen,


"Maureen Woodyard" <mew@azulsystems.com> writes:
> The problem appears to be the stdio.h in /usr/include defines
> strerror differently from movemail.c. If I compile without movemail,
> it just fails with a similar error on emacsclient.

My point is that neither movemail nor emacsclient should define
strerror() at all.  It is part of the runtime library and there is no
reason to replace it.  Which is probably why these definitions don't
fit with the runtime definitions, they were never intended to do that.

Both definitions of the function in movemail.c and in emacsclient.c
are surrounded by "#ifndef HAVE_STRERROR".  This define should be set
by the configure script on Linux when it finds the function in the
compiler runtime.

You need to find out, why this doesn't work in your setup, e.g. by
looking at config.log.  You may also be able just to set the define
yourself in some option to temporarily get around this, but that
wouldn't get at the root of the problem.

I wrote befiore:
> 	b) Investigate why configure doesn't find strerror() in the
> 	system headers.  It does on my machine here, as it should and
> 	if it finds that, it shouldn't try to use it's own version.  I
> 	admit my machine is linux-ppc, not i386.


Hope this helps, benny

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-05-09 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.5777.1052414811.21513.help-gnu-emacs@gnu.org>
2003-05-09 15:10 ` linux compile fails on sys_error / stdio.h incompatible Benjamin Riefenstahl
2003-05-08 17:21 Maureen Woodyard
     [not found] <mailman.5736.1052367227.21513.help-gnu-emacs@gnu.org>
2003-05-08 12:21 ` Benjamin Riefenstahl
  -- strict thread matches above, loose matches on Subject: below --
2003-05-08  4:09 Maureen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.