From apeiron@prophecy.dyndns.org  Wed Mar 19 11:45:56 2003
Return-Path: <apeiron@prophecy.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id CCD3637B404
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Mar 2003 11:45:55 -0800 (PST)
Received: from prophecy.dyndns.org (pcp01380957pcs.levtwn01.pa.comcast.net [68.81.162.166])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6D8E043FB1
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Mar 2003 11:45:54 -0800 (PST)
	(envelope-from apeiron@prophecy.dyndns.org)
Received: from prophecy.dyndns.org (apeiron@localhost [127.0.0.1])
	by prophecy.dyndns.org (8.12.6/8.12.6) with ESMTP id h2JJkMNq008608
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Mar 2003 14:46:23 -0500 (EST)
	(envelope-from apeiron@prophecy.dyndns.org)
Received: (from apeiron@localhost)
	by prophecy.dyndns.org (8.12.6/8.12.6/Submit) id h2JJkLrA008607;
	Wed, 19 Mar 2003 14:46:21 -0500 (EST)
Message-Id: <200303191946.h2JJkLrA008607@prophecy.dyndns.org>
Date: Wed, 19 Mar 2003 14:46:21 -0500 (EST)
From: Christopher Nehren <apeiron@prophecy.dyndns.org>
Reply-To: Christopher Nehren <apeiron@prophecy.dyndns.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: conflicting types for mkdir() and rename() in elm 2.5.6
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         50135
>Category:       ports
>Synopsis:       conflicting types for mkdir() and rename() in elm 2.5.6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 19 11:50:13 PST 2003
>Closed-Date:    Tue Sep 09 09:32:03 PDT 2003
>Last-Modified:  Tue Sep 09 09:32:03 PDT 2003
>Originator:     Christopher Nehren
>Release:        FreeBSD 5.0-RELEASE-p4 i386
>Organization:
>Environment:
System: FreeBSD prophecy.dyndns.org 5.0-RELEASE-p4 FreeBSD 5.0-RELEASE-p4 #0: Tue Mar 11 15:31:41 EST 2003 apeiron@prophecy:/usr/obj/usr/src/sys/PROPHECY i386

>Description:

While building elm 2.5.6, the build fails with errors regarding conflicting types for mkdir() and rename(). 

>How-To-Repeat:

cd $PREFIX/ports/mail/elm && make install

>Fix:

Define MKDIR and RENAME in a scope visible to work/elm-2.5.6/hdrs/elm_lib.h . Defining them right before the #ifndef lines in elm_lib.h does solve the problem, if in a kludgish way.
>Release-Note:
>Audit-Trail:

From: Jonathan Lennox <lennox@cs.columbia.edu>
To: freebsd-gnats-submit@FreeBSD.org, apeiron@prophecy.dyndns.org
Cc:  
Subject: Re: ports/50135: conflicting types for mkdir() and rename() in elm 2.5.6
Date: Wed, 3 Sep 2003 13:37:32 -0400

 --yT6MG4c4rA
 Content-Type: text/plain; charset=us-ascii
 Content-Description: message body text
 Content-Transfer-Encoding: 7bit
 
 I've figured out this problem.
 
 The problem is that elm's Configure script uses 'nm' to extract
 symbols from libc, to determine what functions are available on the
 system.
 
 However, the script isn't expecting symbols of type 'W' (weak) to show
 up. In FreeBSD 5.x, a number of functions in libc are weak symbols.
 
 The solution is to patch elm's Configure script as indicated by the
 attached patch.  (I've attached the new patch-aa file; this
 incorporates the existing patch-aa as well as the new patch I've
 introduced.)  The fix changes '[ATDS]', in the sed expression run over
 the output of 'nm', to '[ATDSW]'.
 
 
 --yT6MG4c4rA
 Content-Type: text/plain
 Content-Disposition: inline;
 	filename="patch-aa"
 Content-Transfer-Encoding: 7bit
 
 --- Configure.bak	Wed Sep  3 13:25:06 2003
 +++ Configure	Wed Sep  3 13:23:43 2003
 @@ -18,11 +18,6 @@
  PATH=".:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:$PATH"
  export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0; kill $$)
  
 -if test ! -t 0; then
 -    echo "Say 'sh Configure', not 'sh <Configure'"
 -    exit 1
 -fi
 -
  (alias) >/dev/null 2>&1 && \
      echo "(I see you are using the Korn shell.  Some ksh's blow up on Configure," && \
      echo "especially on exotic machines.  If yours does, try the Bourne shell instead.)"
 @@ -2055,6 +2050,7 @@
      libc=/usr/lib/libc.a
  else
  set /usr/ccs/lib/libc.so
 +test -f $1 || set /usr/lib/libc.a
  test -f $1 || set /usr/lib/libc.so
  test -f $1 || set /usr/lib/libc.so.[0-9]*
  test -f $1 || set /lib/libsys_s.a
 @@ -2108,7 +2104,7 @@
  set `echo $libc $libnames | tr ' ' '\012' | sort | uniq`
  $echo $n "Extracting names from $* for later perusal...$c"
  nm $nm_opts $* 2>/dev/null >libc.tmp
 -$sed -n -e 's/^.* [ATDS]  *[_.]*//p' -e 's/^.* [ATDS] //p' <libc.tmp >libc.list
 +$sed -n -e 's/^.* [ATDSW]  *[_.]*//p' -e 's/^.* [ATDSW] //p' <libc.tmp >libc.list
  if $contains '^printf$' libc.list >/dev/null 2>&1; then
      echo done
  elif $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' \
 @@ -2496,7 +2492,10 @@
  #
  : see if crypt exists
  echo " "
 -if $contains '^crypt$' libc.list >/dev/null 2>&1; then
 +if $test "$cryptlib" = -lcrypt; then
 +    echo 'crypt() found.'
 +    d_crypt="$define"
 +elif $contains '^crypt$' libc.list >/dev/null 2>&1; then
      echo 'crypt() found.'
      d_crypt="$define"
      cryptlib=''
 
 --yT6MG4c4rA
 Content-Type: text/plain; charset=us-ascii
 Content-Description: .signature
 Content-Transfer-Encoding: 7bit
 
 
 -- 
 Jonathan Lennox
 lennox@cs.columbia.edu
 
 --yT6MG4c4rA--
State-Changed-From-To: open->closed 
State-Changed-By: glewis 
State-Changed-When: Tue Sep 9 09:31:30 PDT 2003 
State-Changed-Why:  
Committed the same patch from earlier PR 47379. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50135 
>Unformatted:
