This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Does CVS build?


On Wed, Aug 15, 2001 at 03:51:57PM -0400, Christopher Faylor wrote:
>>This is caused by the following patch.  What's up Chris?
>>
>>Mon Aug 13 22:26:01 2001  Christopher Faylor <cgf@cygnus.com>
>>
>>        * libc/include/sys/errno.h: Declare sys_errlist and sys_nerr, >under
>>        Cygwin.
>
>WIP.  I know that you will all use your substantial programming skills
>to work around this problem while libiberty is being fixed.

Here is a libiberty patch to try.  configure has to be regenerated after applying
this patch.

cgf

Index: configure.in
===================================================================
RCS file: /cvs/uberbaum/libiberty/configure.in,v
retrieving revision 1.33
diff -p -r1.33 configure.in
*** configure.in	2001/07/05 17:24:39	1.33
--- configure.in	2001/08/15 20:04:49
*************** if test -n "${with_target_subdir}"; then
*** 177,184 ****
      # Of the functions in $checkfuncs, newlib only has strerror.
      AC_DEFINE_NOAUTOHEADER(HAVE_STRERROR)
  
!     setobjs=yes
! 
    fi
  
  else
--- 177,186 ----
      # Of the functions in $checkfuncs, newlib only has strerror.
      AC_DEFINE_NOAUTOHEADER(HAVE_STRERROR)
  
!     case "$host" in
! 	*-*-cygwin*) ;;
! 	*) setobjs=yes ;;
!     esac
    fi
  
  else
*************** if test -z "${setobjs}"; then
*** 221,233 ****
      setobjs=yes
      ;;
  
-   esac
- fi
- 
- if test -z "${setobjs}"; then
- 
-   case "${host}" in
- 
    *-*-cygwin*)
      # The Cygwin library actually uses a couple of files from
      # libiberty when it is built.  If we are building a native
--- 223,228 ----
*************** if test -z "${setobjs}"; then
*** 247,252 ****
--- 242,272 ----
        funcs="`echo $funcs | sed -e 's/random//'`"
        LIBOBJS="$LIBOBJS random.o"
        vars="`echo $vars | sed -e 's/sys_siglist//'`"
+       # Newer cygwins define sys_errlist and sys_nerr.
+       # We have a chicken/egg situation here, though.  How do we know that
+       # the toolchain being built contains a newer cygwin?
+       # The code below checks for the existence of sys_errlist in the
+       # winsup/cygwin/cygwin.din file.  The assumption is that you are going
+       # to be building a dll which contains this global.
+       # If this is not found then check if the export is in the library
+       # that is used by GCC.  Define the appropriate libiberty_cv_var variables
+       # if so.
+       if test -z "$libiberty_cv_var_sys_errlist"
+       then
+ 	  eval `sed -n -e 's/^sys_errlist.*/libiberty_cv_var_sys_errlist=yes/p' \
+ 		       -e 's/^sys_nerr .*/libiberty_cv_var_sys_nerr=yes/p' \
+ 		    "$srcdir/../winsup/cygwin/cygwin.din" 2>/dev/null`
+ 	  if test -z "$libiberty_cv_var_sys_errlist"
+ 	  then
+ 	      for v in sys_errlist sys_nerr; do
+ 		  AC_TRY_LINK([int *p;], [extern int _imp__$v; p = &_imp__$v;],
+ 			       [eval "libiberty_cv_var_$v=yes"],
+ 			       [eval "libiberty_cv_var_$v=no"])
+ 	      done
+ 	  fi
+       fi
+       test -z "$libiberty_cv_var_sys_errlist" && libiberty_cv_var_sys_errlist=no
+       test -z "$libiberty_cv_var_sys_nerr" && libiberty_cv_var_sys_nerr=no
        checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
      fi
      ;;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]