eval $checkccflag
;;
esac
+ case "$gccversion" in
+ 1*) ;;
+ 2*) ;;
+ ?*) echo " "
+ echo "Checking if your compiler accepts -fno-delete-null-pointer-checks" 2>&1
+ echo 'int main(void) { return 0; }' > gcctest.c
+ if $cc -O2 -fno-delete-null-pointer-checks -o gcctest gcctest.c; then
+ echo "Yes, it does." 2>&1
+ case "$ccflags" in
+ *delete-null-pointer-checks*)
+ echo "Leaving current flags $ccflags alone." 2>&1
+ ;;
+ *) dflt="$dflt -fno-delete-null-pointer-checks" ;;
+ esac
+ else
+ echo "Nope, it doesn't, but that's ok." 2>&1
+ fi
+ ;;
+ esac
# For gcc, adding -pipe speeds up compilations for some, but apparently
# some assemblers can't read from stdin. (It also slows down compilations
# in other cases, but those are apparently rarer these days.) AD 5/2004.
;;
esac
-randfunc=Perl_drand48
-drand01="Perl_drand48()"
-seedfunc="Perl_drand48_init"
+randfunc=drand48
+drand01="drand48()"
+seedfunc="srand48"
randbits=48
randseedtype=U32
find_extensions='
for xxx in *; do
case "$xxx" in
+ CVS) ;;
DynaLoader|dynaload) ;;
*)
this_ext=`echo "$xxx" | $sed -e s/-/\\\//g`;
nonxs_ext=''
for xxx in $nonxs_extensions ; do
case "$xxx" in
+ CVS|RCS|SCCS|.svn)
+ ;;
VMS*)
;;
*) nonxs_ext="$nonxs_ext $xxx"
charclass_invlists.h Compiled-in inversion lists
class.c Internals of the `use feature 'class'` object system
CODE_OF_CONDUCT.md Information on where to find the Standards of Conduct
+config.over Site-specific overrides for Configure defaults
config_h.SH Produces config.h
configpm Produces lib/Config.pm
Configure Portability tool
feature.h Feature header
form.h Public declarations for formats
generate_uudmap.c Generate uudmap.h, the uuencode decoding map
+git_version.h Pre-generated git_version.h for OpenBSD
globals.c File to declare global symbols (for shared library)
globvar.sym Global variables that need hiding when embedded
gv.c Glob value code
cpan/NEXT/t/next.t NEXT
cpan/NEXT/t/stringify.t NEXT
cpan/NEXT/t/unseen.t NEXT
+cpan/OpenBSD-MkTemp/lib/OpenBSD/MkTemp.pm OpenBSD::MkTemp
+cpan/OpenBSD-MkTemp/MkTemp.xs OpenBSD::MkTemp
+cpan/OpenBSD-MkTemp/README OpenBSD::MkTemp Readme
+cpan/OpenBSD-MkTemp/t/OpenBSD-MkTemp.t OpenBSD::MkTemp test file
+cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm OpenBSD::Pledge
+cpan/OpenBSD-Pledge/Pledge.xs OpenBSD::Pledge
+cpan/OpenBSD-Pledge/t/OpenBSD-Pledge.t OpenBSD::Pledge test file
+cpan/OpenBSD-Unveil/lib/OpenBSD/Unveil.pm OpenBSD::Unveil
+cpan/OpenBSD-Unveil/t/OpenBSD-Unveil.t OpenBSD::Unveil test file
+cpan/OpenBSD-Unveil/Unveil.xs OpenBSD::Unveil
cpan/Params-Check/lib/Params/Check.pm Params::Check
cpan/Params-Check/t/01_Params-Check.t Params::Check tests
cpan/parent/lib/parent.pm Establish an ISA relationship with base classes at compile time
cpan/Term-ANSIColor/t/taint/basic.t
cpan/Term-Cap/Cap.pm Perl module supporting termcap usage
cpan/Term-Cap/test.pl See if Term::Cap works
+cpan/Term-ReadKey/Changes Term::ReadKey
+cpan/Term-ReadKey/Configure.pm Term::ReadKey
+cpan/Term-ReadKey/example/test.pl Term::ReadKey
+cpan/Term-ReadKey/genchars.pl Term::ReadKey
+cpan/Term-ReadKey/Makefile.PL Term::ReadKey
+cpan/Term-ReadKey/ppport.h Term::ReadKey
+cpan/Term-ReadKey/ReadKey.xs Term::ReadKey
+cpan/Term-ReadKey/ReadKey.pm.PL Term::ReadKey
+cpan/Term-ReadKey/README Term::ReadKey
+cpan/Term-ReadKey/t/01_basic.t Term::ReadKey
+cpan/Term-ReadKey/t/02_terminal_functions.t Term::ReadKey
cpan/Test-Harness/bin/prove The prove harness utility
cpan/Test-Harness/lib/App/Prove.pm Gubbins for the prove utility
cpan/Test-Harness/lib/App/Prove/State.pm Gubbins for the prove utility
ext/B/B/Terse.pm Compiler Terse backend
ext/B/B/Xref.pm Compiler Xref backend
ext/B/hints/darwin.pl Hints for named architecture
-ext/B/hints/openbsd.pl Hints for named architecture
ext/B/Makefile.PL Compiler backend makefile writer
ext/B/O.pm Compiler front-end module (-MO=...)
ext/B/t/b.t See if B works
lib/Config.t See if Config works
lib/Config/Extensions.pm Convenient hash lookup for built extensions
lib/Config/Extensions.t See if Config::Extensions works
+lib/Config_git.pl Pre-generated Config_git.pl for OpenBSD
lib/CORE.pod document the CORE namespace
lib/DB.pm Debugger API (draft)
lib/DB.t See if DB works
t/op/svleak.t See if stuff leaks SVs
t/op/switch.t See if switches (given/when) work
t/op/symbolcache.t See if undef/delete works on stashes with functions
+t/op/syscall_emulator.t Tests that syscall works via the emulator
t/op/sysio.t See if sysread and syswrite work
t/op/taint.t See if tainting works
t/op/threads.t Misc. tests for perl features with threads
cpan/Pod-Simple/pm_to_blib: dist/if/pm_to_blib
ext/Pod-Functions/pm_to_blib: cpan/Pod-Simple/pm_to_blib cpan/Pod-Escapes/pm_to_blib pod/perlfunc.pod
cpan/IO-Compress/pm_to_blib: dist/lib/pm_to_blib
+lib/auto/Term/ReadKey/ReadKey.so: lib/auto/Cwd/Cwd.so
'
for f in $dynamic_ext; do
: the dependency named here will never exist
## In the following dollars and backticks do not need the extra backslash.
$spitshell >>$Makefile <<!GROK!THIS!
-private = preplibrary \$(CONFIGPM) \$(CONFIGPOD) git_version.h lib/buildcustomize.pl
+private = preplibrary \$(CONFIGPM) \$(CONFIGPOD) lib/buildcustomize.pl
# Files to be built with variable substitution before miniperl
# is available.
c3 = taint.c toke.c util.c deb.c run.c builtin.c universal.c class.c pad.c globals.c keywords.c
c4 = perlio.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c caretx.c dquote.c time64.c
c5 = regcomp.c regcomp_debug.c regcomp_invlist.c regcomp_study.c regcomp_trie.c regexec.c
-c6 = $(mallocsrc)
+c5 = $(mallocsrc) syscall_emulator.c
c_base = $(c1) $(c2) $(c3) $(c4) $(c5) $(c6)
!NO!SUBS!
obj7 = doop$(OBJ_EXT) doio$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT)
obj8 = deb$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT)
obj9 = locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) caretx$(OBJ_EXT) dquote$(OBJ_EXT)
-obj10 = time64$(OBJ_EXT)
+obj10 = time64$(OBJ_EXT) syscall_emulator$(OBJ_EXT)
# split the objects into 3 exclusive sets: those used by both miniperl and
# perl, and those used by just one or the other. Doesn't include the
.PHONY: all utilities
+# OpenBSD uses pre-generated lib/Config_git.pl and git_version.h files
# Both git_version.h and lib/Config_git.pl are built
# by make_patchnum.pl.
-git_version.h: lib/Config_git.pl
-
-lib/Config_git.pl: $(MINIPERL_EXE) make_patchnum.pl
- $(MINIPERL) make_patchnum.pl
-
-# make sure that we recompile perl.c if the git version changes
-perl$(OBJ_EXT): git_version.h
+#git_version.h: lib/Config_git.pl
+#
+#lib/Config_git.pl: $(MINIPERL_EXE) make_patchnum.pl
+# $(MINIPERL) make_patchnum.pl
+#
+## make sure that we recompile perl.c if the git version changes
+#perl$(OBJ_EXT): git_version.h
!NO!SUBS!
unidatafiles $(unidatafiles) pod/perluniprops.pod: uni.data
uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
- $(MINIPERL) lib/unicore/mktables -C lib/unicore -P pod -maketest -makenormtest -makelist -p
-# Commented out so always runs, mktables looks at far more files than we
-# can in this makefile to decide if needs to run or not
-# touch uni.data
+ touch uni.data
# $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5
# But also this ensures that all extensions are built before we try to scan
-rm -f *perl.xok
-rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
-rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl
- -rm -f config.arch config.over $(DTRACE_H)
+ -rm -f $(DTRACE_H)
_cleaner1:
-cd os2; rm -f Makefile
-rmdir lib/TAP/Formatter lib/TAP lib/Sys/Syslog lib/Sys lib/Sub
-rmdir lib/Search lib/Scalar lib/Pod/Text lib/Pod/Simple
-rmdir lib/Pod/Perldoc lib/Pod/Html lib/PerlIO/via lib/PerlIO lib/Perl
- -rmdir lib/Parse/CPAN lib/Parse lib/Params lib/Net/FTP lib/Module/Load
- -rmdir lib/Module/CoreList lib/Module lib/Memoize lib/Math/BigRat
- -rmdir lib/Math/BigInt lib/Math/BigFloat lib/Math lib/MIME
- -rmdir lib/Locale/Maketext lib/Locale lib/List/Util lib/List
+ -rmdir lib/Parse/CPAN lib/Parse lib/Params lib/OpenBSD lib/Net/FTP
+ -rmdir lib/Module/Load lib/Module/CoreList lib/Module lib/Memoize
+ -rmdir lib/Math/BigRat lib/Math/BigInt lib/Math/BigFloat lib/Math
+ -rmdir lib/MIME lib/Locale/Maketext lib/Locale lib/List/Util lib/List
-rmdir lib/JSON/PP lib/JSON lib/IPC lib/IO/Uncompress/Adapter
-rmdir lib/IO/Uncompress lib/IO/Socket lib/IO/Compress/Zlib
-rmdir lib/IO/Compress/Zip lib/IO/Compress/Gzip lib/IO/Compress/Base
perl5361delta 1 pod/perl5361delta.pod \
perl5362delta 1 pod/perl5362delta.pod \
perl5363delta 1 pod/perl5363delta.pod \
+ perl5380delta 1 pod/perl5380delta.pod \
+ perl5381delta 1 pod/perl5381delta.pod \
+ perl5382delta 1 pod/perl5382delta.pod \
perl561delta 1 pod/perl561delta.pod \
perl56delta 1 pod/perl56delta.pod \
perl581delta 1 pod/perl581delta.pod \
perlbug 1 utils/perlbug \
perlcall 1 pod/perlcall.pod \
perlcheat 1 pod/perlcheat.pod \
+ perlclass 1 pod/perlclass.pod \
+ perlclassguts 1 pod/perlclassguts.pod \
perlclib 1 pod/perlclib.pod \
perlcommunity 1 pod/perlcommunity.pod \
perldata 1 pod/perldata.pod \
Memoize 3p lib/Memoize.pm \
Memoize::AnyDBM_File 3p lib/Memoize/AnyDBM_File.pm \
Memoize::Expire 3p lib/Memoize/Expire.pm \
- Memoize::ExpireFile 3p lib/Memoize/ExpireFile.pm \
- Memoize::ExpireTest 3p lib/Memoize/ExpireTest.pm \
Memoize::NDBM_File 3p lib/Memoize/NDBM_File.pm \
Memoize::SDBM_File 3p lib/Memoize/SDBM_File.pm \
Memoize::Storable 3p lib/Memoize/Storable.pm \
sigtrap 3p lib/sigtrap.pm \
Socket 3p lib/Socket.pm \
sort 3p lib/sort.pm \
+ stable 3p lib/stable.pm \
Storable 3p lib/Storable.pm \
strict 3p lib/strict.pm \
Sub::Util 3p lib/Sub/Util.pm \
vmsish 3p lib/vmsish.pm \
warnings 3p lib/warnings.pm \
warnings::register 3p lib/warnings/register.pm \
- XS::APItest 3p ext/XS-APItest/APItest.pm \
+ XS::APItest 3p lib/XS/APItest.pm \
XS::Typemap 3p ext/XS-Typemap/Typemap.pm \
XSLoader 3p lib/XSLoader.pm
. ifndef NOMAN
lib/vmsish.{pm,t}
],
},
+ 'openbsd' => {
+ 'FILES' => q[lib/Config_git.pl],
+ },
);
5.004_07 to 5.004_08 patch as an example.
# unpack perl5.004_07/
- gzip -d -c perl5.004_07.tar.gz | tar -xof -
+ gzip -d -c perl5.004_07.tar.gz | tar -xf -
# unpack perl5.004_08/
- gzip -d -c perl5.004_08.tar.gz | tar -xof -
+ gzip -d -c perl5.004_08.tar.gz | tar -xf -
makepatch perl5.004_07 perl5.004_08 > perl5.004_08.pat
Makepatch will automatically generate appropriate B<rm> commands to remove
"panic: av_extend_guts() negative count (%" IVdf ")", (IV)key);
if (key > *maxp) {
- SSize_t ary_offset = *maxp + 1;
- SSize_t to_null = 0;
+ SSize_t ary_offset = *maxp + 1; /* Start NULL initialization
+ * from this element */
+ SSize_t to_null = 0; /* How many elements to Zero */
SSize_t newmax = 0;
if (av && *allocp != *arrayp) { /* a shifted SV* array exists */
+
+ /* to_null will contain the number of elements currently
+ * shifted and about to be unshifted. If the array has not
+ * been shifted to the maximum possible extent, this will be
+ * a smaller number than (*maxp - AvFILLp(av)). */
to_null = *arrayp - *allocp;
+
*maxp += to_null;
ary_offset = AvFILLp(av) + 1;
if (key > *maxp - 10) {
newmax = key + *maxp;
+
+ /* Zero everything above AvFILLp(av), which could be more
+ * elements than have actually been shifted. If we don't
+ * do this, trailing elements at the end of the resized
+ * array may not be correctly initialized. */
+ to_null = *maxp - AvFILLp(av);
+
goto resize;
}
} else if (*allocp) { /* a full SV* array exists */
#ifdef Perl_safesysmalloc_size
resized:
#endif
- to_null += newmax - *maxp;
+ to_null += newmax - *maxp; /* Initialize all new elements
+ * (newmax - *maxp) in addition to
+ * any previously specified */
*maxp = newmax;
/* See GH#18014 for discussion of when this might be needed: */
* don't get any special treatment here.
* See https://github.com/Perl/perl5/pull/18690 for more detail */
ary_offset = 0;
- to_null = *maxp+1;
+ to_null = *maxp+1; /* Initialize all new array elements */
goto zero;
}
}
if ($orig_config_txt ne $config_txt or $orig_heavy_txt ne $heavy_txt) {
+ # During the build don't look in /usr/local for libs or includes
+ # but after, we want to let modules look there.
+ my $install_heavy_txt = $heavy_txt;
+ $install_heavy_txt =~ s,^(ccflags|cppflags)[^=]*='[^']+,$& -I/usr/local/include,gm;
+ $install_heavy_txt =~ s,^(ldflags|lddlflags)[^=]*='[^']+,$& -L/usr/local/lib,gm;
+
+ open INSTALL_CONFIG_HEAVY, ">", "$Config_heavy.install"
+ or die "Can't open install $Config_heavy: $!\n";
+ print INSTALL_CONFIG_HEAVY $install_heavy_txt;
+ close INSTALL_CONFIG_HEAVY;
+ print "updated install $Config_heavy\n";
+
open CONFIG, ">", $Config_PM or die "Can't open $Config_PM: $!\n";
open CONFIG_HEAVY, ">", $Config_heavy or die "Can't open $Config_heavy: $!\n";
print CONFIG $config_txt;
my $path = shift;
return undef
- if $path =~ /(~|\.bak|_bak)$/ ||
+ if $path =~ /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/ ||
+ $path =~ /(~|\.bak|_bak)$/ ||
$path =~ /\..*\.sw(o|p)$/ ||
$path =~ /\B\.svn\b/;
# Setting the Gzip OS Code
#
-BUILD_ZLIB = True
-INCLUDE = ./zlib-src
-LIB = ./zlib-src
+BUILD_ZLIB = False
+INCLUDE = /usr/include
+LIB = /usr/lib
OLD_ZLIB = False
GZIP_OS_CODE = AUTO_DETECT
USE_ZLIB_NG = False
my $path = shift;
return undef
- if $path =~ /(~|\.bak|_bak)$/ ||
+ if $path =~ /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/ ||
+ $path =~ /(~|\.bak|_bak)$/ ||
$path =~ /\..*\.sw(o|p)$/ ||
$path =~ /\B\.svn\b/;
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
+#include <sys/types.h>
+#include <md5.h>
#ifndef PERL_UNUSED_VAR
# define PERL_UNUSED_VAR(x) ((void)x)
# define SvPVbyte(sv, lp) (sv_utf8_downgrade((sv), 0), SvPV((sv), (lp)))
#endif
-/* Perl does not guarantee that U32 is exactly 32 bits. Some system
- * has no integral type with exactly 32 bits. For instance, A Cray has
- * short, int and long all at 64 bits so we need to apply this macro
- * to reduce U32 values to 32 bits at appropriate places. If U32
- * really does have 32 bits then this is a no-op.
- */
-#if BYTEORDER > 0x4321 || defined(TRUNCATE_U32)
- #define TO32(x) ((x) & 0xFFFFffff)
- #define TRUNC32(x) ((x) &= 0xFFFFffff)
-#else
- #define TO32(x) (x)
- #define TRUNC32(x) /*nothing*/
-#endif
-
-/* The MD5 algorithm is defined in terms of little endian 32-bit
- * values. The following macros (and functions) allow us to convert
- * between native integers and such values.
- */
-static void u2s(U32 u, U8* s)
-{
- *s++ = (U8)(u & 0xFF);
- *s++ = (U8)((u >> 8) & 0xFF);
- *s++ = (U8)((u >> 16) & 0xFF);
- *s = (U8)((u >> 24) & 0xFF);
-}
-
-#define s2u(s,u) ((u) = (U32)(*s) | \
- ((U32)(*(s+1)) << 8) | \
- ((U32)(*(s+2)) << 16) | \
- ((U32)(*(s+3)) << 24))
-
-/* This structure keeps the current state of algorithm.
- */
-typedef struct {
- U32 A, B, C, D; /* current digest */
- U32 bytes_low; /* counts bytes in message */
- U32 bytes_high; /* turn it into a 64-bit counter */
- U8 buffer[128]; /* collect complete 64 byte blocks */
-} MD5_CTX;
-
#if defined(USE_ITHREADS) && defined(MGf_DUP)
STATIC int dup_md5_ctx(pTHX_ MAGIC *mg, CLONE_PARAMS *params)
{
};
#endif
-
-/* Padding is added at the end of the message in order to fill a
- * complete 64 byte block (- 8 bytes for the message length). The
- * padding is also the reason the buffer in MD5_CTX have to be
- * 128 bytes.
- */
-static const unsigned char PADDING[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-/* Constants for MD5Transform routine.
- */
-#define S11 7
-#define S12 12
-#define S13 17
-#define S14 22
-#define S21 5
-#define S22 9
-#define S23 14
-#define S24 20
-#define S31 4
-#define S32 11
-#define S33 16
-#define S34 23
-#define S41 6
-#define S42 10
-#define S43 15
-#define S44 21
-
-/* F, G, H and I are basic MD5 functions.
- */
-#define F(x, y, z) ((((x) & ((y) ^ (z))) ^ (z)))
-#define G(x, y, z) F(z, x, y)
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define I(x, y, z) ((y) ^ ((x) | (~z)))
-
-/* ROTATE_LEFT rotates x left n bits.
- */
-#define ROTATE_LEFT(x, n) (((x) << (n) | ((x) >> (32-(n)))))
-
-/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
- * Rotation is separate from addition to prevent recomputation.
- */
-#define FF(a, b, c, d, s, ac) \
- (a) += F ((b), (c), (d)) + (NEXTx) + (U32)(ac); \
- TRUNC32((a)); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- TRUNC32((a));
-
-#define GG(a, b, c, d, x, s, ac) \
- (a) += G ((b), (c), (d)) + X[x] + (U32)(ac); \
- TRUNC32((a)); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- TRUNC32((a));
-
-#define HH(a, b, c, d, x, s, ac) \
- (a) += H ((b), (c), (d)) + X[x] + (U32)(ac); \
- TRUNC32((a)); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- TRUNC32((a));
-
-#define II(a, b, c, d, x, s, ac) \
- (a) += I ((b), (c), (d)) + X[x] + (U32)(ac); \
- TRUNC32((a)); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- TRUNC32((a));
-
-
-static void
-MD5Init(MD5_CTX *ctx)
-{
- /* Start state */
- ctx->A = 0x67452301;
- ctx->B = 0xefcdab89;
- ctx->C = 0x98badcfe;
- ctx->D = 0x10325476;
-
- /* message length */
- ctx->bytes_low = ctx->bytes_high = 0;
-}
-
-
-static void
-MD5Transform(MD5_CTX* ctx, const U8* buf, STRLEN blocks)
-{
-#ifdef MD5_DEBUG
- static int tcount = 0;
-#endif
-
- U32 A = ctx->A;
- U32 B = ctx->B;
- U32 C = ctx->C;
- U32 D = ctx->D;
-
- do {
- U32 a = A;
- U32 b = B;
- U32 c = C;
- U32 d = D;
-
- U32 X[16]; /* little-endian values, used in round 2-4 */
- U32 *uptr = X;
- U32 tmp;
- #define NEXTx (s2u(buf,tmp), buf += 4, *uptr++ = tmp)
-
-#ifdef MD5_DEBUG
- if (buf == ctx->buffer)
- fprintf(stderr,"%5d: Transform ctx->buffer", ++tcount);
- else
- fprintf(stderr,"%5d: Transform %p (%d)", ++tcount, buf, blocks);
-
- {
- int i;
- fprintf(stderr,"[");
- for (i = 0; i < 16; i++) {
- fprintf(stderr,"%x,", x[i]); /* FIXME */
- }
- fprintf(stderr,"]\n");
- }
-#endif
-
- /* Round 1 */
- FF (a, b, c, d, S11, 0xd76aa478); /* 1 */
- FF (d, a, b, c, S12, 0xe8c7b756); /* 2 */
- FF (c, d, a, b, S13, 0x242070db); /* 3 */
- FF (b, c, d, a, S14, 0xc1bdceee); /* 4 */
- FF (a, b, c, d, S11, 0xf57c0faf); /* 5 */
- FF (d, a, b, c, S12, 0x4787c62a); /* 6 */
- FF (c, d, a, b, S13, 0xa8304613); /* 7 */
- FF (b, c, d, a, S14, 0xfd469501); /* 8 */
- FF (a, b, c, d, S11, 0x698098d8); /* 9 */
- FF (d, a, b, c, S12, 0x8b44f7af); /* 10 */
- FF (c, d, a, b, S13, 0xffff5bb1); /* 11 */
- FF (b, c, d, a, S14, 0x895cd7be); /* 12 */
- FF (a, b, c, d, S11, 0x6b901122); /* 13 */
- FF (d, a, b, c, S12, 0xfd987193); /* 14 */
- FF (c, d, a, b, S13, 0xa679438e); /* 15 */
- FF (b, c, d, a, S14, 0x49b40821); /* 16 */
-
- /* Round 2 */
- GG (a, b, c, d, 1, S21, 0xf61e2562); /* 17 */
- GG (d, a, b, c, 6, S22, 0xc040b340); /* 18 */
- GG (c, d, a, b, 11, S23, 0x265e5a51); /* 19 */
- GG (b, c, d, a, 0, S24, 0xe9b6c7aa); /* 20 */
- GG (a, b, c, d, 5, S21, 0xd62f105d); /* 21 */
- GG (d, a, b, c, 10, S22, 0x2441453); /* 22 */
- GG (c, d, a, b, 15, S23, 0xd8a1e681); /* 23 */
- GG (b, c, d, a, 4, S24, 0xe7d3fbc8); /* 24 */
- GG (a, b, c, d, 9, S21, 0x21e1cde6); /* 25 */
- GG (d, a, b, c, 14, S22, 0xc33707d6); /* 26 */
- GG (c, d, a, b, 3, S23, 0xf4d50d87); /* 27 */
- GG (b, c, d, a, 8, S24, 0x455a14ed); /* 28 */
- GG (a, b, c, d, 13, S21, 0xa9e3e905); /* 29 */
- GG (d, a, b, c, 2, S22, 0xfcefa3f8); /* 30 */
- GG (c, d, a, b, 7, S23, 0x676f02d9); /* 31 */
- GG (b, c, d, a, 12, S24, 0x8d2a4c8a); /* 32 */
-
- /* Round 3 */
- HH (a, b, c, d, 5, S31, 0xfffa3942); /* 33 */
- HH (d, a, b, c, 8, S32, 0x8771f681); /* 34 */
- HH (c, d, a, b, 11, S33, 0x6d9d6122); /* 35 */
- HH (b, c, d, a, 14, S34, 0xfde5380c); /* 36 */
- HH (a, b, c, d, 1, S31, 0xa4beea44); /* 37 */
- HH (d, a, b, c, 4, S32, 0x4bdecfa9); /* 38 */
- HH (c, d, a, b, 7, S33, 0xf6bb4b60); /* 39 */
- HH (b, c, d, a, 10, S34, 0xbebfbc70); /* 40 */
- HH (a, b, c, d, 13, S31, 0x289b7ec6); /* 41 */
- HH (d, a, b, c, 0, S32, 0xeaa127fa); /* 42 */
- HH (c, d, a, b, 3, S33, 0xd4ef3085); /* 43 */
- HH (b, c, d, a, 6, S34, 0x4881d05); /* 44 */
- HH (a, b, c, d, 9, S31, 0xd9d4d039); /* 45 */
- HH (d, a, b, c, 12, S32, 0xe6db99e5); /* 46 */
- HH (c, d, a, b, 15, S33, 0x1fa27cf8); /* 47 */
- HH (b, c, d, a, 2, S34, 0xc4ac5665); /* 48 */
-
- /* Round 4 */
- II (a, b, c, d, 0, S41, 0xf4292244); /* 49 */
- II (d, a, b, c, 7, S42, 0x432aff97); /* 50 */
- II (c, d, a, b, 14, S43, 0xab9423a7); /* 51 */
- II (b, c, d, a, 5, S44, 0xfc93a039); /* 52 */
- II (a, b, c, d, 12, S41, 0x655b59c3); /* 53 */
- II (d, a, b, c, 3, S42, 0x8f0ccc92); /* 54 */
- II (c, d, a, b, 10, S43, 0xffeff47d); /* 55 */
- II (b, c, d, a, 1, S44, 0x85845dd1); /* 56 */
- II (a, b, c, d, 8, S41, 0x6fa87e4f); /* 57 */
- II (d, a, b, c, 15, S42, 0xfe2ce6e0); /* 58 */
- II (c, d, a, b, 6, S43, 0xa3014314); /* 59 */
- II (b, c, d, a, 13, S44, 0x4e0811a1); /* 60 */
- II (a, b, c, d, 4, S41, 0xf7537e82); /* 61 */
- II (d, a, b, c, 11, S42, 0xbd3af235); /* 62 */
- II (c, d, a, b, 2, S43, 0x2ad7d2bb); /* 63 */
- II (b, c, d, a, 9, S44, 0xeb86d391); /* 64 */
-
- A += a; TRUNC32(A);
- B += b; TRUNC32(B);
- C += c; TRUNC32(C);
- D += d; TRUNC32(D);
-
- } while (--blocks);
- ctx->A = A;
- ctx->B = B;
- ctx->C = C;
- ctx->D = D;
-}
-
-
-#ifdef MD5_DEBUG
-static char*
-ctx_dump(MD5_CTX* ctx)
-{
- static char buf[1024];
- sprintf(buf, "{A=%x,B=%x,C=%x,D=%x,%d,%d(%d)}",
- ctx->A, ctx->B, ctx->C, ctx->D,
- ctx->bytes_low, ctx->bytes_high, (ctx->bytes_low&0x3F));
- return buf;
-}
-#endif
-
-
-static void
-MD5Update(MD5_CTX* ctx, const U8* buf, STRLEN len)
-{
- STRLEN blocks;
- STRLEN fill = ctx->bytes_low & 0x3F;
-
-#ifdef MD5_DEBUG
- static int ucount = 0;
- fprintf(stderr,"%5i: Update(%s, %p, %d)\n", ++ucount, ctx_dump(ctx),
- buf, len);
-#endif
-
- ctx->bytes_low += len;
- if (ctx->bytes_low < len) /* wrap around */
- ctx->bytes_high++;
-
- if (fill) {
- STRLEN missing = 64 - fill;
- if (len < missing) {
- Copy(buf, ctx->buffer + fill, len, U8);
- return;
- }
- Copy(buf, ctx->buffer + fill, missing, U8);
- MD5Transform(ctx, ctx->buffer, 1);
- buf += missing;
- len -= missing;
- }
-
- blocks = len >> 6;
- if (blocks)
- MD5Transform(ctx, buf, blocks);
- if ( (len &= 0x3F)) {
- Copy(buf + (blocks << 6), ctx->buffer, len, U8);
- }
-}
-
-
-static void
-MD5Final(U8* digest, MD5_CTX *ctx)
-{
- STRLEN fill = ctx->bytes_low & 0x3F;
- STRLEN padlen = (fill < 56 ? 56 : 120) - fill;
- U32 bits_low, bits_high;
-#ifdef MD5_DEBUG
- fprintf(stderr," Final: %s\n", ctx_dump(ctx));
-#endif
- Copy(PADDING, ctx->buffer + fill, padlen, U8);
- fill += padlen;
-
- bits_low = ctx->bytes_low << 3;
- bits_high = (ctx->bytes_high << 3) | (ctx->bytes_low >> 29);
- u2s(bits_low, ctx->buffer + fill); fill += 4;
- u2s(bits_high, ctx->buffer + fill); fill += 4;
-
- MD5Transform(ctx, ctx->buffer, fill >> 6);
-#ifdef MD5_DEBUG
- fprintf(stderr," Result: %s\n", ctx_dump(ctx));
-#endif
-
- u2s(ctx->A, digest);
- u2s(ctx->B, digest+4);
- u2s(ctx->C, digest+8);
- u2s(ctx->D, digest+12);
-}
-
-#ifndef INT2PTR
-#define INT2PTR(any,d) (any)(d)
-#endif
-
static MD5_CTX* get_md5_ctx(pTHX_ SV* sv)
{
MAGIC *mg;
InputStream fh
PREINIT:
MD5_CTX* context = get_md5_ctx(aTHX_ self);
- STRLEN fill = context->bytes_low & 0x3F;
+ STRLEN fill = (context->count >> 3) & (MD5_BLOCK_LENGTH - 1);
#ifdef USE_HEAP_INSTEAD_OF_STACK
unsigned char* buffer;
#else
PPCODE:
if (items > 2) {
STRLEN len;
- unsigned long blocks = SvUV(ST(1));
+ ctx->count = SvUV(ST(1)) << 3;
unsigned char *buf = (unsigned char *)(SvPV(ST(2), len));
- ctx->A = buf[ 0] | (buf[ 1]<<8) | (buf[ 2]<<16) | (buf[ 3]<<24);
- ctx->B = buf[ 4] | (buf[ 5]<<8) | (buf[ 6]<<16) | (buf[ 7]<<24);
- ctx->C = buf[ 8] | (buf[ 9]<<8) | (buf[10]<<16) | (buf[11]<<24);
- ctx->D = buf[12] | (buf[13]<<8) | (buf[14]<<16) | (buf[15]<<24);
- ctx->bytes_low = blocks << 6;
- ctx->bytes_high = blocks >> 26;
+ ctx->state[0] = buf[ 0] | (buf[ 1]<<8) | (buf[ 2]<<16) | (buf[ 3]<<24);
+ ctx->state[1] = buf[ 4] | (buf[ 5]<<8) | (buf[ 6]<<16) | (buf[ 7]<<24);
+ ctx->state[2] = buf[ 8] | (buf[ 9]<<8) | (buf[10]<<16) | (buf[11]<<24);
+ ctx->state[3] = buf[12] | (buf[13]<<8) | (buf[14]<<16) | (buf[15]<<24);
if (items == 4) {
buf = (unsigned char *)(SvPV(ST(3), len));
MD5Update(ctx, buf, len);
XSRETURN(0);
}
- w=ctx->A; out[ 0]=(char)w; out[ 1]=(char)(w>>8); out[ 2]=(char)(w>>16); out[ 3]=(char)(w>>24);
- w=ctx->B; out[ 4]=(char)w; out[ 5]=(char)(w>>8); out[ 6]=(char)(w>>16); out[ 7]=(char)(w>>24);
- w=ctx->C; out[ 8]=(char)w; out[ 9]=(char)(w>>8); out[10]=(char)(w>>16); out[11]=(char)(w>>24);
- w=ctx->D; out[12]=(char)w; out[13]=(char)(w>>8); out[14]=(char)(w>>16); out[15]=(char)(w>>24);
+ w=ctx->state[0]; out[ 0]=(char)w; out[ 1]=(char)(w>>8); out[ 2]=(char)(w>>16); out[ 3]=(char)(w>>24);
+ w=ctx->state[0]; out[ 4]=(char)w; out[ 5]=(char)(w>>8); out[ 6]=(char)(w>>16); out[ 7]=(char)(w>>24);
+ w=ctx->state[0]; out[ 8]=(char)w; out[ 9]=(char)(w>>8); out[10]=(char)(w>>16); out[11]=(char)(w>>24);
+ w=ctx->state[0]; out[12]=(char)w; out[13]=(char)(w>>8); out[14]=(char)(w>>16); out[15]=(char)(w>>24);
EXTEND(SP, 3);
- ST(0) = sv_2mortal(newSVuv(ctx->bytes_high << 26 |
- ctx->bytes_low >> 6));
+ ST(0) = sv_2mortal(newSViv((ctx->count >> 3)
+ - ((ctx->count >> 3) % MD5_BLOCK_LENGTH)));
ST(1) = sv_2mortal(newSVpv(out, 16));
- if ((ctx->bytes_low & 0x3F) == 0)
- XSRETURN(2);
+ if (((ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1)) == 0)
+ XSRETURN(2);
ST(2) = sv_2mortal(newSVpv((char *)ctx->buffer,
- ctx->bytes_low & 0x3F));
+ (ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1)));
+
XSRETURN(3);
void
# This is the output of: 'md5sum README MD5.xs rfc1321.txt'
$EXPECT = <<EOT;
2f93400875dbb56f36691d5f69f3eba5 README
-f8549bd328fa712f4af41430738c285a MD5.xs
+16d90fd139c5eae51f786daa1ea6eb24 MD5.xs
754b9db19f79dbc4992f7166eb0f37ce rfc1321.txt
EOT
}
$ENV{MAKEFLAGS} =~ /\b(s|silent|quiet)\b/);
my $Curdir = File::Spec->curdir;
+my $Perm_Dir = $ENV{PERL_CORE} ? 0770 : 0755;
sub _estr(@) {
return join "\n",'!' x 72,@_,'!' x 72,'';
_chdir($cwd);
}
foreach my $targetdir (sort keys %check_dirs) {
- _mkpath( $targetdir, 0, 0755, $verbose, $dry_run );
+ _mkpath( $targetdir, 0, $Perm_Dir, $verbose, $dry_run );
}
foreach my $found (@found_files) {
my ($diff, $ffd, $origfile, $mode, $size, $atime, $mtime,
$targetfile= _unlink_or_rename( $targetfile, 'tryhard', 'install' )
unless $dry_run;
} elsif ( ! -d $targetdir ) {
- _mkpath( $targetdir, 0, 0755, $verbose, $dry_run );
+ _mkpath( $targetdir, 0, $Perm_Dir, $verbose, $dry_run );
}
print "Installing $targetfile\n";
if ($pack{'write'}) {
$dir = install_rooted_dir(dirname($pack{'write'}));
- _mkpath( $dir, 0, 0755, $verbose, $dry_run );
+ _mkpath( $dir, 0, $Perm_Dir, $verbose, $dry_run );
print "Writing $pack{'write'}\n" if $verbose;
$packlist->write(install_rooted_file($pack{'write'})) unless $dry_run;
}
my($fromto,$autodir,$pm_filter) = @_;
my %dirs;
- _mkpath($autodir,0,0755) if defined $autodir;
+ _mkpath($autodir,0,$Perm_Dir) if defined $autodir;
while(my($from, $to) = each %$fromto) {
if( -f $to && -s $from == -s $to && -M $to < -M $from ) {
print "Skip $to (unchanged)\n" unless $INSTALL_QUIET;
} else {
my $dirname = dirname($to);
if (!$dirs{$dirname}++) {
- _mkpath($dirname,0,0755);
+ _mkpath($dirname,0,$Perm_Dir);
}
}
if ($need_filtering) {
sub init_PERM {
my($self) = shift;
- $self->{PERM_DIR} = 755 unless defined $self->{PERM_DIR};
+ my $perm_dir = $self->{PERL_CORE} ? 770 : 755;
+ $self->{PERM_DIR} = $perm_dir unless defined $self->{PERM_DIR};
$self->{PERM_RW} = 644 unless defined $self->{PERM_RW};
$self->{PERM_RWX} = 755 unless defined $self->{PERM_RWX};
my $path = shift;
return undef
- if $path =~ /(~|\.bak|_bak)$/ ||
+ if $path =~ /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/ ||
+ $path =~ /(~|\.bak|_bak)$/ ||
$path =~ /\..*\.sw(o|p)$/ ||
$path =~ /\B\.svn\b/;
$self->opt_M_with('Pod::Perldoc::ToPod'); # the always-there fallthru
$self->opt_o_with('text');
+ $self->opt_o_with('man')
+ if $ENV{TERM} && $ENV{TERM} !~ /dumb|emacs|none|unknown/i;
return;
}
#
# See RT #77465
#
- #push @switches, 'utf8' => 1;
+ # Then again, do *not* comment it out on OpenBSD:
+ # mandoc handles UTF-8 input just fine.
+ push @switches, 'utf8' => 1;
$self->debug( "Pod::Man switches are [@switches]\n" );
$version ge $minimum_groff_version;
}
-sub _have_mandoc_with_utf8 {
- my( $self ) = @_;
-
- $self->_is_mandoc and not system 'mandoc -Tlocale -V > /dev/null 2>&1';
- }
-
sub _collect_nroff_switches {
my( $self ) = shift;
push @render_switches, '-rLL=' . (int $c) . 'n' if $cols > 80;
}
+ if( $self->_is_mandoc ) {
+ push @render_switches, '-Owidth=' . $self->_get_columns;
+ }
+
# I hear persistent reports that adding a -c switch to $render
# solves many people's problems. But I also hear that some mans
# don't have a -c switch, so that unconditionally adding it here
if( $self->_is_nroff ) { qw() }
elsif( $self->_have_groff_with_utf8 ) { qw(-Kutf8 -Tutf8) }
elsif( $self->_is_ebcdic ) { qw(-Tcp1047) }
- elsif( $self->_have_mandoc_with_utf8 ) { qw(-Tlocale) }
elsif( $self->_is_mandoc ) { qw() }
else { qw(-Tlatin1) }
}
length $done
);
+ # wait for it to exit
+ waitpid( $pid, 0 );
+
if( $? ) {
$self->warn( "Error from pipe to $render!\n" );
$self->debug( 'Error: ' . do { local $/; <$err> } );
}
# create a lib/ dir in order to avoid warnings in Test::Distribution
-mkdir "lib", 0755;
+mkdir "lib", $ENV{PERL_CORE} ? 0770 : 0755;
# virtual paths given to EU::MM
my %virtual_path = ( 'Syslog.pm' => '$(INST_LIBDIR)/Syslog.pm' );
use strict;
use vars qw($VERSION $VMS_TERMCAP);
-use vars qw($termpat $state $first $entry);
$VERSION = '1.18';
$self = {} unless defined $self;
bless $self, $class;
- my ( $term, $cap, $search, $field, $max, $tmp_term, $TERMCAP );
- local ( $termpat, $state, $first, $entry ); # used inside eval
+ my ( $term, $cap, $search, $field, $tmp_term, $TERMCAP );
+ my ( $state, $first, $entry );
local $_;
# Compute PADDING factor from OSPEED (to be used by Tpad)
# $tmp_term is always the next term (possibly :tc=...:) we are looking for
$tmp_term = $self->{TERM};
+ my $seen = {};
- # protect any pattern metacharacters in $tmp_term
- $termpat = $tmp_term;
- $termpat =~ s/(\W)/\\$1/g;
-
- my $foo = ( exists $ENV{TERMCAP} ? $ENV{TERMCAP} : '' );
-
- # $entry is the extracted termcap entry
- if ( ( $foo !~ m:^/:s ) && ( $foo =~ m/(^|\|)${termpat}[:|]/s ) )
- {
- $entry = $foo;
+ if (exists $ENV{TERMCAP}) {
+ local $_ = $ENV{TERMCAP};
+ if ( !m:^/:s && m/(^|\|)\Q$tmp_term\E[:|]/s ) {
+ $entry = $_;
+ $seen->{$tmp_term} = 1;
+ }
}
my @termcap_path = termcap_path();
- if ( !@termcap_path && !$entry )
- {
-
- # last resort--fake up a termcap from terminfo
- local $ENV{TERM} = $term;
-
- if ( $^O eq 'VMS' )
- {
- $entry = $VMS_TERMCAP;
- }
- else
- {
- if ( grep { -x "$_/infocmp" } split /:/, $ENV{PATH} )
- {
- eval {
- my $tmp = `infocmp -C 2>/dev/null`;
- $tmp =~ s/^#.*\n//gm; # remove comments
- if ( ( $tmp !~ m%^/%s )
- && ( $tmp =~ /(^|\|)${termpat}[:|]/s ) )
- {
- $entry = $tmp;
- }
- };
- warn "Can't run infocmp to get a termcap entry: $@" if $@;
- }
- else
- {
- # this is getting desperate now
- if ( $self->{TERM} eq 'dumb' )
- {
- $entry = 'dumb|80-column dumb tty::am::co#80::bl=^G:cr=^M:do=^J:sf=^J:';
- }
- }
- }
- }
-
- croak "Can't find a valid termcap file" unless @termcap_path || $entry;
-
$state = 1; # 0 == finished
# 1 == next file
# 2 == search again
+ # 3 == try infocmp
$first = 0; # first entry (keeps term name)
- $max = 32; # max :tc=...:'s
-
if ($entry)
{
if ( $entry =~ s/:tc=([^:]+):/:/ )
{
$tmp_term = $1;
-
- # protect any pattern metacharacters in $tmp_term
- $termpat = $tmp_term;
- $termpat =~ s/(\W)/\\$1/g;
}
else
{
}
}
- # This is eval'ed inside the while loop for each file
- $search = q{
- while (<TERMCAP>) {
- next if /^\\t/ || /^#/;
- if ($_ =~ m/(^|\\|)${termpat}[:|]/o) {
+
+ while ( $state != 0 )
+ {
+ if ( $state == 1 ) {
+ # get the next TERMCAP
+ $TERMCAP = shift @termcap_path or $state = 3;
+ } elsif ($state == 3) {
+ croak "failed termcap lookup on $tmp_term";
+ } else {
+ # do the same file again
+ $state = 1; # ok, maybe do a new file next time
+ }
+
+ my ($fh, $child);
+ if ($state == 3) {
+ # need to do a proper fork, so that we can pass tmp_term
+ # without having to quote it.
+ $child = open($fh, "-|");
+ warn "cannot run infocmp: $!" if !defined $child;
+ if (!$child) {
+ open(STDERR, ">", "/dev/null");
+ exec('infocmp', '-CTrx', '--', $tmp_term);
+ exit(1);
+ }
+ } else {
+ open($fh, '<', $TERMCAP) || croak "open $TERMCAP: $!";
+ }
+ while (<$fh>) {
+ next if /^\t/ || /^#/;
+ if (m/(^|\|)\Q$tmp_term\E[:|]/) {
chomp;
s/^[^:]*:// if $first++;
$state = 0;
- while ($_ =~ s/\\\\$//) {
- defined(my $x = <TERMCAP>) or last;
+ $seen->{$tmp_term} = 1;
+ while (s/\\$//) {
+ defined(my $x = <$fh>) or last;
$_ .= $x; chomp;
}
+ if (defined $entry) {
+ $entry .= $_;
+ } else {
+ $entry = $_;
+ }
last;
}
}
- defined $entry or $entry = '';
- $entry .= $_ if $_;
- };
+ close $fh;
+ waitpid($child, 0) if defined $child;
- while ( $state != 0 )
- {
- if ( $state == 1 )
- {
-
- # get the next TERMCAP
- $TERMCAP = shift @termcap_path
- || croak "failed termcap lookup on $tmp_term";
- }
- else
- {
-
- # do the same file again
- # prevent endless recursion
- $max-- || croak "failed termcap loop at $tmp_term";
- $state = 1; # ok, maybe do a new file next time
- }
-
- open( TERMCAP, "< $TERMCAP\0" ) || croak "open $TERMCAP: $!";
- eval $search;
- die $@ if $@;
- close TERMCAP;
+ next if $state != 0;
# If :tc=...: found then search this file again
- $entry =~ s/:tc=([^:]+):/:/ && ( $tmp_term = $1, $state = 2 );
+ while ($entry =~ s/:tc=([^:]+):/:/) {
+ $tmp_term = $1;
+ next if $seen->{$tmp_term};
+ $state = 2;
+ last;
+ }
+ }
- # protect any pattern metacharacters in $tmp_term
- $termpat = $tmp_term;
- $termpat =~ s/(\W)/\\$1/g;
+ if ( !defined $entry ) {
+ if ( $^O eq 'VMS' ) {
+ $entry = $VMS_TERMCAP;
+ # this is getting desperate now
+ } elsif ( $self->{TERM} eq 'dumb' ){
+ $entry = 'dumb|80-column dumb tty::am::co#80::bl=^G:cr=^M:do=^J:sf=^J:';
+ }
}
- croak "Can't find $term" if $entry eq '';
+ croak "Can't find $term" if !defined $entry;
$entry =~ s/:+\s*:+/:/g; # cleanup $entry
$entry =~ s/:+/:/g; # cleanup $entry
$self->{TERMCAP} = $entry; # save it
plan skip_all => 'no termcap available to test';
}
else {
- plan tests => 45;
+ plan tests => 44;
}
use_ok( 'Term::Cap' );
# it shouldn't try to read one file more than 32(!) times
# see __END__ for a really awful termcap example
- $ENV{TERMPATH} = join(' ', ('tcout') x 33);
- $vals->{TERM} = 'bar';
- eval { $t = Term::Cap->Tgetent($vals) };
- like( $@, qr/failed termcap loop/, 'Tgetent() should catch deep recursion');
+# $ENV{TERMPATH} = join(' ', ('tcout') x 33);
+# $vals->{TERM} = 'bar';
+# eval { $t = Term::Cap->Tgetent($vals) };
+# like( $@, qr/failed termcap loop/, 'Tgetent() should catch deep recursion');
# now let it read a fake termcap file, and see if it sets properties
$ENV{TERMPATH} = 'tcout';
$cut = $i + 1;
$cut++ if ($dirs[$i + 1] && $dirs[$i + 1] eq 'lib');
last;
+ } elsif ($dirs[$i] eq 'lib' && $dirs[$i + 1] && $dirs[0] eq 'ext') {
+ $cut = $i + 1;
}
}
if ($cut > 0) {
skip "no Socket::SO_PROTOCOL", 1 if !defined(eval { Socket::SO_PROTOCOL });
skip "SO_PROTOCOL defined but not implemented", 1
if !defined $new->sockopt(Socket::SO_PROTOCOL);
+ skip "SO_PROTOCOL returns chosen protocol on OpenBSD", 1
+ if $^O eq 'openbsd';
is($new->protocol(), $p, 'protocol match');
}
SKIP: {
print "# Looping for $busycount iterations should take about 0.025s\n";
}
- my $TIMEOUT = 60;
+ my $TIMEOUT = 600;
my $mutex = 1;
share($mutex);
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'NDBM_File',
- LIBS => ["-L/usr/local/lib -lndbm", "-ldbm -lucb"],
+ #LIBS => ["-L/usr/local/lib -lndbm", "-ldbm -lucb"],
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'NDBM_File.pm',
);
d_setruid=$undef
esac
+# OpenBSD 5.5 on has 64 bit time_t
+case "$osvers" in
+[0-4].*|5.[0-4]) ;;
+*)
+ cppflags="$cppflags -DBIG_TIME"
+ ;;
+esac
+
#
# Not all platforms support dynamic loading...
# For the case of "$openbsd_distribution", the hints file
test -z "$usedl" && usedl=$define
# We use -fPIC here because -fpic is *NOT* enough for some of the
# extensions like Tk on some OpenBSD platforms (ie: sparc)
- cccdlflags="-DPIC -fPIC $cccdlflags"
+ PICFLAG=-fPIC
+ if [ -e /usr/share/mk/bsd.own.mk ]; then
+ PICFLAG=`make -f /usr/share/mk/bsd.own.mk -V PICFLAG`
+ fi
+ cccdlflags="-DPIC ${PICFLAG} $cccdlflags"
case "$osvers" in
[01].*|2.[0-7]|2.[0-7].*)
lddlflags="-Bshareable $lddlflags"
;;
*) # from 3.1 onwards
ld=${cc:-cc}
- lddlflags="-shared -fPIC $lddlflags"
+ lddlflags="-shared ${PICFLAG} $lddlflags"
libswanted=`echo $libswanted | sed 's/ dl / /'`
;;
esac
# around for old NetBSD binaries.
libswanted=`echo $libswanted | sed 's/ crypt / /'`
+# OpenBSD hasn't ever needed linking to libutil
+libswanted=`echo $libswanted | sed 's/ util / /'`
+
# Configure can't figure this out non-interactively
d_suidsafe=$define
;;
esac
+#
+# Unaligned access on alpha with -ftree-ter
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59679
+# More details
+# https://rt.perl.org/Public/Bug/Display.html?id=120888
+#
+case "${ARCH}-${osvers}" in
+ alpha-*)
+ ccflags="-fno-tree-ter $ccflags"
+ ;;
+esac
+
+# Special per-arch specific ccflags
+case "${ARCH}-${osvers}" in
+ vax-*)
+ ccflags="-DUSE_PERL_ATOF=0 $ccflags"
+ ;;
+esac
+
# This script UU/usethreads.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use threads.
cat > UU/usethreads.cbu <<'EOCBU'
# Broken up to OpenBSD 3.6, fixed in OpenBSD 3.7
d_getservbyname_r=$undef ;;
esac
+ ;;
+*)
+ libswanted=`echo $libswanted | sed 's/ pthread / /'`
esac
EOCBU
siteprefix='/usr/local'
siteprefixexp='/usr/local'
# Ports installs non-std libs in /usr/local/lib so look there too
- locincpth='/usr/local/include'
- loclibpth='/usr/local/lib'
+ locincpth=''
+ loclibpth=''
# Link perl with shared libperl
- if [ "$usedl" = "$define" -a -r shlib_version ]; then
+ if [ "$usedl" = "$define" -a -r $src/shlib_version ]; then
useshrplib=true
- libperl=`. ./shlib_version; echo libperl.so.${major}.${minor}`
+ libperl=`. $src/shlib_version; echo libperl.so.${major}.${minor}`
fi
;;
esac
# which is being fixed. In the meantime, forbid POSIX 2008 locales
d_newlocale="$undef"
+# OpenBSD's locale support is not that complete yet
+ccflags="-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE $ccflags"
+
# Seems that OpenBSD returns bogus values in _Thread_local variables in code in
# shared objects, so we need to disable it. See GH #19109
d_thread_local=undef
use strict;
use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $Is_Darwin $Is_AmigaOS
%opts $packlist);
-use subs qw(unlink link chmod);
+use subs qw(unlink link chmod chown);
require File::Path;
require File::Copy;
unless -f $to and (chmod(0666, $to), unlink $to)
and File::Copy::copy($from, $to) and ++$success;
}
+ if (defined($opts{uid}) || defined($opts{gid})) {
+ chown($opts{uid}, $opts{gid}, $to) if $success;
+ }
$packlist->{$xto} = { type => 'file' };
}
$success;
unless $opts{notify};
}
+sub chown {
+ my($uid,$gid,$name) = @_;
+
+ return if ($^O eq 'dos');
+ printf " chown %s:%s %s\n", $uid, $gid, $name if $opts{verbose};
+ CORE::chown($uid,$gid,$name)
+ || warn sprintf("Couldn't chown %s:%s %s: $!\n", $uid, $gid, $name)
+ unless $opts{notify};
+}
+
sub samepath {
my($p1, $p2) = @_;
}
sub mkpath {
- File::Path::mkpath(shift , $opts{verbose}, 0777) unless $opts{notify};
+ File::Path::make_path(shift, {owner=>$opts{uid}, group=>$opts{gid},
+ mode=>0777, verbose=>$opts{verbose}}) unless $opts{notify};
}
sub unixtoamiga
my $usage = 0;
if (!GetOptions(\%opts, 'notify|n', 'strip|s', 'silent|S',
'skip-otherperls|o', 'force|f', 'verbose|V', 'archname|A',
- 'nopods|p', 'destdir:s', 'help|h|?',
+ 'nopods|p', 'destdir:s', 'help|h|?', 'user|u:s', 'group|g:s',
'versiononly|v' => \$versiononly, '<>' => sub {
if ($_[0] eq '+v') {
$versiononly = 0;
-A Also install perl with the architecture's name in the perl binary's
name.
-p Don't install the pod files. [This will break use diagnostics;]
+ -g group install files with the specified group
+ -u user install files with the specified user
-destdir Prefix installation directories by this string.
-h Display this help message.
EOT
exit $usage;
}
}
+$opts{'uid'} = getpwnam($opts{'user'}) if exists($opts{'user'});
+$opts{'gid'} = getgrnam($opts{'group'}) if exists($opts{'group'});
$versiononly = 1 if $Config{versiononly} && !defined $versiononly;
my (@scripts, @tolink);
}
# Exclude nonxs extensions that are not architecture dependent
-my @nonxs = grep(!/^Errno$/, split(' ', $Config{'nonxs_ext'}));
+my @nonxs = grep(!/^(Errno|IO\/Compress)$/, split(' ', $Config{'nonxs_ext'}));
my @ext_dirs = qw(cpan dist ext);
foreach my $ext_dir (@ext_dirs) {
my $installarchlib = "$opts{destdir}$Config{installarchlib}";
my $installsitelib = "$opts{destdir}$Config{installsitelib}";
my $installsitearch = "$opts{destdir}$Config{installsitearch}";
-my $installman1dir = "$opts{destdir}$Config{installman1dir}";
+my $installman1dir = "none";
my $man1ext = $Config{man1ext};
my $libperl = $Config{libperl};
# Shared library and dynamic loading suffixes.
$installbin || die "No installbin directory in config.sh\n";
-d $installbin || mkpath($installbin);
-d $installbin || $opts{notify} || die "$installbin is not a directory\n";
--w $installbin || $opts{notify} || die "$installbin is not writable by you\n"
- unless $installbin =~ m#^/afs/# || $opts{notify};
if (!$Is_VMS) {
-x 'perl' . $exe_ext || die "perl isn't executable!\n";
}
}
--f 't/rantests' || $Is_W32
- || warn "WARNING: You've never run 'make test' or",
- " some tests failed! (Installing anyway.)\n";
+#-f 't/rantests' || $Is_W32
+# || warn "WARNING: You've never run 'make test' or",
+# " some tests failed! (Installing anyway.)\n";
# This will be used to store the packlist
$packlist = ExtUtils::Packlist->new("$installarchlib/.packlist");
$packlist->{"$Config{installbin}/$perldll"} = { type => 'file' };
} # if ($Is_W32 or $Is_Cygwin)
+# Get the install command and flags from the environment
+my @installcmd = $ENV{"INSTALL"} || "install";
+push(@installcmd, $ENV{"INSTALL_COPY"} || "-c");
+
# First we install the version-numbered executables.
if ($Is_VMS) {
}
}
else {
- safe_unlink("$installbin/$perl_verbase$ver$exe_ext");
- copy("perl$exe_ext", "$installbin/$perl_verbase$ver$exe_ext");
- strip("$installbin/$perl_verbase$ver$exe_ext");
- fix_dep_names("$installbin/$perl_verbase$ver$exe_ext");
- chmod(0755, "$installbin/$perl_verbase$ver$exe_ext");
+ my $ver = ''; # don't install a versioned perl binary
+ install("perl$exe_ext", "$installbin/$perl_verbase$ver$exe_ext", "0755");
`chtag -r "$installbin/$perl_verbase$ver$exe_ext"` if ($^O eq 'os390');
}
@corefiles = <*.h>;
} else {
# [als] hard-coded 'libperl' name... not good!
- @corefiles = <*.h libperl*.* perl*$Config{lib_ext}>;
+ #@corefiles = <*.h libperl*.* perl*$Config{lib_ext}>;
+ @corefiles = <*.h *.inc perl*$Config{lib_ext}>;
+ install($libperl, "$opts{destdir}$Config{glibpth}/$libperl", "0444");
# AIX needs perl.exp installed as well.
push(@corefiles,'perl.exp') if $^O eq 'aix';
# Install main perl executables
# Make links to ordinary names if installbin directory isn't current directory.
-if (! $versiononly && ! samepath($installbin, '.') && ! $Is_VMS) {
+if (0) { # don't install a versioned perl binary
+#if (! $versiononly && ! samepath($installbin, '.') && ! $Is_VMS) {
safe_unlink("$installbin/$perl$exe_ext", "$installbin/suid$perl$exe_ext");
if ($^O eq 'vos') {
# VOS doesn't support hard links, so use a symlink.
$packlist->write() unless $opts{notify};
+if (defined($opts{uid}) || defined($opts{gid})) {
+ chown($opts{uid}, $opts{gid}, $packlist->packlist_file());
+}
print " Installation complete\n" if $opts{verbose};
exit 0;
sub copy {
my($from,$to) = @_;
+ my($success) = 0;
my $xto = $to;
$xto =~ s/^\Q$opts{destdir}\E//;
unless $opts{silent};
print " creating new version of $xto\n"
if $Is_VMS and -e $to and !$opts{silent};
- unless ($opts{notify} or File::Copy::copy($from, $to)) {
+ unless ($opts{notify} or File::Copy::copy($from, $to) and ++$success) {
# Might have been that F::C::c can't overwrite the target
warn "Couldn't copy $from to $to: $!\n"
unless -f $to and (chmod(0666, $to), unlink $to)
- and File::Copy::copy($from, $to);
+ and File::Copy::copy($from, $to) and ++$success;
}
+ if (defined($opts{uid}) || defined($opts{gid})) {
+ chown($opts{uid}, $opts{gid}, $to) if $success;
+ }
+ $packlist->{$xto} = { type => 'file' };
+}
+
+sub install {
+ my($from,$to,$mode) = @_;
+
+ my $xto = $to;
+ my $cmd = join(' ', @installcmd);
+ $cmd .= " -m $mode" if $mode;
+ $cmd .= " -s" if $opts{strip};
+ $cmd .= " -o $opts{uid}" if defined($opts{uid});
+ $cmd .= " -g $opts{gid}" if defined($opts{gid});
+ $cmd .= " $from $to";
+ $xto =~ s/^\Q$opts{destdir}\E// if $opts{destdir};
+ print $opts{verbose} ? " install $from $xto\n" : " $xto\n" unless $opts{silent};
+ system($cmd);
+ warn "Couldn't $cmd\n" if $?;
$packlist->{$xto} = { type => 'file' };
}
return;
}
+ # If we have different install version, install that instead
+ return if -e "$_.install";
+ $name =~ s/\.install$//;
+
# ignore patch backups, RCS files, emacs backup & temp files and the
# .exists files, .PL files, and test files.
return if $name =~ m{\.orig$|\.rej$|~$|^#.+#$|,v$|^\.exists|\.PL$|\.plc$|\.t$|^test\.pl$|^dbm_filter_util\.pl$|^filter-util\.pl$|^uupacktool\.pl$|^\.gitignore$} ||
AnyDBM_File - provide framework for multiple DBMs
-NDBM_File, DB_File, GDBM_File, SDBM_File, ODBM_File - various DBM implementations
-
=head1 SYNOPSIS
use AnyDBM_File;
@old_watch,
);
+sub _DB__use_full_path
+{
+ # If running in the perl test suite, don't use old system libs
+ return &{$_[0]} if $ENV{PERL_CORE};
+ local @INC = @INC;
+ eval { require Config; };
+ unshift(@INC,
+ @Config::Config{qw(archlibexp privlibexp sitearchexp sitelibexp)});
+ &{$_[0]};
+}
+
sub _DB__determine_if_we_should_break
{
# if we have something here, see if we should break.
if (!eval {
local @INC = @INC;
pop @INC if $INC[-1] eq '.';
- require PadWalker; PadWalker->VERSION(0.08) }) {
+ _DB__use_full_path(sub {
+ require PadWalker;
+ });
+ PadWalker->VERSION(0.08) }) {
my $Err = $@;
_db_warn(
$Err =~ /locate/
use vars qw($ornaments);
use vars qw($rl_attribs);
-
sub setterm {
# Load Term::Readline, but quietly; don't debug it and don't trace it.
local $frame = 0;
local $doret = -2;
- require Term::ReadLine;
+ _DB__use_full_path(sub {
+ require Term::ReadLine;
+ });
+
# If noTTY is set, but we have a TTY name, go ahead and hook up to it.
if ($notty) {
# We need $term defined or we can not switch to the newly created xterm
if ($tty ne '' && !defined $term) {
- require Term::ReadLine;
+ _DB__use_full_path(sub {
+ require Term::ReadLine;
+ });
if ( !$rl ) {
$term = Term::ReadLine::Stub->new( 'perldb', $IN, $OUT );
}
return if $skipCvGV; # Backdoor to avoid problems if XS broken...
return unless ref $in;
$in = \&$in; # Hard reference...
- eval { require Devel::Peek; 1 } or return;
+ eval { _DB__use_full_path(sub { require Devel::Peek; 1; }); } or return;
my $gv = Devel::Peek::CvGV($in) or return;
*$gv{PACKAGE} . '::' . *$gv{NAME};
} ## end sub CvGV_name_or_bust
PERL_STATIC_INLINE NV
S_strtod(pTHX_ const char * const s, char ** e)
{
- DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
NV result;
+ DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
STORE_LC_NUMERIC_SET_TO_NEEDED();
# endif
#endif
+#undef PERL_BUILD_DATE
+
#ifdef PERL_BUILD_DATE
PUSHs(Perl_newSVpvn_flags(aTHX_
STR_WITH_LEN("Compiled at " PERL_BUILD_DATE),
Or, you can combine this step with the next to save disk space:
- gzip -dc yourmodule.tar.gz | tar -xof -
+ gzip -dc yourmodule.tar.gz | tar -xf -
B. UNPACK
-Unpack the result with C<tar -xof yourmodule.tar>
+Unpack the result with C<tar -xf yourmodule.tar>
C. BUILD
die "p5p-controlled module $filename missing =head1 NAME\n"
if $filename !~ m{^(dist/|cpan/)}n # under our direct control
&& $filename !~ m{/_[^/]+\z} # not private
+ && $filename !~ m{/unicore/} # not unicore
&& $filename ne 'lib/meta_notation.pm' # no pod
&& $filename ne 'lib/overload/numbers.pm'; # no pod
warn "$filename missing =head1 NAME\n" unless $Quiet;
/* env var PERL_RAND_SEED has been set so the user wants
* consistent srand() initialization. */
PERL_SRAND_OVERRIDE_GET(s);
+ (void)srand48_deterministic((Rand_seed_t)s);
} else {
/* Pseudo random initialization from context state and possible
* random devices */
s= (Rand_seed_t)seed();
+ (void)seedDrand01(s);
}
- (void)seedDrand01(s);
PL_srand_called = TRUE;
}
{
"Integer overflow in srand");
anum = UV_MAX;
}
+ (void)srand48_deterministic((Rand_seed_t)anum);
}
else {
if (PL_srand_override) {
/* env var PERL_RAND_SEED has been set so the user wants
* consistent srand() initialization. */
PERL_SRAND_OVERRIDE_GET(anum);
+ (void)srand48_deterministic((Rand_seed_t)anum);
} else {
anum = seed();
+ (void)seedDrand01((Rand_seed_t)anum);
}
}
- (void)seedDrand01((Rand_seed_t)anum);
PL_srand_called = TRUE;
if (anum)
XPUSHu(anum);
#define PERL_IN_PP_SYS_C
#include "perl.h"
#include "time64.h"
+#include "syscall_emulator.h"
+#define syscall syscall_emulator
#ifdef I_SHADOW
/* Shadow password support for solaris - pdo@cs.umd.edu
$package = $1;
last;
}
+ elsif (/^\s*package\s*$/) {
+ # If they're hiding their package name, we ignore them
+ ++$ignore{"/$path"};
+ $package='';
+ last;
+ }
}
close $fh
or die "Can't close $file: $!";
-major=23
+major=24
minor=0
--- /dev/null
+/*
+ * Generated from gen_syscall_emulator.pl
+ */
+#include <sys/syscall.h>
+#include <stdarg.h>
+#include <errno.h>
+#include <sys/socket.h>
+#include <sys/event.h>
+#include <sys/futex.h>
+#include <sys/ioctl.h>
+#include <sys/ktrace.h>
+#include <sys/mman.h>
+#include <sys/mount.h>
+#include <sys/msg.h>
+#include <sys/poll.h>
+#include <sys/ptrace.h>
+#include <sys/resource.h>
+#include <sys/select.h>
+#include <sys/sem.h>
+#include <sys/shm.h>
+#include <sys/stat.h>
+#include <sys/sysctl.h>
+#include <sys/time.h>
+#include <sys/uio.h>
+#include <sys/wait.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <sched.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <syslog.h>
+#include <tib.h>
+#include <time.h>
+#include <unistd.h>
+#include "syscall_emulator.h"
+
+long
+syscall_emulator(int syscall, ...)
+{
+ long ret = 0;
+ va_list args;
+ va_start(args, syscall);
+
+ switch(syscall) {
+ /* Indirect syscalls not supported
+ *case SYS_syscall:
+ * ret = syscall(int, ...);
+ * break;
+ */
+ case SYS_exit:
+ exit(va_arg(args, int)); // rval
+ break;
+ case SYS_fork:
+ ret = fork();
+ break;
+ case SYS_read: {
+ int fd = (int)va_arg(args, long);
+ void * buf = (void *)va_arg(args, long);
+ size_t nbyte = (size_t)va_arg(args, long);
+ ret = read(fd, buf, nbyte);
+ break;
+ }
+ case SYS_write: {
+ int fd = (int)va_arg(args, long);
+ const void * buf = (const void *)va_arg(args, long);
+ size_t nbyte = (size_t)va_arg(args, long);
+ ret = write(fd, buf, nbyte);
+ break;
+ }
+ case SYS_open: {
+ const char * path = (const char *)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ mode_t mode = (mode_t)va_arg(args, long);
+ ret = open(path, flags, mode);
+ break;
+ }
+ case SYS_close:
+ ret = close(va_arg(args, int)); // fd
+ break;
+ case SYS_getentropy: {
+ void * buf = (void *)va_arg(args, long);
+ size_t nbyte = (size_t)va_arg(args, long);
+ ret = getentropy(buf, nbyte);
+ break;
+ }
+ /* No signature found in headers
+ *case SYS___tfork: {
+ * const struct __tfork * param = (const struct __tfork *)va_arg(args, long);
+ * size_t psize = (size_t)va_arg(args, long);
+ * ret = __tfork(param, psize);
+ * break;
+ *}
+ */
+ case SYS_link: {
+ const char * path = (const char *)va_arg(args, long);
+ const char * _link = (const char *)va_arg(args, long);
+ ret = link(path, _link);
+ break;
+ }
+ case SYS_unlink:
+ ret = unlink(va_arg(args, const char *)); // path
+ break;
+ case SYS_wait4: {
+ pid_t pid = (pid_t)va_arg(args, long);
+ int * status = (int *)va_arg(args, long);
+ int options = (int)va_arg(args, long);
+ struct rusage * rusage = (struct rusage *)va_arg(args, long);
+ ret = wait4(pid, status, options, rusage);
+ break;
+ }
+ case SYS_chdir:
+ ret = chdir(va_arg(args, const char *)); // path
+ break;
+ case SYS_fchdir:
+ ret = fchdir(va_arg(args, int)); // fd
+ break;
+ case SYS_mknod: {
+ const char * path = (const char *)va_arg(args, long);
+ mode_t mode = (mode_t)va_arg(args, long);
+ dev_t dev = (dev_t)va_arg(args, long);
+ ret = mknod(path, mode, dev);
+ break;
+ }
+ case SYS_chmod: {
+ const char * path = (const char *)va_arg(args, long);
+ mode_t mode = (mode_t)va_arg(args, long);
+ ret = chmod(path, mode);
+ break;
+ }
+ case SYS_chown: {
+ const char * path = (const char *)va_arg(args, long);
+ uid_t uid = (uid_t)va_arg(args, long);
+ gid_t gid = (gid_t)va_arg(args, long);
+ ret = chown(path, uid, gid);
+ break;
+ }
+ /* No signature found in headers
+ *case SYS_break:
+ * ret = break(char *);
+ * break;
+ */
+ case SYS_getdtablecount:
+ ret = getdtablecount();
+ break;
+ case SYS_getrusage: {
+ int who = (int)va_arg(args, long);
+ struct rusage * rusage = (struct rusage *)va_arg(args, long);
+ ret = getrusage(who, rusage);
+ break;
+ }
+ case SYS_getpid:
+ ret = getpid();
+ break;
+ case SYS_mount: {
+ const char * type = (const char *)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ void * data = (void *)va_arg(args, long);
+ ret = mount(type, path, flags, data);
+ break;
+ }
+ case SYS_unmount: {
+ const char * path = (const char *)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ ret = unmount(path, flags);
+ break;
+ }
+ case SYS_setuid:
+ ret = setuid(va_arg(args, uid_t)); // uid
+ break;
+ case SYS_getuid:
+ ret = getuid();
+ break;
+ case SYS_geteuid:
+ ret = geteuid();
+ break;
+ case SYS_ptrace: {
+ int req = (int)va_arg(args, long);
+ pid_t pid = (pid_t)va_arg(args, long);
+ caddr_t addr = (caddr_t)va_arg(args, long);
+ int data = (int)va_arg(args, long);
+ ret = ptrace(req, pid, addr, data);
+ break;
+ }
+ case SYS_recvmsg: {
+ int s = (int)va_arg(args, long);
+ struct msghdr * msg = (struct msghdr *)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ ret = recvmsg(s, msg, flags);
+ break;
+ }
+ case SYS_sendmsg: {
+ int s = (int)va_arg(args, long);
+ const struct msghdr * msg = (const struct msghdr *)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ ret = sendmsg(s, msg, flags);
+ break;
+ }
+ case SYS_recvfrom: {
+ int s = (int)va_arg(args, long);
+ void * buf = (void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ struct sockaddr * from = (struct sockaddr *)va_arg(args, long);
+ socklen_t * fromlenaddr = (socklen_t *)va_arg(args, long);
+ ret = recvfrom(s, buf, len, flags, from, fromlenaddr);
+ break;
+ }
+ case SYS_accept: {
+ int s = (int)va_arg(args, long);
+ struct sockaddr * name = (struct sockaddr *)va_arg(args, long);
+ socklen_t * anamelen = (socklen_t *)va_arg(args, long);
+ ret = accept(s, name, anamelen);
+ break;
+ }
+ case SYS_getpeername: {
+ int fdes = (int)va_arg(args, long);
+ struct sockaddr * asa = (struct sockaddr *)va_arg(args, long);
+ socklen_t * alen = (socklen_t *)va_arg(args, long);
+ ret = getpeername(fdes, asa, alen);
+ break;
+ }
+ case SYS_getsockname: {
+ int fdes = (int)va_arg(args, long);
+ struct sockaddr * asa = (struct sockaddr *)va_arg(args, long);
+ socklen_t * alen = (socklen_t *)va_arg(args, long);
+ ret = getsockname(fdes, asa, alen);
+ break;
+ }
+ case SYS_access: {
+ const char * path = (const char *)va_arg(args, long);
+ int amode = (int)va_arg(args, long);
+ ret = access(path, amode);
+ break;
+ }
+ case SYS_chflags: {
+ const char * path = (const char *)va_arg(args, long);
+ u_int flags = (u_int)va_arg(args, long);
+ ret = chflags(path, flags);
+ break;
+ }
+ case SYS_fchflags: {
+ int fd = (int)va_arg(args, long);
+ u_int flags = (u_int)va_arg(args, long);
+ ret = fchflags(fd, flags);
+ break;
+ }
+ case SYS_sync:
+ sync();
+ break;
+ /* No signature found in headers
+ *case SYS_msyscall: {
+ * void * addr = (void *)va_arg(args, long);
+ * size_t len = (size_t)va_arg(args, long);
+ * ret = msyscall(addr, len);
+ * break;
+ *}
+ */
+ case SYS_stat: {
+ const char * path = (const char *)va_arg(args, long);
+ struct stat * ub = (struct stat *)va_arg(args, long);
+ ret = stat(path, ub);
+ break;
+ }
+ case SYS_getppid:
+ ret = getppid();
+ break;
+ case SYS_lstat: {
+ const char * path = (const char *)va_arg(args, long);
+ struct stat * ub = (struct stat *)va_arg(args, long);
+ ret = lstat(path, ub);
+ break;
+ }
+ case SYS_dup:
+ ret = dup(va_arg(args, int)); // fd
+ break;
+ case SYS_fstatat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ struct stat * buf = (struct stat *)va_arg(args, long);
+ int flag = (int)va_arg(args, long);
+ ret = fstatat(fd, path, buf, flag);
+ break;
+ }
+ case SYS_getegid:
+ ret = getegid();
+ break;
+ case SYS_profil: {
+ caddr_t samples = (caddr_t)va_arg(args, long);
+ size_t size = (size_t)va_arg(args, long);
+ u_long offset = (u_long)va_arg(args, long);
+ u_int scale = (u_int)va_arg(args, long);
+ ret = profil(samples, size, offset, scale);
+ break;
+ }
+ case SYS_ktrace: {
+ const char * fname = (const char *)va_arg(args, long);
+ int ops = (int)va_arg(args, long);
+ int facs = (int)va_arg(args, long);
+ pid_t pid = (pid_t)va_arg(args, long);
+ ret = ktrace(fname, ops, facs, pid);
+ break;
+ }
+ case SYS_sigaction: {
+ int signum = (int)va_arg(args, long);
+ const struct sigaction * nsa = (const struct sigaction *)va_arg(args, long);
+ struct sigaction * osa = (struct sigaction *)va_arg(args, long);
+ ret = sigaction(signum, nsa, osa);
+ break;
+ }
+ case SYS_getgid:
+ ret = getgid();
+ break;
+ /* Mismatched func: int sigprocmask(int, const sigset_t *, sigset_t *); <signal.h>
+ * int sigprocmask(int, sigset_t); <sys/syscall.h>
+ *case SYS_sigprocmask: {
+ * int how = (int)va_arg(args, long);
+ * sigset_t mask = (sigset_t)va_arg(args, long);
+ * ret = sigprocmask(how, mask);
+ * break;
+ *}
+ */
+ case SYS_mmap: {
+ void * addr = (void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ int prot = (int)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ int fd = (int)va_arg(args, long);
+ off_t pos = (off_t)va_arg(args, long);
+ ret = (long)mmap(addr, len, prot, flags, fd, pos);
+ break;
+ }
+ case SYS_setlogin:
+ ret = setlogin(va_arg(args, const char *)); // namebuf
+ break;
+ case SYS_acct:
+ ret = acct(va_arg(args, const char *)); // path
+ break;
+ /* Mismatched func: int sigpending(sigset_t *); <signal.h>
+ * int sigpending(void); <sys/syscall.h>
+ *case SYS_sigpending:
+ * ret = sigpending();
+ * break;
+ */
+ case SYS_fstat: {
+ int fd = (int)va_arg(args, long);
+ struct stat * sb = (struct stat *)va_arg(args, long);
+ ret = fstat(fd, sb);
+ break;
+ }
+ case SYS_ioctl: {
+ int fd = (int)va_arg(args, long);
+ u_long com = (u_long)va_arg(args, long);
+ void * data = (void *)va_arg(args, long);
+ ret = ioctl(fd, com, data);
+ break;
+ }
+ case SYS_reboot:
+ ret = reboot(va_arg(args, int)); // opt
+ break;
+ case SYS_revoke:
+ ret = revoke(va_arg(args, const char *)); // path
+ break;
+ case SYS_symlink: {
+ const char * path = (const char *)va_arg(args, long);
+ const char * link = (const char *)va_arg(args, long);
+ ret = symlink(path, link);
+ break;
+ }
+ case SYS_readlink: {
+ const char * path = (const char *)va_arg(args, long);
+ char * buf = (char *)va_arg(args, long);
+ size_t count = (size_t)va_arg(args, long);
+ ret = readlink(path, buf, count);
+ break;
+ }
+ case SYS_execve: {
+ const char * path = (const char *)va_arg(args, long);
+ char *const * argp = (char *const *)va_arg(args, long);
+ char *const * envp = (char *const *)va_arg(args, long);
+ ret = execve(path, argp, envp);
+ break;
+ }
+ case SYS_umask:
+ ret = umask(va_arg(args, mode_t)); // newmask
+ break;
+ case SYS_chroot:
+ ret = chroot(va_arg(args, const char *)); // path
+ break;
+ case SYS_getfsstat: {
+ struct statfs * buf = (struct statfs *)va_arg(args, long);
+ size_t bufsize = (size_t)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ ret = getfsstat(buf, bufsize, flags);
+ break;
+ }
+ case SYS_statfs: {
+ const char * path = (const char *)va_arg(args, long);
+ struct statfs * buf = (struct statfs *)va_arg(args, long);
+ ret = statfs(path, buf);
+ break;
+ }
+ case SYS_fstatfs: {
+ int fd = (int)va_arg(args, long);
+ struct statfs * buf = (struct statfs *)va_arg(args, long);
+ ret = fstatfs(fd, buf);
+ break;
+ }
+ case SYS_fhstatfs: {
+ const fhandle_t * fhp = (const fhandle_t *)va_arg(args, long);
+ struct statfs * buf = (struct statfs *)va_arg(args, long);
+ ret = fhstatfs(fhp, buf);
+ break;
+ }
+ case SYS_vfork:
+ ret = vfork();
+ break;
+ case SYS_gettimeofday: {
+ struct timeval * tp = (struct timeval *)va_arg(args, long);
+ struct timezone * tzp = (struct timezone *)va_arg(args, long);
+ ret = gettimeofday(tp, tzp);
+ break;
+ }
+ case SYS_settimeofday: {
+ const struct timeval * tv = (const struct timeval *)va_arg(args, long);
+ const struct timezone * tzp = (const struct timezone *)va_arg(args, long);
+ ret = settimeofday(tv, tzp);
+ break;
+ }
+ case SYS_setitimer: {
+ int which = (int)va_arg(args, long);
+ const struct itimerval * itv = (const struct itimerval *)va_arg(args, long);
+ struct itimerval * oitv = (struct itimerval *)va_arg(args, long);
+ ret = setitimer(which, itv, oitv);
+ break;
+ }
+ case SYS_getitimer: {
+ int which = (int)va_arg(args, long);
+ struct itimerval * itv = (struct itimerval *)va_arg(args, long);
+ ret = getitimer(which, itv);
+ break;
+ }
+ case SYS_select: {
+ int nd = (int)va_arg(args, long);
+ fd_set * in = (fd_set *)va_arg(args, long);
+ fd_set * ou = (fd_set *)va_arg(args, long);
+ fd_set * ex = (fd_set *)va_arg(args, long);
+ struct timeval * tv = (struct timeval *)va_arg(args, long);
+ ret = select(nd, in, ou, ex, tv);
+ break;
+ }
+ case SYS_kevent: {
+ int fd = (int)va_arg(args, long);
+ const struct kevent * changelist = (const struct kevent *)va_arg(args, long);
+ int nchanges = (int)va_arg(args, long);
+ struct kevent * eventlist = (struct kevent *)va_arg(args, long);
+ int nevents = (int)va_arg(args, long);
+ const struct timespec * timeout = (const struct timespec *)va_arg(args, long);
+ ret = kevent(fd, changelist, nchanges, eventlist, nevents, timeout);
+ break;
+ }
+ case SYS_munmap: {
+ void * addr = (void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ ret = munmap(addr, len);
+ break;
+ }
+ case SYS_mprotect: {
+ void * addr = (void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ int prot = (int)va_arg(args, long);
+ ret = mprotect(addr, len, prot);
+ break;
+ }
+ case SYS_madvise: {
+ void * addr = (void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ int behav = (int)va_arg(args, long);
+ ret = madvise(addr, len, behav);
+ break;
+ }
+ case SYS_utimes: {
+ const char * path = (const char *)va_arg(args, long);
+ const struct timeval * tptr = (const struct timeval *)va_arg(args, long);
+ ret = utimes(path, tptr);
+ break;
+ }
+ case SYS_futimes: {
+ int fd = (int)va_arg(args, long);
+ const struct timeval * tptr = (const struct timeval *)va_arg(args, long);
+ ret = futimes(fd, tptr);
+ break;
+ }
+ case SYS_mquery: {
+ void * addr = (void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ int prot = (int)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ int fd = (int)va_arg(args, long);
+ off_t pos = (off_t)va_arg(args, long);
+ ret = (long)mquery(addr, len, prot, flags, fd, pos);
+ break;
+ }
+ case SYS_getgroups: {
+ int gidsetsize = (int)va_arg(args, long);
+ gid_t * gidset = (gid_t *)va_arg(args, long);
+ ret = getgroups(gidsetsize, gidset);
+ break;
+ }
+ case SYS_setgroups: {
+ int gidsetsize = (int)va_arg(args, long);
+ const gid_t * gidset = (const gid_t *)va_arg(args, long);
+ ret = setgroups(gidsetsize, gidset);
+ break;
+ }
+ case SYS_getpgrp:
+ ret = getpgrp();
+ break;
+ case SYS_setpgid: {
+ pid_t pid = (pid_t)va_arg(args, long);
+ pid_t pgid = (pid_t)va_arg(args, long);
+ ret = setpgid(pid, pgid);
+ break;
+ }
+ case SYS_futex: {
+ uint32_t * f = (uint32_t *)va_arg(args, long);
+ int op = (int)va_arg(args, long);
+ int val = (int)va_arg(args, long);
+ const struct timespec * timeout = (const struct timespec *)va_arg(args, long);
+ uint32_t * g = (uint32_t *)va_arg(args, long);
+ ret = futex(f, op, val, timeout, g);
+ break;
+ }
+ case SYS_utimensat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ const struct timespec * times = (const struct timespec *)va_arg(args, long);
+ int flag = (int)va_arg(args, long);
+ ret = utimensat(fd, path, times, flag);
+ break;
+ }
+ case SYS_futimens: {
+ int fd = (int)va_arg(args, long);
+ const struct timespec * times = (const struct timespec *)va_arg(args, long);
+ ret = futimens(fd, times);
+ break;
+ }
+ /* No signature found in headers
+ *case SYS_kbind: {
+ * const struct __kbind * param = (const struct __kbind *)va_arg(args, long);
+ * size_t psize = (size_t)va_arg(args, long);
+ * int64_t proc_cookie = (int64_t)va_arg(args, long);
+ * ret = kbind(param, psize, proc_cookie);
+ * break;
+ *}
+ */
+ case SYS_clock_gettime: {
+ clockid_t clock_id = (clockid_t)va_arg(args, long);
+ struct timespec * tp = (struct timespec *)va_arg(args, long);
+ ret = clock_gettime(clock_id, tp);
+ break;
+ }
+ case SYS_clock_settime: {
+ clockid_t clock_id = (clockid_t)va_arg(args, long);
+ const struct timespec * tp = (const struct timespec *)va_arg(args, long);
+ ret = clock_settime(clock_id, tp);
+ break;
+ }
+ case SYS_clock_getres: {
+ clockid_t clock_id = (clockid_t)va_arg(args, long);
+ struct timespec * tp = (struct timespec *)va_arg(args, long);
+ ret = clock_getres(clock_id, tp);
+ break;
+ }
+ case SYS_dup2: {
+ int from = (int)va_arg(args, long);
+ int to = (int)va_arg(args, long);
+ ret = dup2(from, to);
+ break;
+ }
+ case SYS_nanosleep: {
+ const struct timespec * rqtp = (const struct timespec *)va_arg(args, long);
+ struct timespec * rmtp = (struct timespec *)va_arg(args, long);
+ ret = nanosleep(rqtp, rmtp);
+ break;
+ }
+ case SYS_fcntl: {
+ int fd = (int)va_arg(args, long);
+ int cmd = (int)va_arg(args, long);
+ void * arg = (void *)va_arg(args, long);
+ ret = fcntl(fd, cmd, arg);
+ break;
+ }
+ case SYS_accept4: {
+ int s = (int)va_arg(args, long);
+ struct sockaddr * name = (struct sockaddr *)va_arg(args, long);
+ socklen_t * anamelen = (socklen_t *)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ ret = accept4(s, name, anamelen, flags);
+ break;
+ }
+ /* No signature found in headers
+ *case SYS___thrsleep: {
+ * const volatile void * ident = (const volatile void *)va_arg(args, long);
+ * clockid_t clock_id = (clockid_t)va_arg(args, long);
+ * const struct timespec * tp = (const struct timespec *)va_arg(args, long);
+ * void * lock = (void *)va_arg(args, long);
+ * const int * abort = (const int *)va_arg(args, long);
+ * ret = __thrsleep(ident, clock_id, tp, lock, abort);
+ * break;
+ *}
+ */
+ case SYS_fsync:
+ ret = fsync(va_arg(args, int)); // fd
+ break;
+ case SYS_setpriority: {
+ int which = (int)va_arg(args, long);
+ id_t who = (id_t)va_arg(args, long);
+ int prio = (int)va_arg(args, long);
+ ret = setpriority(which, who, prio);
+ break;
+ }
+ case SYS_socket: {
+ int domain = (int)va_arg(args, long);
+ int type = (int)va_arg(args, long);
+ int protocol = (int)va_arg(args, long);
+ ret = socket(domain, type, protocol);
+ break;
+ }
+ case SYS_connect: {
+ int s = (int)va_arg(args, long);
+ const struct sockaddr * name = (const struct sockaddr *)va_arg(args, long);
+ socklen_t namelen = (socklen_t)va_arg(args, long);
+ ret = connect(s, name, namelen);
+ break;
+ }
+ case SYS_getdents: {
+ int fd = (int)va_arg(args, long);
+ void * buf = (void *)va_arg(args, long);
+ size_t buflen = (size_t)va_arg(args, long);
+ ret = getdents(fd, buf, buflen);
+ break;
+ }
+ case SYS_getpriority: {
+ int which = (int)va_arg(args, long);
+ id_t who = (id_t)va_arg(args, long);
+ ret = getpriority(which, who);
+ break;
+ }
+ case SYS_pipe2: {
+ int * fdp = (int *)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ ret = pipe2(fdp, flags);
+ break;
+ }
+ case SYS_dup3: {
+ int from = (int)va_arg(args, long);
+ int to = (int)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ ret = dup3(from, to, flags);
+ break;
+ }
+ /* No signature found in headers
+ *case SYS_sigreturn:
+ * ret = sigreturn(va_arg(args, struct sigcontext *)); // sigcntxp
+ * break;
+ */
+ case SYS_bind: {
+ int s = (int)va_arg(args, long);
+ const struct sockaddr * name = (const struct sockaddr *)va_arg(args, long);
+ socklen_t namelen = (socklen_t)va_arg(args, long);
+ ret = bind(s, name, namelen);
+ break;
+ }
+ case SYS_setsockopt: {
+ int s = (int)va_arg(args, long);
+ int level = (int)va_arg(args, long);
+ int name = (int)va_arg(args, long);
+ const void * val = (const void *)va_arg(args, long);
+ socklen_t valsize = (socklen_t)va_arg(args, long);
+ ret = setsockopt(s, level, name, val, valsize);
+ break;
+ }
+ case SYS_listen: {
+ int s = (int)va_arg(args, long);
+ int backlog = (int)va_arg(args, long);
+ ret = listen(s, backlog);
+ break;
+ }
+ case SYS_chflagsat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ u_int flags = (u_int)va_arg(args, long);
+ int atflags = (int)va_arg(args, long);
+ ret = chflagsat(fd, path, flags, atflags);
+ break;
+ }
+ case SYS_pledge: {
+ const char * promises = (const char *)va_arg(args, long);
+ const char * execpromises = (const char *)va_arg(args, long);
+ ret = pledge(promises, execpromises);
+ break;
+ }
+ case SYS_ppoll: {
+ struct pollfd * fds = (struct pollfd *)va_arg(args, long);
+ u_int nfds = (u_int)va_arg(args, long);
+ const struct timespec * ts = (const struct timespec *)va_arg(args, long);
+ const sigset_t * mask = (const sigset_t *)va_arg(args, long);
+ ret = ppoll(fds, nfds, ts, mask);
+ break;
+ }
+ case SYS_pselect: {
+ int nd = (int)va_arg(args, long);
+ fd_set * in = (fd_set *)va_arg(args, long);
+ fd_set * ou = (fd_set *)va_arg(args, long);
+ fd_set * ex = (fd_set *)va_arg(args, long);
+ const struct timespec * ts = (const struct timespec *)va_arg(args, long);
+ const sigset_t * mask = (const sigset_t *)va_arg(args, long);
+ ret = pselect(nd, in, ou, ex, ts, mask);
+ break;
+ }
+ /* Mismatched func: int sigsuspend(const sigset_t *); <signal.h>
+ * int sigsuspend(int); <sys/syscall.h>
+ *case SYS_sigsuspend:
+ * ret = sigsuspend(va_arg(args, int)); // mask
+ * break;
+ */
+ case SYS_sendsyslog: {
+ const char * buf = (const char *)va_arg(args, long);
+ size_t nbyte = (size_t)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ ret = sendsyslog(buf, nbyte, flags);
+ break;
+ }
+ case SYS_unveil: {
+ const char * path = (const char *)va_arg(args, long);
+ const char * permissions = (const char *)va_arg(args, long);
+ ret = unveil(path, permissions);
+ break;
+ }
+ /* No signature found in headers
+ *case SYS___realpath: {
+ * const char * pathname = (const char *)va_arg(args, long);
+ * char * resolved = (char *)va_arg(args, long);
+ * ret = __realpath(pathname, resolved);
+ * break;
+ *}
+ */
+ case SYS_recvmmsg: {
+ int s = (int)va_arg(args, long);
+ struct mmsghdr * mmsg = (struct mmsghdr *)va_arg(args, long);
+ unsigned int vlen = (unsigned int)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ struct timespec * timeout = (struct timespec *)va_arg(args, long);
+ ret = recvmmsg(s, mmsg, vlen, flags, timeout);
+ break;
+ }
+ case SYS_sendmmsg: {
+ int s = (int)va_arg(args, long);
+ struct mmsghdr * mmsg = (struct mmsghdr *)va_arg(args, long);
+ unsigned int vlen = (unsigned int)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ ret = sendmmsg(s, mmsg, vlen, flags);
+ break;
+ }
+ case SYS_getsockopt: {
+ int s = (int)va_arg(args, long);
+ int level = (int)va_arg(args, long);
+ int name = (int)va_arg(args, long);
+ void * val = (void *)va_arg(args, long);
+ socklen_t * avalsize = (socklen_t *)va_arg(args, long);
+ ret = getsockopt(s, level, name, val, avalsize);
+ break;
+ }
+ case SYS_thrkill: {
+ pid_t tid = (pid_t)va_arg(args, long);
+ int signum = (int)va_arg(args, long);
+ void * tcb = (void *)va_arg(args, long);
+ ret = thrkill(tid, signum, tcb);
+ break;
+ }
+ case SYS_readv: {
+ int fd = (int)va_arg(args, long);
+ const struct iovec * iovp = (const struct iovec *)va_arg(args, long);
+ int iovcnt = (int)va_arg(args, long);
+ ret = readv(fd, iovp, iovcnt);
+ break;
+ }
+ case SYS_writev: {
+ int fd = (int)va_arg(args, long);
+ const struct iovec * iovp = (const struct iovec *)va_arg(args, long);
+ int iovcnt = (int)va_arg(args, long);
+ ret = writev(fd, iovp, iovcnt);
+ break;
+ }
+ case SYS_kill: {
+ int pid = (int)va_arg(args, long);
+ int signum = (int)va_arg(args, long);
+ ret = kill(pid, signum);
+ break;
+ }
+ case SYS_fchown: {
+ int fd = (int)va_arg(args, long);
+ uid_t uid = (uid_t)va_arg(args, long);
+ gid_t gid = (gid_t)va_arg(args, long);
+ ret = fchown(fd, uid, gid);
+ break;
+ }
+ case SYS_fchmod: {
+ int fd = (int)va_arg(args, long);
+ mode_t mode = (mode_t)va_arg(args, long);
+ ret = fchmod(fd, mode);
+ break;
+ }
+ case SYS_setreuid: {
+ uid_t ruid = (uid_t)va_arg(args, long);
+ uid_t euid = (uid_t)va_arg(args, long);
+ ret = setreuid(ruid, euid);
+ break;
+ }
+ case SYS_setregid: {
+ gid_t rgid = (gid_t)va_arg(args, long);
+ gid_t egid = (gid_t)va_arg(args, long);
+ ret = setregid(rgid, egid);
+ break;
+ }
+ case SYS_rename: {
+ const char * from = (const char *)va_arg(args, long);
+ const char * to = (const char *)va_arg(args, long);
+ ret = rename(from, to);
+ break;
+ }
+ case SYS_flock: {
+ int fd = (int)va_arg(args, long);
+ int how = (int)va_arg(args, long);
+ ret = flock(fd, how);
+ break;
+ }
+ case SYS_mkfifo: {
+ const char * path = (const char *)va_arg(args, long);
+ mode_t mode = (mode_t)va_arg(args, long);
+ ret = mkfifo(path, mode);
+ break;
+ }
+ case SYS_sendto: {
+ int s = (int)va_arg(args, long);
+ const void * buf = (const void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ const struct sockaddr * to = (const struct sockaddr *)va_arg(args, long);
+ socklen_t tolen = (socklen_t)va_arg(args, long);
+ ret = sendto(s, buf, len, flags, to, tolen);
+ break;
+ }
+ case SYS_shutdown: {
+ int s = (int)va_arg(args, long);
+ int how = (int)va_arg(args, long);
+ ret = shutdown(s, how);
+ break;
+ }
+ case SYS_socketpair: {
+ int domain = (int)va_arg(args, long);
+ int type = (int)va_arg(args, long);
+ int protocol = (int)va_arg(args, long);
+ int * rsv = (int *)va_arg(args, long);
+ ret = socketpair(domain, type, protocol, rsv);
+ break;
+ }
+ case SYS_mkdir: {
+ const char * path = (const char *)va_arg(args, long);
+ mode_t mode = (mode_t)va_arg(args, long);
+ ret = mkdir(path, mode);
+ break;
+ }
+ case SYS_rmdir:
+ ret = rmdir(va_arg(args, const char *)); // path
+ break;
+ case SYS_adjtime: {
+ const struct timeval * delta = (const struct timeval *)va_arg(args, long);
+ struct timeval * olddelta = (struct timeval *)va_arg(args, long);
+ ret = adjtime(delta, olddelta);
+ break;
+ }
+ /* Mismatched func: int getlogin_r(char *, size_t); <unistd.h>
+ * int getlogin_r(char *, u_int); <sys/syscall.h>
+ *case SYS_getlogin_r: {
+ * char * namebuf = (char *)va_arg(args, long);
+ * u_int namelen = (u_int)va_arg(args, long);
+ * ret = getlogin_r(namebuf, namelen);
+ * break;
+ *}
+ */
+ case SYS_getthrname: {
+ pid_t tid = (pid_t)va_arg(args, long);
+ char * name = (char *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ ret = getthrname(tid, name, len);
+ break;
+ }
+ case SYS_setthrname: {
+ pid_t tid = (pid_t)va_arg(args, long);
+ const char * name = (const char *)va_arg(args, long);
+ ret = setthrname(tid, name);
+ break;
+ }
+ /* No signature found in headers
+ *case SYS_pinsyscall: {
+ * int syscall = (int)va_arg(args, long);
+ * void * addr = (void *)va_arg(args, long);
+ * size_t len = (size_t)va_arg(args, long);
+ * ret = pinsyscall(syscall, addr, len);
+ * break;
+ *}
+ */
+ case SYS_setsid:
+ ret = setsid();
+ break;
+ case SYS_quotactl: {
+ const char * path = (const char *)va_arg(args, long);
+ int cmd = (int)va_arg(args, long);
+ int uid = (int)va_arg(args, long);
+ char * arg = (char *)va_arg(args, long);
+ ret = quotactl(path, cmd, uid, arg);
+ break;
+ }
+ /* No signature found in headers
+ *case SYS_ypconnect:
+ * ret = ypconnect(va_arg(args, int)); // type
+ * break;
+ */
+ case SYS_nfssvc: {
+ int flag = (int)va_arg(args, long);
+ void * argp = (void *)va_arg(args, long);
+ ret = nfssvc(flag, argp);
+ break;
+ }
+ case SYS_mimmutable: {
+ void * addr = (void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ ret = mimmutable(addr, len);
+ break;
+ }
+ case SYS_waitid: {
+ int idtype = (int)va_arg(args, long);
+ id_t id = (id_t)va_arg(args, long);
+ siginfo_t * info = (siginfo_t *)va_arg(args, long);
+ int options = (int)va_arg(args, long);
+ ret = waitid(idtype, id, info, options);
+ break;
+ }
+ case SYS_getfh: {
+ const char * fname = (const char *)va_arg(args, long);
+ fhandle_t * fhp = (fhandle_t *)va_arg(args, long);
+ ret = getfh(fname, fhp);
+ break;
+ }
+ /* No signature found in headers
+ *case SYS___tmpfd:
+ * ret = __tmpfd(va_arg(args, int)); // flags
+ * break;
+ */
+ /* No signature found in headers
+ *case SYS_sysarch: {
+ * int op = (int)va_arg(args, long);
+ * void * parms = (void *)va_arg(args, long);
+ * ret = sysarch(op, parms);
+ * break;
+ *}
+ */
+ case SYS_lseek: {
+ int fd = (int)va_arg(args, long);
+ off_t offset = (off_t)va_arg(args, long);
+ int whence = (int)va_arg(args, long);
+ ret = lseek(fd, offset, whence);
+ break;
+ }
+ case SYS_truncate: {
+ const char * path = (const char *)va_arg(args, long);
+ off_t length = (off_t)va_arg(args, long);
+ ret = truncate(path, length);
+ break;
+ }
+ case SYS_ftruncate: {
+ int fd = (int)va_arg(args, long);
+ off_t length = (off_t)va_arg(args, long);
+ ret = ftruncate(fd, length);
+ break;
+ }
+ case SYS_pread: {
+ int fd = (int)va_arg(args, long);
+ void * buf = (void *)va_arg(args, long);
+ size_t nbyte = (size_t)va_arg(args, long);
+ off_t offset = (off_t)va_arg(args, long);
+ ret = pread(fd, buf, nbyte, offset);
+ break;
+ }
+ case SYS_pwrite: {
+ int fd = (int)va_arg(args, long);
+ const void * buf = (const void *)va_arg(args, long);
+ size_t nbyte = (size_t)va_arg(args, long);
+ off_t offset = (off_t)va_arg(args, long);
+ ret = pwrite(fd, buf, nbyte, offset);
+ break;
+ }
+ case SYS_preadv: {
+ int fd = (int)va_arg(args, long);
+ const struct iovec * iovp = (const struct iovec *)va_arg(args, long);
+ int iovcnt = (int)va_arg(args, long);
+ off_t offset = (off_t)va_arg(args, long);
+ ret = preadv(fd, iovp, iovcnt, offset);
+ break;
+ }
+ case SYS_pwritev: {
+ int fd = (int)va_arg(args, long);
+ const struct iovec * iovp = (const struct iovec *)va_arg(args, long);
+ int iovcnt = (int)va_arg(args, long);
+ off_t offset = (off_t)va_arg(args, long);
+ ret = pwritev(fd, iovp, iovcnt, offset);
+ break;
+ }
+ case SYS_setgid:
+ ret = setgid(va_arg(args, gid_t)); // gid
+ break;
+ case SYS_setegid:
+ ret = setegid(va_arg(args, gid_t)); // egid
+ break;
+ case SYS_seteuid:
+ ret = seteuid(va_arg(args, uid_t)); // euid
+ break;
+ case SYS_pathconf: {
+ const char * path = (const char *)va_arg(args, long);
+ int name = (int)va_arg(args, long);
+ ret = pathconf(path, name);
+ break;
+ }
+ case SYS_fpathconf: {
+ int fd = (int)va_arg(args, long);
+ int name = (int)va_arg(args, long);
+ ret = fpathconf(fd, name);
+ break;
+ }
+ case SYS_swapctl: {
+ int cmd = (int)va_arg(args, long);
+ const void * arg = (const void *)va_arg(args, long);
+ int misc = (int)va_arg(args, long);
+ ret = swapctl(cmd, arg, misc);
+ break;
+ }
+ case SYS_getrlimit: {
+ int which = (int)va_arg(args, long);
+ struct rlimit * rlp = (struct rlimit *)va_arg(args, long);
+ ret = getrlimit(which, rlp);
+ break;
+ }
+ case SYS_setrlimit: {
+ int which = (int)va_arg(args, long);
+ const struct rlimit * rlp = (const struct rlimit *)va_arg(args, long);
+ ret = setrlimit(which, rlp);
+ break;
+ }
+ case SYS_sysctl: {
+ const int * name = (const int *)va_arg(args, long);
+ u_int namelen = (u_int)va_arg(args, long);
+ void * old = (void *)va_arg(args, long);
+ size_t * oldlenp = (size_t *)va_arg(args, long);
+ void * new = (void *)va_arg(args, long);
+ size_t newlen = (size_t)va_arg(args, long);
+ ret = sysctl(name, namelen, old, oldlenp, new, newlen);
+ break;
+ }
+ case SYS_mlock: {
+ const void * addr = (const void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ ret = mlock(addr, len);
+ break;
+ }
+ case SYS_munlock: {
+ const void * addr = (const void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ ret = munlock(addr, len);
+ break;
+ }
+ case SYS_getpgid:
+ ret = getpgid(va_arg(args, pid_t)); // pid
+ break;
+ case SYS_utrace: {
+ const char * label = (const char *)va_arg(args, long);
+ const void * addr = (const void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ ret = utrace(label, addr, len);
+ break;
+ }
+ case SYS_semget: {
+ key_t key = (key_t)va_arg(args, long);
+ int nsems = (int)va_arg(args, long);
+ int semflg = (int)va_arg(args, long);
+ ret = semget(key, nsems, semflg);
+ break;
+ }
+ case SYS_msgget: {
+ key_t key = (key_t)va_arg(args, long);
+ int msgflg = (int)va_arg(args, long);
+ ret = msgget(key, msgflg);
+ break;
+ }
+ case SYS_msgsnd: {
+ int msqid = (int)va_arg(args, long);
+ const void * msgp = (const void *)va_arg(args, long);
+ size_t msgsz = (size_t)va_arg(args, long);
+ int msgflg = (int)va_arg(args, long);
+ ret = msgsnd(msqid, msgp, msgsz, msgflg);
+ break;
+ }
+ case SYS_msgrcv: {
+ int msqid = (int)va_arg(args, long);
+ void * msgp = (void *)va_arg(args, long);
+ size_t msgsz = (size_t)va_arg(args, long);
+ long msgtyp = (long)va_arg(args, long);
+ int msgflg = (int)va_arg(args, long);
+ ret = msgrcv(msqid, msgp, msgsz, msgtyp, msgflg);
+ break;
+ }
+ case SYS_shmat: {
+ int shmid = (int)va_arg(args, long);
+ const void * shmaddr = (const void *)va_arg(args, long);
+ int shmflg = (int)va_arg(args, long);
+ ret = (long)shmat(shmid, shmaddr, shmflg);
+ break;
+ }
+ case SYS_shmdt:
+ ret = shmdt(va_arg(args, const void *)); // shmaddr
+ break;
+ case SYS_minherit: {
+ void * addr = (void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ int inherit = (int)va_arg(args, long);
+ ret = minherit(addr, len, inherit);
+ break;
+ }
+ case SYS_poll: {
+ struct pollfd * fds = (struct pollfd *)va_arg(args, long);
+ u_int nfds = (u_int)va_arg(args, long);
+ int timeout = (int)va_arg(args, long);
+ ret = poll(fds, nfds, timeout);
+ break;
+ }
+ case SYS_issetugid:
+ ret = issetugid();
+ break;
+ case SYS_lchown: {
+ const char * path = (const char *)va_arg(args, long);
+ uid_t uid = (uid_t)va_arg(args, long);
+ gid_t gid = (gid_t)va_arg(args, long);
+ ret = lchown(path, uid, gid);
+ break;
+ }
+ case SYS_getsid:
+ ret = getsid(va_arg(args, pid_t)); // pid
+ break;
+ case SYS_msync: {
+ void * addr = (void *)va_arg(args, long);
+ size_t len = (size_t)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ ret = msync(addr, len, flags);
+ break;
+ }
+ case SYS_pipe:
+ ret = pipe(va_arg(args, int *)); // fdp
+ break;
+ case SYS_fhopen: {
+ const fhandle_t * fhp = (const fhandle_t *)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ ret = fhopen(fhp, flags);
+ break;
+ }
+ case SYS_kqueue:
+ ret = kqueue();
+ break;
+ case SYS_mlockall:
+ ret = mlockall(va_arg(args, int)); // flags
+ break;
+ case SYS_munlockall:
+ ret = munlockall();
+ break;
+ case SYS_getresuid: {
+ uid_t * ruid = (uid_t *)va_arg(args, long);
+ uid_t * euid = (uid_t *)va_arg(args, long);
+ uid_t * suid = (uid_t *)va_arg(args, long);
+ ret = getresuid(ruid, euid, suid);
+ break;
+ }
+ case SYS_setresuid: {
+ uid_t ruid = (uid_t)va_arg(args, long);
+ uid_t euid = (uid_t)va_arg(args, long);
+ uid_t suid = (uid_t)va_arg(args, long);
+ ret = setresuid(ruid, euid, suid);
+ break;
+ }
+ case SYS_getresgid: {
+ gid_t * rgid = (gid_t *)va_arg(args, long);
+ gid_t * egid = (gid_t *)va_arg(args, long);
+ gid_t * sgid = (gid_t *)va_arg(args, long);
+ ret = getresgid(rgid, egid, sgid);
+ break;
+ }
+ case SYS_setresgid: {
+ gid_t rgid = (gid_t)va_arg(args, long);
+ gid_t egid = (gid_t)va_arg(args, long);
+ gid_t sgid = (gid_t)va_arg(args, long);
+ ret = setresgid(rgid, egid, sgid);
+ break;
+ }
+ case SYS_closefrom:
+ ret = closefrom(va_arg(args, int)); // fd
+ break;
+ case SYS_sigaltstack: {
+ const struct sigaltstack * nss = (const struct sigaltstack *)va_arg(args, long);
+ struct sigaltstack * oss = (struct sigaltstack *)va_arg(args, long);
+ ret = sigaltstack(nss, oss);
+ break;
+ }
+ case SYS_shmget: {
+ key_t key = (key_t)va_arg(args, long);
+ size_t size = (size_t)va_arg(args, long);
+ int shmflg = (int)va_arg(args, long);
+ ret = shmget(key, size, shmflg);
+ break;
+ }
+ case SYS_semop: {
+ int semid = (int)va_arg(args, long);
+ struct sembuf * sops = (struct sembuf *)va_arg(args, long);
+ size_t nsops = (size_t)va_arg(args, long);
+ ret = semop(semid, sops, nsops);
+ break;
+ }
+ case SYS_fhstat: {
+ const fhandle_t * fhp = (const fhandle_t *)va_arg(args, long);
+ struct stat * sb = (struct stat *)va_arg(args, long);
+ ret = fhstat(fhp, sb);
+ break;
+ }
+ case SYS___semctl: {
+ int semid = (int)va_arg(args, long);
+ int semnum = (int)va_arg(args, long);
+ int cmd = (int)va_arg(args, long);
+ union semun * arg = (union semun *)va_arg(args, long);
+ ret = __semctl(semid, semnum, cmd, arg);
+ break;
+ }
+ case SYS_shmctl: {
+ int shmid = (int)va_arg(args, long);
+ int cmd = (int)va_arg(args, long);
+ struct shmid_ds * buf = (struct shmid_ds *)va_arg(args, long);
+ ret = shmctl(shmid, cmd, buf);
+ break;
+ }
+ case SYS_msgctl: {
+ int msqid = (int)va_arg(args, long);
+ int cmd = (int)va_arg(args, long);
+ struct msqid_ds * buf = (struct msqid_ds *)va_arg(args, long);
+ ret = msgctl(msqid, cmd, buf);
+ break;
+ }
+ case SYS_sched_yield:
+ ret = sched_yield();
+ break;
+ case SYS_getthrid:
+ ret = getthrid();
+ break;
+ /* No signature found in headers
+ *case SYS___thrwakeup: {
+ * const volatile void * ident = (const volatile void *)va_arg(args, long);
+ * int n = (int)va_arg(args, long);
+ * ret = __thrwakeup(ident, n);
+ * break;
+ *}
+ */
+ /* No signature found in headers
+ *case SYS___threxit:
+ * __threxit(va_arg(args, pid_t *)); // notdead
+ * break;
+ */
+ /* No signature found in headers
+ *case SYS___thrsigdivert: {
+ * sigset_t sigmask = (sigset_t)va_arg(args, long);
+ * siginfo_t * info = (siginfo_t *)va_arg(args, long);
+ * const struct timespec * timeout = (const struct timespec *)va_arg(args, long);
+ * ret = __thrsigdivert(sigmask, info, timeout);
+ * break;
+ *}
+ */
+ /* No signature found in headers
+ *case SYS___getcwd: {
+ * char * buf = (char *)va_arg(args, long);
+ * size_t len = (size_t)va_arg(args, long);
+ * ret = __getcwd(buf, len);
+ * break;
+ *}
+ */
+ case SYS_adjfreq: {
+ const int64_t * freq = (const int64_t *)va_arg(args, long);
+ int64_t * oldfreq = (int64_t *)va_arg(args, long);
+ ret = adjfreq(freq, oldfreq);
+ break;
+ }
+ case SYS_setrtable:
+ ret = setrtable(va_arg(args, int)); // rtableid
+ break;
+ case SYS_getrtable:
+ ret = getrtable();
+ break;
+ case SYS_faccessat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ int amode = (int)va_arg(args, long);
+ int flag = (int)va_arg(args, long);
+ ret = faccessat(fd, path, amode, flag);
+ break;
+ }
+ case SYS_fchmodat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ mode_t mode = (mode_t)va_arg(args, long);
+ int flag = (int)va_arg(args, long);
+ ret = fchmodat(fd, path, mode, flag);
+ break;
+ }
+ case SYS_fchownat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ uid_t uid = (uid_t)va_arg(args, long);
+ gid_t gid = (gid_t)va_arg(args, long);
+ int flag = (int)va_arg(args, long);
+ ret = fchownat(fd, path, uid, gid, flag);
+ break;
+ }
+ case SYS_linkat: {
+ int fd1 = (int)va_arg(args, long);
+ const char * path1 = (const char *)va_arg(args, long);
+ int fd2 = (int)va_arg(args, long);
+ const char * path2 = (const char *)va_arg(args, long);
+ int flag = (int)va_arg(args, long);
+ ret = linkat(fd1, path1, fd2, path2, flag);
+ break;
+ }
+ case SYS_mkdirat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ mode_t mode = (mode_t)va_arg(args, long);
+ ret = mkdirat(fd, path, mode);
+ break;
+ }
+ case SYS_mkfifoat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ mode_t mode = (mode_t)va_arg(args, long);
+ ret = mkfifoat(fd, path, mode);
+ break;
+ }
+ case SYS_mknodat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ mode_t mode = (mode_t)va_arg(args, long);
+ dev_t dev = (dev_t)va_arg(args, long);
+ ret = mknodat(fd, path, mode, dev);
+ break;
+ }
+ case SYS_openat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ int flags = (int)va_arg(args, long);
+ mode_t mode = (mode_t)va_arg(args, long);
+ ret = openat(fd, path, flags, mode);
+ break;
+ }
+ case SYS_readlinkat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ char * buf = (char *)va_arg(args, long);
+ size_t count = (size_t)va_arg(args, long);
+ ret = readlinkat(fd, path, buf, count);
+ break;
+ }
+ case SYS_renameat: {
+ int fromfd = (int)va_arg(args, long);
+ const char * from = (const char *)va_arg(args, long);
+ int tofd = (int)va_arg(args, long);
+ const char * to = (const char *)va_arg(args, long);
+ ret = renameat(fromfd, from, tofd, to);
+ break;
+ }
+ case SYS_symlinkat: {
+ const char * path = (const char *)va_arg(args, long);
+ int fd = (int)va_arg(args, long);
+ const char * link = (const char *)va_arg(args, long);
+ ret = symlinkat(path, fd, link);
+ break;
+ }
+ case SYS_unlinkat: {
+ int fd = (int)va_arg(args, long);
+ const char * path = (const char *)va_arg(args, long);
+ int flag = (int)va_arg(args, long);
+ ret = unlinkat(fd, path, flag);
+ break;
+ }
+ case SYS___set_tcb:
+ __set_tcb(va_arg(args, void *)); // tcb
+ break;
+ case SYS___get_tcb:
+ ret = (long)__get_tcb();
+ break;
+ default:
+ ret = -1;
+ errno = ENOSYS;
+ }
+ va_end(args);
+
+ return ret;
+}
}
eval("sub flim () { 0; }") unless defined(&flim);
eval("sub flam () { 1; }") unless defined(&flam);
- eval 'sub blli_in_use {
- my($blli) = @_;
- eval q({ ($blli->{l2_proto}) || ($blli->{l3_proto}); });
- }' unless defined(&blli_in_use);
eval 'sub multiline () {"multilinestring";}' unless defined(&multiline);
}
1;
set_up_inc('.', '../lib');
}
-plan (194);
+plan (195);
#
# @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them
'holes passed to sub do not lose their position (aelem, mg)';
}
+# GH #21235
+fresh_perl_is('my @x;$x[0] = 1;shift @x;$x[22] = 1;$x[25] = 1;','',
+ {}, 'unshifting and growing an array initializes trailing elements');
+
"We're included by lib/Tie/Array/std.t so we need to return something true";
}
} else {
# Fudge it by waiting a bit more:
- sleep 2;
+ sleep 3;
}
my $ppid2 = getppid();
print $w "$how,$ppid1,$ppid2\n";
Compress::Raw::Zlib cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm 4198f92e2880d36d6cef4f1be216005b6738ada8
Compress::Raw::Zlib cpan/Compress-Raw-Zlib/Zlib.xs 2ed95faab364703f6b93f7ffff6e0f2a2b2adedd
Digest::MD5 cpan/Digest-MD5/MD5.pm cf2fd9d327f3e314e9e66bb6ecb7a62b4ec72767
-Digest::MD5 cpan/Digest-MD5/MD5.xs dc40839d25ba5e2d6f42fc9b81b409f1d0dbfb0e
+Digest::MD5 cpan/Digest-MD5/MD5.xs 288775759d20ddfb0a0cb02f2ea670afefe2ce6c
ExtUtils::Constant cpan/ExtUtils-Constant/lib/ExtUtils/Constant/Base.pm 7560e1018f806db5689dee78728ccb8374aea741
ExtUtils::Constant cpan/ExtUtils-Constant/t/Constant.t 165e9c7132b003fd192d32a737b0f51f9ba4999e
Filter::Util::Call pod/perlfilter.pod d1e217d0bc6083755b9017050b8724472c58275a
Locale::Maketext::Simple cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm 57ed38905791a17c150210cd6f42ead22a7707b6
MIME::Base64 cpan/MIME-Base64/Base64.xs ad617fe2d01932c35b92defa26d40aba601a95a8
MIME::Base64 cpan/MIME-Base64/lib/MIME/Base64.pm 18e38d197c7c83f96b24f48bef514e93908e6a82
-Pod::Perldoc cpan/Pod-Perldoc/lib/Pod/Perldoc.pm 582be34c077c9ff44d99914724a0cc2140bcd48c
+Pod::Perldoc cpan/Pod-Perldoc/lib/Pod/Perldoc.pm d97aa26b722e6e3120b19ee0d7cf9af04dfdfb7f
Test::Harness cpan/Test-Harness/t/harness.t 38b13cfc479d37d91c104b97dd364a74dfde0f2f
Time::Piece cpan/Time-Piece/Piece.pm 8cec8b66183ceddb9bf2b6af35dcdd345bc9adfa
Time::Piece cpan/Time-Piece/Piece.xs 543152540ee17788a638b2c5746b86c3d04401d1
Win32API::File cpan/Win32API-File/File.xs beb870fed4490d2faa547b4a8576b8d64d1d27c5
version cpan/version/lib/version.pm a963b513cf812bd7f4d28b3422efd9904e70a34c
version cpan/version/t/07locale.t b1cceee71544ce6b6c926d06656a52aabbfe8abf
+version vutil.c 8f1e65848649b125b6e2d3a91d54f5e147d12e41
# Exceptions that are found in dual-life bin dirs but aren't
# installed by default; some occur only during testing:
my $not_installed = qr{^(?:
+ \.\./cpan/Archive-Tar/bin/ptar.*
+ |
+ \.\./cpan/JSON-PP/bin/json_pp
+ |
+ \.\./cpan/IO-Compress/bin/zipdetails
+ |
\.\./cpan/Encode/bin/u(?:cm(?:2table|lint|sort)|nidump)
|
\.\./cpan/Module-(?:Metadata|Build)
skip_all( "VOS combines the read and execute permission bits." );
}
+if ( $^O eq "openbsd" ) {
+ skip_all( "OpenBSD CVS src tree execute permission bits do not match Perl distribution." );
+}
+
if ( $Config{usecrosscompile} ) {
skip_all( "Not all files are available during cross-compilation" );
}
sub run_tests {
- watchdog((($::running_as_thread && $::running_as_thread) ? 150 : 225));
+ watchdog((($::running_as_thread && $::running_as_thread) ? 150 : 540));
{
# [perl #120446]
=cut
*/
+#if defined(__m88k__)
+/* XXX workaround: m88k gcc3 produces wrong code with NATIVE_TO_UNI() */
+#define UVCHR_IS_INVARIANT(cp) (OFFUNI_IS_INVARIANT(cp))
+#else /* the original one */
#define UVCHR_IS_INVARIANT(cp) (OFFUNI_IS_INVARIANT(NATIVE_TO_UNI(cp)))
+#endif
/* This defines the 1-bits that are to be in the first byte of a multi-byte
* UTF-8 encoded character that mark it as a start byte and give the number of
U32
Perl_seed(pTHX)
{
+#if defined(__OpenBSD__)
+ return arc4random();
+#else
/*
* This is really just a quick hack which grabs various garbage
* values. It really should be a real hash algorithm which
u += SEED_C5 * ptr_hash(ptruv);
#endif
return u;
+#endif
}
void
utils/h2ph
utils/h2xs
utils/instmodsh
-utils/json_pp
utils/libnetcfg
-utils/perlbug # link = utils/perlthanks
+utils/perlbug
utils/perldoc
utils/perlivp
utils/piconv
utils/pl2pm
utils/pod2html
utils/prove
-utils/ptar
-utils/ptardiff
-utils/ptargrep
-utils/shasum
utils/splain
utils/streamzip
utils/xsubpp
-utils/zipdetails
# Files to be built with variable substitution after miniperl is
# available. Dependencies handled manually below (for now).
-pl = corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL json_pp.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL ptar.PL ptardiff.PL ptargrep.PL shasum.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL encguess.PL xsubpp.PL pod2html.PL zipdetails.PL streamzip.PL
-plextract = corelist cpan h2ph h2xs instmodsh json_pp perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep shasum splain libnetcfg piconv enc2xs encguess xsubpp pod2html zipdetails streamzip
-plextractexe = ./corelist ./cpan ./h2ph ./h2xs ./json_pp ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./shasum ./splain ./libnetcfg ./piconv ./enc2xs ./encguess ./xsubpp ./pod2html ./zipdetails ./streamzip
+pl = corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL encguess.PL xsubpp.PL pod2html.PL zipdetails.PL streamzip.PL
+plextract = corelist cpan h2ph h2xs instmodsh perlbug perldoc perlivp pl2pm prove splain libnetcfg piconv enc2xs encguess xsubpp pod2html zipdetails streamzip
+plextractexe = ./corelist ./cpan ./h2ph ./h2xs ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./splain ./libnetcfg ./piconv ./enc2xs ./encguess xsubpp.PL ./pod2html ./zipdetails ./streamzip
all: $(plextract)
instmodsh: instmodsh.PL ../config.sh
-json_pp: json_pp.PL ../config.sh
-
perlbug: perlbug.PL ../config.sh ../patchlevel.h
perldoc: perldoc.PL ../config.sh
prove: prove.PL ../config.sh
-ptar: ptar.PL ../config.sh
-
-ptardiff: ptardiff.PL ../config.sh
-
-ptargrep: ptargrep.PL ../config.sh
-
pl2pm: pl2pm.PL ../config.sh
-shasum: shasum.PL ../config.sh
-
splain: splain.PL ../config.sh ../lib/diagnostics.pm
libnetcfg: libnetcfg.PL ../config.sh
xsubpp: xsubpp.PL ../config.sh
-zipdetails: zipdetails.PL ../config.sh
-
streamzip: streamzip.PL ../config.sh
pod2html: pod2html.PL ../config.sh ../ext/Pod-Html/bin/pod2html
$in =~ s/\?\?</{/g; # | ??<| {|
$in =~ s/\?\?>/}/g; # | ??>| }|
}
- if ($in =~ /^\#ifdef __LANGUAGE_PASCAL__/) {
+ if ($in =~ s/^\#ifdef __LANGUAGE_PASCAL__//) {
# Tru64 disassembler.h evilness: mixed C and Pascal.
while (<IN>) {
last if /^\#endif/;
$in = "";
next READ;
}
- if ($in =~ /^extern inline / && # Inlined assembler.
- $^O eq 'linux' && $file =~ m!(?:^|/)asm/[^/]+\.h$!) {
+ # Skip inlined functions in headers
+ if ($in =~ s/^(extern|static) (__inline__|inline) .*[^;]\s*$//) {
while (<IN>) {
last if /^}/;
}
authors and maintainers of perl.
If you wish to generate a bug report, please run it without the -T flag
-(or run the program perlbug rather than perlthanks)
EOF
} else {
paraprint <<"EOF";
This program provides an easy way to generate a bug report for the core
perl distribution (along with tests or patches). To send a thank-you
-note to $thanksaddress instead of a bug report, please run 'perlthanks'.
+note to $thanksaddress instead of a bug report, please use the -T flag.
The GitHub issue tracker at https://github.com/Perl/perl5/issues is the
best place to submit your report so it can be tracked and resolved.
B<perlbug> S<[ B<-v> ]> S<[ B<-r> I<returnaddress> ]>
S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]>
-B<perlthanks>
-
=head1 DESCRIPTION
=item Can you use C<perlbug> to submit a thank-you note?
-Yes, you can do this by either using the C<-T> option, or by invoking
-the program as C<perlthanks>. Thank-you notes are good. It makes people
+Yes, you can do this by using the C<-T> option.
+Thank-you notes are good. It makes people
smile.
=back
/* may get too much accuracy */
char tbuf[64];
+#ifdef __vax__
+ SV *sv = SvNVX(ver) > 10e37 ? newSV(64) : 0;
+#else
SV *sv = SvNVX(ver) > 10e50 ? newSV(64) : 0;
+#endif
char *buf;
#if PERL_VERSION_GE(5,19,0)
-if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
-if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
-if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
+ -if exist $(LIBDIR)\OpenBSD rmdir /s /q $(LIBDIR)\OpenBSD
-if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
-if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
-if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
-if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
-if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
-if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
+ -if exist $(LIBDIR)\OpenBSD rmdir /s /q $(LIBDIR)\OpenBSD
-if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
-if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
-if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl