1.1 --- a/templates/native/limits.c Thu Mar 23 16:40:57 2017 +0100
1.2 +++ b/templates/native/limits.c Thu Mar 23 23:36:32 2017 +0100
1.3 @@ -1,6 +1,6 @@
1.4 /* Native functions for limit definition.
1.5
1.6 -Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
1.7 +Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
1.8
1.9 This program is free software; you can redistribute it and/or modify it under
1.10 the terms of the GNU General Public License as published by the Free Software
1.11 @@ -16,7 +16,6 @@
1.12 this program. If not, see <http://www.gnu.org/licenses/>.
1.13 */
1.14
1.15 -#include <limits.h> /* INT_MAX, INT_MIN */
1.16 #include "native/common.h"
1.17 #include "types.h"
1.18 #include "exceptions.h"
1.19 @@ -30,12 +29,12 @@
1.20
1.21 __attr __fn_native_limits_get_maxint(__attr __args[])
1.22 {
1.23 - return __new_int(INT_MAX);
1.24 + return __new_int(__MAXINT);
1.25 }
1.26
1.27 __attr __fn_native_limits_get_minint(__attr __args[])
1.28 {
1.29 - return __new_int(INT_MIN);
1.30 + return __new_int(__MININT);
1.31 }
1.32
1.33 /* Module initialisation. */