From: simonmar Date: Fri, 14 Sep 2001 11:25:57 +0000 (+0000) Subject: [project @ 2001-09-14 11:25:57 by simonmar] X-Git-Tag: nhc98-1-18-release~1161 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=fa7e73b1a0bdf92b3bb36311d9d664d825df49ec;p=ghc-base.git [project @ 2001-09-14 11:25:57 by simonmar] Remove inline functions from GHC.Handle and GHC.IO, and declare them as 'extern inline' in HsCore.h. --- diff --git a/include/HsCore.h b/include/HsCore.h index 8e49e69..d07e829 100644 --- a/include/HsCore.h +++ b/include/HsCore.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: HsCore.h,v 1.3 2001/09/13 11:40:28 simonmar Exp $ + * $Id: HsCore.h,v 1.4 2001/09/14 11:25:57 simonmar Exp $ * * Definitions for package `core' which are visible in Haskell land. * @@ -9,6 +9,7 @@ #define HSCORE_H #include "config.h" +#include "HsFFI.h" #ifdef HAVE_SYS_TYPES_H #include @@ -92,6 +93,26 @@ extern inline int s_ischr_wrap(m) { return S_ISCHR(m); } extern inline int s_issock_wrap(m) { return S_ISSOCK(m); } #endif +extern inline void * +memcpy_wrap_dst_off(char *dst, int dst_off, char *src, size_t sz) +{ return memcpy(dst+dst_off, src, sz); } + +extern inline void * +memcpy_wrap_src_off(char *dst, char *src, int src_off, size_t sz) +{ return memcpy(dst, src+src_off, sz); } + +extern inline int +read_ba_wrap(int fd, void *ptr, HsInt off, int size) +{ return read(fd, ptr + off, size); } + +extern inline int +write_wrap(int fd, void *ptr, HsInt off, int size) +{ return write(fd, ptr + off, size); } + +extern inline int +read_wrap(int fd, void *ptr, HsInt off, int size) +{ return read(fd, ptr + off, size); } + #include "lockFile.h" #include "HsFFI.h"