mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
new release
This commit is contained in:
parent
0e5a31d7be
commit
f9a7043782
28 changed files with 396 additions and 157 deletions
31
g10/misc.c
31
g10/misc.c
|
@ -22,10 +22,41 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined(__linux__) && defined(__alpha__)
|
||||
#include <asm/sysinfo.h>
|
||||
#include <asm/unistd.h>
|
||||
#endif
|
||||
#include "util.h"
|
||||
#include "main.h"
|
||||
|
||||
|
||||
|
||||
#if defined(__linux__) && defined(__alpha__)
|
||||
#warning using trap_unaligned
|
||||
static int
|
||||
setsysinfo(unsigned long op, void *buffer, unsigned long size,
|
||||
int *start, void *arg, unsigned long flag)
|
||||
{
|
||||
return syscall(__NR_osf_setsysinfo, op, buffer, size, start, arg, flag);
|
||||
}
|
||||
|
||||
void
|
||||
trap_unaligned(void)
|
||||
{
|
||||
unsigned int buf[2];
|
||||
|
||||
buf[0] = SSIN_UACPROC;
|
||||
buf[1] = UAC_SIGBUS | UAC_NOPRINT;
|
||||
setsysinfo(SSI_NVPAIRS, buf, 1, 0, 0, 0);
|
||||
}
|
||||
#else
|
||||
void
|
||||
trap_unaligned(void)
|
||||
{ /* dummy */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
u16
|
||||
checksum_u16( unsigned n )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue