Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitry Baryshkov
nettle
Commits
33304507
Commit
33304507
authored
12 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Make gmp-glue.c work in the case that GMP does define mpz_limbs_read and friends.
parent
ae944d88
Branches
ecc-support
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+2
-0
2 additions, 0 deletions
ChangeLog
gmp-glue.c
+5
-2
5 additions, 2 deletions
gmp-glue.c
with
7 additions
and
2 deletions
ChangeLog
+
2
−
0
View file @
33304507
2013-03-07 Niels Möller <nisse@lysator.liu.se>
* gmp-glue.c (mpz_limbs_cmp): Don't use PTR and SIZ macros.
* Makefile.in (aesdata, desdata, twofishdata, shadata, gcmdata)
(eccdata): Arrange for compiling these programs for running on the
build system, also when cross compiling everything else.
...
...
This diff is collapsed.
Click to expand it.
gmp-glue.c
+
5
−
2
View file @
33304507
...
...
@@ -111,7 +111,10 @@ mpz_roinit_n (mpz_ptr x, const mp_limb_t *xp, mp_size_t xs)
int
mpz_limbs_cmp
(
mpz_srcptr
a
,
const
mp_limb_t
*
bp
,
mp_size_t
bn
)
{
mp_size_t
an
=
SIZ
(
a
);
mp_size_t
an
=
mpz_size
(
a
);
assert
(
mpz_sgn
(
a
)
>=
0
);
assert
(
bn
>=
0
);
if
(
an
<
bn
)
return
-
1
;
if
(
an
>
bn
)
...
...
@@ -119,7 +122,7 @@ mpz_limbs_cmp (mpz_srcptr a, const mp_limb_t *bp, mp_size_t bn)
if
(
an
==
0
)
return
0
;
return
mpn_cmp
(
PTR
(
a
),
bp
,
an
);
return
mpn_cmp
(
mpz_limbs_read
(
a
),
bp
,
an
);
}
/* Get a pointer to an n limb area, for read-only operation. n must be
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment