inttypes.h revision 88962
185892Smike/*- 285892Smike * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> 385892Smike * All rights reserved. 485892Smike * 585892Smike * Redistribution and use in source and binary forms, with or without 685892Smike * modification, are permitted provided that the following conditions 785892Smike * are met: 885892Smike * 1. Redistributions of source code must retain the above copyright 985892Smike * notice, this list of conditions and the following disclaimer. 1085892Smike * 2. Redistributions in binary form must reproduce the above copyright 1185892Smike * notice, this list of conditions and the following disclaimer in the 1285892Smike * documentation and/or other materials provided with the distribution. 1385892Smike * 1485892Smike * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1585892Smike * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1685892Smike * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1785892Smike * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1885892Smike * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1985892Smike * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2085892Smike * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2185892Smike * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2285892Smike * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2385892Smike * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2485892Smike * SUCH DAMAGE. 2585892Smike * 2685892Smike * $FreeBSD: head/include/inttypes.h 88962 2002-01-06 19:04:12Z mike $ 2785892Smike */ 2885892Smike 2985892Smike#ifndef _INTTYPES_H_ 3085892Smike#define _INTTYPES_H_ 3185892Smike 3285892Smike#include <machine/_inttypes.h> 3385892Smike#include <sys/stdint.h> 3485892Smike 3585892Smike#ifdef _BSD_WCHAR_T_ 3685892Smiketypedef _BSD_WCHAR_T_ wchar_t; 3785892Smike#undef _BSD_WCHAR_T_ 3885892Smike#endif 3985892Smike 4085892Smiketypedef struct { 4185892Smike intmax_t quot; /* Quotient. */ 4285892Smike intmax_t rem; /* Remainder. */ 4385892Smike} imaxdiv_t; 4485892Smike 4588962Smike__BEGIN_DECLS 4686368Smikeintmax_t imaxabs(intmax_t) __pure2; 4786368Smikeimaxdiv_t imaxdiv(intmax_t, intmax_t) __pure2; 4885892Smike 4985892Smike/* XXX: The following functions are missing the restrict type qualifier. */ 5085892Smikeintmax_t strtoimax(const char *, char **, int); 5185892Smikeuintmax_t strtoumax(const char *, char **, int); 5285892Smikeintmax_t wcstoimax(const wchar_t *, wchar_t **, int); 5385892Smikeuintmax_t wcstoumax(const wchar_t *, wchar_t **, int); 5488962Smike__END_DECLS 5585892Smike 5685892Smike#endif /* !_INTTYPES_H_ */ 57