From efc2566256e873c518b2559f3e622e48a4bde2a9 Mon Sep 17 00:00:00 2001 From: Kurt Miller Date: Thu, 2 Oct 2008 20:12:09 +0000 Subject: Fix mmap() error checking to be correct 64-bit addresses. Consistently use _dl_mmap_error() to check for mmap() errors. Adjust datatypes of some local vars for 64-bit safety. okay millert@ drahn@ --- libexec/ld.so/powerpc/syscall.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libexec/ld.so/powerpc') diff --git a/libexec/ld.so/powerpc/syscall.h b/libexec/ld.so/powerpc/syscall.h index 29878f3a988..b1212f6bde0 100644 --- a/libexec/ld.so/powerpc/syscall.h +++ b/libexec/ld.so/powerpc/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.20 2006/05/03 16:10:52 drahn Exp $ */ +/* $OpenBSD: syscall.h,v 1.21 2008/10/02 20:12:08 kurt Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -38,10 +38,10 @@ static off_t _dl_lseek(int, off_t, int); #ifndef _dl_MAX_ERRNO -#define _dl_MAX_ERRNO 4096 +#define _dl_MAX_ERRNO 512L #endif -#define _dl_check_error(__res) \ - ((int) __res < 0 && (int) __res >= -_dl_MAX_ERRNO) +#define _dl_mmap_error(__res) \ + ((long)__res < 0 && (long)__res >= -_dl_MAX_ERRNO) /* * Inlined system call functions that can be used before -- cgit v1.2.3