Forum: Cfengine Help Subject: Re: Successful 3.1.4 build on HP-UX 11.11 Author: mvpel Link to topic: https://cfengine.com/forum/read.php?3,21894,21896#msg-21896
Looks like the proper way to handle the setlinebuf() issue for HP-UX with autoconf is this, from the 3.1.5 source: *** configure.ac.orig Mon May 2 08:02:17 2011 --- configure.ac Wed May 11 11:37:51 2011 *************** *** 624,629 **** --- 624,631 ---- AC_CHECK_FUNC(lchown, AC_DEFINE(HAVE_LCHOWN, [], )) + AC_CHECK_FUNC(setlinebuf, , AC_DEFINE(, [(void)setvbuf(_STREAM_, NULL, _IOLBUF, BUFSIZ)], )) + AC_CHECK_FUNC(pthread_attr_setstacksize, AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE, [], ), AC_CHECK_LIB(pthread, pthread_create)) AC_CHECK_FUNC(pthread_sigmask, AC_DEFINE(HAVE_PTHREAD_SIGMASK, [], ), AC_CHECK_LIB(pthread, pthread_create)) Nice and tidy this way. If you're making this change and you don't have autoconf, you also need these changes to configure and to src/conf.h.in: *** src/conf.h.in.orig Mon May 2 08:03:35 2011 --- src/conf.h.in Wed May 11 11:58:25 2011 *************** *** 116,121 **** --- 116,124 ---- /* Whether to use lchown(3) to change ownerships */ #undef HAVE_LCHOWN + /* If there's no setlinebuf(3) use setvbuf(3) instead */ + #undef setlinebuf(_STREAM_) + /* Define to 1 if you have the `acl' library (-lacl). */ #undef HAVE_LIBACL *** configure.orig Wed May 11 11:16:49 2011 --- configure Wed May 11 11:48:50 2011 *************** *** 15036,15042 **** --- 15036,15048 ---- fi + ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf" + if test "x$ac_cv_func_setlinebuf" != x""yes; then : + $as_echo "#define setlinebuf(_STREAM_) (void)setvbuf(_STREAM_, NULL, _IOLBUF, BUFSIZ) /**/" >>confdefs.h + + fi + ac_fn_c_check_func "$LINENO" "pthread_attr_setstacksize" "ac_cv_func_pthread_attr_setstacksize" if test "x$ac_cv_func_pthread_attr_setstacksize" = x""yes; then : _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine