summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-08-01 01:08:28 +0100
committerIan Lynagh <igloo@earth.li>2011-08-01 01:08:28 +0100
commit15bc61c2f7af1c438aa58e0028cd82636ed06fbb (patch)
treea328de585cde52172215d1625d9572deaba3fed7
parentb2cec8671df8b6393a4c5a35a35b9893de200ca7 (diff)
downloadhaskell-15bc61c2f7af1c438aa58e0028cd82636ed06fbb.tar.gz
Remove some antiquated C constructs
Fixes validate on amd64/Linux with: SRC_CC_OPTS += -Wmissing-parameter-type SRC_CC_OPTS += -Wold-style-declaration SRC_CC_OPTS += -Wold-style-definition
-rw-r--r--libraries/base/cbits/primFloat.c20
-rw-r--r--libraries/base/include/HsBase.h12
2 files changed, 16 insertions, 16 deletions
diff --git a/libraries/base/cbits/primFloat.c b/libraries/base/cbits/primFloat.c
index 0e9f9b337f..7ac03202f9 100644
--- a/libraries/base/cbits/primFloat.c
+++ b/libraries/base/cbits/primFloat.c
@@ -445,16 +445,16 @@ rintDouble(HsDouble d)
#else /* ! IEEE_FLOATING_POINT */
/* Dummy definitions of predicates - they all return "normal" values */
-HsInt isDoubleFinite(d) HsDouble d; { return 1;}
-HsInt isDoubleNaN(d) HsDouble d; { return 0; }
-HsInt isDoubleInfinite(d) HsDouble d; { return 0; }
-HsInt isDoubleDenormalized(d) HsDouble d; { return 0; }
-HsInt isDoubleNegativeZero(d) HsDouble d; { return 0; }
-HsInt isFloatFinite(f) HsFloat f; { return 1; }
-HsInt isFloatNaN(f) HsFloat f; { return 0; }
-HsInt isFloatInfinite(f) HsFloat f; { return 0; }
-HsInt isFloatDenormalized(f) HsFloat f; { return 0; }
-HsInt isFloatNegativeZero(f) HsFloat f; { return 0; }
+HsInt isDoubleFinite(HsDouble d) { return 1;}
+HsInt isDoubleNaN(HsDouble d) { return 0; }
+HsInt isDoubleInfinite(HsDouble d) { return 0; }
+HsInt isDoubleDenormalized(HsDouble d) { return 0; }
+HsInt isDoubleNegativeZero(HsDouble d) { return 0; }
+HsInt isFloatFinite(HsFloat f) { return 1; }
+HsInt isFloatNaN(HsFloat f) { return 0; }
+HsInt isFloatInfinite(HsFloat f) { return 0; }
+HsInt isFloatDenormalized(HsFloat f) { return 0; }
+HsInt isFloatNegativeZero(HsFloat f) { return 0; }
/* For exotic floating point formats, we can't do much */
diff --git a/libraries/base/include/HsBase.h b/libraries/base/include/HsBase.h
index c8fabba658..a9c19e406b 100644
--- a/libraries/base/include/HsBase.h
+++ b/libraries/base/include/HsBase.h
@@ -217,19 +217,19 @@ __hscore_memcpy_src_off( char *dst, char *src, int src_off, size_t sz )
{ return memcpy(dst, src+src_off, sz); }
INLINE HsInt
-__hscore_bufsiz()
+__hscore_bufsiz(void)
{
return BUFSIZ;
}
INLINE int
-__hscore_seek_cur()
+__hscore_seek_cur(void)
{
return SEEK_CUR;
}
INLINE int
-__hscore_o_binary()
+__hscore_o_binary(void)
{
#if defined(_MSC_VER)
return O_BINARY;
@@ -239,7 +239,7 @@ __hscore_o_binary()
}
INLINE int
-__hscore_o_rdonly()
+__hscore_o_rdonly(void)
{
#ifdef O_RDONLY
return O_RDONLY;
@@ -656,12 +656,12 @@ INLINE void setTimevalTicks(struct timeval *p, HsWord64 usecs)
// You should not access _environ directly on Darwin in a bundle/shared library.
// See #2458 and http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man7/environ.7.html
#include <crt_externs.h>
-INLINE char **__hscore_environ() { return *(_NSGetEnviron()); }
+INLINE char **__hscore_environ(void) { return *(_NSGetEnviron()); }
#else
/* ToDo: write a feature test that doesn't assume 'environ' to
* be in scope at link-time. */
extern char** environ;
-INLINE char **__hscore_environ() { return environ; }
+INLINE char **__hscore_environ(void) { return environ; }
#endif
/* lossless conversions between pointers and integral types */