More ANSI/ISO 9899-1990 to the people!
Now actually builds (not including util) with DEC "cc -std1" and Sun "acc -Xc". There are still major prototype conflicts, but there isn't much to do about this. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@192 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -34,13 +34,13 @@ SOURCES = cbc_cksm.c cbc_enc.c ecb_enc.c pcbc_enc.c \
|
||||
qud_cksm.c read_pwd.c set_key.c str2key.c \
|
||||
cfb_enc.c \
|
||||
3ecb_enc.c ofb_enc.c 3cbc_enc.c rnd_keys.c key_par.c \
|
||||
enc_read.c enc_writ.c gethostid.c fcrypt.c
|
||||
enc_read.c enc_writ.c fcrypt.c
|
||||
|
||||
OBJECTS = cbc_cksm.o cbc_enc.o ecb_enc.o pcbc_enc.o \
|
||||
qud_cksm.o read_pwd.o set_key.o str2key.o \
|
||||
cfb_enc.o \
|
||||
3ecb_enc.o ofb_enc.o 3cbc_enc.o rnd_keys.o key_par.o \
|
||||
enc_read.o enc_writ.o gethostid.o fcrypt.o
|
||||
enc_read.o enc_writ.o fcrypt.o
|
||||
|
||||
all: $(LIB)
|
||||
|
||||
|
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Some systems doesn't have gethostid(2) (e.g Solaris if you don't
|
||||
* link with libucb - and we don't want that...
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef HAVE_GETHOSTID
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/systeminfo.h>
|
||||
|
||||
long gethostid(void)
|
||||
{
|
||||
static int flag=0;
|
||||
static long hostid;
|
||||
if(!flag){
|
||||
char s[32];
|
||||
sysinfo(SI_HW_SERIAL, s, 32);
|
||||
sscanf(s, "%u", &hostid);
|
||||
flag=1;
|
||||
}
|
||||
return hostid;
|
||||
}
|
||||
|
||||
#endif
|
@@ -72,6 +72,25 @@ des_new_random_key(des_cblock *key)
|
||||
return(0);
|
||||
}
|
||||
|
||||
/* this is for broken Solaris */
|
||||
#ifndef HAVE_GETHOSTID
|
||||
|
||||
#include <sys/systeminfo.h>
|
||||
|
||||
static long gethostid(void)
|
||||
{
|
||||
static int flag=0;
|
||||
static long hostid;
|
||||
if(!flag){
|
||||
char s[32];
|
||||
sysinfo(SI_HW_SERIAL, s, 32);
|
||||
sscanf(s, "%u", &hostid);
|
||||
flag=1;
|
||||
}
|
||||
return hostid;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* des_init_random_number_generator:
|
||||
*
|
||||
|
Reference in New Issue
Block a user