Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
89e2a955
Commit
89e2a955
authored
Jul 15, 2006
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some pgcrypto portability issues, per Marko Kreen.
parent
9b556322
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
22 deletions
+11
-22
contrib/pgcrypto/imath.c
contrib/pgcrypto/imath.c
+2
-2
contrib/pgcrypto/imath.h
contrib/pgcrypto/imath.h
+9
-20
No files found.
contrib/pgcrypto/imath.c
View file @
89e2a955
...
...
@@ -3,7 +3,7 @@
Name: imath.c
Purpose: Arbitrary precision integer arithmetic routines.
Author: M. J. Fromberger <http://www.dartmouth.edu/~sting/>
Info: $Id: imath.c,v 1.
1 2006/07/13 04:15:24 neilc
Exp $
Info: $Id: imath.c,v 1.
2 2006/07/15 15:27:14 tgl
Exp $
Copyright (C) 2002 Michael J. Fromberger, All Rights Reserved.
...
...
@@ -33,7 +33,7 @@
#include "imath.h"
#undef assert
#define assert(TEST)
#define assert(TEST)
Assert(TEST)
#define TRACEABLE_CLAMP 0
#define TRACEABLE_FREE 0
...
...
contrib/pgcrypto/imath.h
View file @
89e2a955
...
...
@@ -2,7 +2,7 @@
Name: imath.h
Purpose: Arbitrary precision integer arithmetic routines.
Author: M. J. Fromberger <http://www.dartmouth.edu/~sting/>
Info: $Id: imath.h,v 1.
1 2006/07/13 04:15:24 neilc
Exp $
Info: $Id: imath.h,v 1.
2 2006/07/15 15:27:14 tgl
Exp $
Copyright (C) 2002 Michael J. Fromberger, All Rights Reserved.
...
...
@@ -39,11 +39,15 @@ typedef unsigned char mp_sign;
typedef
unsigned
int
mp_size
;
typedef
int
mp_result
;
#ifdef USE_LONG_LONG
typedef
unsigned
int
mp_digit
;
typedef
unsigned
long
long
mp_word
;
typedef
uint32
mp_digit
;
typedef
uint64
mp_word
;
#define MP_DIGIT_MAX 0xFFFFFFFFULL
#define MP_WORD_MAX 0xFFFFFFFFFFFFFFFFULL
#else
typedef
unsigned
short
mp_digit
;
typedef
unsigned
int
mp_word
;
typedef
uint16
mp_digit
;
typedef
uint32
mp_word
;
#define MP_DIGIT_MAX 0xFFFFUL
#define MP_WORD_MAX 0xFFFFFFFFUL
#endif
typedef
struct
mpz
{
...
...
@@ -70,21 +74,6 @@ extern const mp_result MP_BADARG;
#define MP_DIGIT_BIT (sizeof(mp_digit) * CHAR_BIT)
#define MP_WORD_BIT (sizeof(mp_word) * CHAR_BIT)
#ifdef USE_LONG_LONG
# ifndef ULONG_LONG_MAX
# ifdef ULLONG_MAX
# define ULONG_LONG_MAX ULLONG_MAX
# else
# error "Maximum value of unsigned long long not defined!"
# endif
# endif
# define MP_DIGIT_MAX (ULONG_MAX * 1ULL)
# define MP_WORD_MAX ULONG_LONG_MAX
#else
# define MP_DIGIT_MAX (USHRT_MAX * 1UL)
# define MP_WORD_MAX (UINT_MAX * 1UL)
#endif
#define MP_MIN_RADIX 2
#define MP_MAX_RADIX 36
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment