Current-Users archive

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

Re: c063 and openat

On Fri, Nov 23, 2012 at 01:32:40PM +0100, Martin Husemann wrote:
> On Fri, Nov 23, 2012 at 12:30:20PM +0000, Patrick Welche wrote:
> > I just had pkgsrc multimedia/vlc fail to compile, because it detected 
> > openat()
> > and fcntl.h, but doesn't define _INCOMPLETE_XOPEN_C063.
> Sounds more like it did "detect" it - I would fix the autoconfig test 
> (to at least AC_TRY_LINK).

Thinking about it: if I wrote a configure test which found the function I
was after in the header file, and as a symbol in the library, I would be
surprised if it didn't work. I wouldn't AC_LINK_IFELSE every function was
going to use just in case it might not work.

So, I went for the attached patch instead. The OPSYS test could then
be changed to a version once _INCOMPLETE_XOPEN_C063 was no longer
incomplete ;-)

(BTW presumably bug reports of the form, I get a kernel panic if try
to openat(dfd, "/tmp/openfoo/bar", O_RDONLY, 0); aren't useful because
you know already which is why openat is marked as _INCOMPETE ?)


Index: mk/configure/
RCS file: /cvsroot/pkgsrc/mk/configure/,v
retrieving revision 1.13
diff -u -r1.13
--- mk/configure/       26 Jan 2012 06:33:43 -0000      1.13
+++ mk/configure/       25 Nov 2012 15:20:16 -0000
@@ -22,6 +22,28 @@
 CONFIGURE_ENV+=        lt_cv_sys_max_cmd_len=${_OPSYS_MAX_CMDLEN_CMD:sh}
+.if ${OPSYS} == "NetBSD"
+# remove when _INCOMPLETE_XOPEN_C063 is no longer necessary
+# sys/fcntl.h
+CONFIGURE_ENV+=        ac_cv_func_openat=no
+# sys/stat.h
+CONFIGURE_ENV+=        ac_cv_func_fstatat=no
+CONFIGURE_ENV+=        ac_cv_func_utimensat=no
+# unistd.h
+CONFIGURE_ENV+=        ac_cv_func_linkat=no
+CONFIGURE_ENV+=        ac_cv_func_renameat=no
+CONFIGURE_ENV+=        ac_cv_func_mkfifoat=no
+CONFIGURE_ENV+=        ac_cv_func_mknodat=no
+CONFIGURE_ENV+=        ac_cv_func_mkdirat=no
+CONFIGURE_ENV+=        ac_cv_func_faccessat=no
+CONFIGURE_ENV+=        ac_cv_func_fchmodat=no
+CONFIGURE_ENV+=        ac_cv_func_fchownat=no
+CONFIGURE_ENV+=        ac_cv_func_readlinkat=no
+CONFIGURE_ENV+=        ac_cv_func_symlinkat=no
+CONFIGURE_ENV+=        ac_cv_func_unlinkat=no
+CONFIGURE_ENV+=        ac_cv_func_fexecve=no
 .if ${OPSYS} == "MirBSD"
 CONFIGURE_ENV+=        lt_cv_deplibs_check_method='match_pattern 

Home | Main Index | Thread Index | Old Index