S_ISLNK and S_ISSOCK error in libcdio-0.82

View: New views
2 Messages — Rating Filter:   Alert me  

S_ISLNK and S_ISSOCK error in libcdio-0.82

by carlo.bramix :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
the newest version 0.82 cannot be compiled anymore on Mingw.
The problem happens because the tests for S_ISLNK and S_ISSOCK macros are wrong.
Into configure script it is used AC_COMPILE_IFELSE instead of AC_LINK_IFELSE.
That's a false test because it does not fail even if those macros are unsupported.
Infact the compiler does not generate an error, it just returns a warning like "implicit declaration of function S_ISLNK".
On Mingw 4.4.0 that warning is not even printed, I had to add -Wall to GCC options for getting it.
Attached patch fixes the problem.
Since the new version has been just released and this bug blocks the compilation on all platforms that do not support S_ISLNK and S_ISSOCK, do you think it would be possible to release a quick bugfixed revision?

Sincerely,

Carlo Bramini.


diff -r -u libcdio-0.82-old/configure.ac libcdio-0.82-new/configure.ac
--- libcdio-0.82-old/configure.ac 2009-10-27 11:26:32 +0000
+++ libcdio-0.82-new/configure.ac 2009-10-28 15:04:24 +0000
@@ -217,7 +217,7 @@
 ## Check for S_ISSOCK() and S_ISLNK() macros
 ##
 AC_MSG_CHECKING(for S_ISLNK() macro)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
@@ -226,7 +226,7 @@
 [ AC_MSG_RESULT(no) ])
 
 AC_MSG_CHECKING([for S_ISSOCK() macro])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif


Re: S_ISLNK and S_ISSOCK error in libcdio-0.82

by Rocky Bernstein :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the information and patch. It has been applied and  currently in
the git repository. You might want to double check since sometimes I make a
mistake.

The existing tests for S_ISLINK and S_ISSOCK are from a patch supplied by
Mike Frysinger. It was put in, he told me,  to support cross compilation. So
I have some concern as to whether this will change that.  Anyone care to
comment?

2009/10/29 carlo.bramix <carlo.bramix@...>

> Hello,
> the newest version 0.82 cannot be compiled anymore on Mingw.
> The problem happens because the tests for S_ISLNK and S_ISSOCK macros are
> wrong.
> Into configure script it is used AC_COMPILE_IFELSE instead of
> AC_LINK_IFELSE.
> That's a false test because it does not fail even if those macros are
> unsupported.
> Infact the compiler does not generate an error, it just returns a warning
> like "implicit declaration of function S_ISLNK".
> On Mingw 4.4.0 that warning is not even printed, I had to add -Wall to GCC
> options for getting it.
> Attached patch fixes the problem.
> Since the new version has been just released and this bug blocks the
> compilation on all platforms that do not support S_ISLNK and S_ISSOCK, do
> you think it would be possible to release a quick bugfixed revision?
>
> Sincerely,
>
> Carlo Bramini.
>
>