[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#636568: xerces-c: Updated patch, submitted upstream



Svante Signell, le Tue 16 Oct 2012 13:29:58 +0200, a écrit :
> AC_RUN_IFELSE([
> AC_LANG_PROGRAM([
> #ifdef HAVE_GETCWD
> #include <unistd.h>
> #endif
> ],[
> char *result = getcwd(NULL,0);
> if (result == NULL)
>   return 1;
> ])]
> ,[
>   AC_MSG_RESULT([checking for getcwd(NULL, 0)... yes])
>   AC_DEFINE([HAVE_GETCWD_GLIBC], 1, [Define to 1 if you have support for `getcwd(NULL,0)`])
> ],[
>   AC_MSG_RESULT([checking for getcwd(NULL, 0)... no])
>   AC_DEFINE([HAVE_GETCWD_GLIBC], 0, [Define to 0 if you have support for `getcwd(NULL,0)`])

No need to define HAVE_GETCWD_GLIBC to 0, people usually only define it
to 1 when the feature is available, thus allowing to just use #ifdef
HAVE_GETCWD_GLIBC.

> ])
> #[AC_MSG_FAILURE([test getcwd(NULL,0) failed])]): Add this for cross-compiling?

Better handle cross-compiling yes. I would however not write that it
failed, but just that it could not be tested.

Samuel


Reply to: