15 years agominiperl-ification of ext/utils/make_ext
Steffen Mueller [Sat, 10 Jan 2009 18:34:57 +0000]
miniperl-ification of ext/utils/make_ext

15 years agomove ext/utils/make_ext to ext/utils/make_ext.pl
Steffen Mueller [Sat, 10 Jan 2009 16:06:22 +0000]
move ext/utils/make_ext to ext/utils/make_ext.pl

15 years agoTypo fix in pod/perldiag.pod
Abigail [Sat, 10 Jan 2009 11:15:05 +0000]
Typo fix in pod/perldiag.pod

15 years ago'VMS support for Unix and extended file specifications' (PathTools RT #42153)
John Malmberg [Fri, 9 Jan 2009 20:20:21 +0000]
'VMS support for Unix and extended file specifications' (PathTools RT #42153)

15 years agoMerge changes from PathTools: 'Update to support VMS in Unix compatible mode and...
John Malmberg [Fri, 9 Jan 2009 20:09:36 +0000]
Merge changes from PathTools: 'Update to support VMS in Unix compatible mode and/or file names using extended character sets' (PathTools RT #42154)

15 years agoBe consistent in writing deobfuscator
Abigail [Fri, 9 Jan 2009 19:01:06 +0000]
Be consistent in writing deobfuscator

15 years agoFix typo
Abigail [Fri, 9 Jan 2009 18:57:27 +0000]
Fix typo

15 years agoCapitalize "latin"
Abigail [Fri, 9 Jan 2009 18:38:15 +0000]
Capitalize "latin"

15 years agofake_localtime_r and fake_gmtime_r may need thread context.
Craig A. Berry [Fri, 9 Jan 2009 18:55:45 +0000]
fake_localtime_r and fake_gmtime_r may need thread context.

They definitely need it on VMS.

15 years agosimple_trnlnm needs an actual length as its last argument.
Craig A. Berry [Fri, 9 Jan 2009 18:51:31 +0000]
simple_trnlnm needs an actual length as its last argument.

Plus the length of sys$posix_root was miscalculated.

Plus an argument reversal when translating the TMP logical.

15 years agoTypo fix in pod/perl5110delta.pod
Abigail [Fri, 9 Jan 2009 18:01:10 +0000]
Typo fix in pod/perl5110delta.pod

15 years agoFix typo in pod/perltodo.pod
Abigail [Fri, 9 Jan 2009 16:38:06 +0000]
Fix typo in pod/perltodo.pod

15 years ago-Be consistent with kb/kB.
Abigail [Fri, 9 Jan 2009 16:15:13 +0000]
-Be consistent with kb/kB.
-Mention Abigail in last section.

15 years agoMerge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
Abigail [Fri, 9 Jan 2009 16:01:38 +0000]
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead

15 years agoFixed some spelling errors
Abigail [Fri, 9 Jan 2009 16:00:37 +0000]
Fixed some spelling errors

15 years agoPrefer tabs over spaces in MANIFEST
Vincent Pit [Fri, 9 Jan 2009 15:45:06 +0000]
Prefer tabs over spaces in MANIFEST

15 years agoChange the link to the sort pragma to be more clear.
Abigail [Fri, 9 Jan 2009 13:09:24 +0000]
Change the link to the sort pragma to be more clear.
This fixes #62136, reported by rrt@sc3d.org.

15 years agovms.c backslash efs and long name fixes
John Malmberg [Thu, 8 Jan 2009 22:37:19 +0000]
vms.c backslash efs and long name fixes

Message-id: <496552AF.7040702@gmail.com>

This fixes the support for the backslash in a file name as it shows up
in the ExtUtils tests.

Also the flag for rename to work on efs file specifications was
incorrectly the bit number instead of the mask value.

15 years agoext/File/Gob/t/basic.t, ext/POSIX/t/posix.t vms fixes
John Malmberg [Sun, 4 Jan 2009 19:06:54 +0000]
ext/File/Gob/t/basic.t, ext/POSIX/t/posix.t vms fixes

Message-id: <496108CE.1060704@gmail.com>

The tests ext/File/Glob/t/basic.t and ext/POSIX/t/posix.t need to know
if VMS is in the UNIX compatible mode.

15 years agolib/blib.t, lib/h2xs.t patches for VMS
John Malmberg [Sun, 4 Jan 2009 19:13:45 +0000]
lib/blib.t, lib/h2xs.t patches for VMS

Message-id: <49610A69.3020908@gmail.com>

The tests lib/blib.t and lib/h2xs.t need fixes to know when VMS is in
the UNIX report mode.

15 years agomkppport using catfile for catdir
John Malmberg [Sun, 4 Jan 2009 18:45:11 +0000]
mkppport using catfile for catdir

Message-id: <496103B7.1000308@gmail.com>

15 years agot/op/chdir.t, t/op/defins.t on VMS
John Malmberg [Sun, 4 Jan 2009 18:58:03 +0000]
t/op/chdir.t, t/op/defins.t on VMS

Message-id: <496106BB.9020102@gmail.com>

The test t/op/chdir.t needs to expect that returned dir could be in
either case or in VMS or UNIX formst.

The test t/op/defins.t needs to know of VMS is dropping dots on
filenames when VMS is in the UNIX REPORT mode.

15 years agot/x2p/s2p.t fix for VMS in UNIX mode
John Malmberg [Sun, 4 Jan 2009 20:48:08 +0000]
t/x2p/s2p.t fix for VMS in UNIX mode

Message-id: <49612088.4010005@gmail.com>

When VMS is in UNIX mode, conversions from UNIX specifications to VMS
can result in a trailing '.' which needs to be removed if the intent is
to default the extension.

15 years agoFixed spelling of 'uncondtional', as reported by Ronald J Kimball
Abigail [Thu, 8 Jan 2009 16:31:17 +0000]
Fixed spelling of 'uncondtional', as reported by Ronald J Kimball
in 20090108160007.GA85010@penkwe.pair.com.

15 years agoMake File::Copy detect Unix compatibility mode on VMS.
John Malmberg [Sun, 4 Jan 2009 19:45:24 +0000]
Make File::Copy detect Unix compatibility mode on VMS.

Message-id: <496111D4.8030007@gmail.com>

This is needed as part of Perl support for VMS in UNIX or using the
extended character set.

Patch amended to only check for the VMS::Feature module on VMS.

15 years agoUse a slightly more paranoid regex
Rafael Garcia-Suarez [Wed, 7 Jan 2009 17:49:19 +0000]
Use a slightly more paranoid regex

15 years agosort MANIFEST
David Golden [Wed, 7 Jan 2009 20:48:43 +0000]
sort MANIFEST

15 years agoCPAN.pm on CPAN is considered upstream
Steffen Mueller [Wed, 7 Jan 2009 14:38:16 +0000]
CPAN.pm on CPAN is considered upstream

15 years agoVMS feature logical name fixes
John Malmberg [Wed, 7 Jan 2009 04:52:49 +0000]
VMS feature logical name fixes

15 years agoVMS thread context fixes
John Malmberg [Wed, 7 Jan 2009 04:21:17 +0000]
VMS thread context fixes

15 years agoMerge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
Abigail [Tue, 6 Jan 2009 23:04:31 +0000]
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead

15 years agoAdd David Golden (DAGOLDEN) to AUTHORS
David Golden [Tue, 6 Jan 2009 22:45:37 +0000]
Add David Golden (DAGOLDEN) to AUTHORS

15 years agoMerge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
Abigail [Tue, 6 Jan 2009 16:51:08 +0000]
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead

15 years agoUpdated the 'some statistics for the other subdirectories' to include
Abigail [Tue, 6 Jan 2009 16:49:16 +0000]
Updated the 'some statistics for the other subdirectories' to include
data for the 5.6.0 to 5.10.0 releases.

15 years agoAvoid wrapping long lines when displaying as man page
Abigail [Tue, 6 Jan 2009 16:13:03 +0000]
Avoid wrapping long lines when displaying as man page

15 years agoSync with Filter::Simple 0.84 which has a CPAN-relevant fix in the Makefile.PL only
Steffen Mueller [Tue, 6 Jan 2009 12:06:58 +0000]
Sync with Filter::Simple 0.84 which has a CPAN-relevant fix in the Makefile.PL only

15 years agoCalculated patch sizes for the modern era.
Abigail [Tue, 6 Jan 2009 15:07:05 +0000]
Calculated patch sizes for the modern era.

15 years agoUpdate data for 5.7.3 release
Abigail [Tue, 6 Jan 2009 14:31:35 +0000]
Update data for 5.7.3 release

15 years agoRemove duplicate entry
Abigail [Tue, 6 Jan 2009 13:45:46 +0000]
Remove duplicate entry

15 years agoAdded 21st century data to 'SELECTED RELEASE SIZES'
Abigail [Tue, 6 Jan 2009 12:03:31 +0000]
Added 21st century data to 'SELECTED RELEASE SIZES'

15 years agoRequire a space or a newline after a "#line XXX" directive
Rafael Garcia-Suarez [Mon, 5 Jan 2009 17:14:01 +0000]
Require a space or a newline after a "#line XXX" directive

This fixes bug [perl #59170] Typo: bad regex for #line directive in perlsyn.

15 years agoAdd a --checkout / -c flag to git-find-p4-change
Rafael Garcia-Suarez [Tue, 6 Jan 2009 08:59:35 +0000]
Add a --checkout / -c flag to git-find-p4-change

Remove the now obsolete switch_to_perforce_id.pl

15 years agoRemove a couple of p4-specific utilities
Rafael Garcia-Suarez [Tue, 6 Jan 2009 08:49:02 +0000]
Remove a couple of p4-specific utilities

15 years agoDelete the largely obsolete Porting/patching.pod
Rafael Garcia-Suarez [Tue, 6 Jan 2009 08:44:55 +0000]
Delete the largely obsolete Porting/patching.pod

(but move some good advice in there to the perlrepository man page)

15 years agoUse git instead of p4 for the --opened option of Porting/Maintainers
Rafael Garcia-Suarez [Tue, 6 Jan 2009 08:11:58 +0000]
Use git instead of p4 for the --opened option of Porting/Maintainers

15 years agoRemove notes about -v from perltodo
Rafael Garcia-Suarez [Tue, 6 Jan 2009 08:01:37 +0000]
Remove notes about -v from perltodo

15 years agoMove .bat gitignores with their unix counterparts
Rafael Garcia-Suarez [Tue, 6 Jan 2009 08:25:03 +0000]
Move .bat gitignores with their unix counterparts

Remove also redundant ignores for produced files in x2p

15 years agoMerge t/.gitignore in main git ignore file
Rafael Garcia-Suarez [Tue, 6 Jan 2009 08:20:19 +0000]
Merge t/.gitignore in main git ignore file

15 years agoOn VMS, run make_patchnum.pl, not make_patchnum.com
Craig A. Berry [Tue, 6 Jan 2009 04:36:55 +0000]
On VMS, run make_patchnum.pl, not make_patchnum.com

15 years agoAdd lib/CORE/ to .gitignore (needed on Windows)
Max Maischein [Mon, 5 Jan 2009 13:22:54 +0000]
Add lib/CORE/ to .gitignore (needed on Windows)

C:\Projekte\bleadperl-git\win32>dmake && git status
[...]
nothing to commit (working directory clean)
C:\Projekte\bleadperl-git\win32>

15 years agoUpdate AutoLoader to 5.68.
Steffen Mueller [Mon, 5 Jan 2009 16:04:48 +0000]
Update AutoLoader to 5.68.

Fixes by John Malmberg for running tests when VMS is a UNIX compatible mode.

15 years agoEmit less PERL_ARGS_ASSERT_* macros
Rafael Garcia-Suarez [Mon, 5 Jan 2009 13:36:12 +0000]
Emit less PERL_ARGS_ASSERT_* macros

15 years ago"rm -f" better in "make clean" targets
Rafael Garcia-Suarez [Mon, 5 Jan 2009 13:11:00 +0000]
"rm -f" better in "make clean" targets

It always succeeds and does not warn.

15 years agoUpgrade to Time::HiRes 1.9719
Rafael Garcia-Suarez [Mon, 5 Jan 2009 09:53:40 +0000]
Upgrade to Time::HiRes 1.9719

15 years agoBump two module versions after Haiku port
Rafael Garcia-Suarez [Mon, 5 Jan 2009 09:47:45 +0000]
Bump two module versions after Haiku port

CPANPLUS and Module::Build
(see df00ff3beeb297b9622f8acbed9c80d320c87580)

15 years agoAdjustments to POSIX for the Haiku port
Ingo Weinhold [Mon, 5 Jan 2009 09:29:56 +0000]
Adjustments to POSIX for the Haiku port

Message-Id: <20081029022544.413.1@knochen-vm.localdomain>

  I re-introduced the use of the WMUNGE() macro, which was
  (accidentally?) removed after 5.10.0. The macro is still a hack. As my
  added comment explains the use of the OS's W*() macros in this context
  is simply not correct and should probably better be fixed.

15 years agoUpdate copyright year to 2009.
Nicholas Clark [Mon, 5 Jan 2009 07:18:54 +0000]
Update copyright year to 2009.

15 years agoCorrect vim modeline
Rafael Garcia-Suarez [Mon, 5 Jan 2009 07:12:02 +0000]
Correct vim modeline

- ts=4 is evil
- use same settings as in everywhere else in the core sources

15 years agoTypo fix in stock PERL_PATCHNUM definition
Rafael Garcia-Suarez [Mon, 5 Jan 2009 07:06:16 +0000]
Typo fix in stock PERL_PATCHNUM definition

15 years agoUNKNOWN should not have been a bareword at e9be352
Craig A. Berry [Mon, 5 Jan 2009 04:47:45 +0000]
UNKNOWN should not have been a bareword at e9be352

15 years agoVMS posix exit fixes
John Malmberg [Sun, 4 Jan 2009 18:42:07 +0000]
VMS posix exit fixes

perl.h and perl.c need further fixes to get VMS to return the expected
POSIX exit codes when that is enabled.

This fix gets the correct numbers except for the SIGTERM case, which
will need some more work.

It also gets the posix exit code to set an error severity on a fatal
exit so that DCL and MMS/MMK or VMS native programs can easily detect a
script failure.

This patch does not address an issue in vms.c where the feature logicals
may not be correctly read.  That will follow in a future patch.

The tests have been adjusted to detect when VMS is in the POSIX exit
mode and perform properly.

-John
wb8tyw@gmail.com
--
My qsl.net e-mail address is temporarily out of order.

15 years agoMake time64.c's internal copy function names more readable and VMS-friendly.
Craig A. Berry [Mon, 5 Jan 2009 02:58:49 +0000]
Make time64.c's internal copy function names more readable and VMS-friendly.

15 years agoeliminate double stringification, the defines as done in git_version.h are already...
Yves Orton [Sun, 4 Jan 2009 23:45:02 +0000]
eliminate double stringification, the defines as done in git_version.h are already quoted

15 years agoadd better pod and headers, and clean up some whitespace issues in the previous patches
Yves Orton [Sun, 4 Jan 2009 22:55:58 +0000]
add better pod and headers, and clean up some whitespace issues in the previous patches

15 years agoeliminate make_patchnum.sh, and make the build process use make_patchnum.pl instead
Yves Orton [Sun, 4 Jan 2009 21:41:05 +0000]
eliminate make_patchnum.sh, and make the build process use make_patchnum.pl instead

15 years agothis seems to work, still not using the perl version, but this works the way it would
Yves Orton [Sun, 4 Jan 2009 18:12:53 +0000]
this seems to work, still not using the perl version, but this works the way it would

15 years agodoesnt quite work yet, but provisional steps towards using miniperl to do the git...
Yves Orton [Sun, 4 Jan 2009 16:39:25 +0000]
doesnt quite work yet, but provisional steps towards using miniperl to do the git stuff

15 years agoAdded stuff so that perl.exe now builds clean with regards to 'git status'
Max Maischein [Sun, 4 Jan 2009 15:23:16 +0000]
Added stuff so that perl.exe now builds clean with regards to 'git status'

15 years agoAdded config.w32 to win32/.gitignore
Max Maischein [Sun, 4 Jan 2009 14:57:07 +0000]
Added config.w32 to win32/.gitignore

15 years agoAdded win32/.gitignore to ignore stuff from the Windows build
Max Maischein [Sun, 4 Jan 2009 14:54:41 +0000]
Added win32/.gitignore to ignore stuff from the Windows build

15 years agoAdd more documentation to make_patchnum.pl
Max Maischein [Sat, 3 Jan 2009 19:32:20 +0000]
Add more documentation to make_patchnum.pl

15 years agoeliminate .patchnum and related infrastrcuture from *nix based build process
Yves Orton [Sun, 4 Jan 2009 15:48:27 +0000]
eliminate .patchnum and related infrastrcuture from *nix based build process

Rename the old "unpushed.h" to "git_version.h" and make it hold the defines that used to come from cflags magic

15 years agoMessage about making make_patchnum.pl Perl 5.005 compatible (A test for pushing)
Max Maischein [Sat, 3 Jan 2009 19:21:22 +0000]
Message about making make_patchnum.pl Perl 5.005 compatible (A test for pushing)

15 years agomove subs from bottom to top, and add a vim and shebang line
Yves Orton [Thu, 1 Jan 2009 17:19:33 +0000]
move subs from bottom to top, and add a vim and shebang line

15 years agovarious changes
Yves Orton [Thu, 1 Jan 2009 17:05:53 +0000]
various changes

15 years agoAlmost a literal conversion of make_patchnum.sh
Kenichi Ishigaki [Thu, 1 Jan 2009 16:41:06 +0000]
Almost a literal conversion of make_patchnum.sh

15 years agoprepare for refactoring to perl
Yves Orton [Thu, 1 Jan 2009 16:37:52 +0000]
prepare for refactoring to perl

15 years agomodified make_patchnum.sh script
Yves Orton [Thu, 1 Jan 2009 16:36:35 +0000]
modified make_patchnum.sh script

15 years agobump ExtUtils/MM.pm version number after change 34630 (add Haiku port)
David Mitchell [Sun, 4 Jan 2009 21:41:17 +0000]
bump ExtUtils/MM.pm version number after change 34630 (add Haiku port)

15 years agobump Errno version number after change 34630 (add Haiku port)
David Mitchell [Sun, 4 Jan 2009 20:54:56 +0000]
bump Errno version number after change 34630 (add Haiku port)

15 years agoAnother regexp failure with utf8-flagged string and byte-flagged pattern (reminder)
Slaven Rezic [Sun, 4 Jan 2009 16:28:33 +0000]
Another regexp failure with utf8-flagged string and byte-flagged pattern (reminder)

Date: 17 Nov 2007 16:29:29 +0100
Message-ID: <87r6iohova.fsf@biokovo-amd64.herceg.de>

15 years agomake Dumper.xs work with 5.10.x
David Mitchell [Sun, 4 Jan 2009 00:19:00 +0000]
make Dumper.xs work with 5.10.x

15 years agoRemove duplicate return in S_mro_get_linear_isa_c3() accidentally added by
Nicholas Clark [Sat, 3 Jan 2009 18:06:25 +0000]
Remove duplicate return in S_mro_get_linear_isa_c3() accidentally added by
fa60396f123333e92849ecaecffb9252458d6678

15 years agoMerge branch 'blead' of camel:/gitroot/perl into blead
Rafael Garcia-Suarez [Sat, 3 Jan 2009 18:12:18 +0000]
Merge branch 'blead' of camel:/gitroot/perl into blead

15 years agoChanging get_isa_hash() to static means that it needs to be wrapped in
Nicholas Clark [Sat, 3 Jan 2009 18:04:17 +0000]
Changing get_isa_hash() to static means that it needs to be wrapped in
an #if defined(PERL_IN_UNIVERSAL_C).

15 years agoMerge branch 'schwern/y2038' into blead
Rafael Garcia-Suarez [Sat, 3 Jan 2009 17:55:29 +0000]
Merge branch 'schwern/y2038' into blead

Conflicts:

lib/Time/Local.pm
lib/Time/Local.t
reentr.h

15 years agoUpdate from y2038
Michael G. Schwern [Tue, 7 Oct 2008 20:17:10 +0000]
Update from y2038

Fix trailing #endif.

Remove C99 macro.

15 years agoApply bleadperl@34470 by hand while waiting for the git master to catch up.
Michael G. Schwern [Tue, 7 Oct 2008 13:20:46 +0000]
Apply bleadperl@34470 by hand while waiting for the git master to catch up.

15 years agoTurn quads on in the VC configurations.
Michael G. Schwern [Sat, 4 Oct 2008 22:47:50 +0000]
Turn quads on in the VC configurations.

15 years agoUpdate from y2038.
Michael G. Schwern [Sat, 4 Oct 2008 22:24:54 +0000]
Update from y2038.

Add trace code.

Fix implied negative time in localtie64_r().  This fixes Windows.

Put in some more tests around small negative and positive times to
try and catch the above.

Explain the loss of accuracy due to use of doubles in perlport.

15 years agoUpdate from y2038
Michael G. Schwern [Sat, 4 Oct 2008 19:12:50 +0000]
Update from y2038

Configuration information split out into its own header.

Added files to MANIFEST

Turn off USE_SYSTEM_GMTIME, ours is more reliable and possibly faster.

Fix type warnings found on Windows.

Remove unnecessary use of floor() and ceil().

15 years agoFix gmtime() and localtime() so they can pop times larger than 2**55 off the stack...
Michael G. Schwern [Fri, 3 Oct 2008 20:05:10 +0000]
Fix gmtime() and localtime() so they can pop times larger than 2**55 off the stack. Neither POPn nor SvNVx work when casted to (Time64_T). Had to use a double and then cast.

Also POPq uses an SvIV so that's no good.

This causes an unfortunate loss in accuracy near 2**63 up to 8 minutes.

%lld is broken, it uses regular integers.  Need to use doubles and %.0f
instead, again losing accuracy.

Now things can go out to 2**63-512.

15 years agoWe are no longer bound by the limits of the tm struct.
Michael G. Schwern [Fri, 3 Oct 2008 20:04:53 +0000]
We are no longer bound by the limits of the tm struct.

15 years agoFix pulling a large time off the stack by using a real double. What I really need...
Michael G. Schwern [Thu, 2 Oct 2008 21:30:26 +0000]
Fix pulling a large time off the stack by using a real double. What I really need is SvQV.

Fix list context with large years.

List context can now go to 2**63-513.  I don't know why that's not 2**63-1
but I'll take it.  Maybe double imprecision.

Scalar context with large years still busted.  It appears to be something
inside Perl_newSVpvf().

15 years agoRemove the AIX work around code. Instead it should just set it's LOCALTIME_MAX to...
Michael G. Schwern [Thu, 2 Oct 2008 20:18:54 +0000]
Remove the AIX work around code. Instead it should just set it's LOCALTIME_MAX to 0x7fff573e.

Update from y2038.

Use the new TM64 struct so years can go out past y2**31

Defines a Year type to avoid converting years to ints.

Remove the TIMGM work around code, using timegm64() is fine and it
saves us from having to convert from TM to tm.

Make functions private with static rather than the _foo convention.

Even faster for distant dates.

15 years agoRename localtime64.[ch] to time64.[ch] to mirror change in y2038, and the file isn...
Michael G. Schwern [Mon, 29 Sep 2008 19:55:17 +0000]
Rename localtime64.[ch] to time64.[ch] to mirror change in y2038, and the file isn't about just localtime() anymore.

15 years agoEverything should now work with negative times, so let's pull out all the skips from...
Michael G. Schwern [Mon, 29 Sep 2008 16:07:29 +0000]
Everything should now work with negative times, so let's pull out all the skips from the tests.

15 years agoUpdate some docs to explain that Perl no longer has a 2038 bug.
Michael G. Schwern [Mon, 29 Sep 2008 15:44:44 +0000]
Update some docs to explain that Perl no longer has a 2038 bug.

15 years agoUpdate from y2038
Michael G. Schwern [Mon, 29 Sep 2008 15:05:17 +0000]
Update from y2038

Work around a system that doesn't have gm/localtime_r().  This replaces Perl's
own gm/localtime() wrapper which couldn't be called outside a PP anyway
because it needs my_perl.

15 years agoUpdate from y2038
Michael G. Schwern [Sat, 27 Sep 2008 19:43:22 +0000]
Update from y2038

Fix a bug in the code to use the system gmtime, it was using localtime.

Define a Year type to avoid mixing years and ints unintentionally.

Do some explicit casting to prop up compilers that don't understand
X % Y can never be larger than Y.