-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A more useful interface to strtol.
- Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2014 Free Software
+ Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2015 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
need stderr defined if assertion checking is enabled. */
#include <stdio.h>
-#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
+#include "assure.h"
#include "intprops.h"
/* xstrtoll.c and xstrtoull.c, which include this file, require that
__strtol_t tmp;
strtol_error err = LONGINT_OK;
- assert (0 <= strtol_base && strtol_base <= 36);
+ assure (0 <= strtol_base && strtol_base <= 36);
p = (ptr ? ptr : &t_ptr);
+ errno = 0;
+
if (! TYPE_SIGNED (__strtol_t))
{
const char *q = s;
return LONGINT_INVALID;
}
- errno = 0;
tmp = __strtol (s, p, strtol_base);
if (*p == s)
break;
case 'c':
- overflow = 0;
+ overflow = LONGINT_OK;
break;
case 'E': /* exa or exbi */