blob: 8bd0aee704cab188c59dfc666ea9117fdfed70ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
$NetBSD: patch-af,v 1.1 2007/05/07 12:42:19 tnn Exp $
--- src/ffi.c.orig 2007-05-07 14:17:55.000000000 +0200
+++ src/ffi.c
@@ -307,9 +307,11 @@ rep_ffi_marshal (unsigned int type_id, r
*(double *)ptr = (double) rep_get_float (value);
return ptr + sizeof (double);
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
case FFI_TYPE_LONGDOUBLE:
*(long double *)ptr = (long double) rep_get_float (value);
return ptr + sizeof (long double);
+#endif
case FFI_TYPE_UINT8:
*(uint8_t *)ptr = (uint8_t) rep_get_long_int (value);
@@ -435,9 +437,11 @@ rep_ffi_demarshal (unsigned int type_id,
*value = rep_make_float (*(double *)ptr, rep_TRUE);
return ptr + sizeof (double);
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
case FFI_TYPE_LONGDOUBLE:
*value = rep_make_float (*(long double *)ptr, rep_TRUE);
return ptr + sizeof (long double);
+#endif
case FFI_TYPE_UINT8:
*value = rep_MAKE_INT (*(uint8_t *)ptr);
|