1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Fix some portability problems (get it to compile, at least, on HP's cc)

This commit is contained in:
Tom Lane
2001-10-15 19:15:18 +00:00
parent aa6970efff
commit 77f27d5ec3
5 changed files with 34 additions and 41 deletions

View File

@ -30,7 +30,8 @@
* hadn't seen his code).
*/
#include <postgres.h>
#include "postgres.h"
#include "px-crypt.h"
#define __set_errno(v)
@ -38,13 +39,6 @@
#define __set_errno(val) errno = (val)
#endif
#undef __CONST
#ifdef __GNUC__
#define __CONST __const
#else
#define __CONST
#endif
#ifdef __i386__
#define BF_ASM 0 /* 1 */
#define BF_SCALE 1
@ -373,7 +367,7 @@ static unsigned char BF_atoi64[0x60] = {
(dst) = tmp; \
}
static int BF_decode(BF_word *dst, __CONST char *src, int size)
static int BF_decode(BF_word *dst, const char *src, int size)
{
unsigned char *dptr = (unsigned char *)dst;
unsigned char *end = dptr + size;
@ -397,7 +391,7 @@ static int BF_decode(BF_word *dst, __CONST char *src, int size)
return 0;
}
static void BF_encode(char *dst, __CONST BF_word *src, int size)
static void BF_encode(char *dst, const BF_word *src, int size)
{
unsigned char *sptr = (unsigned char *)src;
unsigned char *end = sptr + size;
@ -536,9 +530,9 @@ extern void _BF_body_r(BF_ctx *ctx);
#endif
static void BF_set_key(__CONST char *key, BF_key expanded, BF_key initial)
static void BF_set_key(const char *key, BF_key expanded, BF_key initial)
{
__CONST char *ptr = key;
const char *ptr = key;
int i, j;
BF_word tmp;
@ -556,7 +550,7 @@ static void BF_set_key(__CONST char *key, BF_key expanded, BF_key initial)
}
}
char *_crypt_blowfish_rn(__CONST char *key, __CONST char *setting,
char *_crypt_blowfish_rn(const char *key, const char *setting,
char *output, int size)
{
struct {