inttypes.h revision 85892
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 85892 2001-11-02 18:05:43Z 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 4585892Smikeintmax_t imaxabs(intmax_t); 4685892Smikeimaxdiv_t imaxdiv(intmax_t, intmax_t); 4785892Smike 4885892Smike/* XXX: The following functions are missing the restrict type qualifier. */ 4985892Smikeintmax_t strtoimax(const char *, char **, int); 5085892Smikeuintmax_t strtoumax(const char *, char **, int); 5185892Smikeintmax_t wcstoimax(const wchar_t *, wchar_t **, int); 5285892Smikeuintmax_t wcstoumax(const wchar_t *, wchar_t **, int); 5385892Smike 5485892Smike#endif /* !_INTTYPES_H_ */ 55