]>
git.zerfleddert.de Git - micropolis/blob - src/tcl/compat/teststrtoul.c
05a392191a61dc15ab63a35c4a9fe6b364936dc5
4 * This file contains a simple program to detect broken versions
5 * of strtoul, like those on AIX. The broken versions return an
6 * incorrect terminator pointer for the string "0". This program
7 * exits with a normal status if strtoul does the right thing, and
8 * it exits with a non-zero status if strtoul is bogus. Unlike
9 * the other test programs, this one must actually be executed to
10 * be sure that it works.
12 * Copyright 1991 Regents of the University of California
13 * Permission to use, copy, modify, and distribute this
14 * software and its documentation for any purpose and without
15 * fee is hereby granted, provided that this copyright
16 * notice appears in all copies. The University of California
17 * makes no representations about the suitability of this
18 * software for any purpose. It is provided "as is" without
19 * express or implied warranty.
23 static char rcsid
[] = "$Header: /user6/ouster/tcl/compat/RCS/teststrtoul.c,v 1.2 92/01/07 10:02:56 ouster Exp $ SPRITE (Berkeley)";
34 value
= strtoul(string
, &term
, 0);
35 if ((value
!= 0) || (term
!= (string
+1))) {