Convert-UUlib
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
force:
$(MYEXTLIB): uulib/Makefile uulib/uulib.c force
cd uulib && $(MAKE) all
END
}
WriteMakefile(
'dist' => {
PREOP => 'pod2text UUlib.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ; chmod -R u=rwX,go=rX . ;',
COMPRESS => 'gzip -9v',
SUFFIX => '.gz',
},
'NAME' => 'Convert::UUlib',
'VERSION_FROM' => 'UUlib.pm',
'MYEXTLIB' => 'uulib/libuu$(LIB_EXT)',
'LIBS' => [''],
'DEFINE' => '',
'INC' => '',
CONFIGURE_REQUIRES => {
uulib/acconfig.h view on Meta::CPAN
* how to declare functions that are exported from the fptools library
*/
#undef TOOLEXPORT
/*
* define if your compiler supports function prototypes
*/
#undef PROTOTYPES
/*
* define if your system has chmod(2)
*/
#undef HAVE_CHMOD
/*
* define if your system has umask(2)
*/
#undef HAVE_UMASK
/*
* define if your system has mkstemp
uulib/config.h.in view on Meta::CPAN
* how to declare functions that are exported from the fptools library
*/
#undef TOOLEXPORT
/*
* define if your compiler supports function prototypes
*/
#undef PROTOTYPES
/*
* define if your system has chmod(2)
*/
#undef HAVE_CHMOD
/*
* define if your system has umask(2)
*/
#undef HAVE_UMASK
/*
* define if your system has mkstemp
uulib/configure view on Meta::CPAN
:
else
echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define tempnam FP_tempnam
EOF
fi
echo $ac_n "checking for chmod""... $ac_c" 1>&6
echo "configure:1313: checking for chmod" >&5
if eval "test \"`echo '$''{'ac_cv_func_chmod'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1318 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char chmod(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char chmod();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_chmod) || defined (__stub___chmod)
choke me
#else
chmod();
#endif
; return 0; }
EOF
if { (eval echo configure:1341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_chmod=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_chmod=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'chmod`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_CHMOD 1
EOF
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for umask""... $ac_c" 1>&6
uulib/configure view on Meta::CPAN
fi; done
EOF
cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
uulib/configure.in view on Meta::CPAN
AC_HEADER_TIME
AC_CHECK_HEADERS(fcntl.h unistd.h memory.h malloc.h errno.h)
AC_CHECK_HEADERS(io.h sys/time.h)
CFLAGS="$CFLAGS -D_GNU_SOURCE"
AC_CHECK_FUNCS(gettimeofday fgetc_unlocked)
dnl AC_CHECK_FUNCS(strcasecmp strncasecmp strcasestr)
AC_CHECK_FUNC(tempnam,,AC_DEFINE(tempnam,FP_tempnam))
AC_CHECK_FUNC(chmod,AC_DEFINE(HAVE_CHMOD))
AC_CHECK_FUNC(umask,AC_DEFINE(HAVE_UMASK))
AC_CHECK_FUNC(mkstemp,AC_DEFINE(HAVE_MKSTEMP))
#
# strerror might be internally defined. this would cause a
# CHECK_FUNCS(strerror) to fail because it'd be called with
# zero arguments. So use our own code.
#
AC_MSG_CHECKING([for strerror])
AC_TRY_LINK([
uulib/uulib.c view on Meta::CPAN
/* try rename() shortcut first */
if (!rename (thefile->binfile, uugen_fnbuffer))
{
mode_t mask = 0000; /* there is a slight window here anyway */
#if HAVE_UMASK
mask = umask (0022); umask (mask);
#endif
fclose (source);
UUCLRBUF (uu_rbuf, source_buf);
#if HAVE_CHMOD
chmod (uugen_fnbuffer, thefile->mode & ~mask);
#endif
goto skip_copy;
}
progress.action = 0;
_FP_strncpy (progress.curfile,
(strlen(uugen_fnbuffer)>255)?
(uugen_fnbuffer+strlen(uugen_fnbuffer)-255):uugen_fnbuffer,
256);
progress.partno = 0;
( run in 0.644 second using v1.01-cache-2.11-cpan-496ff517765 )