1*3873297bSjsg /* $OpenBSD: atoll.c,v 1.4 2021/10/24 10:05:23 jsg Exp $ */
209919f81Smillert /*
309919f81Smillert * Copyright (c) 1988 Regents of the University of California.
409919f81Smillert * All rights reserved.
509919f81Smillert *
609919f81Smillert * Redistribution and use in source and binary forms, with or without
709919f81Smillert * modification, are permitted provided that the following conditions
809919f81Smillert * are met:
909919f81Smillert * 1. Redistributions of source code must retain the above copyright
1009919f81Smillert * notice, this list of conditions and the following disclaimer.
1109919f81Smillert * 2. Redistributions in binary form must reproduce the above copyright
1209919f81Smillert * notice, this list of conditions and the following disclaimer in the
1309919f81Smillert * documentation and/or other materials provided with the distribution.
146580fee3Smillert * 3. Neither the name of the University nor the names of its contributors
1509919f81Smillert * may be used to endorse or promote products derived from this software
1609919f81Smillert * without specific prior written permission.
1709919f81Smillert *
1809919f81Smillert * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1909919f81Smillert * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2009919f81Smillert * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2109919f81Smillert * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2209919f81Smillert * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2309919f81Smillert * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2409919f81Smillert * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2509919f81Smillert * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2609919f81Smillert * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2709919f81Smillert * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2809919f81Smillert * SUCH DAMAGE.
2909919f81Smillert */
3009919f81Smillert
3109919f81Smillert #include <stdlib.h>
3209919f81Smillert
3309919f81Smillert long long
atoll(const char * str)34*3873297bSjsg atoll(const char *str)
3509919f81Smillert {
3609919f81Smillert return(strtoll(str, (char **)NULL, 10));
3709919f81Smillert }
38