* mingw: Delete obsolete directory.

* w32api: Ditto.
This commit is contained in:
Christopher Faylor 2012-11-07 16:52:48 +00:00
parent 2ca28ea2dc
commit 61746d6ae8
1039 changed files with 5 additions and 246525 deletions

View File

@ -1,3 +1,8 @@
2012-11-07 Christopher Faylor <me.cygwin2012@cgf.cx>
* mingw: Delete obsolete directory.
* w32api: Ditto.
2012-11-07 Corinna Vinschen <corinna@vinschen.de>
* Makefile.common (zlib_source): Remove.

View File

@ -1,28 +0,0 @@
/*
* CONTRIBUTORS
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* HISTORICAL:
* Colin Peters <colin@fu.is.saga-u.ac.jp> - Original author of the
* mingw-runtime package.
* Mumit Khan <khan@xraylith.wisc.EDU> - Original maintainer of the
* mingw-runtime package.
* Gunther Ebert <gunther.ebert@ixos-leipzig.de> - Adaptations of his DLL
* support.
* Stan Cox <scox@cygnus.com> - Provided gccmain.c.
* J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl> - Provided
* dos.h.
* Mikey <jeffdb@netzone.com> - Adaptated excpt.h from his code.
* Pedro A. Aranda <paag@tid.es> - Provided lots of types for types.h.
*
* CURRENT:
* Danny Smith <dannysmith@users.sourceforge.net>
* Earnie Boyd <earnie@users.sourceforge.net>
* Luke Dunstan <coder_infidel@users.sourceforge.net>
*
* Many others in the MinGW user community. They are listed in the ChangeLog.
* Please review that file for the names of those contributors.
*
*/

View File

@ -1,20 +0,0 @@
/*
* CRT_FP10.c
*
* This defines _fpreset as asm ("fnint"). Calls to _fpreset
* will set default floating point precesion to 64-bit mantissa
* at app startup.
*
* Linking in CRT_FP10.o before libmingw.a will override the definition
* set in CRT_FP8.o.
*/
/* Override library _fpreset() with asm fninit */
void _fpreset (void)
{ __asm__ ( "fninit" ) ;}
#if defined(__PCC__)
void _Pragma("alias _fpreset") fpreset(void);
#else
void __attribute__ ((alias ("_fpreset"))) fpreset(void);
#endif

View File

@ -1,22 +0,0 @@
/*
* CRT_FP8.c
*
* This forces calls of _fpreset to the MSVCRT function
* exported from dll. Effectively it make default
* precison same as apps built with MSVC (53-bit mantissa).
*
* To change to 64-bit mantissa, link in CRT_FP10.o before libmingw.a.
*/
/* Link against the _fpreset visible in import lib */
extern void (*_imp___fpreset)(void) ;
void _fpreset (void)
{ (*_imp___fpreset)(); }
#if defined(__PCC__)
void _Pragma("alias _fpreset") fpreset(void);
#else
void __attribute__ ((alias ("_fpreset"))) fpreset(void);
#endif

View File

@ -1,15 +0,0 @@
/*
* CRT_noglob.c
* This file has no copyright is assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Include this object file to set _CRT_glob to a state that will turn off
* command line globbing by default. NOTE: _CRT_glob has a default state of on.
*
* To use this object include the object file in your link command:
* gcc -o foo.exe foo.o CRT_noglob.o
*
*/
int _CRT_glob = 0;

View File

@ -1,19 +0,0 @@
/*
* CRTfmode.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* This libmingw.a object sets _CRT_fmode to a state that will cause
* _mingw32_init_fmode to leave all file modes in their default state
* (basically text mode).
*
* To override the default, add, eg:
*
* #include <fcntl.h>
* int _CRT_fmode = _O_BINARY;
*
* to your app.
*/
int _CRT_fmode = 0;

View File

@ -1,16 +0,0 @@
/*
* CRTglob.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Include this object file to set _CRT_glob to a state that will
* turn on command line globbing by default. NOTE: _CRT_glob has a default
* state of on. Specify CRT_noglob.o to turn off globbing by default.
*
* To use this object include the object file in your link command:
* gcc -o foo.exe foo.o CRTglob.o
*
*/
int _CRT_glob = -1;

View File

@ -1,24 +0,0 @@
/*
* CRTinit.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* A dummy version of _CRT_INIT for MS compatibility. Programs, or more often
* dlls, which use the static version of the MSVC run time are supposed to
* call _CRT_INIT to initialize the run time library in DllMain. This does
* not appear to be necessary when using crtdll or the dll versions of the
* MSVC runtime, so the dummy call simply does nothing.
*
* This object file is included as a standard in the link process as provided
* by the appropriate GCC frontend.
*
* To use this object include the object file in your link command:
* gcc -o foo.exe foo.o CRTinit.o
*
*/
void
_CRT_INIT ()
{
}

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
/*
* DISCLAIMER
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
*
* The mingw-runtime package and its code is distributed in the hope that it
* will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR
* IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to
* warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You are free to use this package and its code without limitation.
*/

View File

@ -1,650 +0,0 @@
# Makefile.in for the winsup/mingw directory.
# Copyright (c) 1995-2008, 1996, 1997, 1998 Cygnus Solutions
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# This makefile requires GNU make.
PACKAGE = @PACKAGE_TARNAME@
VERSION = @PACKAGE_VERSION@
CYGRELEASE = 1
VPATH = @srcdir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
# FIXME: I see no reason to define `objdir';
# it appears to be unused, and could be removed.
objdir = .
host_alias = @host_alias@
build_alias = @build_alias@
target_alias = @target_alias@
with_cross_host = @with_cross_host@
prefix = @prefix@
conf_prefix = @prefix@
host_os = @host_os@
datarootdir = @datarootdir@
program_transform_name = @program_transform_name@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
ifneq (,$(findstring cygwin,$(target_alias)))
#
# FIXME: What is the purpose of such logic, testing `target_alias'?
#
# Firstly, there is no code generator being built here. The concept
# of `target' is meaningless, and there is no valid reason to expect
# that `target_alias' would be anything other than an empty string.
# Thus, the validity of such tests is extremely suspect.
#
# Secondly, the decisions being taken, on the basis of these tests,
# rightfully belong in the configure script; all this logic should be
# removed, and properly implemented in `configure.in'.
#
mandir = $(prefix)/share/man
mansection = mingw
else
mandir = @mandir@
mansection = 3
endif
manpage_transform = @mingw_manpage_transform@
ifeq ($(target_alias),$(host_alias))
ifeq ($(build_alias),$(host_alias))
tooldir:=$(exec_prefix)
else
tooldir:=$(exec_prefix)/$(target_alias)
endif
else
tooldir:=$(exec_prefix)/$(target_alias)
endif
datadir = @datadir@
infodir = @infodir@
includedir = @includedir@
ifneq (,$(findstring cygwin,$(target_alias)))
#
# FIXME: Doubtful use of `target_alias', again.
#
# Here we not only have a dubious test, based on `target_alias',
# but we also assign local alternatives for the standard autoconf
# installation path macros. This should not be necessary; the
# configure script should simply assign appropriate values to
# the standard macros, which should be used herein.
#
inst_bindir:=$(tooldir)/bin
inst_includedir:=$(tooldir)/include/mingw
inst_libdir:=$(tooldir)/lib/mingw
inst_docdir:=$(tooldir)/share/doc/mingw-runtime
need-DESTDIR-compatibility = prefix exec_prefix tooldir mandir
else
ifneq (,$(with_cross_host))
#
# FIXME: What is the intended purpose of `with_cross_host'?
#
# Notwithstanding that this conforms to no known standard, and
# is completely undocumented, it does not belong here; every one
# of these settings is the prerogative of the configure script,
# and they should use standard names, as noted above.
#
inst_bindir:=$(tooldir)/bin
inst_includedir:=$(tooldir)/include
inst_libdir:=$(tooldir)/lib
inst_docdir:=$(tooldir)/share/doc/mingw-runtime
need-DESTDIR-compatibility = prefix exec_prefix tooldir mandir
else
inst_bindir:=$(bindir)
inst_includedir:=$(includedir)
inst_libdir:=$(libdir)
inst_docdir:=$(prefix)/doc/runtime
need-DESTDIR-compatibility = prefix bindir includedir libdir mandir
endif
endif
# The Mingw headers are installed under a subdirectory of
# $(tooldir)/include when configuring in Cygwin.
HEADER_SUBDIR = @HEADER_SUBDIR@
SHELL = /bin/sh
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
mkinstalldirs = $(SHELL) @MKINSTALLDIRS@
CC := @CC@
ifneq (,$(findstring cygwin,$(target_alias)))
#
# FIXME: What is the purpose of this hideous kludge?
#
# Again, we have a dubious use of `target_alias'. Worse, `CC'
# should have been appropriately set by the configure script; to
# mess with it, in this fashion, should neither be necessary,
# nor accepted.
#
override CC := ${filter-out -L% -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\) *[^ ]*\( \|$$\)% %g'}}
endif
# FIXME: Which is it, CC or CC_FOR_TARGET?
CC_FOR_TARGET = $(CC)
AS_FOR_TARGET = $(AS)
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
# compiling with Cygwin?
NO_CYGWIN := @NO_CYGWIN@
ifdef NO_CYGWIN
#
# FIXME: Again, this should have been resolved by `configure',
# and this kludge should be unnecessary.
#
override CC := ${NO_CYGWIN} $(firstword ${CC})
endif
# Either crtdll (CRT_ID 1) or msvcrt (CRT_ID 2).
RUNTIME = @RUNTIME@
CRT_ID = @CRT_ID@
# Needed for threading dll.
THREAD_DLL = @THREAD_DLL@
THREAD_DLL_VERSION = 10
THREAD_DLL_NAME = $(THREAD_DLL)$(THREAD_DLL_VERSION).dll
# Various libraries.
LIBM_A=@LIBM_A@
W32API_INCLUDE = @W32API_INCLUDE@
INCLUDES = -I$(srcdir)/include \
-I$(srcdir)/../include \
-nostdinc \
-iwithprefixbefore include
ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(W32API_INCLUDE)
ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE)
AS = @AS@
AR = @AR@
LD = @LD@
AR_FLAGS = rcv
RANLIB = @RANLIB@
DLLTOOL = @DLLTOOL@
DLLTOOLFLAGS =
DLLTOOL_FOR_TARGET = $(DLLTOOL)
DLLTOOL_FLAGS = --as $(AS_FOR_TARGET)
DLLWRAP = @DLLWRAP@
DLLWRAP_FOR_TARGET = $(DLLWRAP)
DLLWRAP_FLAGS = --dlltool $(DLLTOOL) --as $(AS) --driver-name $(CC)
OBJCOPY = @OBJCOPY@
NM = @NM@
TAR = tar
TARFLAGS = z
TARFILEEXT = .tar.gz
SUBDIRS = mingwex profile
# FIXME: Most of these are either redundant, or should be set
# directly in the subdirectories' Makefiles, by `configure'.
FLAGS_TO_PASS:=\
AS="$(AS)" \
CC="$(CC)" \
CFLAGS="$(CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_CONFIG)" \
CXXFLAGS="$(CXXFLAGS) $(CFLAGS_COMMON) $(CFLAGS_CONFIG)" \
EXE_LDFLAGS="$(EXE_LDFLAGS)" \
AR="$(AR)" \
RANLIB="$(RANLIB)" \
LD="$(LD)" \
DLLTOOL="$(DLLTOOL)" \
exec_prefix="$(exec_prefix)" \
bindir="$(bindir)" \
libdir="$(libdir)" \
tooldir="$(tooldir)" \
datadir="$(datadir)" \
infodir="$(infodir)" \
includedir="$(includedir)" \
inst_bindir="$(inst_bindir)" \
inst_includedir="$(inst_includedir)" \
inst_libdir="$(inst_libdir)" \
inst_docdir="$(inst_docdir)" \
prefix="$(prefix)" \
target_alias="$(target_alias)" \
TAR="$(TAR)" \
TARFLAGS="$(TARFLAGS)" \
TARFILEEXT="$(TARFILEEXT)"
CRT0S = crt1.o dllcrt1.o crt2.o dllcrt2.o CRT_noglob.o crtmt.o crtst.o \
CRT_fp8.o CRT_fp10.o txtmode.o binmode.o
MINGW_OBJS = CRTglob.o CRTfmode.o CRTinit.o dllmain.o gccmain.o \
main.o crtst.o CRT_fp10.o txtmode.o \
pseudo-reloc.o pseudo-reloc-list.o cpu_features.o \
tlsmcrt.o tlsmthread.o tlssup.o tlsthrd.o
MOLD_OBJS = isascii.o iscsym.o iscsymf.o toascii.o \
strcasecmp.o strncasecmp.o wcscmpi.o
LIBS = libcrtdll.a \
libmsvcrt.a libmsvcrtd.a \
libmsvcr70.a libmsvcr70d.a \
libmsvcr71.a libmsvcr71d.a \
libmsvcr80.a libmsvcr80d.a \
libmsvcr90.a libmsvcr90d.a \
libmsvcr100.a libmsvcr100d.a \
libmingw32.a \
libcoldname.a \
libmoldname.a libmoldnamed.a \
libmoldname70.a libmoldname70d.a \
libmoldname71.a libmoldname71d.a \
libmoldname80.a libmoldname80d.a \
libmoldname90.a libmoldname90d.a \
libmoldname100.a libmoldname100d.a \
$(LIBM_A) \
libmingwthrd_old.a \
libmingwthrd.a
DLLS = $(THREAD_DLL_NAME)
INSTDOCS = CONTRIBUTORS \
DISCLAIMER \
README
SRCDIST_FILES = CRT_noglob.c CRTfmode.c CRTglob.c CRTinit.c ChangeLog \
Makefile.in README TODO config.guess config.sub configure configure.in \
aclocal.m4 crt1.c crtdll.def crtmt.c crtst.c dllcrt1.c dllmain.c \
gccmain.c init.c install-sh jamfile main.c mkinstalldirs \
moldname.def.in msvcrt.def.in ofmt_stub.s \
mthr.c mthr_init.c tlsmcrt.c tlsmthread.c tlssup.c tlsthrd.c readme.txt \
isascii.c iscsym.c iscsymf.c toascii.c \
strcasecmp.c strncasecmp.c wcscmpi.c \
CRT_fp8.c CRT_fp10.c test_headers.c txtmode.c binmode.c pseudo-reloc.c \
pseudo-reloc-list.c cpu_features.c cpu_features.h \
DISCLAIMER CONTRIBUTORS
all_dlls_host = @all_dlls_host@
install_dlls_host = @install_dlls_host@
all: $(CRT0S) $(LIBS) $(all_dlls_host)
all_dlls_host: $(DLLS)
install_dlls_host:
for i in $(DLLS); do \
$(INSTALL_PROGRAM) $$i $(DESTDIR)$(inst_bindir)/$$i ; \
done
_libm_dummy.o:
rm -f _libm_dummy.c
echo "static int __mingw_libm_dummy;" > _libm_dummy.c
$(CC) -c $(ALL_CFLAGS) _libm_dummy.c
rm -f _libm_dummy.c
libm.a: _libm_dummy.o
$(AR) rc $@ _libm_dummy.o
$(RANLIB) $@
libmingwthrd.a: crtmt.o
$(AR) $(ARFLAGS) $@ crtmt.o
$(RANLIB) $@
libmingwthrd_old.a: crtmt.o mingwthrd.def
$(DLLTOOL) $(DLLTOOL_FLAGS) --dllname $(THREAD_DLL_NAME) \
--def mingwthrd.def --output-lib $@
$(AR) $(ARFLAGS) $@ crtmt.o
$(RANLIB) $@
DLL_OFILES = mthr.o mthr_init.o
DLL_CC_STUFF = -B./ -shared $(MNO_CYGWIN) -Wl,--image-base,0x6FBC0000 \
-Wl,--entry,_DllMainCRTStartup@12 \
$(DLL_OFILES) mingwthrd.def \
-Lmingwex
$(THREAD_DLL_NAME) mingwthrd.def: $(DLL_OFILES) Makefile $(SUBDIRS)
$(DLLTOOL) --as $(AS) --output-def mingwthrd.def $(DLL_OFILES)
$(CC) $(DLL_CC_STUFF) -o $(THREAD_DLL_NAME)
libmingw32.a: $(MINGW_OBJS)
$(AR) rc $@ $(MINGW_OBJS)
$(RANLIB) $@
msvcrt.def msvcrtd.def \
msvcr70.def msvcr70d.def \
msvcr71.def msvcr71d.def \
msvcr80.def msvcr80d.def \
msvcr90.def msvcr90d.def \
msvcr100.def msvcr100d.def: msvcrt.def.in
V=`echo $@ | sed -e 's|[a-z]*\([0-9]*\).*|\1|'`; \
test -z "$$V" && V=60; \
V="0x0$${V}0"; \
$(CC) -DRUNTIME=$(basename $(notdir $@)) \
-D__MSVCRT_VERSION__=$$V \
-D__$(basename $(notdir $@))__=1 \
-D__MSVCRT__ -C -E -P \
-xc-header $? > $@
moldname-crtdll.def: moldname.def.in
$(CC) -DRUNTIME=crtdll \
-D__FILENAME__=moldname-crtdll.def \
-D__CRTDLL__ -C -E -P \
-xc-header $? > $@
moldname-msvcrt.def: moldname.def.in
$(CC) -DRUNTIME=msvcrt \
-D__FILENAME__=moldname-msvcrt.def \
-D__MSVCRT__ -C -E -P \
-xc-header $? > $@
libcoldname.a: moldname-crtdll.def $(MOLD_OBJS)
$(DLLTOOL) --as $(AS) -k -U \
--dllname crtdll.dll \
--def moldname-crtdll.def \
--output-lib $@
$(AR) rc $@ $(MOLD_OBJS)
$(RANLIB) $@
libmoldname.a libmoldnamed.a: moldname-msvcrt.def $(MOLD_OBJS)
$(DLLTOOL) --as $(AS) -k -U \
--dllname msvcrt$(@:libmoldname%a=%)dll \
--def moldname-msvcrt.def \
--output-lib $@
$(AR) rc $@ $(MOLD_OBJS)
$(RANLIB) $@
libmoldname70.a libmoldname70d.a \
libmoldname71.a libmoldname71d.a \
libmoldname80.a libmoldname80d.a \
libmoldname90.a libmoldname90d.a \
libmoldname100.a libmoldname100d.a: moldname-msvcrt.def $(MOLD_OBJS)
$(DLLTOOL) --as $(AS) -k -U \
--dllname msvcr$(@:libmoldname%a=%)dll \
--def moldname-msvcrt.def \
--output-lib $@
$(AR) rc $@ $(MOLD_OBJS)
$(RANLIB) $@
# These special rules are necessary...
#
crt1.o dllcrt1.o:
$(CC) -c -D__CRTDLL__ -U__MSVCRT__ $(ALL_CFLAGS) $< -o $@
crt2.o dllcrt2.o:
$(CC) -c -D__MSVCRT__ -U__CRTDLL__ $(ALL_CFLAGS) $< -o $@
check: check-headers
TEST_H_OPTIONS = $(ALL_CFLAGS) -Wall -W -Wsystem-headers -c \
$(srcdir)/test_headers.c -o test_headers.o
.PHONY: check-headers
check-headers: force
@echo "Testing runtime headers..."
@for lang in c c++ objective-c ; do \
echo "$$lang ..."; \
$(CC) -x$$lang $(TEST_H_OPTIONS) ; \
echo "$$lang -ansi"; \
$(CC) -x$$lang -ansi $(TEST_H_OPTIONS) ; \
done
@echo; echo "Testing runtime 8.0 headers..."
@for lang in c c++ objective-c ; do \
echo "$$lang ..."; \
$(CC) -x$$lang -Wall -D__MSVCRT_VERSION__=0x0800 $(TEST_H_OPTIONS) ; \
echo "$$lang -ansi"; \
$(CC) -x$$lang -Wall -D__MSVCRT_VERSION__=0x0800 -ansi $(TEST_H_OPTIONS) ; \
done
@echo; echo "Testing runtime 8.0(time32) headers..."
@for lang in c c++ objective-c ; do \
echo "$$lang ..."; \
$(CC) -x$$lang -Wall -D__MSVCRT_VERSION__=0x0800 -D_USE_32BIT_TIME_T $(TEST_H_OPTIONS) ; \
echo "$$lang -ansi"; \
$(CC) -x$$lang -Wall -D__MSVCRT_VERSION__=0x0800 -D_USE_32BIT_TIME_T -ansi $(TEST_H_OPTIONS) ; \
done
@echo; echo "Testing runtime 8.0(time32) headers..."
# specify -std=xx only for C
@for std in gnu89 gnu99 c89 c99 ; do \
echo "std = $$std"; \
$(CC) -std=$$std $(TEST_H_OPTIONS) ; \
done
@rm -f test_headers.o
clean:
-rm -f *.o *.a *~ core a.out mingwthrd.def mingwthrd.base mingwthrd.exp
-rm -f $(THREAD_DLL_NAME) mingwthrd_dummy.exe
-rm -f msvcr*.def moldname-*.def
@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
distclean: clean
@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
-rm -f config.cache config.status config.log
-rm -f Makefile
ifdef SNAPDATE
distdir=$(PACKAGE)-$(VERSION)-$(SNAPDATE)
else
ifneq (,$(findstring cygwin, $(target_alias)))
distdir=$(PACKAGE)-$(VERSION)-$(CYGRELEASE)
else
distdir=$(PACKAGE)-$(VERSION)-$(host_os)
endif
endif
ifneq (,$(findstring cygwin, $(target_alias)))
#
# FIXME: Dubious use of `target_alias', yet again.
#
# Once more, the default settings for these macros could be
# more productively determined by `configure'.
#
TARFLAGS = j
TARFILEEXT = .tar.bz2
dist_prefix = $(conf_prefix)
endif
dist: srcdist bindist
srcdist:
rm -rf $(distdir)
mkdir $(distdir)
chmod 755 $(distdir)
for i in $(SRCDIST_FILES); do \
cp -p $(srcdir)/$$i $(distdir)/$$i ; \
done
for i in $(SUBDIRS); do \
(cd $$i; $(MAKE) distdir=../$(distdir) dist); \
done
#FIXME this needs to be done with SUBDIRS and Makefiles.
#
# Maybe, but this is simpler, and adequate for now!
# However, as more manpages are added, spanning multiple sections,
# we'll probably need a separate Makefile to organise them.
#
mkdir $(distdir)/include
mkdir $(distdir)/include/sys
cp $(srcdir)/include/*.h $(distdir)/include/
cp $(srcdir)/include/sys/*.h $(distdir)/include/sys/
mkdir $(distdir)/man
cp $(srcdir)/man/*.man $(distdir)/man/
#
#end FIXME
rm -f $(distdir)-src.tar.gz
$(TAR) $(TARFLAGS)cf $(distdir)-src$(TARFILEEXT) $(distdir)
# Binary package structure is determined according to the
# preferred package name assigned at configure time...
#
bindist: bindist-$(PACKAGE)
# The directory structure is common to both package styles...
#
bindist-common:
rm -rf $(distdir)
mkdir $(distdir)
chmod 755 $(distdir)
$(MAKE) install prefix=$(shell pwd)/$(distdir)$(dist_prefix)
rm -f $(distdir).tar.gz
# Current MinGW distributions prefer separate `dev' and `dll' bundles,
# and use the abbreviated `mingwrt' form for the package name...
#
DEVDIST_FILES = * --exclude=bin
DLLDIST_FILES = bin/*.dll doc/*
#
bindist-mingwrt: bindist-common
cd $(distdir); \
$(TAR) $(TARFLAGS)cf ../$(distdir)-dev$(TARFILEEXT) $(DEVDIST_FILES); \
$(TAR) $(TARFLAGS)cf ../$(distdir)-dll$(TARFILEEXT) $(DLLDIST_FILES)
rm -rf $(distdir)
# However, Cygwin maintainers continue to prefer a composite package,
# retaining the older `mingw-runtime' naming convention...
#
BINDIST_FILES = *
#
bindist-mingw-runtime: bindist-common
cd $(distdir); \
$(TAR) $(TARFLAGS)cf ../$(distdir)$(TARFILEEXT) $(BINDIST_FILES)
rm -rf $(distdir)
snapshot:
make dist SNAPDATE=$(shell date '+%Y%m%d')
info:
info-html:
install-info: info
.PHONY: $(need-DESTDIR-compatibility) fail-DESTDIR-compatibility
$(need-DESTDIR-compatibility):
@test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
$(MAKE) --no-print-directory reject="$@" fail-DESTDIR-compatibility ;; \
esac
fail-DESTDIR-compatibility:
$(error DESTDIR is not supported when $(reject) contains Win32 path `$($(reject))'; \
try `make install $(reject)=$(shell echo '$($(reject))' | sed s,:,:$(DESTDIR),) ...' instead)
install-dirs: $(need-DESTDIR-compatibility)
$(mkinstalldirs) $(DESTDIR)$(inst_bindir)
$(mkinstalldirs) $(DESTDIR)$(inst_includedir)
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
$(mkinstalldirs) $(DESTDIR)$(inst_docdir)
$(mkinstalldirs) $(DESTDIR)$(mandir)/man$(mansection)
install: all install-dirs $(install_dlls_host)
for i in $(LIBS); do \
$(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \
done
for i in $(CRT0S); do \
$(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \
done
for i in $(INSTDOCS); do \
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(inst_docdir)/$$i ; \
done
for sub in . sys ; do \
dstdir=$(DESTDIR)$(inst_includedir)/$$sub ; \
$(mkinstalldirs) $$dstdir ; \
for i in $(srcdir)/include/$$sub/*.h ; do \
$(INSTALL_DATA) $$i $$dstdir/`basename $$i` ; \
done ; \
done
#
# This provisional hack installs the only manpage we have at present...
# It simply CANNOT suffice, when we have more manpages to ship.
#
$(mkinstalldirs) $(DESTDIR)$(mandir)/man$(mansection)
$(INSTALL_DATA) $(srcdir)/man/dirname.man $(DESTDIR)$(mandir)/man$(mansection)/`\
echo dirname.man|sed '$(manpage_transform);s,man$$,$(mansection),'`
$(INSTALL_DATA) $(srcdir)/man/dirname.man $(DESTDIR)$(mandir)/man$(mansection)/`\
echo basename.man|sed '$(manpage_transform);s,man$$,$(mansection),'`
#
# End provisional hack.
#
@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
subdirs: $(SUBDIRS)
$(SUBDIRS): force
@test -n "$(DO)" && g="$(DO)" || g=all; echo "Making \`$$g' in \`$@'"
@cd $@; $(MAKE) $(FLAGS_TO_PASS) $(DO)
force:
#
# Dependencies
#
libcrtdll.a: crtdll.def
libmsvcrt.a: msvcrt.def
libmsvcrtd.a: msvcrtd.def
CRT_noglob.o: CRT_noglob.c
CRTfmode.o: CRTfmode.c
CRTglob.o: CRTglob.c
CRTinit.o: CRTinit.c
crt1.o: crt1.c init.c
crt2.o: crt1.c init.c
crtmt.o: crtmt.c
crtst.o: crtst.c
ctype_old.o: ctype_old.c
dllcrt1.o: dllcrt1.c
dllcrt2.o: dllcrt1.c
dllmain.o: dllmain.c
main.o: main.c
oldnames.o: oldnames.c
string_old.o: string_old.c
CRT_fp8.o: CRT_fp8.c
CRT_fp10.o: CRT_fp10.c
Makefile: Makefile.in config.status configure
$(SHELL) config.status
config.status: configure
$(SHELL) config.status --recheck
.SUFFIXES: .y $(SUFFIXES) .cc .def .a
sym_prefix = __msvcrt
NM_LOOKUP = $(NM) $@ | sed -n \
-e '/:$$/h;/^[0-7][0-7]* *T */{s///;H;g;s/\n//p' \
-e '}' | sed -n 's/:_'"$$key"'$$//p'
MINGW_REPL_FUNCS = printf fprintf sprintf vprintf vfprintf vsprintf
lib%.a: %.def
$(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@ --def $<
for key in $(MINGW_REPL_FUNCS); do \
src=`$(NM_LOOKUP)`; \
if test -n "$$src"; then \
dst=`echo "$$src" | sed 's/0/4/'`; repl="$$repl $$dst"; \
tmpfiles="$$tmpfiles $$src $$dst"; \
$(AR) x $@ $$src; \
$(OBJCOPY) --redefine-sym _$$key=_$(sym_prefix)_$$key \
--redefine-sym __imp__$$key=__imp__$(sym_prefix)_$$key \
$$src $$dst; \
fi; done; \
test `key=_get_output_format; $(NM_LOOKUP)` || \
repl="$$repl ofmt_stub.o"; \
test -n "$$repl" && $(AR) rcs $@ $$repl; \
$(RM) $$tmpfiles
libmsvcrt.a libmsvcrtd.a: ofmt_stub.o
libmsvcr70.a libmsvcr70d.a: ofmt_stub.o
libmsvcr71.a libmsvcr71d.a: ofmt_stub.o
libcrtdll.a libcrtdlld.a: ofmt_stub.o
.c.o:
$(CC) -c $(ALL_CFLAGS) $< -o $@
# $RCSfile$: end of file

View File

@ -1,10 +0,0 @@
Free Microsoft C Runtime and import library definitions
Maintained by MinGW Developers
Send bug reports and questions to MinGW-users@lists.sourceforge.net
URL: http://www.mingw.org
A historical readme.txt exists and is distributed for your edification. The
references within may or may not be correct. Please do not rely on them. See
http://www.mingw.org for a list of valid references.

View File

@ -1,5 +0,0 @@
Finish the README.
Timezone variables for msvcrt >= 8.0(now as functions):
_get_daylight, _get_dstbias, _get_timezone, _get_tzname.
Functions with _s ("secure") suffix and may be deprecation
warnings for "non-secure" functions.

View File

@ -1,121 +0,0 @@
# aclocal.m4 for MinGW Runtime package. -*- Autoconf -*-
#
# This provides configure definitions used by all the winsup
# configure.in files.
# MINGW_AC_CONFIG_SRCDIR( VERSION_TAG, UNIQUE_FILE )
# --------------------------------------------------
# Wrapper for AC_CONFIG_SRCDIR; in addition to checking for a
# unique file reference within the source tree, it resolves the
# definition for PACKAGE_VERSION, based on a tagged definition
# within that file.
#
AC_DEFUN([MINGW_AC_CONFIG_SRCDIR],
[AC_CONFIG_SRCDIR([$2])
AC_MSG_CHECKING([package version])
PACKAGE_VERSION=`awk '$[2] == "'"$1"'" { print $[3] }' ${srcdir}/$2`
AC_MSG_RESULT([$PACKAGE_VERSION])dnl
]) #MINGW_AC_CONFIG_SRCDIR
# The following is copied from `no-executables.m4', in the top
# `src/config' directory.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# GCC_NO_EXECUTABLES
# ------------------
# FIXME: The GCC team has specific needs which the current Autoconf
# framework cannot solve elegantly. This macro implements a dirty
# hack until Autoconf is able to provide the services its users
# need.
#
# Several of the support libraries that are often built with GCC can't
# assume the tool-chain is already capable of linking a program: the
# compiler often expects to be able to link with some of such
# libraries.
#
# In several of these libraries, workarounds have been introduced to
# avoid the AC_PROG_CC_WORKS test, that would just abort their
# configuration. The introduction of AC_EXEEXT, enabled either by
# libtool or by CVS autoconf, have just made matters worse.
#
# Unlike the previous AC_NO_EXECUTABLES, this test does not
# disable link tests at autoconf time, but at configure time.
# This allows AC_NO_EXECUTABLES to be invoked conditionally.
AC_DEFUN_ONCE([GCC_NO_EXECUTABLES],
[m4_divert_push([KILL])
AC_BEFORE([$0], [_AC_COMPILER_EXEEXT])
AC_BEFORE([$0], [AC_LINK_IFELSE])
m4_define([_AC_COMPILER_EXEEXT],
AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
# FIXME: Cleanup?
AS_IF([AC_TRY_EVAL(ac_link)], [gcc_no_link=no], [gcc_no_link=yes])
if test x$gcc_no_link = xyes; then
# Setting cross_compile will disable run tests; it will
# also disable AC_CHECK_FILE but that's generally
# correct if we can't link.
cross_compiling=yes
EXEEXT=
else
m4_defn([_AC_COMPILER_EXEEXT])dnl
fi
)
m4_define([AC_LINK_IFELSE],
if test x$gcc_no_link = xyes; then
AC_MSG_ERROR([Link tests are not allowed after [[$0]].])
fi
m4_defn([AC_LINK_IFELSE]))
dnl This is a shame. We have to provide a default for some link tests,
dnl similar to the default for run tests.
m4_define([AC_FUNC_MMAP],
if test x$gcc_no_link = xyes; then
if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
ac_cv_func_mmap_fixed_mapped=no
fi
fi
if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then
m4_defn([AC_FUNC_MMAP])
fi)
m4_divert_pop()dnl
])# GCC_NO_EXECUTABLES
# MINGW_AC_MANPAGE_TRANSFORM
# --------------------------
# Provide support for specifying a manpage name transform.
# This allows e.g. Cygwin to add a `mingw-' prefix to MinGW specific
# manpages, when installing as a Cygwin subsystem.
#
# Activated by `--enable-mingw-manpage-transform[=SED-SCRIPT]', the
# default is disabled, (i.e. no transform). If enabled, without any
# SED-SCRIPT specification, the default `mingw-' prefix is added.
#
AC_DEFUN([MINGW_AC_MANPAGE_TRANSFORM],
[AC_ARG_ENABLE([mingw-manpage-transform],
[AS_HELP_STRING([--enable-mingw-manpage-transform@<:@=SED-SCRIPT@:>@],
[apply SED-SCRIPT @<:@s/^/mingw-/@:>@ to installed manpage names])]
[AS_HELP_STRING([--disable-mingw-manpage-transform],
[@<:@DEFAULT@:>@ don't transform installed manpage names])],
[case ${enableval} in
yes) mingw_manpage_transform='s,^,mingw-,' ;;
no) mingw_manpage_transform='s,x,x,' ;;
*) mingw_manpage_transform=${enableval} ;;
esac])
AC_SUBST([mingw_manpage_transform],[${mingw_manpage_transform-'s,x,x,'}])dnl
])# MINGW_AC_MANPAGE_TRANSFORM
# $RCSfile$: end of file: vim: ft=config

View File

@ -1,5 +0,0 @@
#include <fcntl.h>
/* Set default file mode to binary */
int _fmode = _O_BINARY;

File diff suppressed because it is too large Load Diff

1504
winsup/mingw/config.sub vendored

File diff suppressed because it is too large Load Diff

5028
winsup/mingw/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,89 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
dnl This file is part of winsup/mingw
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
AC_PREREQ([2.59])
AC_INIT([MinGW Runtime], [v3.x], [http://mingw.org/reporting_bugs], [mingwrt])
MINGW_AC_CONFIG_SRCDIR([__MINGW_VERSION], [include/_mingw.h])
AC_CANONICAL_SYSTEM
GCC_NO_EXECUTABLES
AC_PROG_CC
case "$with_cross_host" in
""|*cygwin*) all_dlls_host='all_dlls_host'
install_dlls_host='install_dlls_host';;
esac
AC_SUBST([with_cross_host])
AC_SUBST([all_dlls_host])
AC_SUBST([install_dlls_host])
AC_CHECK_TOOL([AR], [ar], [ar])
AC_CHECK_TOOL([AS], [as], [as])
AC_CHECK_TOOL([RANLIB], [ranlib], [ranlib])
AC_CHECK_TOOL([LD], [ld], [ld])
AC_CHECK_TOOL([NM], [nm], [nm])
AC_CHECK_TOOL([OBJCOPY], [objcopy], [objcopy])
AC_CHECK_TOOL([DLLTOOL], [dlltool], [dlltool])
AC_CHECK_TOOL([DLLWRAP], [dlltool], [dlltool])
AC_CHECK_TOOL([WINDRES], [windres], [windres])
AC_SUBST([NO_CYGWIN])
AC_SUBST([HEADER_SUBDIR])
AC_SUBST([W32API_INCLUDE], ['-I ${top_srcdir}/../w32api/include'])
# The following are used by the GCC profiling hooks...
#
AC_SUBST([LIBGMON_A], [libgmon.a])
AC_SUBST([CRT0S], ["gcrt1.o gcrt2.o"])
# FIXME: Why is this case determined on `target_os'?
# There is no code generator to be built here, so `target_os'
# should be irrelevant. Should it not rather be `host_os'?
#
case "$target_os" in
*cygwin*)
PACKAGE_TARNAME="mingw-runtime"
NO_CYGWIN="`cd ${srcdir}/../utils; pwd`/mingw"
# Install mingw headers in mingw subdirectory.
HEADER_SUBDIR="mingw"
CRT0S="gcrt0.o"
;;
esac
# THREAD_DLL used to be set within the above case and was mingwc for CRTDLL.
# I can find no reason to do this.
#
# FIXME: In the future I would like to change the dll name to mingwthrd to
# to match the libmingwthrd.a name.
AC_SUBST([THREAD_DLL], [mingwm])
# LIBM_A also used be set in the preceding case statement; it had the
# exact same assignment, (libm.a), in every case, so we may just as well
# assign it unconditionally, (making the default case redundant).
#
AC_SUBST([LIBM_A], [libm.a])
AC_SUBST([MKINSTALLDIRS], [$ac_aux_dir/mkinstalldirs])
AC_PROG_INSTALL
MINGW_AC_MANPAGE_TRANSFORM
AC_CONFIG_FILES([Makefile mingwex/Makefile profile/Makefile])
AC_OUTPUT
# $RCSfile$: end of file

View File

@ -1,105 +0,0 @@
#include <stdbool.h>
#include "cpu_features.h"
/* level 1 edx bits */
#define EDX_CX8 (1 << 8) /* CMPXCHG8B */
#define EDX_CMOV (1 << 15)
#define EDX_MMX (1 << 23)
#define EDX_FXSR (1 << 24) /* FXSAVE and FXRSTOR */
#define EDX_SSE (1 << 25)
#define EDX_SSE2 (1 << 26)
/* level 1 ecx bits */
#define ECX_SSE3 (1 << 0)
#define ECX_CX16 (1 << 13) /* CMPXCHG16B */
/* extended level 0x80000001 edx bits */
#define EDX_3DNOW (1 << 31)
#define EDX_3DNOWP (1 << 30)
#define EDX_LM (1 << 29) /*LONG MODE */
#define __cpuid(level,a,b,c,d) \
asm volatile ("cpuid;" \
: "=a" (a), "=b" (b), "=c" (c), "=d" (d)\
: "0" (level))
/* Combine the different cpuid flags into a single bitmap. */
unsigned int __cpu_features = 0;
void __cpu_features_init (void)
{
unsigned int eax, ebx, ecx, edx;
/* Try to change the value of CPUID bit (bit 21) in EFLAGS.
If the bit can be toggled, CPUID is supported. */
asm volatile ("pushfl; pushfl; popl %0;"
"movl %0,%1; xorl %2,%0;"
"pushl %0; popfl; pushfl; popl %0; popfl"
: "=&r" (eax), "=&r" (ebx)
: "i" (0x00200000));
if (((eax ^ ebx) & 0x00200000) == 0)
return;
__cpuid (0, eax, ebx, ecx, edx);
if (eax == 0)
return;
__cpuid (1, eax, ebx, ecx, edx);
if (edx & EDX_CX8)
__cpu_features |= _CRT_CMPXCHG8B;
if (edx & EDX_CMOV)
__cpu_features |= _CRT_CMOV;
if (edx & EDX_MMX)
__cpu_features |= _CRT_MMX;
if (edx & EDX_FXSR)
__cpu_features |= _CRT_FXSR;
if (edx & EDX_SSE)
__cpu_features |= _CRT_SSE;
if (edx & EDX_SSE2)
__cpu_features |= _CRT_SSE2;
if (ecx & ECX_SSE3)
__cpu_features |= _CRT_SSE3;
if (ecx & ECX_CX16)
__cpu_features |= _CRT_CMPXCHG16B;
__cpuid (0x80000000, eax, ebx, ecx, edx);
if (eax < 0x80000001)
return;
__cpuid (0x80000001, eax, ebx, ecx, edx);
if (edx & EDX_3DNOW)
__cpu_features |= _CRT_3DNOW;
if (edx & EDX_3DNOWP)
__cpu_features |= _CRT_3DNOWP;
return;
}
#ifdef TEST
#include <stdio.h>
#define report(feature) \
if ((feature) & __cpu_features) printf( #feature " found\n")
int main()
{
__cpu_features_init();
report(_CRT_CMPXCHG8B);
report(_CRT_CMOV);
report(_CRT_MMX);
report(_CRT_FXSR);
report(_CRT_SSE);
report(_CRT_SSE2);
report(_CRT_SSE3);
report(_CRT_CMPXCHG16B);
report(_CRT_3DNOW);
report(_CRT_3DNOWP);
return 0;
}
#endif

View File

@ -1,23 +0,0 @@
#ifndef _CPU_FEATURES_H
#define _CPU_FEATURES_H
#include <stdbool.h>
#define _CRT_CMPXCHG8B 0x0001
#define _CRT_CMOV 0x0002
#define _CRT_MMX 0x0004
#define _CRT_FXSR 0x0008
#define _CRT_SSE 0x0010
#define _CRT_SSE2 0x0020
#define _CRT_SSE3 0x0040
#define _CRT_CMPXCHG16B 0x0080
#define _CRT_3DNOW 0x0100
#define _CRT_3DNOWP 0x0200
extern unsigned int __cpu_features;
/* Currently we use this in fpenv functions */
#define __HAS_SSE __cpu_features & _CRT_SSE
#endif

View File

@ -1,297 +0,0 @@
/*
* crt1.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Source code for the startup proceedures used by all programs. This code
* is compiled to make crt1.o, which should be located in the library path.
*
*/
/* Hide the declaration of _fmode with dllimport attribute in stdlib.h to
avoid problems with older GCC. */
#define __IN_MINGW_RUNTIME
#include <stdlib.h>
#include <stdio.h>
#include <io.h>
#include <process.h>
#include <float.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <signal.h>
/* NOTE: The code for initializing the _argv, _argc, and environ variables
* has been moved to a separate .c file which is included in both
* crt1.c and dllcrt1.c. This means changes in the code don't have to
* be manually synchronized, but it does lead to this not-generally-
* a-good-idea use of include. */
#include "init.c"
#include "cpu_features.h"
extern void __main ();
extern void _pei386_runtime_relocator (void);
extern int main (int, char **, char **);
/* TLS initialization hook. */
extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback;
/*
* Must have the correct app type for MSVCRT.
*/
#ifdef __MSVCRT__
#define __UNKNOWN_APP 0
#define __CONSOLE_APP 1
#define __GUI_APP 2
__MINGW_IMPORT void __set_app_type(int);
#endif /* __MSVCRT__ */
/* Global _fmode for this .exe, not the one in msvcrt.dll,
The default is set in txtmode.o in libmingw32.a */
/* Override the dllimport'd declarations in stdlib.h */
#undef _fmode
extern int _fmode;
#ifdef __MSVCRT__
extern int* __p__fmode(void); /* To access the dll _fmode */
#endif
/*
* Setup the default file handles to have the _CRT_fmode mode, as well as
* any new files created by the user.
*/
extern int _CRT_fmode;
static void
_mingw32_init_fmode (void)
{
/* Don't set the std file mode if the user hasn't set any value for it. */
if (_CRT_fmode)
{
_fmode = _CRT_fmode;
/*
* This overrides the default file mode settings for stdin,
* stdout and stderr. At first I thought you would have to
* test with isatty, but it seems that the DOS console at
* least is smart enough to handle _O_BINARY stdout and
* still display correctly.
*/
if (stdin)
{
_setmode (_fileno (stdin), _CRT_fmode);
}
if (stdout)
{
_setmode (_fileno (stdout), _CRT_fmode);
}
if (stderr)
{
_setmode (_fileno (stderr), _CRT_fmode);
}
}
/* Now sync the dll _fmode to the one for this .exe. */
#ifdef __MSVCRT__
*__p__fmode() = _fmode;
#else
*_imp___fmode_dll = _fmode;
#endif
}
/* This function will be called when a trap occurs. Thanks to Jacob
Navia for his contribution. */
static CALLBACK long
_gnu_exception_handler (EXCEPTION_POINTERS * exception_data)
{
void (*old_handler) (int);
long action = EXCEPTION_CONTINUE_SEARCH;
int reset_fpu = 0;
switch (exception_data->ExceptionRecord->ExceptionCode)
{
case EXCEPTION_ACCESS_VIOLATION:
/* test if the user has set SIGSEGV */
old_handler = signal (SIGSEGV, SIG_DFL);
if (old_handler == SIG_IGN)
{
/* this is undefined if the signal was raised by anything other
than raise (). */
signal (SIGSEGV, SIG_IGN);
action = EXCEPTION_CONTINUE_EXECUTION;
}
else if (old_handler != SIG_DFL)
{
/* This means 'old' is a user defined function. Call it */
(*old_handler) (SIGSEGV);
action = EXCEPTION_CONTINUE_EXECUTION;
}
break;
case EXCEPTION_ILLEGAL_INSTRUCTION:
case EXCEPTION_PRIV_INSTRUCTION:
/* test if the user has set SIGILL */
old_handler = signal (SIGILL, SIG_DFL);
if (old_handler == SIG_IGN)
{
/* this is undefined if the signal was raised by anything other
than raise (). */
signal (SIGILL, SIG_IGN);
action = EXCEPTION_CONTINUE_EXECUTION;
}
else if (old_handler != SIG_DFL)
{
/* This means 'old' is a user defined function. Call it */
(*old_handler) (SIGILL);
action = EXCEPTION_CONTINUE_EXECUTION;
}
break;
case EXCEPTION_FLT_INVALID_OPERATION:
case EXCEPTION_FLT_DIVIDE_BY_ZERO:
case EXCEPTION_FLT_DENORMAL_OPERAND:
case EXCEPTION_FLT_OVERFLOW:
case EXCEPTION_FLT_UNDERFLOW:
case EXCEPTION_FLT_INEXACT_RESULT:
reset_fpu = 1;
/* fall through. */
case EXCEPTION_INT_DIVIDE_BY_ZERO:
/* test if the user has set SIGFPE */
old_handler = signal (SIGFPE, SIG_DFL);
if (old_handler == SIG_IGN)
{
signal (SIGFPE, SIG_IGN);
if (reset_fpu)
_fpreset ();
action = EXCEPTION_CONTINUE_EXECUTION;
}
else if (old_handler != SIG_DFL)
{
/* This means 'old' is a user defined function. Call it */
(*old_handler) (SIGFPE);
action = EXCEPTION_CONTINUE_EXECUTION;
}
break;
default:
break;
}
return action;
}
/*
* The function mainCRTStartup is the entry point for all console programs.
*/
static void __MINGW_ATTRIB_NORETURN
__mingw_CRTStartup (void)
{
int nRet;
/* Initialize TLS callback. */
if (__dyn_tls_init_callback != NULL)
__dyn_tls_init_callback (NULL, DLL_THREAD_ATTACH, NULL);
/*
* Set up the top-level exception handler so that signal handling
* works as expected. The mapping between ANSI/POSIX signals and
* Win32 SE is not 1-to-1, so caveat emptore.
*
*/
SetUnhandledExceptionFilter (_gnu_exception_handler);
/*
* Initialize floating point unit.
*/
__cpu_features_init (); /* Do we have SSE, etc.*/
_fpreset (); /* Supplied by the runtime library. */
/*
* Set up __argc, __argv and _environ.
*/
_mingw32_init_mainargs ();
/*
* Sets the default file mode.
* If _CRT_fmode is set, also set mode for stdin, stdout
* and stderr, as well
* NOTE: DLLs don't do this because that would be rude!
*/
_mingw32_init_fmode ();
/* Adust references to dllimported data that have non-zero offsets. */
_pei386_runtime_relocator ();
/* Align the stack to 16 bytes for the sake of SSE ops in main
or in functions inlined into main. */
asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
/* From libgcc.a, __main calls global class constructors via
__do_global_ctors, This in turn registers __do_global_dtors
as the first entry of the app's atexit table. We do this
explicitly at app startup rather than rely on gcc to generate
the call in main's prologue, since main may be imported from a dll
which has its own __do_global_ctors. */
__main ();
/*
* Call the main function. If the user does not supply one
* the one in the 'libmingw32.a' library will be linked in, and
* that one calls WinMain. See main.c in the 'lib' dir
* for more details.
*/
nRet = main (_argc, _argv, environ);
/*
* Perform exit processing for the C library. This means
* flushing output and calling 'atexit' registered functions.
*/
_cexit ();
ExitProcess (nRet);
}
/*
* The function mainCRTStartup is the entry point for all console programs.
*/
void
mainCRTStartup (void)
{
#ifdef __MSVCRT__
__set_app_type (__CONSOLE_APP);
#endif
__mingw_CRTStartup ();
}
/*
* For now the GUI startup function is the same as the console one.
* This simply gets rid of the annoying warning about not being able
* to find WinMainCRTStartup when linking GUI applications.
*/
void
WinMainCRTStartup (void)
{
#ifdef __MSVCRT__
__set_app_type (__GUI_APP);
#endif
__mingw_CRTStartup ();
}
/*
* We force use of library version of atexit, which is only
* visible in import lib as _imp__atexit
*/
extern int (*_imp__atexit)(void (*)(void));
int atexit (void (* pfn )(void) )
{
return ( (*_imp__atexit)(pfn));
}
/* Likewise for non-ANSI _onexit */
extern _onexit_t (*_imp___onexit)(_onexit_t);
_onexit_t
_onexit (_onexit_t pfn )
{
return (*_imp___onexit)(pfn);
}

View File

@ -1,695 +0,0 @@
;
;* crtdll.def
;* This file has no copyright assigned and is placed in the Public Domain.
;* This file is a part of the mingw-runtime package.
;* No warranty is given; refer to the file DISCLAIMER within the package.
;
; Exports from crtdll.dll from Windows 95 SYSTEM directory. Hopefully this
; should also work with the crtdll provided with Windows NT.
;
; NOTE: The crtdll is OBSOLETE and msvcrt should be used instead. The msvcrt
; is available for free download from Microsoft Corporation and will work on
; Windows 95. Support for the crtdll is deprecated and this file may be
; deleted in future versions.
;
; These three functions appear to be name mangled in some way, so GCC is
; probably not going to be able to use them in any case.
;
; ??2@YAPAXI@Z
; ??3@YAXPAX@Z
; ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z
;
; These are functions for which I have not yet written prototypes or
; otherwise set up (they are still included below though unlike those
; first three).
;
; _CIacos
; _CIasin
; _CIatan
; _CIatan2
; _CIcos
; _CIcosh
; _CIexp
; _CIfmod
; _CIlog
; _CIlog10
; _CIpow
; _CIsin
; _CIsinh
; _CIsqrt
; _CItan
; _CItanh
; __dllonexit
; __mb_cur_max_dll
; __threadhandle
; __threadid
; _abnormal_termination
; _acmdln_dll
; _aexit_rtn_dll
; _amsg_exit
; _commit
; _commode_dll
; _cpumode_dll
; _ctype
; _expand
; _fcloseall
; _filbuf
; _fileinfo_dll
; _flsbuf
; _flushall
; _fmode_dll
; _fpieee_flt
; _fsopen
; _ftol
; _getdiskfree
; _getdllprocaddr
; _getdrive
; _getdrives
; _getsystime
; _initterm
; _ismbbalnum
; _ismbbalpha
; _ismbbgraph
; _ismbbkalnum
; _ismbbkana
; _ismbbkpunct
; _ismbblead
; _ismbbprint
; _ismbbpunct
; _ismbbtrail
; _ismbcalpha
; _ismbcdigit
; _ismbchira
; _ismbckata
; _ismbcl0
; _ismbcl1
; _ismbcl2
; _ismbclegal
; _ismbclower
; _ismbcprint
; _ismbcspace
; _ismbcsymbol
; _ismbcupper
; _ismbslead
; _ismbstrail
; _lfind
; _loaddll
; _lrotl
; _lrotr
; _lsearch
; _makepath
; _matherr
; _mbbtombc
; _mbbtype
; _mbccpy
; _mbcjistojms
; _mbcjmstojis
; _mbclen
; _mbctohira
; _mbctokata
; _mbctolower
; _mbctombb
; _mbctoupper
; _mbctype
; _mbsbtype
; _mbscat
; _mbscmp
; _mbscpy
; _mbscspn
; _mbsdec
; _mbsdup
; _mbsicmp
; _mbsinc
; _mbslen
; _mbslwr
; _mbsnbcat
; _mbsnbcmp
; _mbsnbcnt
; _mbsnbcpy
; _mbsnbicmp
; _mbsnbset
; _mbsnccnt
; _mbsncmp
; _mbsncpy
; _mbsnextc
; _mbsnicmp
; _mbsninc
; _mbsnset
; _mbspbrk
; _mbsrchr
; _mbsrev
; _mbsset
; _mbsspn
; _mbsspnp
; _mbsstr
; _mbstrlen
; _mbsupr
; _onexit
; _osversion_dll
; _pctype_dll
; _purecall
; _pwctype_dll
; _rmtmp
; _rotl
; _rotr
; _setsystime
; _snprintf
; _snwprintf
; _splitpath
; _strdate
; _strdec
; _strinc
; _strncnt
; _strnextc
; _strninc
; _strspnp
; _strtime
; _tempnam
; _ultoa
; _unloaddll
; _vsnprintf
; _vsnwprintf
; _wtoi
; _wtol
;
EXPORTS
_CIacos
_CIasin
_CIatan
_CIatan2
_CIcos
_CIcosh
_CIexp
_CIfmod
_CIlog
_CIlog10
_CIpow
_CIsin
_CIsinh
_CIsqrt
_CItan
_CItanh
_HUGE_dll DATA
_XcptFilter
__GetMainArgs
__argc_dll DATA
__argv_dll DATA
__dllonexit
__doserrno
__fpecode
__isascii
__iscsym
__iscsymf
__mb_cur_max_dll DATA
__pxcptinfoptrs
__threadhandle
__threadid
__toascii
_abnormal_termination
_access
_acmdln_dll DATA
_aexit_rtn_dll DATA
_amsg_exit
_assert
_basemajor_dll DATA
_baseminor_dll DATA
_baseversion_dll DATA
_beep
_beginthread
_c_exit
_cabs
_cexit
_cgets
_chdir
_chdrive
_chgsign
_chmod
_chsize
_clearfp
_close
_commit
_commode_dll DATA
_control87
_controlfp
_copysign
_cprintf
_cpumode_dll DATA
_cputs
_creat
_cscanf
_ctype
_cwait
_daylight_dll DATA
_dup
_dup2
_ecvt
_endthread
_environ_dll DATA
_eof
_errno
_except_handler2
_execl
_execle
_execlp
_execlpe
_execv
_execve
_execvp
_execvpe
_exit
_expand
_fcloseall
_fcvt
_fdopen
_fgetchar
_fgetwchar
_filbuf
_fileinfo_dll DATA
_filelength
_fileno
_findclose
_findfirst
_findnext
_finite
_flsbuf
_flushall
_fmode_dll DATA
_fpclass
_fpieee_flt
_fpreset DATA
_fputchar
_fputwchar
_fsopen
_fstat
_ftime
_ftol
_fullpath
_futime
_gcvt
_get_osfhandle
_getch
_getche
_getcwd
_getdcwd
_getdiskfree
_getdllprocaddr
_getdrive
_getdrives
_getpid
_getsystime
_getw
_global_unwind2
_heapchk
_heapmin
_heapset
_heapwalk
_hypot
_initterm
_iob DATA
_isatty
_isctype
_ismbbalnum
_ismbbalpha
_ismbbgraph
_ismbbkalnum
_ismbbkana
_ismbbkpunct
_ismbblead
_ismbbprint
_ismbbpunct
_ismbbtrail
_ismbcalpha
_ismbcdigit
_ismbchira
_ismbckata
_ismbcl0
_ismbcl1
_ismbcl2
_ismbclegal
_ismbclower
_ismbcprint
_ismbcspace
_ismbcsymbol
_ismbcupper
_ismbslead
_ismbstrail
_isnan
_itoa
_j0
_j1
_jn
_kbhit
_lfind
_loaddll
_local_unwind2
_locking
_logb
_lrotl
_lrotr
_lsearch
_lseek
_ltoa
_makepath
_matherr
_mbbtombc
_mbbtype
_mbccpy
_mbcjistojms
_mbcjmstojis
_mbclen
_mbctohira
_mbctokata
_mbctolower
_mbctombb
_mbctoupper
_mbctype
_mbsbtype
_mbscat
_mbschr
_mbscmp
_mbscpy
_mbscspn
_mbsdec
_mbsdup
_mbsicmp
_mbsinc
_mbslen
_mbslwr
_mbsnbcat
_mbsnbcmp
_mbsnbcnt
_mbsnbcpy
_mbsnbicmp
_mbsnbset
_mbsncat
_mbsnccnt
_mbsncmp
_mbsncpy
_mbsnextc
_mbsnicmp
_mbsninc
_mbsnset
_mbspbrk
_mbsrchr
_mbsrev
_mbsset
_mbsspn
_mbsspnp
_mbsstr
_mbstok
_mbstrlen
_mbsupr
_memccpy
_memicmp
_mkdir
_mktemp
_msize
_nextafter
_onexit DATA
_open
_open_osfhandle
_osmajor_dll DATA
_osminor_dll DATA
_osmode_dll DATA
_osver_dll DATA
_osversion_dll DATA
_pclose
_pctype_dll DATA
_pgmptr_dll DATA
_pipe
_popen
_purecall
_putch
_putenv
_putw
_pwctype_dll DATA
_read
_rmdir
_rmtmp
_rotl
_rotr
_scalb
_searchenv
_seterrormode
_setjmp
_setmode
_setsystime
_sleep
_snprintf
_snwprintf
_sopen
_spawnl
_spawnle
_spawnlp
_spawnlpe
_spawnv
_spawnve
_spawnvp
_spawnvpe
_splitpath
_stat
_statusfp
_strcmpi
_strdate
_strdec
_strdup
_strerror
_stricmp
_stricoll
_strinc
_strlwr
_strncnt
_strnextc
_strnicmp
_strninc
_strnset
_strrev
_strset
_strspnp
_strtime
_strupr
_swab
_sys_errlist DATA
_sys_nerr_dll DATA
_tell
_tempnam
_timezone_dll DATA
_tolower
_toupper
_tzname DATA
_tzset
_ultoa
_umask
_ungetch
_unlink
_unloaddll
_utime
_vsnprintf
_vsnwprintf
_wcsdup
_wcsicmp
_wcsicoll
_wcslwr
_wcsnicmp
_wcsnset
_wcsrev
_wcsset
_wcsupr
_winmajor_dll DATA
_winminor_dll DATA
_winver_dll DATA
_write
_wtoi
_wtol
_y0
_y1
_yn
abort
abs
acos
asctime
asin
atan
atan2
atexit DATA
atof
atoi
atol
bsearch
calloc
ceil
clearerr
clock
cos
cosh
ctime
difftime
div
exit
exp
fabs
fclose
feof
ferror
fflush
fgetc
fgetpos
fgets
fgetwc
floor
fmod
fopen
fprintf
fputc
fputs
fputwc
fread
free
freopen
frexp
fscanf
fseek
fsetpos
ftell
fwprintf
fwrite
fwscanf
getc
getchar
getenv
gets
gmtime
is_wctype
isalnum
isalpha
iscntrl
isdigit
isgraph
isleadbyte
islower
isprint
ispunct
isspace
isupper
iswalnum
iswalpha
iswascii
iswcntrl
iswctype
iswdigit
iswgraph
iswlower
iswprint
iswpunct
iswspace
iswupper
iswxdigit
isxdigit
labs
ldexp
ldiv
localeconv
localtime
log
log10
longjmp
malloc
mblen
mbstowcs
mbtowc
memchr
memcmp
memcpy
memmove
memset
mktime
modf
perror
pow
printf
putc
putchar
puts
qsort
raise
rand
realloc
remove
rename
rewind
scanf
setbuf
setlocale
setvbuf
signal
sin
sinh
sprintf
sqrt
srand
sscanf
strcat
strchr
strcmp
strcoll
strcpy
strcspn
strerror
strftime
strlen
strncat
strncmp
strncpy
strpbrk
strrchr
strspn
strstr
strtod
strtok
strtol
strtoul
strxfrm
swprintf
swscanf
system
tan
tanh
time
tmpfile
tmpnam
tolower
toupper
towlower
towupper
ungetc
ungetwc
vfprintf
vfwprintf
vprintf
vsprintf
vswprintf
vwprintf
wcscat
wcschr
wcscmp
wcscoll
wcscpy
wcscspn
wcsftime
wcslen
wcsncat
wcsncmp
wcsncpy
wcspbrk
wcsrchr
wcsspn
wcsstr
wcstod
wcstok
wcstol
wcstombs
wcstoul
wcsxfrm
wctomb
wprintf
wscanf

View File

@ -1,14 +0,0 @@
/*
* crtmt.c
*
* This object file defines _CRT_MT to have a value of 1, which will
* turn on MT support in GCC runtime. This is only linked in when
* you specify -mthreads when linking with gcc. The Mingw support
* library, libmingw32.a, contains the complement, crtst.o, which
* sets this variable to 0.
*
* Mumit Khan <khan@nanotech.wisc.edu>
*
*/
int _CRT_MT = 1;

View File

@ -1,12 +0,0 @@
/*
* crtst.c
*
* This object file defines _CRT_MT to have a value of 0, which will
* turn off MT support in GCC runtime. This is linked by default unless
* you specify -mthreads when linking with gcc.
*
* Mumit Khan <khan@nanotech.wisc.edu>
*
*/
int _CRT_MT = 0;

View File

@ -1,192 +0,0 @@
/*
* dllcrt1.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Initialization code for DLLs.
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <io.h>
#include <process.h>
#include <errno.h>
#include <windows.h>
/* TLS initialization hook. */
extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback;
/* Unlike normal crt1, I don't initialize the FPU, because the process
* should have done that already. I also don't set the file handle modes,
* because that would be rude. */
#ifdef __GNUC__
extern void __main ();
extern void __do_global_dtors ();
#endif
typedef void (* p_atexit_fn )(void);
static p_atexit_fn* first_atexit;
static p_atexit_fn* next_atexit;
static void
__dll_exit (void);
/* This is based on the function in the Wine project's exit.c */
p_atexit_fn __dllonexit (p_atexit_fn, p_atexit_fn**, p_atexit_fn**);
extern BOOL WINAPI DllMain (HANDLE, DWORD, LPVOID);
extern void _pei386_runtime_relocator (void);
BOOL WINAPI
DllMainCRTStartup (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
{
BOOL bRet;
if (dwReason == DLL_PROCESS_ATTACH)
{
#ifdef DEBUG
printf ("%s: DLL_PROCESS_ATTACH (%d)\n", __FUNCTION__);
#endif
/* Initialize private atexit table for this dll.
32 is min size required by ANSI */
first_atexit = (p_atexit_fn*) malloc (32 * sizeof (p_atexit_fn));
if (first_atexit == NULL ) /* can't allocate memory */
{
errno=ENOMEM;
return FALSE;
}
*first_atexit = NULL;
next_atexit = first_atexit;
/* Initialize TLS callback. */
if (__dyn_tls_init_callback != NULL)
{
__dyn_tls_init_callback (hDll, DLL_THREAD_ATTACH, lpReserved);
}
/* Adust references to dllimported data (from other DLL's)
that have non-zero offsets. */
_pei386_runtime_relocator ();
#ifdef __GNUC__
/* From libgcc.a, __main calls global class constructors,
__do_global_ctors, which registers __do_global_dtors
as the first entry of the private atexit table we
have just initialised */
__main ();
#endif
}
/*
* Call the user-supplied DllMain subroutine.
* This has to come after initialization of atexit table and
* registration of global constructors.
* NOTE: DllMain is optional, so libmingw32.a includes a stub
* which will be used if the user does not supply one.
*/
bRet = DllMain (hDll, dwReason, lpReserved);
/* Handle case where DllMain returns FALSE on attachment attempt. */
if ( (dwReason == DLL_PROCESS_ATTACH) && !bRet)
{
#ifdef DEBUG
printf ("%s: DLL_PROCESS_ATTACH failed, cleaning up\n", __FUNCTION__);
#endif
__dll_exit (); /* Cleanup now. This will set first_atexit to NULL so we
know we've cleaned up */
}
if (dwReason == DLL_PROCESS_DETACH)
{
#ifdef DEBUG
printf ("%s: DLL_PROCESS_DETACH (%d)\n", __FUNCTION__);
#endif
/* If not attached, return FALSE. Cleanup already done above
if failed attachment attempt. */
if (! first_atexit )
bRet = FALSE;
else
/*
* We used to call __do_global_dtors () here. This is
* no longer necessary since __do_global_dtors is now
* registered at start (last out) of private atexit table.
*/
__dll_exit ();
}
return bRet;
}
static
void
__dll_exit(void)
/* Run LIFO terminators registered in private atexit table */
{
if ( first_atexit )
{
p_atexit_fn* __last = next_atexit - 1;
while ( __last >= first_atexit )
{
if ( *__last != NULL )
{
#ifdef DEBUG
printf ("%s: Calling exit function 0x%x from 0x%x\n",
__FUNCTION__, (unsigned)(*__last),(unsigned)__last);
#endif
(**__last) ();
}
__last--;
}
free ( first_atexit ) ;
first_atexit = NULL ;
}
/*
Make sure output buffers opened by DllMain or
atexit-registered functions are flushed before detaching,
otherwise we can have problems with redirected output.
*/
fflush (NULL);
}
/*
* The atexit exported from msvcrt.dll causes problems in DLLs.
* Here, we override the exported version of atexit with one that passes the
* private table initialised in DllMainCRTStartup to __dllonexit.
* That means we have to hide the mscvrt.dll atexit because the
* atexit defined here gets __dllonexit from the same lib.
*/
int
atexit (p_atexit_fn pfn )
{
#ifdef DEBUG
printf ("%s: registering exit function 0x%x at 0x%x\n",
__FUNCTION__, (unsigned)pfn, (unsigned)next_atexit);
#endif
return (__dllonexit (pfn, &first_atexit, &next_atexit)
== NULL ? -1 : 0 );
}
/*
* Likewise for non-ANSI function _onexit that may be called by
* code in the dll.
*/
_onexit_t
_onexit (_onexit_t pfn )
{
#ifdef DEBUG
printf ("%s: registering exit function 0x%x at 0x%x\n",
__FUNCTION__, (unsigned)pfn, (unsigned)next_atexit);
#endif
return ((_onexit_t) __dllonexit ((p_atexit_fn)pfn, &first_atexit, &next_atexit));
}

View File

@ -1,19 +0,0 @@
/*
* dllmain.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* A stub DllMain function which will be called by DLLs which do not
* have a user supplied DllMain.
*
*/
#include <windows.h>
BOOL WINAPI
DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
{
return TRUE;
}

View File

@ -1,79 +0,0 @@
/*
* gccmain.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* A separate version of __main, __do_global_ctors and __do_global_dtors for
* Mingw32 for use with Cygwin32 b19. Hopefully this object file will only
* be linked if the libgcc.a doesn't include __main, __do_global_dtors and
* __do_global_ctors.
*
*/
/* Needed for the atexit prototype. */
#include <stdlib.h>
typedef void (*func_ptr) (void);
extern func_ptr __CTOR_LIST__[];
extern func_ptr __DTOR_LIST__[];
void
__do_global_dtors (void)
{
static func_ptr *p = __DTOR_LIST__ + 1;
/*
* Call each destructor in the destructor list until a null pointer
* is encountered.
*/
while (*p)
{
(*(p)) ();
p++;
}
}
void
__do_global_ctors (void)
{
unsigned long nptrs = (unsigned long) __CTOR_LIST__[0];
unsigned i;
/*
* If the first entry in the constructor list is -1 then the list
* is terminated with a null entry. Otherwise the first entry was
* the number of pointers in the list.
*/
if (nptrs == -1)
{
for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++)
;
}
/*
* Go through the list backwards calling constructors.
*/
for (i = nptrs; i >= 1; i--)
{
__CTOR_LIST__[i] ();
}
/*
* Register the destructors for processing on exit.
*/
atexit (__do_global_dtors);
}
static int initialized = 0;
void
__main (void)
{
if (!initialized)
{
initialized = 1;
__do_global_ctors ();
}
}

View File

@ -1,303 +0,0 @@
#ifndef __MINGW_H
/*
* _mingw.h
*
* Mingw specific macros included by ALL include files.
*
* This file is part of the Mingw32 package.
*
* Contributors:
* Created by Mumit Khan <khan@xraylith.wisc.edu>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#define __MINGW_H
#define __MINGW_VERSION 4
#define __MINGW_MAJOR_VERSION 0
#define __MINGW_MINOR_VERSION 0
#define __MINGW_PATCHLEVEL 0
// These four macros are deprecated and will be removed in the next major
// version release.
#define __MINGW32_VERSION 3.20
#define __MINGW32_MAJOR_VERSION 3
#define __MINGW32_MINOR_VERSION 20
#define __MINGW32_PATCHLEVEL 0
#if __GNUC__ >= 3
#ifndef __PCC__
#pragma GCC system_header
#endif
#endif
/* These are defined by the user (or the compiler)
to specify how identifiers are imported from a DLL.
__DECLSPEC_SUPPORTED Defined if dllimport attribute is supported.
__MINGW_IMPORT The attribute definition to specify imported
variables/functions.
_CRTIMP As above. For MS compatibility.
__MINGW_VERSION Runtime version.
__MINGW_MAJOR_VERSION Runtime major version.
__MINGW_MINOR_VERSION Runtime minor version.
__MINGW_BUILD_DATE Runtime build date.
Macros to enable MinGW features which deviate from standard MSVC
compatible behaviour; these may be specified directly in user code,
activated implicitly, (e.g. by specifying _POSIX_C_SOURCE or such),
or by inclusion in __MINGW_FEATURES__:
__USE_MINGW_ANSI_STDIO Select a more ANSI C99 compatible
implementation of printf() and friends.
Other macros:
__int64 define to be long long. Using a typedef
doesn't work for "unsigned __int64"
All headers should include this first, and then use __DECLSPEC_SUPPORTED
to choose between the old ``__imp__name'' style or __MINGW_IMPORT
style declarations. */
/* Manifest definitions identifying the flag bits, controlling activation
* of MinGW features, as specified by the user in __MINGW_FEATURES__.
*/
#define __MINGW_ANSI_STDIO__ 0x0000000000000001ULL
/*
* The following three are not yet formally supported; they are
* included here, to document anticipated future usage.
*/
#define __MINGW_LC_EXTENSIONS__ 0x0000000000000050ULL
#define __MINGW_LC_MESSAGES__ 0x0000000000000010ULL
#define __MINGW_LC_ENVVARS__ 0x0000000000000040ULL
/* Try to avoid problems with outdated checks for GCC __attribute__ support. */
#undef __attribute__
#if defined (__PCC__)
# undef __DECLSPEC_SUPPORTED
# ifndef __MINGW_IMPORT
# define __MINGW_IMPORT extern
# endif
# ifndef _CRTIMP
# define _CRTIMP
# endif
# ifndef __cdecl
# define __cdecl _Pragma("cdecl")
# endif
# ifndef __stdcall
# define __stdcall _Pragma("stdcall")
# endif
# ifndef __int64
# define __int64 long long
# endif
# ifndef __int32
# define __int32 long
# endif
# ifndef __int16
# define __int16 short
# endif
# ifndef __int8
# define __int8 char
# endif
# ifndef __small
# define __small char
# endif
# ifndef __hyper
# define __hyper long long
# endif
# ifndef __volatile__
# define __volatile__ volatile
# endif
# ifndef __restrict__
# define __restrict__ restrict
# endif
# define NONAMELESSUNION
#elif defined(__GNUC__)
# ifdef __declspec
# ifndef __MINGW_IMPORT
/* Note the extern. This is needed to work around GCC's
limitations in handling dllimport attribute. */
# define __MINGW_IMPORT extern __attribute__ ((__dllimport__))
# endif
# ifndef _CRTIMP
# ifdef __USE_CRTIMP
# define _CRTIMP __attribute__ ((dllimport))
# else
# define _CRTIMP
# endif
# endif
# define __DECLSPEC_SUPPORTED
# else /* __declspec */
# undef __DECLSPEC_SUPPORTED
# undef __MINGW_IMPORT
# ifndef _CRTIMP
# define _CRTIMP
# endif
# endif /* __declspec */
/*
* The next two defines can cause problems if user code adds the
* __cdecl attribute like so:
* void __attribute__ ((__cdecl)) foo(void);
*/
# ifndef __cdecl
# define __cdecl __attribute__ ((__cdecl__))
# endif
# ifndef __stdcall
# define __stdcall __attribute__ ((__stdcall__))
# endif
# ifndef __int64
# define __int64 long long
# endif
# ifndef __int32
# define __int32 long
# endif
# ifndef __int16
# define __int16 short
# endif
# ifndef __int8
# define __int8 char
# endif
# ifndef __small
# define __small char
# endif
# ifndef __hyper
# define __hyper long long
# endif
#else /* ! __GNUC__ && ! __PCC__ */
# ifndef __MINGW_IMPORT
# define __MINGW_IMPORT __declspec(dllimport)
# endif
# ifndef _CRTIMP
# define _CRTIMP __declspec(dllimport)
# endif
# define __DECLSPEC_SUPPORTED
# define __attribute__(x) /* nothing */
#endif
#if defined (__GNUC__) && defined (__GNUC_MINOR__)
#define __MINGW_GNUC_PREREQ(major, minor) \
(__GNUC__ > (major) \
|| (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
#else
#define __MINGW_GNUC_PREREQ(major, minor) 0
#endif
#ifdef __cplusplus
# define __CRT_INLINE inline
#else
# if __GNUC_STDC_INLINE__
# define __CRT_INLINE extern inline __attribute__((__gnu_inline__))
# else
# define __CRT_INLINE extern __inline__
# endif
#endif
# ifdef __GNUC__
# define _CRTALIAS __CRT_INLINE __attribute__ ((__always_inline__))
# else
# define _CRTALIAS __CRT_INLINE
# endif
#ifdef __cplusplus
# define __UNUSED_PARAM(x)
#else
# ifdef __GNUC__
# define __UNUSED_PARAM(x) x __attribute__ ((__unused__))
# else
# define __UNUSED_PARAM(x) x
# endif
#endif
#ifdef __GNUC__
#define __MINGW_ATTRIB_NORETURN __attribute__ ((__noreturn__))
#define __MINGW_ATTRIB_CONST __attribute__ ((__const__))
#else
#define __MINGW_ATTRIB_NORETURN
#define __MINGW_ATTRIB_CONST
#endif
#if __MINGW_GNUC_PREREQ (3, 0)
#define __MINGW_ATTRIB_MALLOC __attribute__ ((__malloc__))
#define __MINGW_ATTRIB_PURE __attribute__ ((__pure__))
#else
#define __MINGW_ATTRIB_MALLOC
#define __MINGW_ATTRIB_PURE
#endif
/* Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
variadiac macro facility, because variadic macros cause syntax
errors with --traditional-cpp. */
#if __MINGW_GNUC_PREREQ (3, 3)
#define __MINGW_ATTRIB_NONNULL(arg) __attribute__ ((__nonnull__ (arg)))
#else
#define __MINGW_ATTRIB_NONNULL(arg)
#endif /* GNUC >= 3.3 */
#if __MINGW_GNUC_PREREQ (3, 1)
#define __MINGW_ATTRIB_DEPRECATED __attribute__ ((__deprecated__))
#else
#define __MINGW_ATTRIB_DEPRECATED
#endif /* GNUC >= 3.1 */
#if __MINGW_GNUC_PREREQ (3, 3)
#define __MINGW_NOTHROW __attribute__ ((__nothrow__))
#else
#define __MINGW_NOTHROW
#endif /* GNUC >= 3.3 */
/* TODO: Mark (almost) all CRT functions as __MINGW_NOTHROW. This will
allow GCC to optimize away some EH unwind code, at least in DW2 case. */
#ifndef __MSVCRT_VERSION__
/* High byte is the major version, low byte is the minor. */
# define __MSVCRT_VERSION__ 0x0600
#endif
/* Activation of MinGW specific extended features:
*/
#ifndef __USE_MINGW_ANSI_STDIO
/*
* If user didn't specify it explicitly...
*/
# if defined __STRICT_ANSI__ || defined _ISOC99_SOURCE \
|| defined _POSIX_SOURCE || defined _POSIX_C_SOURCE \
|| defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED \
|| defined _GNU_SOURCE || defined _BSD_SOURCE \
|| defined _SVID_SOURCE
/*
* but where any of these source code qualifiers are specified,
* then assume ANSI I/O standards are preferred over Microsoft's...
*/
# define __USE_MINGW_ANSI_STDIO 1
# else
/*
* otherwise use whatever __MINGW_FEATURES__ specifies...
*/
# define __USE_MINGW_ANSI_STDIO (__MINGW_FEATURES__ & __MINGW_ANSI_STDIO__)
# endif
#endif
struct threadlocalinfostruct;
struct threadmbinfostruct;
typedef struct threadlocalinfostruct *pthreadlocinfo;
typedef struct threadmbcinfostruct *pthreadmbcinfo;
typedef struct localeinfo_struct {
pthreadlocinfo locinfo;
pthreadmbcinfo mbcinfo;
} _locale_tstruct, *_locale_t;
#endif /* __MINGW_H */

View File

@ -1,51 +0,0 @@
/*
* assert.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Define the assert macro for debug output.
*
*/
/* We should be able to include this file multiple times to allow the assert
macro to be enabled/disabled for different parts of code. So don't add a
header guard. */
#ifndef RC_INVOKED
/* All the headers include this file. */
#include <_mingw.h>
#undef assert
#ifdef __cplusplus
extern "C" {
#endif
#ifdef NDEBUG
/*
* If not debugging, assert does nothing.
*/
#define assert(x) ((void)0)
#else /* debugging enabled */
/*
* CRTDLL nicely supplies a function which does the actual output and
* call to abort.
*/
_CRTIMP void __cdecl __MINGW_NOTHROW _assert (const char*, const char*, int) __MINGW_ATTRIB_NORETURN;
/*
* Definition of the assert macro.
*/
#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
#endif /* NDEBUG */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */

View File

@ -1,200 +0,0 @@
/*
* complex.h
*
* This file is part of the Mingw32 package.
*
* Contributors:
* Created by Danny Smith <dannysmith@users.sourceforge.net>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef _COMPLEX_H_
#define _COMPLEX_H_
/* All the headers include this file. */
#include <_mingw.h>
/* These macros are specified by C99 standard */
#ifndef __cplusplus
#define complex _Complex
#endif
#define _Complex_I (0.0F + 1.0iF)
/* GCC doesn't support _Imaginary type yet, so we don't
define _Imaginary_I */
#define I _Complex_I
#ifdef __cplusplus
extern "C" {
#endif
#ifndef RC_INVOKED
double __MINGW_ATTRIB_CONST creal (double _Complex);
double __MINGW_ATTRIB_CONST cimag (double _Complex);
double __MINGW_ATTRIB_CONST carg (double _Complex);
double __MINGW_ATTRIB_CONST cabs (double _Complex);
double _Complex __MINGW_ATTRIB_CONST conj (double _Complex);
double _Complex cacos (double _Complex);
double _Complex casin (double _Complex);
double _Complex catan (double _Complex);
double _Complex ccos (double _Complex);
double _Complex csin (double _Complex);
double _Complex ctan (double _Complex);
double _Complex cacosh (double _Complex);
double _Complex casinh (double _Complex);
double _Complex catanh (double _Complex);
double _Complex ccosh (double _Complex);
double _Complex csinh (double _Complex);
double _Complex ctanh (double _Complex);
double _Complex cexp (double _Complex);
double _Complex clog (double _Complex);
double _Complex cpow (double _Complex, double _Complex);
double _Complex csqrt (double _Complex);
double _Complex __MINGW_ATTRIB_CONST cproj (double _Complex);
float __MINGW_ATTRIB_CONST crealf (float _Complex);
float __MINGW_ATTRIB_CONST cimagf (float _Complex);
float __MINGW_ATTRIB_CONST cargf (float _Complex);
float __MINGW_ATTRIB_CONST cabsf (float _Complex);
float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex);
float _Complex cacosf (float _Complex);
float _Complex casinf (float _Complex);
float _Complex catanf (float _Complex);
float _Complex ccosf (float _Complex);
float _Complex csinf (float _Complex);
float _Complex ctanf (float _Complex);
float _Complex cacoshf (float _Complex);
float _Complex casinhf (float _Complex);
float _Complex catanhf (float _Complex);
float _Complex ccoshf (float _Complex);
float _Complex csinhf (float _Complex);
float _Complex ctanhf (float _Complex);
float _Complex cexpf (float _Complex);
float _Complex clogf (float _Complex);
float _Complex cpowf (float _Complex, float _Complex);
float _Complex csqrtf (float _Complex);
float _Complex __MINGW_ATTRIB_CONST cprojf (float _Complex);
long double __MINGW_ATTRIB_CONST creall (long double _Complex);
long double __MINGW_ATTRIB_CONST cimagl (long double _Complex);
long double __MINGW_ATTRIB_CONST cargl (long double _Complex);
long double __MINGW_ATTRIB_CONST cabsl (long double _Complex);
long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex);
long double _Complex cacosl (long double _Complex);
long double _Complex casinl (long double _Complex);
long double _Complex catanl (long double _Complex);
long double _Complex ccosl (long double _Complex);
long double _Complex csinl (long double _Complex);
long double _Complex ctanl (long double _Complex);
long double _Complex cacoshl (long double _Complex);
long double _Complex casinhl (long double _Complex);
long double _Complex catanhl (long double _Complex);
long double _Complex ccoshl (long double _Complex);
long double _Complex csinhl (long double _Complex);
long double _Complex ctanhl (long double _Complex);
long double _Complex cexpl (long double _Complex);
long double _Complex clogl (long double _Complex);
long double _Complex cpowl (long double _Complex, long double _Complex);
long double _Complex csqrtl (long double _Complex);
long double _Complex __MINGW_ATTRIB_CONST cprojl (long double _Complex);
#ifdef __GNUC__
/* double */
__CRT_INLINE double __MINGW_ATTRIB_CONST creal (double _Complex _Z)
{
return __real__ _Z;
}
__CRT_INLINE double __MINGW_ATTRIB_CONST cimag (double _Complex _Z)
{
return __imag__ _Z;
}
__CRT_INLINE double _Complex __MINGW_ATTRIB_CONST conj (double _Complex _Z)
{
return __extension__ ~_Z;
}
__CRT_INLINE double __MINGW_ATTRIB_CONST carg (double _Complex _Z)
{
double res;
__asm__ ("fpatan;"
: "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
return res;
}
/* float */
__CRT_INLINE float __MINGW_ATTRIB_CONST crealf (float _Complex _Z)
{
return __real__ _Z;
}
__CRT_INLINE float __MINGW_ATTRIB_CONST cimagf (float _Complex _Z)
{
return __imag__ _Z;
}
__CRT_INLINE float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex _Z)
{
return __extension__ ~_Z;
}
__CRT_INLINE float __MINGW_ATTRIB_CONST cargf (float _Complex _Z)
{
float res;
__asm__ ("fpatan;"
: "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
return res;
}
/* long double */
__CRT_INLINE long double __MINGW_ATTRIB_CONST creall (long double _Complex _Z)
{
return __real__ _Z;
}
__CRT_INLINE long double __MINGW_ATTRIB_CONST cimagl (long double _Complex _Z)
{
return __imag__ _Z;
}
__CRT_INLINE long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex _Z)
{
return __extension__ ~_Z;
}
__CRT_INLINE long double __MINGW_ATTRIB_CONST cargl (long double _Complex _Z)
{
long double res;
__asm__ ("fpatan;"
: "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
return res;
}
#endif /* __GNUC__ */
#endif /* RC_INVOKED */
#ifdef __cplusplus
}
#endif
#endif /* _COMPLEX_H */

View File

@ -1,53 +0,0 @@
/*
* conio.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Low level console I/O functions. Pretty please try to use the ANSI
* standard ones if you are writing new code.
*
*/
#ifndef _CONIO_H_
#define _CONIO_H_
/* All the headers include this file. */
#include <_mingw.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP char* __cdecl __MINGW_NOTHROW _cgets (char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _cprintf (const char*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _cputs (const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _cscanf (char*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _getch (void);
_CRTIMP int __cdecl __MINGW_NOTHROW _getche (void);
_CRTIMP int __cdecl __MINGW_NOTHROW _kbhit (void);
_CRTIMP int __cdecl __MINGW_NOTHROW _putch (int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ungetch (int);
#ifndef _NO_OLDNAMES
_CRTIMP int __cdecl __MINGW_NOTHROW getch (void);
_CRTIMP int __cdecl __MINGW_NOTHROW getche (void);
_CRTIMP int __cdecl __MINGW_NOTHROW kbhit (void);
_CRTIMP int __cdecl __MINGW_NOTHROW putch (int);
_CRTIMP int __cdecl __MINGW_NOTHROW ungetch (int);
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _CONIO_H_ */

View File

@ -1,275 +0,0 @@
/*
* ctype.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Functions for testing character types and converting characters.
*
*/
#ifndef _CTYPE_H_
#define _CTYPE_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_wchar_t
#define __need_wint_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
/*
* The following flags are used to tell iswctype and _isctype what character
* types you are looking for.
*/
#define _UPPER 0x0001
#define _LOWER 0x0002
#define _DIGIT 0x0004
#define _SPACE 0x0008 /* HT LF VT FF CR SP */
#define _PUNCT 0x0010
#define _CONTROL 0x0020
/* _BLANK is set for SP and non-ASCII horizontal space chars (eg,
"no-break space", 0xA0, in CP1250) but not for HT. */
#define _BLANK 0x0040
#define _HEX 0x0080
#define _LEADBYTE 0x8000
#define _ALPHA 0x0103
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP int __cdecl __MINGW_NOTHROW isalnum(int);
_CRTIMP int __cdecl __MINGW_NOTHROW isalpha(int);
_CRTIMP int __cdecl __MINGW_NOTHROW iscntrl(int);
_CRTIMP int __cdecl __MINGW_NOTHROW isdigit(int);
_CRTIMP int __cdecl __MINGW_NOTHROW isgraph(int);
_CRTIMP int __cdecl __MINGW_NOTHROW islower(int);
_CRTIMP int __cdecl __MINGW_NOTHROW isprint(int);
_CRTIMP int __cdecl __MINGW_NOTHROW ispunct(int);
_CRTIMP int __cdecl __MINGW_NOTHROW isspace(int);
_CRTIMP int __cdecl __MINGW_NOTHROW isupper(int);
_CRTIMP int __cdecl __MINGW_NOTHROW isxdigit(int);
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined __STRICT_ANSI__
int __cdecl __MINGW_NOTHROW isblank (int);
#endif
#ifndef __STRICT_ANSI__
_CRTIMP int __cdecl __MINGW_NOTHROW _isctype (int, int);
#endif
/* These are the ANSI versions, with correct checking of argument */
_CRTIMP int __cdecl __MINGW_NOTHROW tolower(int);
_CRTIMP int __cdecl __MINGW_NOTHROW toupper(int);
/*
* NOTE: The above are not old name type wrappers, but functions exported
* explicitly by MSVCRT/CRTDLL. However, underscored versions are also
* exported.
*/
#ifndef __STRICT_ANSI__
/*
* These are the cheap non-std versions: The return values are undefined
* if the argument is not ASCII char or is not of appropriate case
*/
_CRTIMP int __cdecl __MINGW_NOTHROW _tolower(int);
_CRTIMP int __cdecl __MINGW_NOTHROW _toupper(int);
#endif
/* Also defined in stdlib.h */
#ifndef MB_CUR_MAX
#ifdef __DECLSPEC_SUPPORTED
# ifdef __MSVCRT__
# define MB_CUR_MAX __mb_cur_max
__MINGW_IMPORT int __mb_cur_max;
# else /* not __MSVCRT */
# define MB_CUR_MAX __mb_cur_max_dll
__MINGW_IMPORT int __mb_cur_max_dll;
# endif /* not __MSVCRT */
#else /* ! __DECLSPEC_SUPPORTED */
# ifdef __MSVCRT__
extern int* _imp____mb_cur_max;
# define MB_CUR_MAX (*_imp____mb_cur_max)
# else /* not __MSVCRT */
extern int* _imp____mb_cur_max_dll;
# define MB_CUR_MAX (*_imp____mb_cur_max_dll)
# endif /* not __MSVCRT */
#endif /* __DECLSPEC_SUPPORTED */
#endif /* MB_CUR_MAX */
#ifdef __DECLSPEC_SUPPORTED
# if __MSVCRT_VERSION__ <= 0x0700
__MINGW_IMPORT unsigned short _ctype[];
# endif
# ifdef __MSVCRT__
__MINGW_IMPORT unsigned short* _pctype;
# else /* CRTDLL */
__MINGW_IMPORT unsigned short* _pctype_dll;
# define _pctype _pctype_dll
# endif
#else /* __DECLSPEC_SUPPORTED */
# if __MSVCRT_VERSION__ <= 0x0700
extern unsigned short** _imp___ctype;
# define _ctype (*_imp___ctype)
# endif
# ifdef __MSVCRT__
extern unsigned short** _imp___pctype;
# define _pctype (*_imp___pctype)
# else /* CRTDLL */
extern unsigned short** _imp___pctype_dll;
# define _pctype (*_imp___pctype_dll)
# endif /* CRTDLL */
#endif /* __DECLSPEC_SUPPORTED */
/*
* Use inlines here rather than macros, because macros will upset
* C++ usage (eg, ::isalnum), and so usually get undefined
*
* According to standard for SB chars, these function are defined only
* for input values representable by unsigned char or EOF.
* Thus, there is no range test.
* This reproduces behaviour of MSVCRT.dll lib implemention for SB chars.
*
* If no MB char support is needed, these can be simplified even
* more by command line define -DMB_CUR_MAX=1. The compiler will then
* optimise away the constant condition.
*/
#if !(defined (__NO_INLINE__) || defined (__NO_CTYPE_INLINES) \
|| defined (__STRICT_ANSI__))
/* use simple lookup if SB locale, else _isctype() */
#define __ISCTYPE(c, mask) (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask))
__CRT_INLINE int __cdecl __MINGW_NOTHROW isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW isalpha(int c) {return __ISCTYPE(c, _ALPHA);}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iscntrl(int c) {return __ISCTYPE(c, _CONTROL);}
__CRT_INLINE int __cdecl __MINGW_NOTHROW isdigit(int c) {return __ISCTYPE(c, _DIGIT);}
__CRT_INLINE int __cdecl __MINGW_NOTHROW isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW islower(int c) {return __ISCTYPE(c, _LOWER);}
__CRT_INLINE int __cdecl __MINGW_NOTHROW isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW ispunct(int c) {return __ISCTYPE(c, _PUNCT);}
__CRT_INLINE int __cdecl __MINGW_NOTHROW isspace(int c) {return __ISCTYPE(c, _SPACE);}
__CRT_INLINE int __cdecl __MINGW_NOTHROW isupper(int c) {return __ISCTYPE(c, _UPPER);}
__CRT_INLINE int __cdecl __MINGW_NOTHROW isxdigit(int c) {return __ISCTYPE(c, _HEX);}
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined __STRICT_ANSI__
__CRT_INLINE int __cdecl __MINGW_NOTHROW isblank (int c)
{return (__ISCTYPE(c, _BLANK) || c == '\t');}
#endif
/* these reproduce behaviour of lib underscored versions */
__CRT_INLINE int __cdecl __MINGW_NOTHROW _tolower(int c) {return ( c -'A'+'a');}
__CRT_INLINE int __cdecl __MINGW_NOTHROW _toupper(int c) {return ( c -'a'+'A');}
/* TODO? Is it worth inlining ANSI tolower, toupper? Probably only
if we only want C-locale. */
#endif /* _NO_CTYPE_INLINES */
/* Wide character equivalents */
#ifndef WEOF
#define WEOF (wchar_t)(0xFFFF)
#endif
#ifndef _WCTYPE_T_DEFINED
typedef wchar_t wctype_t;
#define _WCTYPE_T_DEFINED
#endif
_CRTIMP int __cdecl __MINGW_NOTHROW iswalnum(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswalpha(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswascii(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswcntrl(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswctype(wint_t, wctype_t);
_CRTIMP int __cdecl __MINGW_NOTHROW is_wctype(wint_t, wctype_t); /* Obsolete! */
_CRTIMP int __cdecl __MINGW_NOTHROW iswdigit(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswgraph(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswlower(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswprint(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswpunct(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswspace(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswupper(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswxdigit(wint_t);
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined __STRICT_ANSI__ || defined __cplusplus
int __cdecl __MINGW_NOTHROW iswblank (wint_t);
#endif
/* Older MS docs uses wchar_t for arg and return type, while newer
online MS docs say arg is wint_t and return is int.
ISO C uses wint_t for both. */
_CRTIMP wint_t __cdecl __MINGW_NOTHROW towlower (wint_t);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW towupper (wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW isleadbyte (int);
/* Also in wctype.h */
#if ! (defined (__NO_INLINE__) || defined(__NO_CTYPE_INLINES) \
|| defined(__WCTYPE_INLINES_DEFINED))
#define __WCTYPE_INLINES_DEFINED
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined __STRICT_ANSI__ || defined __cplusplus
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswblank (wint_t wc)
{return (iswctype(wc,_BLANK) || wc == L'\t');}
#endif
#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
#ifndef __STRICT_ANSI__
int __cdecl __MINGW_NOTHROW __isascii (int);
int __cdecl __MINGW_NOTHROW __toascii (int);
int __cdecl __MINGW_NOTHROW __iscsymf (int); /* Valid first character in C symbol */
int __cdecl __MINGW_NOTHROW __iscsym (int); /* Valid character in C symbol (after first) */
#if !(defined (__NO_INLINE__) || defined (__NO_CTYPE_INLINES))
__CRT_INLINE int __cdecl __MINGW_NOTHROW __isascii(int c) {return ((c & ~0x7F) == 0);}
__CRT_INLINE int __cdecl __MINGW_NOTHROW __toascii(int c) {return (c & 0x7F);}
__CRT_INLINE int __cdecl __MINGW_NOTHROW __iscsymf(int c) {return (isalpha(c) || (c == '_'));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW __iscsym(int c) {return (isalnum(c) || (c == '_'));}
#endif /* __NO_CTYPE_INLINES */
#ifndef _NO_OLDNAMES
/* Not _CRTIMP */
int __cdecl __MINGW_NOTHROW isascii (int);
int __cdecl __MINGW_NOTHROW toascii (int);
int __cdecl __MINGW_NOTHROW iscsymf (int);
int __cdecl __MINGW_NOTHROW iscsym (int);
#endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _CTYPE_H_ */

View File

@ -1,26 +0,0 @@
/*
* dir.h
*
* This file OBSOLESCENT and only provided for backward compatibility.
* Please use io.h instead.
*
* This file is part of the Mingw32 package.
*
* Contributors:
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
* Mumit Khan <khan@xraylith.wisc.edu>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#include <io.h>

View File

@ -1,73 +0,0 @@
/*
* direct.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Functions for manipulating paths and directories (included from io.h)
* plus functions for setting the current drive.
*
*/
#ifndef _DIRECT_H_
#define _DIRECT_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_wchar_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
#include <io.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _DISKFREE_T_DEFINED
/* needed by _getdiskfree (also in dos.h) */
struct _diskfree_t {
unsigned total_clusters;
unsigned avail_clusters;
unsigned sectors_per_cluster;
unsigned bytes_per_sector;
};
#define _DISKFREE_T_DEFINED
#endif
/*
* You really shouldn't be using these. Use the Win32 API functions instead.
* However, it does make it easier to port older code.
*/
_CRTIMP int __cdecl __MINGW_NOTHROW _getdrive (void);
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW _getdrives(void);
_CRTIMP int __cdecl __MINGW_NOTHROW _chdrive (int);
_CRTIMP char* __cdecl __MINGW_NOTHROW _getdcwd (int, char*, int);
_CRTIMP unsigned __cdecl __MINGW_NOTHROW _getdiskfree (unsigned, struct _diskfree_t *);
#ifndef _NO_OLDNAMES
# define diskfree_t _diskfree_t
#endif
#ifndef _WDIRECT_DEFINED
/* wide character versions. Also in wchar.h */
#ifdef __MSVCRT__
_CRTIMP int __cdecl __MINGW_NOTHROW _wchdir(const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetcwd(wchar_t*, int);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetdcwd(int, wchar_t*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _wmkdir(const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wrmdir(const wchar_t*);
#endif /* __MSVCRT__ */
#define _WDIRECT_DEFINED
#endif
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _DIRECT_H_ */

View File

@ -1,143 +0,0 @@
/*
* DIRENT.H (formerly DIRLIB.H)
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
*/
#ifndef _DIRENT_H_
#define _DIRENT_H_
/* All the headers include this file. */
#include <_mingw.h>
#include <io.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
struct dirent
{
long d_ino; /* Always zero. */
unsigned short d_reclen; /* Always zero. */
unsigned short d_namlen; /* Length of name in d_name. */
/* The following exactly mimic the layout of _finddata_t ...
*/
unsigned d_type; /* File attributes */
time_t d_time_create;
time_t d_time_access; /* always midnight local time */
time_t d_time_write;
_fsize_t d_size;
/*
* ...so that we may map a union of _finddata_t at the
* location of d_type (corresponding to _finddata_t.attrib),
* and thus map this directly to the _findfirst/_findnext
* returned field.
*/
char d_name[FILENAME_MAX]; /* File name. */
};
/*
* This opaque data type represents the private structure
* through which a directory stream is referenced.
*/
typedef union __dirstream_t DIR;
DIR* __cdecl __MINGW_NOTHROW opendir (const char*);
struct dirent* __cdecl __MINGW_NOTHROW readdir (DIR*);
int __cdecl __MINGW_NOTHROW closedir (DIR*);
void __cdecl __MINGW_NOTHROW rewinddir (DIR*);
long __cdecl __MINGW_NOTHROW telldir (DIR*);
void __cdecl __MINGW_NOTHROW seekdir (DIR*, long);
/* wide char versions */
struct _wdirent
{
long d_ino; /* Always zero. */
unsigned short d_reclen; /* Always zero. */
unsigned short d_namlen; /* Length of name in d_name. */
/* The following exactly mimic the layout of _wfinddata_t ...
*/
unsigned d_type; /* File attributes */
time_t d_time_create; /* -1 for FAT file systems */
time_t d_time_access; /* -1 for FAT file systems */
time_t d_time_write;
_fsize_t d_size;
/*
* ...so that we may map a union of _wfinddata_t at the
* location of d_type (corresponding to _wfinddata_t.attrib),
* and thus map this directly to the _wfindfirst/_wfindnext
* returned field.
*/
wchar_t d_name[FILENAME_MAX]; /* File name. */
};
/*
* This opaque data type represents the private structure
* through which a wide directory stream is referenced.
*/
typedef union __wdirstream_t _WDIR;
_WDIR* __cdecl __MINGW_NOTHROW _wopendir (const wchar_t*);
struct _wdirent* __cdecl __MINGW_NOTHROW _wreaddir (_WDIR*);
int __cdecl __MINGW_NOTHROW _wclosedir (_WDIR*);
void __cdecl __MINGW_NOTHROW _wrewinddir (_WDIR*);
long __cdecl __MINGW_NOTHROW _wtelldir (_WDIR*);
void __cdecl __MINGW_NOTHROW _wseekdir (_WDIR*, long);
#ifdef __cplusplus
}
#endif
#if defined(_BSD_SOURCE) || defined(_WIN32)
/*
* BSD-ish systems define manifest constants for the d_type field;
* although probably only DT_REG and DT_DIR are useful on Win32, we
* try to map them as best we can from the _finddata.attrib field.
*
* The relevant Microsoft manifest values are:
*
* _A_NORMAL (0x0000) normal file: best fit for DT_REG
* _A_RDONLY (0x0001) read-only: no BSD d_type equivalent
* _A_HIDDEN (0x0002) hidden entity: no BSD equivalent
* _A_SYSTEM (0x0004) system entity: no BSD equivalent
* _A_VOLID (0x0008) volume label: no BSD equivalent
* _A_SUBDIR (0x0010) directory: best fit for DT_DIR
* _A_ARCH (0x0020) "dirty": no BSD equivalent
*
* Thus, we may immediately define:
*/
#define DT_REG _A_NORMAL
#define DT_DIR _A_SUBDIR
/* The remaining BSD d_type manifest values have no Win32 equivalents;
* we will define them artificially, and then we will ensure that our
* opendir()/readdir() implementation will never assign them; (we will
* substitute DT_UNKNOWN, but it would be unwise to simply make these
* equivalent to that, since an application is likely to simply check
* for d_type equal to any one of these defined types, and thus could
* mistakenly identify DT_UNKNOWN as being of the tested type):
*/
#define DT_BLK (((_A_SUBDIR) << 4) | DT_UNKNOWN)
#define DT_CHR (((_A_SUBDIR) << 5) | DT_UNKNOWN)
#define DT_FIFO (((_A_SUBDIR) << 6) | DT_UNKNOWN)
#define DT_LNK (((_A_SUBDIR) << 7) | DT_UNKNOWN)
#define DT_SOCK (((_A_SUBDIR) << 8) | DT_UNKNOWN)
/* No file system entity can ever be simultaneously a volume label
* and a directory; we will exploit this to unambiguously define:
*/
#define DT_UNKNOWN (_A_VOLID | _A_SUBDIR)
#endif /* _BSD_SOURCE */
#endif /* ! RC_INVOKED */
#endif /* !defined _DIRENT_H_ */

View File

@ -1,89 +0,0 @@
/*
* dos.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* DOS-specific functions and structures.
*
*/
#ifndef _DOS_H_
#define _DOS_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_wchar_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
/* For DOS file attributes */
#include <io.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __MSVCRT__ /* these are in CRTDLL, but not MSVCRT */
#ifndef __DECLSPEC_SUPPORTED
extern unsigned int *_imp___basemajor_dll;
extern unsigned int *_imp___baseminor_dll;
extern unsigned int *_imp___baseversion_dll;
extern unsigned int *_imp___osmajor_dll;
extern unsigned int *_imp___osminor_dll;
extern unsigned int *_imp___osmode_dll;
#define _basemajor (*_imp___basemajor_dll)
#define _baseminor (*_imp___baseminor_dll)
#define _baseversion (*_imp___baseversion_dll)
#define _osmajor (*_imp___osmajor_dll)
#define _osminor (*_imp___osminor_dll)
#define _osmode (*_imp___osmode_dll)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT unsigned int _basemajor_dll;
__MINGW_IMPORT unsigned int _baseminor_dll;
__MINGW_IMPORT unsigned int _baseversion_dll;
__MINGW_IMPORT unsigned int _osmajor_dll;
__MINGW_IMPORT unsigned int _osminor_dll;
__MINGW_IMPORT unsigned int _osmode_dll;
#define _basemajor _basemajor_dll
#define _baseminor _baseminor_dll
#define _baseversion _baseversion_dll
#define _osmajor _osmajor_dll
#define _osminor _osminor_dll
#define _osmode _osmode_dll
#endif /* __DECLSPEC_SUPPORTED */
#endif /* ! __MSVCRT__ */
#ifndef _DISKFREE_T_DEFINED
/* needed by _getdiskfree (also in direct.h) */
struct _diskfree_t {
unsigned total_clusters;
unsigned avail_clusters;
unsigned sectors_per_cluster;
unsigned bytes_per_sector;
};
#define _DISKFREE_T_DEFINED
#endif
_CRTIMP unsigned __cdecl __MINGW_NOTHROW _getdiskfree (unsigned, struct _diskfree_t *);
#ifndef _NO_OLDNAMES
# define diskfree_t _diskfree_t
#endif
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _DOS_H_ */

View File

@ -1,101 +0,0 @@
/*
* errno.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Error numbers and access to error reporting.
*
*/
#ifndef _ERRNO_H_
#define _ERRNO_H_
/* All the headers include this file. */
#include <_mingw.h>
/*
* Error numbers.
* TODO: Can't be sure of some of these assignments, I guessed from the
* names given by strerror and the defines in the Cygnus errno.h. A lot
* of the names from the Cygnus errno.h are not represented, and a few
* of the descriptions returned by strerror do not obviously match
* their error naming.
*/
#define EPERM 1 /* Operation not permitted */
#define ENOFILE 2 /* No such file or directory */
#define ENOENT 2
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted function call */
#define EIO 5 /* Input/output error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Arg list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file descriptor */
#define ECHILD 10 /* No child processes */
#define EAGAIN 11 /* Resource temporarily unavailable */
#define ENOMEM 12 /* Not enough space */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
/* 15 - Unknown Error */
#define EBUSY 16 /* strerror reports "Resource device" */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Improper link (cross-device link?) */
#define ENODEV 19 /* No such device */
#define ENOTDIR 20 /* Not a directory */
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* Too many open files in system */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Inappropriate I/O control operation */
/* 26 - Unknown Error */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
#define EROFS 30 /* Read-only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Domain error (math functions) */
#define ERANGE 34 /* Result too large (possibly too small) */
/* 35 - Unknown Error */
#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
#define EDEADLK 36
/* 37 - Unknown Error */
#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
#define ENOLCK 39 /* No locks available (46 in Cyg?) */
#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
#define EILSEQ 42 /* Illegal byte sequence */
/*
* NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
* sockets.h header provided with windows32api-0.1.2.
* You should go and put an #if 0 ... #endif around the whole block
* of errors (look at the comment above them).
*/
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
* stdlib.h.
*/
#ifdef _UWIN
#undef errno
extern int errno;
#else
_CRTIMP int* __cdecl __MINGW_NOTHROW _errno(void);
#define errno (*_errno())
#endif
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _ERRNO_H_ */

View File

@ -1,115 +0,0 @@
/*
* excpt.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Support for operating system level structured exception handling.
*
* NOTE: This is very preliminary stuff. I am also pretty sure it is
* completely Intel specific.
*
*/
#ifndef _EXCPT_H_
#define _EXCPT_H_
/* All the headers include this file. */
#include <_mingw.h>
#include <windef.h>
/*
* NOTE: The constants structs and typedefs below should be defined in the
* Win32 API headers.
*/
#define EH_NONCONTINUABLE 0x01
#define EH_UNWINDING 0x02
#define EH_EXIT_UNWIND 0x04
#define EH_STACK_INVALID 0x08
#define EH_NESTED_CALL 0x10
#ifndef RC_INVOKED
typedef enum {
ExceptionContinueExecution,
ExceptionContinueSearch,
ExceptionNestedException,
ExceptionCollidedUnwind
} EXCEPTION_DISPOSITION;
/*
* End of stuff that should be in the Win32 API files.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* The type of function that is expected as an exception handler to be
* installed with __try1.
*/
typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)
(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
/*
* This is not entirely necessary, but it is the structure installed by
* the __try1 primitive below.
*/
typedef struct _EXCEPTION_REGISTRATION
{
struct _EXCEPTION_REGISTRATION* prev;
PEXCEPTION_HANDLER handler;
} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD;
typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
/*
* A macro which installs the supplied exception handler.
* Push the pointer to the new handler onto the stack,
* then push the pointer to the old registration structure (at fs:0)
* onto the stack, then put a pointer to the new registration
* structure (i.e. the current stack pointer) at fs:0.
*/
#ifdef _WIN64
# define __try1(pHandler) \
__asm__ __volatile__ ("pushq %0;pushq %%gs:0;movq %%rsp,%%gs:0;" : : \
"g" (pHandler));
#else
# define __try1(pHandler) \
__asm__ __volatile__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : \
"g" (pHandler));
#endif
/*
* A macro which (despite its name) *removes* an installed
* exception handler. Should be used only in conjunction with the above
* install routine __try1.
* Move the pointer to the old reg. struct (at the current stack
* position) to fs:0, replacing the pointer we installed above,
* then add 8 to the stack pointer to get rid of the space we
* used when we pushed on our new reg. struct above. Notice that
* the stack must be in the exact state at this point that it was
* after we did __try1 or this will smash things.
*/
#ifdef _WIN64
# define __except1 \
__asm__ __volatile__ ("movq (%%rsp),%%rax;movq %%rax,%%gs:0;addq \
$16,%%rsp;" : : : "%rax");
#else
# define __except1 \
__asm__ __volatile__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl \
$8,%%esp;" : : : "%eax");
#endif
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* _EXCPT_H_ not defined */

View File

@ -1,75 +0,0 @@
/*
* fcntl.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Access constants for _open. Note that the permissions constants are
* in sys/stat.h (ick).
*
*/
#ifndef _FCNTL_H_
#define _FCNTL_H_
/* All the headers include this file. */
#include <_mingw.h>
/*
* It appears that fcntl.h should include io.h for compatibility...
*/
#include <io.h>
/* Specifiy one of these flags to define the access mode. */
#define _O_RDONLY 0
#define _O_WRONLY 1
#define _O_RDWR 2
/* Mask for access mode bits in the _open flags. */
#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
#define _O_APPEND 0x0008 /* Writes will add to the end of the file. */
#define _O_RANDOM 0x0010
#define _O_SEQUENTIAL 0x0020
#define _O_TEMPORARY 0x0040 /* Make the file dissappear after closing.
* WARNING: Even if not created by _open! */
#define _O_NOINHERIT 0x0080
#define _O_CREAT 0x0100 /* Create the file if it does not exist. */
#define _O_TRUNC 0x0200 /* Truncate the file if it does exist. */
#define _O_EXCL 0x0400 /* Open only if the file does not exist. */
#define _O_SHORT_LIVED 0x1000
/* NOTE: Text is the default even if the given _O_TEXT bit is not on. */
#define _O_TEXT 0x4000 /* CR-LF in file becomes LF in memory. */
#define _O_BINARY 0x8000 /* Input and output is not translated. */
#define _O_RAW _O_BINARY
#if (__MSVCRT_VERSION__ >= 0x0800)
#define _O_WTEXT 0x10000
#define _O_U16TEXT 0x20000
#define _O_U8TEXT 0x40000
#endif
#ifndef _NO_OLDNAMES
/* POSIX/Non-ANSI names for increased portability */
#define O_RDONLY _O_RDONLY
#define O_WRONLY _O_WRONLY
#define O_RDWR _O_RDWR
#define O_ACCMODE _O_ACCMODE
#define O_APPEND _O_APPEND
#define O_CREAT _O_CREAT
#define O_TRUNC _O_TRUNC
#define O_EXCL _O_EXCL
#define O_TEXT _O_TEXT
#define O_BINARY _O_BINARY
#define O_TEMPORARY _O_TEMPORARY
#define O_NOINHERIT _O_NOINHERIT
#define O_SEQUENTIAL _O_SEQUENTIAL
#define O_RANDOM _O_RANDOM
#endif /* Not _NO_OLDNAMES */
#endif /* Not _FCNTL_H_ */

View File

@ -1,107 +0,0 @@
#ifndef _FENV_H_
#define _FENV_H_
#include <_mingw.h>
/* FPU status word exception flags */
#define FE_INVALID 0x01
#define FE_DENORMAL 0x02
#define FE_DIVBYZERO 0x04
#define FE_OVERFLOW 0x08
#define FE_UNDERFLOW 0x10
#define FE_INEXACT 0x20
#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \
| FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
/* FPU control word rounding flags */
#define FE_TONEAREST 0x0000
#define FE_DOWNWARD 0x0400
#define FE_UPWARD 0x0800
#define FE_TOWARDZERO 0x0c00
/* The MXCSR exception flags are the same as the
FE flags. */
#define __MXCSR_EXCEPT_FLAG_SHIFT 0
/* How much to shift FE status word exception flags
to get the MXCSR exeptions masks, */
#define __MXCSR_EXCEPT_MASK_SHIFT 7
/* How much to shift FE control word rounding flags
to get MXCSR rounding flags, */
#define __MXCSR_ROUND_FLAG_SHIFT 3
#ifndef RC_INVOKED
/*
For now, support only for the basic abstraction of flags that are
either set or clear. fexcept_t could be structure that holds more
info about the fp environment.
*/
typedef unsigned short fexcept_t;
/* This 32-byte struct represents the entire floating point
environment as stored by fnstenv or fstenv, augmented by
the contents of the MXCSR register, as stored by stmxcsr
(if CPU supports it). */
typedef struct
{
unsigned short __control_word;
unsigned short __unused0;
unsigned short __status_word;
unsigned short __unused1;
unsigned short __tag_word;
unsigned short __unused2;
unsigned int __ip_offset; /* instruction pointer offset */
unsigned short __ip_selector;
unsigned short __opcode;
unsigned int __data_offset;
unsigned short __data_selector;
unsigned short __unused3;
unsigned int __mxcsr; /* contents of the MXCSR register */
} fenv_t;
/*The C99 standard (7.6.9) allows us to define implementation-specific macros for
different fp environments */
/* The default Intel x87 floating point environment (64-bit mantissa) */
#define FE_PC64_ENV ((const fenv_t *)-1)
/* The floating point environment set by MSVCRT _fpreset (53-bit mantissa) */
#define FE_PC53_ENV ((const fenv_t *)-2)
/* The FE_DFL_ENV macro is required by standard.
fesetenv will use the environment set at app startup.*/
#define FE_DFL_ENV ((const fenv_t *) 0)
#ifdef __cplusplus
extern "C" {
#endif
/*TODO: Some of these could be inlined */
/* 7.6.2 Exception */
extern int __cdecl __MINGW_NOTHROW feclearexcept (int);
extern int __cdecl __MINGW_NOTHROW fegetexceptflag (fexcept_t * flagp, int excepts);
extern int __cdecl __MINGW_NOTHROW feraiseexcept (int excepts );
extern int __cdecl __MINGW_NOTHROW fesetexceptflag (const fexcept_t *, int);
extern int __cdecl __MINGW_NOTHROW fetestexcept (int excepts);
/* 7.6.3 Rounding */
extern int __cdecl __MINGW_NOTHROW fegetround (void);
extern int __cdecl __MINGW_NOTHROW fesetround (int mode);
/* 7.6.4 Environment */
extern int __cdecl __MINGW_NOTHROW fegetenv (fenv_t * envp);
extern int __cdecl __MINGW_NOTHROW fesetenv (const fenv_t * );
extern int __cdecl __MINGW_NOTHROW feupdateenv (const fenv_t *);
extern int __cdecl __MINGW_NOTHROW feholdexcept (fenv_t *);
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* ndef _FENV_H */

View File

@ -1,169 +0,0 @@
#ifndef _MINGW_FLOAT_H_
/*
* float.h
*
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Constants related to floating point arithmetic.
*
* Also included here are some non-ANSI bits for accessing the floating
* point controller.
*
*/
#define _MINGW_FLOAT_H_
/*
* NOTE:
*
* GCC provides float.h, but it doesn't include the non-standard stuff for
* accessing the fp controller. We parse the GCC-supplied header, for its
* standard content, and then define the MS-specific extensions here.
*
* In a MinGW standard Win32 hosted environment, this should be the float.h
* found by a system include path search, but this can't be guaranteed; for
* a cross-compiler setup, the GCC-supplied header, which is guarded by the
* _FLOAT_H___ macro, may be found first, thus...
*
*/
#if !defined(_FLOAT_H___) && !defined(__FLOAT_H)
/*
* ...when we didn't find the GCC-supplied header first, we want to pull
* it in now; include_next should achieve this, (and we must rely on the
* GCC header maintainers to extend us the same courtesy, to get this one
* pulled in, when the GCC-supplied header is found first).
*
*/
# include_next <float.h>
#endif
/* All the headers include this file. */
#include <_mingw.h>
/*
* Functions and definitions for controlling the FPU.
*/
#ifndef __STRICT_ANSI__
/* TODO: These constants are only valid for x86 machines */
/* Control word masks for unMask */
#define _MCW_EM 0x0008001F /* Error masks */
#define _MCW_IC 0x00040000 /* Infinity */
#define _MCW_RC 0x00000300 /* Rounding */
#define _MCW_PC 0x00030000 /* Precision */
/* Control word values for unNew (use with related unMask above) */
#define _EM_INVALID 0x00000010
#define _EM_DENORMAL 0x00080000
#define _EM_ZERODIVIDE 0x00000008
#define _EM_OVERFLOW 0x00000004
#define _EM_UNDERFLOW 0x00000002
#define _EM_INEXACT 0x00000001
#define _IC_AFFINE 0x00040000
#define _IC_PROJECTIVE 0x00000000
#define _RC_CHOP 0x00000300
#define _RC_UP 0x00000200
#define _RC_DOWN 0x00000100
#define _RC_NEAR 0x00000000
#define _PC_24 0x00020000
#define _PC_53 0x00010000
#define _PC_64 0x00000000
/* These are also defined in Mingw math.h, needed to work around
GCC build issues. */
/* Return values for fpclass. */
#ifndef __MINGW_FPCLASS_DEFINED
#define __MINGW_FPCLASS_DEFINED 1
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
#define _FPCLASS_NN 0x0008 /* Negative Normal */
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
#define _FPCLASS_PN 0x0100 /* Positive Normal */
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
#endif /* __MINGW_FPCLASS_DEFINED */
/* invalid subconditions (_SW_INVALID also set) */
#define _SW_UNEMULATED 0x0040 /* unemulated instruction */
#define _SW_SQRTNEG 0x0080 /* square root of a neg number */
#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */
#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */
/* Floating point error signals and return codes */
#define _FPE_INVALID 0x81
#define _FPE_DENORMAL 0x82
#define _FPE_ZERODIVIDE 0x83
#define _FPE_OVERFLOW 0x84
#define _FPE_UNDERFLOW 0x85
#define _FPE_INEXACT 0x86
#define _FPE_UNEMULATED 0x87
#define _FPE_SQRTNEG 0x88
#define _FPE_STACKOVERFLOW 0x8a
#define _FPE_STACKUNDERFLOW 0x8b
#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
/* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask),
* i.e. change the bits in unMask to have the values they have in unNew,
* leaving other bits unchanged. */
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _controlfp (unsigned int unNew, unsigned int unMask);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _control87 (unsigned int unNew, unsigned int unMask);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _clearfp (void); /* Clear the FPU status word */
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _statusfp (void); /* Report the FPU status word */
#define _clear87 _clearfp
#define _status87 _statusfp
/*
MSVCRT.dll _fpreset initializes the control register to 0x27f,
the status register to zero and the tag word to 0FFFFh.
This differs from asm instruction finit/fninit which set control
word to 0x37f (64 bit mantissa precison rather than 53 bit).
By default, the mingw version of _fpreset sets fp control as
per fninit. To use the MSVCRT.dll _fpreset, include CRT_fp8.o when
building your application.
*/
void __cdecl __MINGW_NOTHROW _fpreset (void);
void __cdecl __MINGW_NOTHROW fpreset (void);
/* Global 'variable' for the current floating point error code. */
_CRTIMP int * __cdecl __MINGW_NOTHROW __fpecode(void);
#define _fpecode (*(__fpecode()))
/*
* IEEE recommended functions. MS puts them in float.h
* but they really belong in math.h.
*/
_CRTIMP double __cdecl __MINGW_NOTHROW _chgsign (double);
_CRTIMP double __cdecl __MINGW_NOTHROW _copysign (double, double);
_CRTIMP double __cdecl __MINGW_NOTHROW _logb (double);
_CRTIMP double __cdecl __MINGW_NOTHROW _nextafter (double, double);
_CRTIMP double __cdecl __MINGW_NOTHROW _scalb (double, long);
_CRTIMP int __cdecl __MINGW_NOTHROW _finite (double);
_CRTIMP int __cdecl __MINGW_NOTHROW _fpclass (double);
_CRTIMP int __cdecl __MINGW_NOTHROW _isnan (double);
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not __STRICT_ANSI__ */
#endif /* _MINGW_FLOAT_H_ */

View File

@ -1,111 +0,0 @@
#ifndef __GETOPT_H__
/*
* getopt.h
*
* $Id$
*
* Defines constants and function prototypes required to implement
* the `getopt', `getopt_long' and `getopt_long_only' APIs.
*
* This file is part of the MinGW32 package set.
*
* Contributed by Keith Marshall <keithmarshall@users.sourceforge.net>
*
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision$
* $Author$
* $Date$
*
*/
#define __GETOPT_H__
/* All the headers include this file. */
#include <_mingw.h>
#ifdef __cplusplus
extern "C" {
#endif
extern int optind; /* index of first non-option in argv */
extern int optopt; /* single option character, as parsed */
extern int opterr; /* flag to enable built-in diagnostics... */
/* (user may set to zero, to suppress) */
extern char *optarg; /* pointer to argument of current option */
extern int getopt( int, char * const [], const char * );
#ifdef _BSD_SOURCE
/*
* BSD adds the non-standard `optreset' feature, for reinitialisation
* of `getopt' parsing. We support this feature, for applications which
* proclaim their BSD heritage, before including this header; however,
* to maintain portability, developers are advised to avoid it.
*/
# define optreset __mingw_optreset
extern int optreset;
#endif
#ifdef __cplusplus
}
#endif
/*
* POSIX requires the `getopt' API to be specified in `unistd.h';
* thus, `unistd.h' includes this header. However, we do not want
* to expose the `getopt_long' or `getopt_long_only' APIs, when
* included in this manner. Thus, close the standard __GETOPT_H__
* declarations block, and open an additional __GETOPT_LONG_H__
* specific block, only when *not* __UNISTD_H_SOURCED__, in which
* to declare the extended API.
*/
#endif /* !defined(__GETOPT_H__) */
#if !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__)
#define __GETOPT_LONG_H__
#ifdef __cplusplus
extern "C" {
#endif
struct option /* specification for a long form option... */
{
const char *name; /* option name, without leading hyphens */
int has_arg; /* does it take an argument? */
int *flag; /* where to save its status, or NULL */
int val; /* its associated status value */
};
enum /* permitted values for its `has_arg' field... */
{
no_argument = 0, /* option never takes an argument */
required_argument, /* option always requires an argument */
optional_argument /* option may take an argument */
};
extern int getopt_long( int, char * const [], const char *, const struct option *, int * );
extern int getopt_long_only( int, char * const [], const char *, const struct option *, int * );
/*
* Previous MinGW implementation had...
*/
#ifndef HAVE_DECL_GETOPT
/*
* ...for the long form API only; keep this for compatibility.
*/
# define HAVE_DECL_GETOPT 1
#endif
#ifdef __cplusplus
}
#endif
#endif /* !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) */
/* $RCSfile$Revision$: end of file */

View File

@ -1,298 +0,0 @@
/* 7.8 Format conversion of integer types <inttypes.h> */
#ifndef _INTTYPES_H_
#define _INTTYPES_H_
#include <_mingw.h>
#include <stdint.h>
#define __need_wchar_t
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
intmax_t quot;
intmax_t rem;
} imaxdiv_t;
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
/* 7.8.1 Macros for format specifiers
*
* MS runtime does not yet understand C9x standard "ll"
* length specifier. It appears to treat "ll" as "l".
* The non-standard I64 length specifier causes warning in GCC,
* but understood by MS runtime functions.
*/
/* fprintf macros for signed types */
#define PRId8 "d"
#define PRId16 "d"
#define PRId32 "d"
#define PRId64 "I64d"
#define PRIdLEAST8 "d"
#define PRIdLEAST16 "d"
#define PRIdLEAST32 "d"
#define PRIdLEAST64 "I64d"
#define PRIdFAST8 "d"
#define PRIdFAST16 "d"
#define PRIdFAST32 "d"
#define PRIdFAST64 "I64d"
#define PRIdMAX "I64d"
#define PRIi8 "i"
#define PRIi16 "i"
#define PRIi32 "i"
#define PRIi64 "I64i"
#define PRIiLEAST8 "i"
#define PRIiLEAST16 "i"
#define PRIiLEAST32 "i"
#define PRIiLEAST64 "I64i"
#define PRIiFAST8 "i"
#define PRIiFAST16 "i"
#define PRIiFAST32 "i"
#define PRIiFAST64 "I64i"
#define PRIiMAX "I64i"
#define PRIo8 "o"
#define PRIo16 "o"
#define PRIo32 "o"
#define PRIo64 "I64o"
#define PRIoLEAST8 "o"
#define PRIoLEAST16 "o"
#define PRIoLEAST32 "o"
#define PRIoLEAST64 "I64o"
#define PRIoFAST8 "o"
#define PRIoFAST16 "o"
#define PRIoFAST32 "o"
#define PRIoFAST64 "I64o"
#define PRIoMAX "I64o"
/* fprintf macros for unsigned types */
#define PRIu8 "u"
#define PRIu16 "u"
#define PRIu32 "u"
#define PRIu64 "I64u"
#define PRIuLEAST8 "u"
#define PRIuLEAST16 "u"
#define PRIuLEAST32 "u"
#define PRIuLEAST64 "I64u"
#define PRIuFAST8 "u"
#define PRIuFAST16 "u"
#define PRIuFAST32 "u"
#define PRIuFAST64 "I64u"
#define PRIuMAX "I64u"
#define PRIx8 "x"
#define PRIx16 "x"
#define PRIx32 "x"
#define PRIx64 "I64x"
#define PRIxLEAST8 "x"
#define PRIxLEAST16 "x"
#define PRIxLEAST32 "x"
#define PRIxLEAST64 "I64x"
#define PRIxFAST8 "x"
#define PRIxFAST16 "x"
#define PRIxFAST32 "x"
#define PRIxFAST64 "I64x"
#define PRIxMAX "I64x"
#define PRIX8 "X"
#define PRIX16 "X"
#define PRIX32 "X"
#define PRIX64 "I64X"
#define PRIXLEAST8 "X"
#define PRIXLEAST16 "X"
#define PRIXLEAST32 "X"
#define PRIXLEAST64 "I64X"
#define PRIXFAST8 "X"
#define PRIXFAST16 "X"
#define PRIXFAST32 "X"
#define PRIXFAST64 "I64X"
#define PRIXMAX "I64X"
#ifdef _WIN64
#define PRIdPTR "I64d"
#define PRIiPTR "I64i"
#define PRIoPTR "I64o"
#define PRIuPTR "I64u"
#define PRIxPTR "I64x"
#define PRIXPTR "I64X"
#else
#define PRIdPTR "d"
#define PRIiPTR "i"
#define PRIoPTR "o"
#define PRIuPTR "u"
#define PRIxPTR "x"
#define PRIXPTR "X"
#endif
/*
* fscanf macros for signed int types
* NOTE: if 32-bit int is used for int_fast8_t and int_fast16_t
* (see stdint.h, 7.18.1.3), FAST8 and FAST16 should have
* no length identifiers
*/
#define SCNd16 "hd"
#define SCNd32 "d"
#define SCNd64 "I64d"
#define SCNdLEAST16 "hd"
#define SCNdLEAST32 "d"
#define SCNdLEAST64 "I64d"
#define SCNdFAST16 "hd"
#define SCNdFAST32 "d"
#define SCNdFAST64 "I64d"
#define SCNdMAX "I64d"
#define SCNi16 "hi"
#define SCNi32 "i"
#define SCNi64 "I64i"
#define SCNiLEAST16 "hi"
#define SCNiLEAST32 "i"
#define SCNiLEAST64 "I64i"
#define SCNiFAST16 "hi"
#define SCNiFAST32 "i"
#define SCNiFAST64 "I64i"
#define SCNiMAX "I64i"
#define SCNo16 "ho"
#define SCNo32 "o"
#define SCNo64 "I64o"
#define SCNoLEAST16 "ho"
#define SCNoLEAST32 "o"
#define SCNoLEAST64 "I64o"
#define SCNoFAST16 "ho"
#define SCNoFAST32 "o"
#define SCNoFAST64 "I64o"
#define SCNoMAX "I64o"
#define SCNx16 "hx"
#define SCNx32 "x"
#define SCNx64 "I64x"
#define SCNxLEAST16 "hx"
#define SCNxLEAST32 "x"
#define SCNxLEAST64 "I64x"
#define SCNxFAST16 "hx"
#define SCNxFAST32 "x"
#define SCNxFAST64 "I64x"
#define SCNxMAX "I64x"
/* fscanf macros for unsigned int types */
#define SCNu16 "hu"
#define SCNu32 "u"
#define SCNu64 "I64u"
#define SCNuLEAST16 "hu"
#define SCNuLEAST32 "u"
#define SCNuLEAST64 "I64u"
#define SCNuFAST16 "hu"
#define SCNuFAST32 "u"
#define SCNuFAST64 "I64u"
#define SCNuMAX "I64u"
#ifdef _WIN64
#define SCNdPTR "I64d"
#define SCNiPTR "I64i"
#define SCNoPTR "I64o"
#define SCNxPTR "I64x"
#define SCNuPTR "I64u"
#else
#define SCNdPTR "d"
#define SCNiPTR "i"
#define SCNoPTR "o"
#define SCNxPTR "x"
#define SCNuPTR "u"
#endif
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/*
* no length modifier for char types prior to C9x
* MS runtime scanf appears to treat "hh" as "h"
*/
/* signed char */
#define SCNd8 "hhd"
#define SCNdLEAST8 "hhd"
#define SCNdFAST8 "hhd"
#define SCNi8 "hhi"
#define SCNiLEAST8 "hhi"
#define SCNiFAST8 "hhi"
#define SCNo8 "hho"
#define SCNoLEAST8 "hho"
#define SCNoFAST8 "hho"
#define SCNx8 "hhx"
#define SCNxLEAST8 "hhx"
#define SCNxFAST8 "hhx"
/* unsigned char */
#define SCNu8 "hhu"
#define SCNuLEAST8 "hhu"
#define SCNuFAST8 "hhu"
#endif /* __STDC_VERSION__ >= 199901 */
#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */
intmax_t __cdecl __MINGW_NOTHROW imaxabs (intmax_t j);
#ifndef __NO_INLINE__
__CRT_INLINE intmax_t __cdecl __MINGW_NOTHROW imaxabs (intmax_t j)
{return (j >= 0 ? j : -j);}
#endif
imaxdiv_t __cdecl __MINGW_NOTHROW imaxdiv (intmax_t numer, intmax_t denom);
/* 7.8.2 Conversion functions for greatest-width integer types */
intmax_t __cdecl __MINGW_NOTHROW strtoimax (const char* __restrict__ nptr,
char** __restrict__ endptr, int base);
uintmax_t __cdecl __MINGW_NOTHROW strtoumax (const char* __restrict__ nptr,
char** __restrict__ endptr, int base);
intmax_t __cdecl __MINGW_NOTHROW wcstoimax (const wchar_t* __restrict__ nptr,
wchar_t** __restrict__ endptr, int base);
uintmax_t __cdecl __MINGW_NOTHROW wcstoumax (const wchar_t* __restrict__ nptr,
wchar_t** __restrict__ endptr, int base);
#ifdef __cplusplus
}
#endif
#endif /* ndef _INTTYPES_H */

View File

@ -1,492 +0,0 @@
/*
* io.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* System level I/O functions and types.
*
*/
#ifndef _IO_H_
#define _IO_H_
/* All the headers include this file. */
#include <_mingw.h>
/* MSVC's io.h contains the stuff from dir.h, so I will too.
* NOTE: This also defines off_t, the file offset type, through
* an inclusion of sys/types.h */
#include <sys/types.h> /* To get time_t. */
/*
* Attributes of files as returned by _findfirst et al.
*/
#define _A_NORMAL 0x00000000
#define _A_RDONLY 0x00000001
#define _A_HIDDEN 0x00000002
#define _A_SYSTEM 0x00000004
#define _A_VOLID 0x00000008
#define _A_SUBDIR 0x00000010
#define _A_ARCH 0x00000020
#ifndef RC_INVOKED
#ifndef _INTPTR_T_DEFINED
#define _INTPTR_T_DEFINED
#ifdef _WIN64
typedef __int64 intptr_t;
#else
typedef int intptr_t;
#endif
#endif
#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t;
#define _FSIZE_T_DEFINED
#endif
/*
* The maximum length of a file name. You should use GetVolumeInformation
* instead of this constant. But hey, this works.
* Also defined in stdio.h.
*/
#ifndef FILENAME_MAX
#define FILENAME_MAX (260)
#endif
/*
* The following structure is filled in by _findfirst or _findnext when
* they succeed in finding a match.
*/
struct _finddata_t
{
unsigned attrib; /* Attributes, see constants above. */
time_t time_create;
time_t time_access; /* always midnight local time */
time_t time_write;
_fsize_t size;
char name[FILENAME_MAX]; /* may include spaces. */
};
struct _finddatai64_t {
unsigned attrib;
time_t time_create;
time_t time_access;
time_t time_write;
__int64 size;
char name[FILENAME_MAX];
};
#if __MSVCRT_VERSION__ >= 0x0601
struct __finddata64_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
/* 8 bytes are returned so it can't be _fsize_t */
__int64 size;
char name[FILENAME_MAX];
};
#endif
#if __MSVCRT_VERSION__ >= 0x0800
struct _finddata32_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
__int32 size;
char name[FILENAME_MAX];
};
struct _finddata32i64_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
__int64 size;
char name[FILENAME_MAX];
};
struct _finddata64i32_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
__int32 size;
char name[FILENAME_MAX];
};
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#ifndef _WFINDDATA_T_DEFINED
struct _wfinddata_t {
unsigned attrib;
time_t time_create; /* -1 for FAT file systems */
time_t time_access; /* -1 for FAT file systems */
time_t time_write;
_fsize_t size;
wchar_t name[FILENAME_MAX]; /* may include spaces. */
};
struct _wfinddatai64_t {
unsigned attrib;
time_t time_create;
time_t time_access;
time_t time_write;
__int64 size;
wchar_t name[FILENAME_MAX];
};
#if __MSVCRT_VERSION__ >= 0x0601
struct __wfinddata64_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
/* 8 bytes are returned so it can't be _fsize_t */
__int64 size;
wchar_t name[FILENAME_MAX];
};
#endif
#if __MSVCRT_VERSION__ >= 0x0800
struct __wfinddata32_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
__int32 size;
wchar_t name[FILENAME_MAX];
};
struct _wfinddata32i64_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
__int64 size;
wchar_t name[FILENAME_MAX];
};
struct _wfinddata64i32_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
__int32 size;
wchar_t name[FILENAME_MAX];
};
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#define _WFINDDATA_T_DEFINED
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Functions for searching for files. _findfirst returns -1 if no match
* is found. Otherwise it returns a handle to be used in _findnext and
* _findclose calls. _findnext also returns -1 if no match could be found,
* and 0 if a match was found. Call _findclose when you are finished.
*/
#if __MSVCRT_VERSION__ >= 0x0800
/*
intptr_t _findfirst (const char *filespec,struct _finddata_t *fileinfo);
intptr_t _findfirst32 (const char *filespec,struct _finddata32_t *fileinfo);
intptr_t _findfirst64 (const char *filespec,struct __finddata64_t *fileinfo);
intptr_t _findfirsti64 (const char *filespec,struct _finddatai64_t *fileinfo);
intptr_t _findfirst32i64 (const char *filespec,struct _finddata32i64_t *fileinfo);
intptr_t _findfirst64i32 (const char *filespec,struct _finddata64i32_t *fileinfo);
intptr_t _wfindfirst (const wchar_t *filespec,struct _wfinddata_t *fileinfo);
intptr_t _wfindfirst32 (const wchar_t *filespec,struct __wfinddata32_t *fileinfo);
intptr_t _wfindfirst64 (const wchar_t *filespec, struct __wfinddata64_t *fileinfo);
intptr_t _wfindfirsti64 (const wchar_t *filespec, struct _wfinddatai64_t *fileinfo);
intptr_t _wfindfirst32i64(const wchar_t *filespec, struct _wfinddata32i64_t *fileinfo);
intptr_t _wfindfirst64i32(const wchar_t *filespec, struct _wfinddata64i32_t *fileinfo);
Time Type and File Length Type Variations of _findfirst:
Functions _USE_32BIT_TIME_T defined? Time type File length type
_findfirst, Not defined 64-bit 32-bit
_wfindfirst
_findfirst, Defined 32-bit 32-bit
_wfindfirst
_findfirst32, Not affected by the macro 32-bit 32-bit
_wfindfirst32 definition
_findfirst64, Not affected by the macro 64-bit 64-bit
_wfindfirst64 definition
_findfirsti64, Not defined 64-bit 64-bit
_wfindfirsti64
_findfirsti64, Defined 32-bit 64-bit
_wfindfirsti64
_findfirst32i64, Not affected by the macro 32-bit 64-bit
_wfindfirst32i64 definition
_findfirst64i32, Not affected by the macro 64-bit 32-bit
_wfindfirst64i32 definition
*/
#endif
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst (const char*, struct _finddata_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _findnext (intptr_t, struct _finddata_t*);
#endif /* __MSVCRT_VERSION__ < 0x0800 */
_CRTIMP int __cdecl __MINGW_NOTHROW _findclose (intptr_t);
#if __MSVCRT_VERSION__ >= 0x0800
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst32 (const char*, struct _finddata32_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _findnext32 (intptr_t, struct _finddata32_t*);
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
_CRTIMP int __cdecl __MINGW_NOTHROW _chdir (const char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _getcwd (char*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _mkdir (const char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _mktemp (char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _rmdir (const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _chmod (const char*, int);
#ifdef __MSVCRT__
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _filelengthi64(int);
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirsti64(const char*, struct _finddatai64_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _findnexti64(intptr_t, struct _finddatai64_t*);
#else
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst32i64 (const char*, struct _finddata32i64_t*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst64i32 (const char*, struct _finddata64i32_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _findnext32i64 (intptr_t, struct _finddata32i64_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _findnext64i32 (intptr_t, struct _finddata64i32_t*);
#endif /* __MSVCRT_VERSION__ < 0x0800 */
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _lseeki64(int, __int64, int);
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _telli64(int);
/* These require newer versions of msvcrt.dll (6.1 or higher). */
#if __MSVCRT_VERSION__ >= 0x0601
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst64(const char*, struct __finddata64_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _findnext64(intptr_t, struct __finddata64_t*);
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
#if __MSVCRT_VERSION__ >= 0x0800
#ifndef _USE_32BIT_TIME_T
_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _findfirst (const char* _v1, struct _finddata_t* _v2) { return(_findfirst64i32 (_v1,(struct _finddata64i32_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _findnext (intptr_t _v1, struct _finddata_t* _v2) { return(_findnext64i32 (_v1,(struct _finddata64i32_t*)_v2)); }
_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _findfirsti64 (const char* _v1, struct _finddatai64_t* _v2) { return(_findfirst64 (_v1,(struct __finddata64_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _findnexti64 (intptr_t _v1, struct _finddatai64_t* _v2) { return(_findnext64 (_v1,(struct __finddata64_t*)_v2)); }
#else
_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _findfirst (const char* _v1, struct _finddata_t* _v2) { return(_findfirst32 (_v1,(struct _finddata32_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _findnext (intptr_t _v1, struct _finddata_t* _v2) { return(_findnext32 (_v1,(struct _finddata32_t*)_v2)); }
_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _findfirsti64 (const char* _v1, struct _finddatai64_t* _v2) { return(_findfirst32i64 (_v1,(struct _finddata32i64_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _findnexti64 (intptr_t _v1, struct _finddatai64_t* _v2) { return(_findnext32i64 (_v1,(struct _finddata32i64_t*)_v2)); }
#endif /* !_USE_32BIT_TIME_T */
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#ifndef __NO_MINGW_LFS
__CRT_INLINE off64_t lseek64 (int, off64_t, int);
__CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence)
{
return _lseeki64(fd, (__int64) offset, whence);
}
#endif
#endif /* __MSVCRT__ */
#ifndef _NO_OLDNAMES
#ifndef _UWIN
_CRTIMP int __cdecl __MINGW_NOTHROW chdir (const char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW getcwd (char*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW mkdir (const char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW mktemp (char*);
_CRTIMP int __cdecl __MINGW_NOTHROW rmdir (const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int);
#endif /* _UWIN */
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
/* TODO: Maximum number of open handles has not been tested, I just set
* it the same as FOPEN_MAX. */
#define HANDLE_MAX FOPEN_MAX
/* Some defines for _access nAccessMode (MS doesn't define them, but
* it doesn't seem to hurt to add them). */
#define F_OK 0 /* Check for file existence */
/* Well maybe it does hurt. On newer versions of MSVCRT, an access mode
of 1 causes invalid parameter error. */
#define X_OK 1 /* MS access() doesn't check for execute permission. */
#define W_OK 2 /* Check for write permission */
#define R_OK 4 /* Check for read permission */
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP int __cdecl __MINGW_NOTHROW _access (const char*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _chsize (int, long);
_CRTIMP int __cdecl __MINGW_NOTHROW _close (int);
_CRTIMP int __cdecl __MINGW_NOTHROW _commit(int);
/* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80),
* the "owner write permission" bit (on FAT). */
_CRTIMP int __cdecl __MINGW_NOTHROW _creat (const char*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _dup (int);
_CRTIMP int __cdecl __MINGW_NOTHROW _dup2 (int, int);
_CRTIMP long __cdecl __MINGW_NOTHROW _filelength (int);
_CRTIMP long __cdecl __MINGW_NOTHROW _get_osfhandle (int);
_CRTIMP int __cdecl __MINGW_NOTHROW _isatty (int);
/* In a very odd turn of events this function is excluded from those
* files which define _STREAM_COMPAT. This is required in order to
* build GNU libio because of a conflict with _eof in streambuf.h
* line 107. Actually I might just be able to change the name of
* the enum member in streambuf.h... we'll see. TODO */
#ifndef _STREAM_COMPAT
_CRTIMP int __cdecl __MINGW_NOTHROW _eof (int);
#endif
/* LK_... locking commands defined in sys/locking.h. */
_CRTIMP int __cdecl __MINGW_NOTHROW _locking (int, int, long);
_CRTIMP long __cdecl __MINGW_NOTHROW _lseek (int, long, int);
/* Optional third argument is unsigned unPermissions. */
_CRTIMP int __cdecl __MINGW_NOTHROW _open (const char*, int, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _open_osfhandle (intptr_t, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _pipe (int *, unsigned int, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _read (int, void*, unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _setmode (int, int);
/* MS puts remove & rename (but not wide versions) in io.h as well
as in stdio.h. */
_CRTIMP int __cdecl __MINGW_NOTHROW remove (const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW rename (const char*, const char*);
/* SH_... flags for nShFlags defined in share.h
* Optional fourth argument is unsigned unPermissions */
_CRTIMP int __cdecl __MINGW_NOTHROW _sopen (const char*, int, int, ...);
_CRTIMP long __cdecl __MINGW_NOTHROW _tell (int);
/* Should umask be in sys/stat.h and/or sys/types.h instead? */
_CRTIMP int __cdecl __MINGW_NOTHROW _umask (int);
_CRTIMP int __cdecl __MINGW_NOTHROW _unlink (const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _write (int, const void*, unsigned int);
/* Wide character versions. Also declared in wchar.h. */
/* Not in crtdll.dll */
#if !defined (_WIO_DEFINED)
#if defined (__MSVCRT__)
_CRTIMP int __cdecl __MINGW_NOTHROW _waccess(const wchar_t*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _wchmod(const wchar_t*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _wcreat(const wchar_t*, int);
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst(const wchar_t*, struct _wfinddata_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext(intptr_t, struct _wfinddata_t *);
#else
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32 (const wchar_t*, struct __wfinddata32_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext32 (intptr_t, struct __wfinddata32_t*);
#endif /* __MSVCRT_VERSION__ < 0x0800 */
_CRTIMP int __cdecl __MINGW_NOTHROW _wunlink(const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wopen(const wchar_t*, int, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _wsopen(const wchar_t*, int, int, ...);
_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wmktemp(wchar_t*);
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64(intptr_t, struct _wfinddatai64_t*);
#else
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32i64 (const wchar_t*, struct _wfinddata32i64_t*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64i32 (const wchar_t*, struct _wfinddata64i32_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext32i64 (intptr_t, struct _wfinddata32i64_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext64i32 (intptr_t, struct _wfinddata64i32_t*);
#endif /* __MSVCRT_VERSION__ < 0x0800 */
#if __MSVCRT_VERSION__ >= 0x0601
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*);
#endif
#if __MSVCRT_VERSION__ >= 0x0800
#ifndef _USE_32BIT_TIME_T
_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t* _v1, struct _wfinddata_t* _v2) { return(_wfindfirst64i32 (_v1,(struct _wfinddata64i32_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext (intptr_t _v1, struct _wfinddata_t* _v2) { return(_wfindnext64i32 (_v1,(struct _wfinddata64i32_t*)_v2)); }
_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t* _v1, struct _wfinddatai64_t* _v2) { return(_wfindfirst64 (_v1,(struct __wfinddata64_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnexti64 (intptr_t _v1, struct _wfinddatai64_t* _v2) { return(_wfindnext64 (_v1,(struct __wfinddata64_t*)_v2)); }
#else
_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t* _v1, struct _wfinddata_t* _v2) { return(_wfindfirst32 (_v1,(struct __wfinddata32_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext (intptr_t _v1, struct _wfinddata_t* _v2) { return(_wfindnext32 (_v1,(struct __wfinddata32_t*)_v2)); }
_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t* _v1, struct _wfinddatai64_t* _v2) { return(_wfindfirst32i64 (_v1,(struct _wfinddata32i64_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnexti64 (intptr_t _v1, struct _wfinddatai64_t* _v2) { return(_wfindnext32i64 (_v1,(struct _wfinddata32i64_t*)_v2)); }
#endif /* !_USE_32BIT_TIME_T */
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#endif /* defined (__MSVCRT__) */
#define _WIO_DEFINED
#endif /* _WIO_DEFINED */
#ifndef _NO_OLDNAMES
/*
* Non-underscored versions of non-ANSI functions to improve portability.
* These functions live in libmoldname.a.
*/
#ifndef _UWIN
_CRTIMP int __cdecl __MINGW_NOTHROW access (const char*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW chsize (int, long );
_CRTIMP int __cdecl __MINGW_NOTHROW close (int);
_CRTIMP int __cdecl __MINGW_NOTHROW creat (const char*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW dup (int);
_CRTIMP int __cdecl __MINGW_NOTHROW dup2 (int, int);
_CRTIMP int __cdecl __MINGW_NOTHROW eof (int);
_CRTIMP long __cdecl __MINGW_NOTHROW filelength (int);
_CRTIMP int __cdecl __MINGW_NOTHROW isatty (int);
_CRTIMP long __cdecl __MINGW_NOTHROW lseek (int, long, int);
_CRTIMP int __cdecl __MINGW_NOTHROW open (const char*, int, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW read (int, void*, unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW setmode (int, int);
_CRTIMP int __cdecl __MINGW_NOTHROW sopen (const char*, int, int, ...);
_CRTIMP long __cdecl __MINGW_NOTHROW tell (int);
_CRTIMP int __cdecl __MINGW_NOTHROW umask (int);
_CRTIMP int __cdecl __MINGW_NOTHROW unlink (const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW write (int, const void*, unsigned int);
#endif /* _UWIN */
#ifdef __USE_MINGW_ACCESS
/* Old versions of MSVCRT access() just ignored X_OK, while the version
shipped with Vista, returns an error code. This will restore the
old behaviour */
static inline int __mingw_access (const char* __fname, int __mode)
{ return _access (__fname, __mode & ~X_OK); }
#define access(__f,__m) __mingw_access (__f, __m)
#endif
/* Wide character versions. Also declared in wchar.h. */
/* Where do these live? Not in libmoldname.a nor in libmsvcrt.a */
#if 0
int waccess(const wchar_t *, int);
int wchmod(const wchar_t *, int);
int wcreat(const wchar_t *, int);
intptr_t wfindfirst(wchar_t *, struct _wfinddata_t *);
int wfindnext(intptr_t, struct _wfinddata_t *);
int wunlink(const wchar_t *);
int wrename(const wchar_t *, const wchar_t *);
int wopen(const wchar_t *, int, ...);
int wsopen(const wchar_t *, int, int, ...);
wchar_t * wmktemp(wchar_t *);
#endif
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* _IO_H_ not defined */

View File

@ -1,31 +0,0 @@
#ifndef _LIBGEN_H_
/*
* libgen.h
*
* $Id$
*
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Functions for splitting pathnames into dirname and basename components.
*
*/
#define _LIBGEN_H_
/* All the headers include this file. */
#include <_mingw.h>
#ifdef __cplusplus
extern "C" {
#endif
extern __cdecl __MINGW_NOTHROW char *basename (char *);
extern __cdecl __MINGW_NOTHROW char *dirname (char *);
#ifdef __cplusplus
}
#endif
#endif /* _LIBGEN_H_: end of file */

View File

@ -1,115 +0,0 @@
/*
* limits.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Functions for manipulating paths and directories (included from io.h)
* plus functions for setting the current drive.
*
* Defines constants for the sizes of integral types.
*
* NOTE: GCC should supply a version of this header and it should be safe to
* use that version instead of this one (maybe safer).
*
*/
#ifndef _LIMITS_H_
#define _LIMITS_H_
/* All the headers include this file. */
#include <_mingw.h>
/*
* File system limits
*
* TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
* same as FILENAME_MAX and FOPEN_MAX from stdio.h?
* NOTE: PATH_MAX is the POSIX equivalent for Microsoft's MAX_PATH; the two
* are semantically identical, with a limit of 259 characters for the
* path name, plus one for a terminating NUL, for a total of 260.
*/
#ifndef __STRICT_ANSI__
# define PATH_MAX 260
#endif
/*
* Characteristics of the char data type.
*
* TODO: Is MB_LEN_MAX correct?
*/
#define CHAR_BIT 8
#define MB_LEN_MAX 2
#define SCHAR_MIN (-128)
#define SCHAR_MAX 127
#define UCHAR_MAX 255
/* TODO: Is this safe? I think it might just be testing the preprocessor,
* not the compiler itself... */
#if ('\x80' < 0)
#define CHAR_MIN SCHAR_MIN
#define CHAR_MAX SCHAR_MAX
#else
#define CHAR_MIN 0
#define CHAR_MAX UCHAR_MAX
#endif
/*
* Maximum and minimum values for ints.
*/
#define INT_MAX 2147483647
#define INT_MIN (-INT_MAX-1)
#define UINT_MAX 0xffffffff
/*
* Maximum and minimum values for shorts.
*/
#define SHRT_MAX 32767
#define SHRT_MIN (-SHRT_MAX-1)
#define USHRT_MAX 0xffff
/*
* Maximum and minimum values for longs and unsigned longs.
*
* TODO: This is not correct for Alphas, which have 64 bit longs.
*/
#define LONG_MAX 2147483647L
#define LONG_MIN (-LONG_MAX-1)
#define ULONG_MAX 0xffffffffUL
#ifndef __STRICT_ANSI__
/* POSIX wants this. */
#define SSIZE_MAX LONG_MAX
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined(__STRICT_ANSI__)
/* ISO C9x macro names */
#define LLONG_MAX 9223372036854775807LL
#define LLONG_MIN (-LLONG_MAX - 1)
#define ULLONG_MAX (2ULL * LLONG_MAX + 1)
#endif
/*
* The GNU C compiler also allows 'long long int'
*/
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
#define LONG_LONG_MAX 9223372036854775807LL
#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
#define ULONG_LONG_MAX (2ULL * LONG_LONG_MAX + 1)
/* MSVC compatibility */
#define _I64_MIN LONG_LONG_MIN
#define _I64_MAX LONG_LONG_MAX
#define _UI64_MAX ULONG_LONG_MAX
#endif /* Not Strict ANSI and GNU C compiler */
#endif /* not _LIMITS_H_ */

View File

@ -1,88 +0,0 @@
/*
* locale.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Functions and types for localization (ie. changing the appearance of
* output based on the standards of a certain country).
*
*/
#ifndef _LOCALE_H_
#define _LOCALE_H_
/* All the headers include this file. */
#include <_mingw.h>
/*
* NOTE: I have tried to test this, but I am limited by my knowledge of
* locale issues. The structure does not bomb if you look at the
* values, and 'decimal_point' even seems to be correct. But the
* rest of the values are, by default, not particularly useful
* (read meaningless and not related to the international settings
* of the system).
*/
#define LC_ALL 0
#define LC_COLLATE 1
#define LC_CTYPE 2
#define LC_MONETARY 3
#define LC_NUMERIC 4
#define LC_TIME 5
#define LC_MIN LC_ALL
#define LC_MAX LC_TIME
#ifndef RC_INVOKED
/* According to C89 std, NULL is defined in locale.h too. */
#define __need_NULL
#include <stddef.h>
/*
* The structure returned by 'localeconv'.
*/
struct lconv
{
char* decimal_point;
char* thousands_sep;
char* grouping;
char* int_curr_symbol;
char* currency_symbol;
char* mon_decimal_point;
char* mon_thousands_sep;
char* mon_grouping;
char* positive_sign;
char* negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
};
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP char* __cdecl __MINGW_NOTHROW setlocale (int, const char*);
_CRTIMP struct lconv* __cdecl __MINGW_NOTHROW localeconv (void);
#ifndef _WLOCALE_DEFINED /* also declared in wchar.h */
# define __need_wchar_t
# include <stddef.h>
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wsetlocale(int, const wchar_t*);
# define _WLOCALE_DEFINED
#endif /* ndef _WLOCALE_DEFINED */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _LOCALE_H_ */

View File

@ -1,103 +0,0 @@
/*
* malloc.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Support for programs which want to use malloc.h to get memory management
* functions. Unless you absolutely need some of these functions and they are
* not in the ANSI headers you should use the ANSI standard header files
* instead.
*
*/
#ifndef _MALLOC_H_
#define _MALLOC_H_
/* All the headers include this file. */
#include <_mingw.h>
#include <stdlib.h>
#ifndef RC_INVOKED
/*
* The structure used to walk through the heap with _heapwalk.
*/
typedef struct _heapinfo
{
int* _pentry;
size_t _size;
int _useflag;
} _HEAPINFO;
/* Values for _heapinfo.useflag */
#define _FREEENTRY 0
#define _USEDENTRY 1
/* Return codes for _heapwalk() */
#define _HEAPEMPTY (-1)
#define _HEAPOK (-2)
#define _HEAPBADBEGIN (-3)
#define _HEAPBADNODE (-4)
#define _HEAPEND (-5)
#define _HEAPBADPTR (-6)
/* maximum size of a user request for memory */
#define _HEAP_MAXREQ 0xFFFFFFE0
#ifdef __cplusplus
extern "C" {
#endif
/*
The _heap* memory allocation functions are supported on NT
but not W9x. On latter, they always set errno to ENOSYS.
*/
_CRTIMP int __cdecl __MINGW_NOTHROW _heapwalk (_HEAPINFO*);
#ifdef __GNUC__
#define _alloca(x) __builtin_alloca((x))
#endif
#ifndef _NO_OLDNAMES
_CRTIMP int __cdecl __MINGW_NOTHROW heapwalk (_HEAPINFO*);
#ifdef __GNUC__
#define alloca(x) __builtin_alloca((x))
#endif
#endif /* Not _NO_OLDNAMES */
_CRTIMP int __cdecl __MINGW_NOTHROW _heapchk (void); /* Verify heap integrety. */
_CRTIMP int __cdecl __MINGW_NOTHROW _heapmin (void); /* Return unused heap to the OS. */
_CRTIMP int __cdecl __MINGW_NOTHROW _heapset (unsigned int);
_CRTIMP size_t __cdecl __MINGW_NOTHROW _msize (void*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW _get_sbh_threshold (void);
_CRTIMP int __cdecl __MINGW_NOTHROW _set_sbh_threshold (size_t);
_CRTIMP void* __cdecl __MINGW_NOTHROW _expand (void*, size_t);
/* These require msvcr70.dll or higher. */
#if __MSVCRT_VERSION__ >= 0x0700
_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_offset_malloc(size_t, size_t, size_t);
_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_offset_realloc(void*, size_t, size_t, size_t);
_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_offset_recalloc(void*, size_t, size_t, size_t, size_t);
_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_malloc (size_t, size_t);
_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_realloc (void*, size_t, size_t);
_CRTIMP void* __cdecl __MINGW_NOTHROW _aligned_recalloc(void*, size_t, size_t, size_t);
_CRTIMP void __cdecl __MINGW_NOTHROW _aligned_free (void*);
#endif /* __MSVCRT_VERSION__ >= 0x0700 */
/* These require libmingwex.a. */
void * __cdecl __MINGW_NOTHROW __mingw_aligned_offset_malloc (size_t, size_t, size_t);
void * __cdecl __MINGW_NOTHROW __mingw_aligned_offset_realloc (void*, size_t, size_t, size_t);
void * __cdecl __MINGW_NOTHROW __mingw_aligned_malloc (size_t, size_t);
void * __cdecl __MINGW_NOTHROW __mingw_aligned_realloc (void*, size_t, size_t);
void __cdecl __MINGW_NOTHROW __mingw_aligned_free (void*);
#ifdef __cplusplus
}
#endif
#endif /* RC_INVOKED */
#endif /* Not _MALLOC_H_ */

View File

@ -1,915 +0,0 @@
/*
* math.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Mathematical functions.
*
*/
#ifndef _MATH_H_
#define _MATH_H_
#if __GNUC__ >= 3
#pragma GCC system_header
#endif
/* All the headers include this file. */
#include <_mingw.h>
/*
* Types for the _exception structure.
*/
#define _DOMAIN 1 /* domain error in argument */
#define _SING 2 /* singularity */
#define _OVERFLOW 3 /* range overflow */
#define _UNDERFLOW 4 /* range underflow */
#define _TLOSS 5 /* total loss of precision */
#define _PLOSS 6 /* partial loss of precision */
/*
* Exception types with non-ANSI names for compatibility.
*/
#ifndef __STRICT_ANSI__
#ifndef _NO_OLDNAMES
#define DOMAIN _DOMAIN
#define SING _SING
#define OVERFLOW _OVERFLOW
#define UNDERFLOW _UNDERFLOW
#define TLOSS _TLOSS
#define PLOSS _PLOSS
#endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
/* Traditional/XOPEN math constants (double precison) */
#ifndef __STRICT_ANSI__
#define M_E 2.7182818284590452354
#define M_LOG2E 1.4426950408889634074
#define M_LOG10E 0.43429448190325182765
#define M_LN2 0.69314718055994530942
#define M_LN10 2.30258509299404568402
#define M_PI 3.14159265358979323846
#define M_PI_2 1.57079632679489661923
#define M_PI_4 0.78539816339744830962
#define M_1_PI 0.31830988618379067154
#define M_2_PI 0.63661977236758134308
#define M_2_SQRTPI 1.12837916709551257390
#define M_SQRT2 1.41421356237309504880
#define M_SQRT1_2 0.70710678118654752440
#endif
/* These are also defined in Mingw float.h; needed here as well to work
around GCC build issues. */
#ifndef __STRICT_ANSI__
#ifndef __MINGW_FPCLASS_DEFINED
#define __MINGW_FPCLASS_DEFINED 1
/* IEEE 754 classication */
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
#define _FPCLASS_NN 0x0008 /* Negative Normal */
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
#define _FPCLASS_PN 0x0100 /* Positive Normal */
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
#endif /* __MINGW_FPCLASS_DEFINED */
#endif /* Not __STRICT_ANSI__ */
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
/*
* HUGE_VAL is returned by strtod when the value would overflow the
* representation of 'double'. There are other uses as well.
*
* __imp__HUGE is a pointer to the actual variable _HUGE in
* MSVCRT.DLL. If we used _HUGE directly we would get a pointer
* to a thunk function.
*
* NOTE: The CRTDLL version uses _HUGE_dll instead.
*/
#if __MINGW_GNUC_PREREQ(3, 3)
#define HUGE_VAL __builtin_huge_val()
#else
#ifndef __DECLSPEC_SUPPORTED
#ifdef __MSVCRT__
extern double* _imp___HUGE;
#define HUGE_VAL (*_imp___HUGE)
#else
/* CRTDLL */
extern double* _imp___HUGE_dll;
#define HUGE_VAL (*_imp___HUGE_dll)
#endif
#else /* __DECLSPEC_SUPPORTED */
#ifdef __MSVCRT__
__MINGW_IMPORT double _HUGE;
#define HUGE_VAL _HUGE
#else
/* CRTDLL */
__MINGW_IMPORT double _HUGE_dll;
#define HUGE_VAL _HUGE_dll
#endif
#endif /* __DECLSPEC_SUPPORTED */
#endif /* __MINGW_GNUC_PREREQ(3, 3) */
struct _exception
{
int type;
char *name;
double arg1;
double arg2;
double retval;
};
_CRTIMP double __cdecl sin (double);
_CRTIMP double __cdecl cos (double);
_CRTIMP double __cdecl tan (double);
_CRTIMP double __cdecl sinh (double);
_CRTIMP double __cdecl cosh (double);
_CRTIMP double __cdecl tanh (double);
_CRTIMP double __cdecl asin (double);
_CRTIMP double __cdecl acos (double);
_CRTIMP double __cdecl atan (double);
_CRTIMP double __cdecl atan2 (double, double);
_CRTIMP double __cdecl exp (double);
_CRTIMP double __cdecl log (double);
_CRTIMP double __cdecl log10 (double);
_CRTIMP double __cdecl pow (double, double);
_CRTIMP double __cdecl sqrt (double);
_CRTIMP double __cdecl ceil (double);
_CRTIMP double __cdecl floor (double);
_CRTIMP double __cdecl fabs (double);
_CRTIMP double __cdecl ldexp (double, int);
_CRTIMP double __cdecl frexp (double, int*);
_CRTIMP double __cdecl modf (double, double*);
_CRTIMP double __cdecl fmod (double, double);
/* Excess precision when using a 64-bit mantissa for FPU math ops can
cause unexpected results with some of the MSVCRT math functions. For
example, unless the function return value is stored (truncating to
53-bit mantissa), calls to pow with both x and y as integral values
sometimes produce a non-integral result.
One workaround is to reset the FPU env to 53-bit mantissa
by a call to fesetenv (FE_PC53_ENV). Amother is to force storage
of the return value of individual math functions using wrappers.
NB, using these wrappers will disable builtin math functions and
hence disable the folding of function results at compile time when
arguments are constant. */
#if 0
#define __DEFINE_FLOAT_STORE_MATHFN_D1(fn1) \
static __inline__ double \
__float_store_ ## fn1 (double x) \
{ \
__volatile__ double res = (fn1) (x); \
return res; \
}
#define __DEFINE_FLOAT_STORE_MATHFN_D2(fn2) \
static __inline__ double \
__float_store_ ## fn2 (double x, double y) \
{ \
__volatile__ double res = (fn2) (x, y); \
return res; \
}
#endif
/* For example, here is how to force the result of the pow function
to be stored: */
#if 0
#undef pow
/* Define the ___float_store_pow function and use it instead of pow(). */
__DEFINE_FLOAT_STORE_MATHFN_D2 (pow)
#define pow __float_store_pow
#endif
#ifndef __STRICT_ANSI__
/* Complex number (for _cabs). This is the MS version. The ISO
C99 counterpart _Complex is an intrinsic type in GCC and
'complex' is defined as a macro. See complex.h */
struct _complex
{
double x; /* Real part */
double y; /* Imaginary part */
};
_CRTIMP double __cdecl _cabs (struct _complex);
_CRTIMP double __cdecl _hypot (double, double);
_CRTIMP double __cdecl _j0 (double);
_CRTIMP double __cdecl _j1 (double);
_CRTIMP double __cdecl _jn (int, double);
_CRTIMP double __cdecl _y0 (double);
_CRTIMP double __cdecl _y1 (double);
_CRTIMP double __cdecl _yn (int, double);
_CRTIMP int __cdecl _matherr (struct _exception *);
/* These are also declared in Mingw float.h; needed here as well to work
around GCC build issues. */
/* BEGIN FLOAT.H COPY */
/*
* IEEE recommended functions
*/
_CRTIMP double __cdecl _chgsign (double);
_CRTIMP double __cdecl _copysign (double, double);
_CRTIMP double __cdecl _logb (double);
_CRTIMP double __cdecl _nextafter (double, double);
_CRTIMP double __cdecl _scalb (double, long);
_CRTIMP int __cdecl _finite (double);
_CRTIMP int __cdecl _fpclass (double);
_CRTIMP int __cdecl _isnan (double);
/* END FLOAT.H COPY */
/*
* Non-underscored versions of non-ANSI functions.
* These reside in liboldnames.a.
*/
#if !defined (_NO_OLDNAMES)
_CRTIMP double __cdecl j0 (double);
_CRTIMP double __cdecl j1 (double);
_CRTIMP double __cdecl jn (int, double);
_CRTIMP double __cdecl y0 (double);
_CRTIMP double __cdecl y1 (double);
_CRTIMP double __cdecl yn (int, double);
_CRTIMP double __cdecl chgsign (double);
/*
* scalb() is a GCC built-in.
* Exclude this _scalb() stub; the semantics are incompatible
* with the built-in implementation.
*
_CRTIMP double __cdecl scalb (double, long);
*
*/
_CRTIMP int __cdecl finite (double);
_CRTIMP int __cdecl fpclass (double);
#define FP_SNAN _FPCLASS_SNAN
#define FP_QNAN _FPCLASS_QNAN
#define FP_NINF _FPCLASS_NINF
#define FP_PINF _FPCLASS_PINF
#define FP_NDENORM _FPCLASS_ND
#define FP_PDENORM _FPCLASS_PD
#define FP_NZERO _FPCLASS_NZ
#define FP_PZERO _FPCLASS_PZ
#define FP_NNORM _FPCLASS_NN
#define FP_PNORM _FPCLASS_PN
#endif /* Not _NO_OLDNAMES */
/* This require msvcr70.dll or higher. */
#if __MSVCRT_VERSION__ >= 0x0700
_CRTIMP int __cdecl _set_SSE2_enable (int);
#endif /* __MSVCRT_VERSION__ >= 0x0700 */
#endif /* __STRICT_ANSI__ */
#ifndef __NO_ISOCEXT
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined __STRICT_ANSI__ || defined __cplusplus
#if __MINGW_GNUC_PREREQ(3, 3)
#define HUGE_VALF __builtin_huge_valf()
#define HUGE_VALL __builtin_huge_vall()
#define INFINITY __builtin_inf()
#define NAN __builtin_nan("")
#else
extern const float __INFF;
#define HUGE_VALF __INFF
extern const long double __INFL;
#define HUGE_VALL __INFL
#define INFINITY HUGE_VALF
extern const double __QNAN;
#define NAN __QNAN
#endif /* __MINGW_GNUC_PREREQ(3, 3) */
/* Use the compiler's builtin define for FLT_EVAL_METHOD to
set float_t and double_t. */
#if defined(__FLT_EVAL_METHOD__)
# if ( __FLT_EVAL_METHOD__== 0)
typedef float float_t;
typedef double double_t;
# elif (__FLT_EVAL_METHOD__ == 1)
typedef double float_t;
typedef double double_t;
# elif (__FLT_EVAL_METHOD__ == 2)
typedef long double float_t;
typedef long double double_t;
#endif
#else /* ix87 FPU default */
typedef long double float_t;
typedef long double double_t;
#endif
/* 7.12.3.1 */
/*
Return values for fpclassify.
These are based on Intel x87 fpu condition codes
in the high byte of status word and differ from
the return values for MS IEEE 754 extension _fpclass()
*/
#define FP_NAN 0x0100
#define FP_NORMAL 0x0400
#define FP_INFINITE (FP_NAN | FP_NORMAL)
#define FP_ZERO 0x4000
#define FP_SUBNORMAL (FP_NORMAL | FP_ZERO)
/* 0x0200 is signbit mask */
/*
We can't inline float or double, because we want to ensure truncation
to semantic type before classification.
(A normal long double value might become subnormal when
converted to double, and zero when converted to float.)
*/
extern int __cdecl __fpclassifyf (float);
extern int __cdecl __fpclassify (double);
extern int __cdecl __fpclassifyl (long double);
#ifndef __NO_INLINE__
__CRT_INLINE int __cdecl __fpclassifyl (long double x){
unsigned short sw;
__asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
}
#endif
#define fpclassify(x) (sizeof (x) == sizeof (float) ? __fpclassifyf (x) \
: sizeof (x) == sizeof (double) ? __fpclassify (x) \
: __fpclassifyl (x))
/* 7.12.3.2 */
#define isfinite(x) ((fpclassify(x) & FP_NAN) == 0)
/* 7.12.3.3 */
#define isinf(x) (fpclassify(x) == FP_INFINITE)
/* 7.12.3.4 */
/* We don't need to worry about truncation here:
A NaN stays a NaN. */
extern int __cdecl __isnan (double);
extern int __cdecl __isnanf (float);
extern int __cdecl __isnanl (long double);
#ifndef __NO_INLINE__
__CRT_INLINE int __cdecl __isnan (double _x)
{
unsigned short sw;
__asm__ ("fxam;"
"fstsw %%ax": "=a" (sw) : "t" (_x));
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
== FP_NAN;
}
__CRT_INLINE int __cdecl __isnanf (float _x)
{
unsigned short sw;
__asm__ ("fxam;"
"fstsw %%ax": "=a" (sw) : "t" (_x));
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
== FP_NAN;
}
__CRT_INLINE int __cdecl __isnanl (long double _x)
{
unsigned short sw;
__asm__ ("fxam;"
"fstsw %%ax": "=a" (sw) : "t" (_x));
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
== FP_NAN;
}
#endif
#define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) \
: sizeof (x) == sizeof (double) ? __isnan (x) \
: __isnanl (x))
/* 7.12.3.5 */
#define isnormal(x) (fpclassify(x) == FP_NORMAL)
/* 7.12.3.6 The signbit macro */
extern int __cdecl __signbit (double);
extern int __cdecl __signbitf (float);
extern int __cdecl __signbitl (long double);
#ifndef __NO_INLINE__
__CRT_INLINE int __cdecl __signbit (double x) {
unsigned short stw;
__asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
return (stw & 0x0200) != 0;
}
__CRT_INLINE int __cdecl __signbitf (float x) {
unsigned short stw;
__asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
return (stw & 0x0200) != 0;
}
__CRT_INLINE int __cdecl __signbitl (long double x) {
unsigned short stw;
__asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
return (stw & 0x0200) != 0;
}
#endif
#define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) \
: sizeof (x) == sizeof (double) ? __signbit (x) \
: __signbitl (x))
/* 7.12.4 Trigonometric functions: Double in C89 */
extern float __cdecl sinf (float);
extern long double __cdecl sinl (long double);
extern float __cdecl cosf (float);
extern long double __cdecl cosl (long double);
extern float __cdecl tanf (float);
extern long double __cdecl tanl (long double);
extern float __cdecl asinf (float);
extern long double __cdecl asinl (long double);
extern float __cdecl acosf (float);
extern long double __cdecl acosl (long double);
extern float __cdecl atanf (float);
extern long double __cdecl atanl (long double);
extern float __cdecl atan2f (float, float);
extern long double __cdecl atan2l (long double, long double);
/* 7.12.5 Hyperbolic functions: Double in C89 */
extern float __cdecl sinhf (float);
#ifndef __NO_INLINE__
__CRT_INLINE float __cdecl sinhf (float x)
{return (float) sinh (x);}
#endif
extern long double __cdecl sinhl (long double);
extern float __cdecl coshf (float);
#ifndef __NO_INLINE__
__CRT_INLINE float __cdecl coshf (float x)
{return (float) cosh (x);}
#endif
extern long double __cdecl coshl (long double);
extern float __cdecl tanhf (float);
#ifndef __NO_INLINE__
__CRT_INLINE float __cdecl tanhf (float x)
{return (float) tanh (x);}
#endif
extern long double __cdecl tanhl (long double);
/* Inverse hyperbolic trig functions */
/* 7.12.5.1 */
extern double __cdecl acosh (double);
extern float __cdecl acoshf (float);
extern long double __cdecl acoshl (long double);
/* 7.12.5.2 */
extern double __cdecl asinh (double);
extern float __cdecl asinhf (float);
extern long double __cdecl asinhl (long double);
/* 7.12.5.3 */
extern double __cdecl atanh (double);
extern float __cdecl atanhf (float);
extern long double __cdecl atanhl (long double);
/* Exponentials and logarithms */
/* 7.12.6.1 Double in C89 */
extern float __cdecl expf (float);
#ifndef __NO_INLINE__
__CRT_INLINE float __cdecl expf (float x)
{return (float) exp (x);}
#endif
extern long double __cdecl expl (long double);
/* 7.12.6.2 */
extern double __cdecl exp2(double);
extern float __cdecl exp2f(float);
extern long double __cdecl exp2l(long double);
/* 7.12.6.3 The expm1 functions */
/* TODO: These could be inlined */
extern double __cdecl expm1(double);
extern float __cdecl expm1f(float);
extern long double __cdecl expm1l(long double);
/* 7.12.6.4 Double in C89 */
extern float __cdecl frexpf (float, int*);
#ifndef __NO_INLINE__
__CRT_INLINE float __cdecl frexpf (float x, int* expn)
{return (float) frexp (x, expn);}
#endif
extern long double __cdecl frexpl (long double, int*);
/* 7.12.6.5 */
#define FP_ILOGB0 ((int)0x80000000)
#define FP_ILOGBNAN ((int)0x80000000)
extern int __cdecl ilogb (double);
extern int __cdecl ilogbf (float);
extern int __cdecl ilogbl (long double);
/* 7.12.6.6 Double in C89 */
extern float __cdecl ldexpf (float, int);
#ifndef __NO_INLINE__
__CRT_INLINE float __cdecl ldexpf (float x, int expn)
{return (float) ldexp (x, expn);}
#endif
extern long double __cdecl ldexpl (long double, int);
/* 7.12.6.7 Double in C89 */
extern float __cdecl logf (float);
extern long double __cdecl logl (long double);
/* 7.12.6.8 Double in C89 */
extern float __cdecl log10f (float);
extern long double __cdecl log10l (long double);
/* 7.12.6.9 */
extern double __cdecl log1p(double);
extern float __cdecl log1pf(float);
extern long double __cdecl log1pl(long double);
/* 7.12.6.10 */
extern double __cdecl log2 (double);
extern float __cdecl log2f (float);
extern long double __cdecl log2l (long double);
/* 7.12.6.11 */
extern double __cdecl logb (double);
extern float __cdecl logbf (float);
extern long double __cdecl logbl (long double);
/* Inline versions. GCC-4.0+ can do a better fast-math optimization
with __builtins. */
#ifndef __NO_INLINE__
#if !(__MINGW_GNUC_PREREQ (4, 0) && defined __FAST_MATH__ )
__CRT_INLINE double __cdecl logb (double x)
{
double res;
__asm__ ("fxtract\n\t"
"fstp %%st" : "=t" (res) : "0" (x));
return res;
}
__CRT_INLINE float __cdecl logbf (float x)
{
float res;
__asm__ ("fxtract\n\t"
"fstp %%st" : "=t" (res) : "0" (x));
return res;
}
__CRT_INLINE long double __cdecl logbl (long double x)
{
long double res;
__asm__ ("fxtract\n\t"
"fstp %%st" : "=t" (res) : "0" (x));
return res;
}
#endif /* !defined __FAST_MATH__ || !__MINGW_GNUC_PREREQ (4, 0) */
#endif /* !defined __NO_INLINE__ */
/* 7.12.6.12 Double in C89 */
extern float __cdecl modff (float, float*);
extern long double __cdecl modfl (long double, long double*);
/* 7.12.6.13 */
extern double __cdecl scalbn (double, int);
extern float __cdecl scalbnf (float, int);
extern long double __cdecl scalbnl (long double, int);
extern double __cdecl scalbln (double, long);
extern float __cdecl scalblnf (float, long);
extern long double __cdecl scalblnl (long double, long);
/* 7.12.7.1 */
/* Implementations adapted from Cephes versions */
extern double __cdecl cbrt (double);
extern float __cdecl cbrtf (float);
extern long double __cdecl cbrtl (long double);
/* 7.12.7.2 The fabs functions: Double in C89 */
extern float __cdecl fabsf (float x);
extern long double __cdecl fabsl (long double x);
/* 7.12.7.3 */
extern double __cdecl hypot (double, double); /* in libmoldname.a */
extern float __cdecl hypotf (float, float);
#ifndef __NO_INLINE__
__CRT_INLINE float __cdecl hypotf (float x, float y)
{ return (float) hypot (x, y);}
#endif
extern long double __cdecl hypotl (long double, long double);
/* 7.12.7.4 The pow functions. Double in C89 */
extern float __cdecl powf (float, float);
#ifndef __NO_INLINE__
__CRT_INLINE float __cdecl powf (float x, float y)
{return (float) pow (x, y);}
#endif
extern long double __cdecl powl (long double, long double);
/* 7.12.7.5 The sqrt functions. Double in C89. */
extern float __cdecl sqrtf (float);
extern long double __cdecl sqrtl (long double);
/* 7.12.8.1 The erf functions */
extern double __cdecl erf (double);
extern float __cdecl erff (float);
extern long double __cdecl erfl (long double);
/* 7.12.8.2 The erfc functions */
extern double __cdecl erfc (double);
extern float __cdecl erfcf (float);
extern long double __cdecl erfcl (long double);
/* 7.12.8.3 The lgamma functions */
extern double __cdecl lgamma (double);
extern float __cdecl lgammaf (float);
extern long double __cdecl lgammal (long double);
/* 7.12.8.4 The tgamma functions */
extern double __cdecl tgamma (double);
extern float __cdecl tgammaf (float);
extern long double __cdecl tgammal (long double);
/* 7.12.9.1 Double in C89 */
extern float __cdecl ceilf (float);
extern long double __cdecl ceill (long double);
/* 7.12.9.2 Double in C89 */
extern float __cdecl floorf (float);
extern long double __cdecl floorl (long double);
/* 7.12.9.3 */
extern double __cdecl nearbyint ( double);
extern float __cdecl nearbyintf (float);
extern long double __cdecl nearbyintl (long double);
/* 7.12.9.4 */
/* round, using fpu control word settings */
extern double __cdecl rint (double);
extern float __cdecl rintf (float);
extern long double __cdecl rintl (long double);
/* 7.12.9.5 */
extern long __cdecl lrint (double);
extern long __cdecl lrintf (float);
extern long __cdecl lrintl (long double);
extern long long __cdecl llrint (double);
extern long long __cdecl llrintf (float);
extern long long __cdecl llrintl (long double);
/* Inline versions of above.
GCC 4.0+ can do a better fast-math job with __builtins. */
#ifndef __NO_INLINE__
#if !(__MINGW_GNUC_PREREQ (4, 0) && defined __FAST_MATH__ )
__CRT_INLINE double __cdecl rint (double x)
{
double retval;
__asm__ ("frndint;": "=t" (retval) : "0" (x));
return retval;
}
__CRT_INLINE float __cdecl rintf (float x)
{
float retval;
__asm__ ("frndint;" : "=t" (retval) : "0" (x) );
return retval;
}
__CRT_INLINE long double __cdecl rintl (long double x)
{
long double retval;
__asm__ ("frndint;" : "=t" (retval) : "0" (x) );
return retval;
}
__CRT_INLINE long __cdecl lrint (double x)
{
long retval;
__asm__ __volatile__
("fistpl %0" : "=m" (retval) : "t" (x) : "st");
return retval;
}
__CRT_INLINE long __cdecl lrintf (float x)
{
long retval;
__asm__ __volatile__
("fistpl %0" : "=m" (retval) : "t" (x) : "st");
return retval;
}
__CRT_INLINE long __cdecl lrintl (long double x)
{
long retval;
__asm__ __volatile__
("fistpl %0" : "=m" (retval) : "t" (x) : "st");
return retval;
}
__CRT_INLINE long long __cdecl llrint (double x)
{
long long retval;
__asm__ __volatile__
("fistpll %0" : "=m" (retval) : "t" (x) : "st");
return retval;
}
__CRT_INLINE long long __cdecl llrintf (float x)
{
long long retval;
__asm__ __volatile__
("fistpll %0" : "=m" (retval) : "t" (x) : "st");
return retval;
}
__CRT_INLINE long long __cdecl llrintl (long double x)
{
long long retval;
__asm__ __volatile__
("fistpll %0" : "=m" (retval) : "t" (x) : "st");
return retval;
}
#endif /* !__FAST_MATH__ || !__MINGW_GNUC_PREREQ (4,0) */
#endif /* !defined __NO_INLINE */
/* 7.12.9.6 */
/* round away from zero, regardless of fpu control word settings */
extern double __cdecl round (double);
extern float __cdecl roundf (float);
extern long double __cdecl roundl (long double);
/* 7.12.9.7 */
extern long __cdecl lround (double);
extern long __cdecl lroundf (float);
extern long __cdecl lroundl (long double);
extern long long __cdecl llround (double);
extern long long __cdecl llroundf (float);
extern long long __cdecl llroundl (long double);
/* 7.12.9.8 */
/* round towards zero, regardless of fpu control word settings */
extern double __cdecl trunc (double);
extern float __cdecl truncf (float);
extern long double __cdecl truncl (long double);
/* 7.12.10.1 Double in C89 */
extern float __cdecl fmodf (float, float);
extern long double __cdecl fmodl (long double, long double);
/* 7.12.10.2 */
extern double __cdecl remainder (double, double);
extern float __cdecl remainderf (float, float);
extern long double __cdecl remainderl (long double, long double);
/* 7.12.10.3 */
extern double __cdecl remquo(double, double, int *);
extern float __cdecl remquof(float, float, int *);
extern long double __cdecl remquol(long double, long double, int *);
/* 7.12.11.1 */
extern double __cdecl copysign (double, double); /* in libmoldname.a */
extern float __cdecl copysignf (float, float);
extern long double __cdecl copysignl (long double, long double);
/* 7.12.11.2 Return a NaN */
extern double __cdecl nan(const char *tagp);
extern float __cdecl nanf(const char *tagp);
extern long double __cdecl nanl(const char *tagp);
#ifndef __STRICT_ANSI__
#define _nan() nan("")
#define _nanf() nanf("")
#define _nanl() nanl("")
#endif
/* 7.12.11.3 */
extern double __cdecl nextafter (double, double); /* in libmoldname.a */
extern float __cdecl nextafterf (float, float);
extern long double __cdecl nextafterl (long double, long double);
/* 7.12.11.4 The nexttoward functions */
extern double __cdecl nexttoward (double, long double);
extern float __cdecl nexttowardf (float, long double);
extern long double __cdecl nexttowardl (long double, long double);
/* 7.12.12.1 */
/* x > y ? (x - y) : 0.0 */
extern double __cdecl fdim (double x, double y);
extern float __cdecl fdimf (float x, float y);
extern long double __cdecl fdiml (long double x, long double y);
/* fmax and fmin.
NaN arguments are treated as missing data: if one argument is a NaN
and the other numeric, then these functions choose the numeric
value. */
/* 7.12.12.2 */
extern double __cdecl fmax (double, double);
extern float __cdecl fmaxf (float, float);
extern long double __cdecl fmaxl (long double, long double);
/* 7.12.12.3 */
extern double __cdecl fmin (double, double);
extern float __cdecl fminf (float, float);
extern long double __cdecl fminl (long double, long double);
/* 7.12.13.1 */
/* return x * y + z as a ternary op */
extern double __cdecl fma (double, double, double);
extern float __cdecl fmaf (float, float, float);
extern long double __cdecl fmal (long double, long double, long double);
/* 7.12.14 */
/*
* With these functions, comparisons involving quiet NaNs set the FP
* condition code to "unordered". The IEEE floating-point spec
* dictates that the result of floating-point comparisons should be
* false whenever a NaN is involved, with the exception of the != op,
* which always returns true: yes, (NaN != NaN) is true).
*/
#if __GNUC__ >= 3
#define isgreater(x, y) __builtin_isgreater(x, y)
#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
#define isless(x, y) __builtin_isless(x, y)
#define islessequal(x, y) __builtin_islessequal(x, y)
#define islessgreater(x, y) __builtin_islessgreater(x, y)
#define isunordered(x, y) __builtin_isunordered(x, y)
#else
/* helper */
extern int __cdecl __fp_unordered_compare (long double, long double);
#ifndef __NO_INLINE__
__CRT_INLINE int __cdecl
__fp_unordered_compare (long double x, long double y){
unsigned short retval;
__asm__ ("fucom %%st(1);"
"fnstsw;": "=a" (retval) : "t" (x), "u" (y));
return retval;
}
#endif
#define isgreater(x, y) ((__fp_unordered_compare(x, y) \
& 0x4500) == 0)
#define isless(x, y) ((__fp_unordered_compare (y, x) \
& 0x4500) == 0)
#define isgreaterequal(x, y) ((__fp_unordered_compare (x, y) \
& FP_INFINITE) == 0)
#define islessequal(x, y) ((__fp_unordered_compare(y, x) \
& FP_INFINITE) == 0)
#define islessgreater(x, y) ((__fp_unordered_compare(x, y) \
& FP_SUBNORMAL) == 0)
#define isunordered(x, y) ((__fp_unordered_compare(x, y) \
& 0x4500) == 0x4500)
#endif
#endif /* __STDC_VERSION__ >= 199901L */
#endif /* __NO_ISOCEXT */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _MATH_H_ */

View File

@ -1,97 +0,0 @@
/*
* mbctype.h
*
* Functions for testing multibyte character types and converting characters.
*
* This file is part of the Mingw32 package.
*
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef _MBCTYPE_H_
#define _MBCTYPE_H_
/* All the headers include this file. */
#include <_mingw.h>
/* return values for _mbsbtype and _mbbtype in mbstring.h */
#define _MBC_SINGLE 0
#define _MBC_LEAD 1
#define _MBC_TRAIL 2
#define _MBC_ILLEGAL (-1)
/* args for setmbcp (in lieu of actual codepage) */
#define _MB_CP_SBCS 0
#define _MB_CP_OEM (-2)
#define _MB_CP_ANSI (-3)
#define _MB_CP_LOCALE (-4)
/* TODO: bit masks */
/*
#define _MS
#define _MP
#define _M1
#define _M2
#define _SBUP
#define _SBLOW
*/
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __STRICT_ANSI__
_CRTIMP int __cdecl __MINGW_NOTHROW _setmbcp (int);
_CRTIMP int __cdecl __MINGW_NOTHROW _getmbcp (void);
/* byte classification */
/* NB: Corresponding _ismbc* functions are in mbstring.h */
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbalpha (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbalnum (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbgraph (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbprint (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbpunct (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkana (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkalnum (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkprint (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkpunct (unsigned int);
/* these are also in mbstring.h */
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbblead (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbtrail (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbslead (const unsigned char*, const unsigned char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbstrail (const unsigned char*, const unsigned char*);
#ifdef __DECLSPEC_SUPPORTED
__MINGW_IMPORT unsigned char _mbctype[];
__MINGW_IMPORT unsigned char _mbcasemap[];
#endif
/* TODO : _MBCS_ mappings go in tchar.h */
#endif /* Not strict ANSI */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _MCTYPE_H_ */

View File

@ -1,132 +0,0 @@
/*
* mbstring.h
*
* Protototypes for string functions supporting multibyte characters.
*
* This file is part of the Mingw32 package.
*
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef _MBSTRING_H_
#define _MBSTRING_H_
/* All the headers include this file. */
#include <_mingw.h>
#ifndef RC_INVOKED
#define __need_size_t
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __STRICT_ANSI__
/* character classification */
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcalnum (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcalpha (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcdigit (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcgraph (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcprint (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcpunct (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcspace (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbclower (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcupper (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbclegal (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcsymbol (unsigned int);
/* also in mbctype.h */
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbblead (unsigned int );
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbtrail (unsigned int );
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbslead ( const unsigned char*, const unsigned char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbstrail ( const unsigned char*, const unsigned char*);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctolower (unsigned int);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctoupper (unsigned int);
_CRTIMP void __cdecl __MINGW_NOTHROW _mbccpy (unsigned char*, const unsigned char*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbclen (const unsigned char*);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbbtombc (unsigned int);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctombb (unsigned int);
/* Return value constants for these are defined in mbctype.h. */
_CRTIMP int __cdecl __MINGW_NOTHROW _mbbtype (unsigned char, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbsbtype (const unsigned char*, size_t);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbscpy (unsigned char*, const unsigned char*);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsncpy (unsigned char*, const unsigned char*, size_t);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnbcpy (unsigned char*, const unsigned char*, size_t);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsset (unsigned char*, unsigned int);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnset (unsigned char*, unsigned int, size_t);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnbset (unsigned char*, unsigned int, size_t);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsdup (const unsigned char*);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsrev (unsigned char*);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbscat (unsigned char*, const unsigned char*);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsncat (unsigned char*, const unsigned char*, size_t);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnbcat (unsigned char*, const unsigned char*, size_t);
_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbslen (const unsigned char*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbsnbcnt (const unsigned char*, size_t);
_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbsnccnt (const unsigned char*, size_t);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbschr (const unsigned char*, unsigned int);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsrchr (const unsigned char*, unsigned int);
_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbsspn (const unsigned char*, const unsigned char*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbscspn (const unsigned char*, const unsigned char*);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsspnp (const unsigned char*, const unsigned char*);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbspbrk (const unsigned char*, const unsigned char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbscmp (const unsigned char*, const unsigned char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbsicmp (const unsigned char*, const unsigned char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbsncmp (const unsigned char*, const unsigned char*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnicmp (const unsigned char*, const unsigned char*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbcmp (const unsigned char*, const unsigned char*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbicmp (const unsigned char*, const unsigned char*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbscoll (const unsigned char*, const unsigned char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbsicoll (const unsigned char*, const unsigned char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbsncoll (const unsigned char*, const unsigned char*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnicoll (const unsigned char*, const unsigned char*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbcoll (const unsigned char*, const unsigned char*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbicoll (const unsigned char*, const unsigned char*, size_t);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsinc (const unsigned char*);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsninc (const unsigned char*, size_t);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsdec (const unsigned char*, const unsigned char*);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbsnextc (const unsigned char*);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbslwr (unsigned char*);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsupr (unsigned char*);
_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbstok (unsigned char*, const unsigned char*);
/* Kanji */
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbchira (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbckata (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcl0 (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcl1 (unsigned int);
_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcl2 (unsigned int);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbcjistojms (unsigned int);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbcjmstojis (unsigned int);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctohira (unsigned int);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctokata (unsigned int);
#endif /* Not strict ANSI */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _MBSTRING_H_ */

View File

@ -1,6 +0,0 @@
/*
* This file is part of the Mingw32 package.
*
* mem.h maps to string.h
*/
#include <string.h>

View File

@ -1,7 +0,0 @@
/*
* This file is part of the Mingw32 package.
*
* memory.h maps to the standard string.h header.
*/
#include <string.h>

View File

@ -1,161 +0,0 @@
/*
* process.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Function calls for spawning child processes.
*
*/
#ifndef _PROCESS_H_
#define _PROCESS_H_
/* All the headers include this file. */
#include <_mingw.h>
#include <sys/types.h> /* For _pid_t and pid_t. */
#include <stdint.h> /* For intptr_t. */
/*
* Constants for cwait actions.
* Obsolete for Win32.
*/
#define _WAIT_CHILD 0
#define _WAIT_GRANDCHILD 1
#ifndef _NO_OLDNAMES
#define WAIT_CHILD _WAIT_CHILD
#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
#endif /* Not _NO_OLDNAMES */
/*
* Mode constants for spawn functions.
*/
#define _P_WAIT 0
#define _P_NOWAIT 1
#define _P_OVERLAY 2
#define _OLD_P_OVERLAY _P_OVERLAY
#define _P_NOWAITO 3
#define _P_DETACH 4
#ifndef _NO_OLDNAMES
#define P_WAIT _P_WAIT
#define P_NOWAIT _P_NOWAIT
#define P_OVERLAY _P_OVERLAY
#define OLD_P_OVERLAY _OLD_P_OVERLAY
#define P_NOWAITO _P_NOWAITO
#define P_DETACH _P_DETACH
#endif /* Not _NO_OLDNAMES */
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP void __cdecl __MINGW_NOTHROW _cexit(void);
_CRTIMP void __cdecl __MINGW_NOTHROW _c_exit(void);
_CRTIMP int __cdecl __MINGW_NOTHROW _cwait (int*, _pid_t, int);
_CRTIMP _pid_t __cdecl __MINGW_NOTHROW _getpid(void);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execl (const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execle (const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execlp (const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execlpe (const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execv (const char*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execve (const char*, const char* const*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execvp (const char*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execvpe (const char*, const char* const*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnl (int, const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnle (int, const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnlp (int, const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnlpe (int, const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnv (int, const char*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnve (int, const char*, const char* const*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnvp (int, const char*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnvpe (int, const char*, const char* const*, const char* const*);
#ifndef _WPROCESS_DEFINED
/* Also in wchar.h - keep in sync */
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecl (const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecle (const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexeclp (const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexeclpe (const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecv (const wchar_t*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecve (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecvp (const wchar_t*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecvpe (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnl (int, const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnle (int, const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnlp (int, const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnlpe (int, const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnv (int, const wchar_t*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnve (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnvp (int, const wchar_t*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnvpe (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
#define _WPROCESS_DEFINED
#endif
/*
* The functions _beginthreadex and _endthreadex are not provided by CRTDLL.
* They are provided by MSVCRT.
*
* NOTE: Apparently _endthread calls CloseHandle on the handle of the thread,
* making for race conditions if you are not careful. Basically you have to
* make sure that no-one is going to do *anything* with the thread handle
* after the thread calls _endthread or returns from the thread function.
*
* NOTE: No old names for these functions. Use the underscore.
*/
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW
_beginthread (void (*)(void *), unsigned, void*);
_CRTIMP void __cdecl __MINGW_NOTHROW _endthread (void);
#ifdef __MSVCRT__
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW
_beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *),
void*, unsigned, unsigned*);
_CRTIMP void __cdecl __MINGW_NOTHROW _endthreadex (unsigned);
#endif
#ifndef _NO_OLDNAMES
/*
* Functions without the leading underscore, for portability. These functions
* live in liboldnames.a.
*/
_CRTIMP int __cdecl __MINGW_NOTHROW cwait (int*, pid_t, int);
_CRTIMP pid_t __cdecl __MINGW_NOTHROW getpid (void);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execl (const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execle (const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execlp (const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execlpe (const char*, const char*,...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execv (const char*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execve (const char*, const char* const*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execvp (const char*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execvpe (const char*, const char* const*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnl (int, const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnle (int, const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnlp (int, const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnlpe (int, const char*, const char*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnv (int, const char*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnve (int, const char*, const char* const*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnvp (int, const char*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnvpe (int, const char*, const char* const*, const char* const*);
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* _PROCESS_H_ not defined */

View File

@ -1,106 +0,0 @@
/*
* search.h
*
* Functions for searching and sorting.
*
* This file is part of the Mingw32 package.
*
* Contributors:
* Created by Danny Smith <dannysmith@users.sourceforge.net>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef _SEARCH_H_
#define _SEARCH_H_
/* All the headers include this file. */
#include <_mingw.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
/* bsearch and qsort are also declared in stdlib.h */
_CRTIMP void* __cdecl bsearch (const void*, const void*, size_t, size_t,
int (*)(const void*, const void*));
_CRTIMP void __cdecl qsort (void*, size_t, size_t,
int (*)(const void*, const void*));
_CRTIMP void* __cdecl _lfind (const void*, const void*, unsigned int*,
unsigned int, int (*)(const void*, const void*));
_CRTIMP void* __cdecl _lsearch (const void*, void*, unsigned int*, unsigned int,
int (*)(const void*, const void*));
/*
Documentation for these POSIX definitions and prototypes can be found in
The Open Group Base Specifications Issue 6
IEEE Std 1003.1, 2004 Edition.
eg: http://www.opengroup.org/onlinepubs/009695399/functions/twalk.html
*/
typedef struct entry {
char *key;
void *data;
} ENTRY;
typedef enum {
FIND,
ENTER
} ACTION;
typedef enum {
preorder,
postorder,
endorder,
leaf
} VISIT;
#ifdef _SEARCH_PRIVATE
typedef struct node {
char *key;
struct node *llink, *rlink;
} node_t;
#endif
void * __cdecl tdelete (const void * __restrict__, void ** __restrict__,
int (*)(const void *, const void *))
__MINGW_ATTRIB_NONNULL (1) __MINGW_ATTRIB_NONNULL (3);
void * __cdecl tfind (const void *, void * const *,
int (*)(const void *, const void *))
__MINGW_ATTRIB_NONNULL (1) __MINGW_ATTRIB_NONNULL (3);
void * __cdecl tsearch (const void *, void **,
int (*)(const void *, const void *))
__MINGW_ATTRIB_NONNULL (1) __MINGW_ATTRIB_NONNULL (3);
void __cdecl twalk (const void *, void (*)(const void *, VISIT, int));
#ifndef _NO_OLDNAMES
_CRTIMP void* __cdecl lfind (const void*, const void*, unsigned int*,
unsigned int, int (*)(const void*, const void*));
_CRTIMP void* __cdecl lsearch (const void*, void*, unsigned int*, unsigned int,
int (*)(const void*, const void*));
#endif
#ifdef __cplusplus
}
#endif
#endif /* RC_INVOKED */
#endif /* _SEARCH_H_ */

View File

@ -1,56 +0,0 @@
/*
* setjmp.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Declarations supporting setjmp and longjump, a method for avoiding
* the normal function call return sequence. (Bleah!)
*
*/
#ifndef _SETJMP_H_
#define _SETJMP_H_
/* All the headers include this file. */
#include <_mingw.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
/*
* The buffer used by setjmp to store the information used by longjmp
* to perform it's evil goto-like work. The size of this buffer was
* determined through experimentation; it's contents are a mystery.
* NOTE: This was determined on an i386 (actually a Pentium). The
* contents could be different on an Alpha or something else.
*/
#define _JBLEN 16
#define _JBTYPE int
typedef _JBTYPE jmp_buf[_JBLEN];
/*
* The function provided by CRTDLL which appears to do the actual work
* of setjmp.
*/
_CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf);
#define setjmp(x) _setjmp(x)
/*
* Return to the last setjmp call and act as if setjmp had returned
* nVal (which had better be non-zero!).
*/
_CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int) __MINGW_ATTRIB_NORETURN;
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _SETJMP_H_ */

View File

@ -1,33 +0,0 @@
/*
* share.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Constants for file sharing functions.
*
*/
#ifndef _SHARE_H_
#define _SHARE_H_
/* All the headers include this file. */
#include <_mingw.h>
#define _SH_COMPAT 0x00 /* Compatibility */
#define _SH_DENYRW 0x10 /* Deny read/write */
#define _SH_DENYWR 0x20 /* Deny write */
#define _SH_DENYRD 0x30 /* Deny read */
#define _SH_DENYNO 0x40 /* Deny nothing */
#ifndef _NO_OLDNAMES
/* Non ANSI names */
#define SH_DENYRW _SH_DENYRW
#define SH_DENYWR _SH_DENYWR
#define SH_DENYRD _SH_DENYRD
#define SH_DENYNO _SH_DENYNO
#endif /* Not _NO_OLDNAMES */
#endif /* Not _SHARE_H_ */

View File

@ -1,98 +0,0 @@
/*
* signal.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* A way to set handlers for exceptional conditions (also known as signals).
*
*/
#ifndef _SIGNAL_H_
#define _SIGNAL_H_
/* All the headers include this file. */
#include <_mingw.h>
/*
* The actual signal values. Using other values with signal
* produces a SIG_ERR return value.
*
* NOTE: SIGINT is produced when the user presses Ctrl-C.
* SIGILL has not been tested.
* SIGFPE doesn't seem to work?
* SIGSEGV does not catch writing to a NULL pointer (that shuts down
* your app; can you say "segmentation violation core dump"?).
* SIGTERM comes from what kind of termination request exactly?
* SIGBREAK is indeed produced by pressing Ctrl-Break.
* SIGABRT is produced by calling abort.
* TODO: The above results may be related to not installing an appropriate
* structured exception handling frame. Results may be better if I ever
* manage to get the SEH stuff down.
*/
#define SIGINT 2 /* Interactive attention */
#define SIGILL 4 /* Illegal instruction */
#define SIGFPE 8 /* Floating point error */
#define SIGSEGV 11 /* Segmentation violation */
#define SIGTERM 15 /* Termination request */
#define SIGBREAK 21 /* Control-break */
#define SIGABRT 22 /* Abnormal termination (abort) */
#define NSIG 23 /* maximum signal number + 1 */
#ifndef RC_INVOKED
#ifndef _SIG_ATOMIC_T_DEFINED
typedef int sig_atomic_t;
#define _SIG_ATOMIC_T_DEFINED
#endif
/*
* The prototypes (below) are the easy part. The hard part is figuring
* out what signals are available and what numbers they are assigned
* along with appropriate values of SIG_DFL and SIG_IGN.
*/
/*
* A pointer to a signal handler function. A signal handler takes a
* single int, which is the signal it handles.
*/
typedef void (*__p_sig_fn_t)(int);
/*
* These are special values of signal handler pointers which are
* used to send a signal to the default handler (SIG_DFL), ignore
* the signal (SIG_IGN), indicate an error return (SIG_ERR),
* get an error (SIG_SGE), or acknowledge (SIG_ACK).
*/
#define SIG_DFL ((__p_sig_fn_t) 0)
#define SIG_IGN ((__p_sig_fn_t) 1)
#define SIG_ERR ((__p_sig_fn_t) -1)
#define SIG_SGE ((__p_sig_fn_t) 3)
#define SIG_ACK ((__p_sig_fn_t) 4)
#ifdef __cplusplus
extern "C" {
#endif
/*
* Call signal to set the signal handler for signal sig to the
* function pointed to by handler. Returns a pointer to the
* previous handler, or SIG_ERR if an error occurs. Initially
* unhandled signals defined above will return SIG_DFL.
*/
_CRTIMP __p_sig_fn_t __cdecl __MINGW_NOTHROW signal(int, __p_sig_fn_t);
/*
* Raise the signal indicated by sig. Returns non-zero on success.
*/
_CRTIMP int __cdecl __MINGW_NOTHROW raise (int);
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _SIGNAL_H_ */

View File

@ -1,207 +0,0 @@
/* ISO C9x 7.18 Integer types <stdint.h>
* Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Date: 2000-12-02
*/
#ifndef _STDINT_H
#define _STDINT_H
#include <_mingw.h>
#define __need_wint_t
#define __need_wchar_t
#include <stddef.h>
/* 7.18.1.1 Exact-width integer types */
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
/* 7.18.1.2 Minimum-width integer types */
typedef signed char int_least8_t;
typedef unsigned char uint_least8_t;
typedef short int_least16_t;
typedef unsigned short uint_least16_t;
typedef int int_least32_t;
typedef unsigned uint_least32_t;
typedef long long int_least64_t;
typedef unsigned long long uint_least64_t;
/* 7.18.1.3 Fastest minimum-width integer types
* Not actually guaranteed to be fastest for all purposes
* Here we use the exact-width types for 8 and 16-bit ints.
*/
typedef signed char int_fast8_t;
typedef unsigned char uint_fast8_t;
typedef short int_fast16_t;
typedef unsigned short uint_fast16_t;
typedef int int_fast32_t;
typedef unsigned int uint_fast32_t;
typedef long long int_fast64_t;
typedef unsigned long long uint_fast64_t;
/* 7.18.1.4 Integer types capable of holding object pointers */
#ifndef _INTPTR_T_DEFINED
#define _INTPTR_T_DEFINED
#ifdef _WIN64
typedef __int64 intptr_t;
#else
typedef int intptr_t;
#endif
#endif
#ifndef _UINTPTR_T_DEFINED
#define _UINTPTR_T_DEFINED
#ifdef _WIN64
typedef unsigned __int64 uintptr_t;
#else
typedef unsigned int uintptr_t;
#endif
#endif
/* 7.18.1.5 Greatest-width integer types */
typedef long long intmax_t;
typedef unsigned long long uintmax_t;
/* 7.18.2 Limits of specified-width integer types */
#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
/* 7.18.2.1 Limits of exact-width integer types */
#define INT8_MIN (-128)
#define INT16_MIN (-32768)
#define INT32_MIN (-2147483647 - 1)
#define INT64_MIN (-9223372036854775807LL - 1)
#define INT8_MAX 127
#define INT16_MAX 32767
#define INT32_MAX 2147483647
#define INT64_MAX 9223372036854775807LL
#define UINT8_MAX 0xff /* 255U */
#define UINT16_MAX 0xffff /* 65535U */
#define UINT32_MAX 0xffffffff /* 4294967295U */
#define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
/* 7.18.2.2 Limits of minimum-width integer types */
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
/* 7.18.2.3 Limits of fastest minimum-width integer types */
#define INT_FAST8_MIN INT8_MIN
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST8_MAX INT8_MAX
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
/* 7.18.2.4 Limits of integer types capable of holding
object pointers */
#ifdef _WIN64
#define INTPTR_MIN INT64_MIN
#define INTPTR_MAX INT64_MAX
#define UINTPTR_MAX UINT64_MAX
#else
#define INTPTR_MIN INT32_MIN
#define INTPTR_MAX INT32_MAX
#define UINTPTR_MAX UINT32_MAX
#endif
/* 7.18.2.5 Limits of greatest-width integer types */
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
/* 7.18.3 Limits of other integer types */
#define PTRDIFF_MIN INTPTR_MIN
#define PTRDIFF_MAX INTPTR_MAX
#define SIG_ATOMIC_MIN INTPTR_MIN
#define SIG_ATOMIC_MAX INTPTR_MAX
#define SIZE_MAX UINTPTR_MAX
#ifndef WCHAR_MIN /* also in wchar.h */
#define WCHAR_MIN 0
#define WCHAR_MAX 0xffff /* UINT16_MAX */
#endif
/*
* wint_t is unsigned short for compatibility with MS runtime
*/
#define WINT_MIN 0
#define WINT_MAX 0xffff /* UINT16_MAX */
#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
/* 7.18.4 Macros for integer constants */
#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
/* 7.18.4.1 Macros for minimum-width integer constants
Accoding to Douglas Gwyn <gwyn@arl.mil>:
"This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
9899:1999 as initially published, the expansion was required
to be an integer constant of precisely matching type, which
is impossible to accomplish for the shorter types on most
platforms, because C99 provides no standard way to designate
an integer constant with width less than that of type int.
TC1 changed this to require just an integer constant
*expression* with *promoted* type."
*/
#define INT8_C(val) val
#define UINT8_C(val) val
#define INT16_C(val) val
#define UINT16_C(val) val
#define INT32_C(val) val
#define UINT32_C(val) val##U
#define INT64_C(val) val##LL
#define UINT64_C(val) val##ULL
/* 7.18.4.2 Macros for greatest-width integer constants */
#define INTMAX_C(val) INT64_C(val)
#define UINTMAX_C(val) UINT64_C(val)
#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
#endif

View File

@ -1,662 +0,0 @@
/*
* stdio.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Definitions of types and prototypes of functions for standard input and
* output.
*
* NOTE: The file manipulation functions provided by Microsoft seem to
* work with either slash (/) or backslash (\) as the directory separator.
*
*/
#ifndef _STDIO_H_
#define _STDIO_H_
/* All the headers include this file. */
#include <_mingw.h>
#ifndef RC_INVOKED
#define __need_size_t
#define __need_NULL
#define __need_wchar_t
#define __need_wint_t
#include <stddef.h>
#define __need___va_list
#include <stdarg.h>
#endif /* Not RC_INVOKED */
/* Flags for the iobuf structure */
#define _IOREAD 1 /* currently reading */
#define _IOWRT 2 /* currently writing */
#define _IORW 0x0080 /* opened as "r+w" */
/*
* The three standard file pointers provided by the run time library.
* NOTE: These will go to the bit-bucket silently in GUI applications!
*/
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
/* Returned by various functions on end of file condition or error. */
#define EOF (-1)
/*
* The maximum length of a file name. You should use GetVolumeInformation
* instead of this constant. But hey, this works.
* Also defined in io.h.
*/
#ifndef FILENAME_MAX
#define FILENAME_MAX (260)
#endif
/*
* The maximum number of files that may be open at once. I have set this to
* a conservative number. The actual value may be higher.
*/
#define FOPEN_MAX (20)
/* After creating this many names, tmpnam and tmpfile return NULL */
#define TMP_MAX 32767
/*
* Tmpnam, tmpfile and, sometimes, _tempnam try to create
* temp files in the root directory of the current drive
* (not in pwd, as suggested by some older MS doc's).
* Redefining these macros does not effect the CRT functions.
*/
#define _P_tmpdir "\\"
#ifndef __STRICT_ANSI__
#define P_tmpdir _P_tmpdir
#endif
#define _wP_tmpdir L"\\"
/*
* The maximum size of name (including NUL) that will be put in the user
* supplied buffer caName for tmpnam.
* Inferred from the size of the static buffer returned by tmpnam
* when passed a NULL argument. May actually be smaller.
*/
#define L_tmpnam (16)
#define _IOFBF 0x0000 /* full buffered */
#define _IOLBF 0x0040 /* line buffered */
#define _IONBF 0x0004 /* not buffered */
#define _IOMYBUF 0x0008 /* stdio malloc()'d buffer */
#define _IOEOF 0x0010 /* EOF reached on read */
#define _IOERR 0x0020 /* I/O error from system */
#define _IOSTRG 0x0040 /* Strange or no file descriptor */
#ifdef _POSIX_SOURCE
# define _IOAPPEND 0x0200
#endif
/*
* The buffer size as used by setbuf such that it is equivalent to
* (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
*/
#define BUFSIZ 512
/* Constants for nOrigin indicating the position relative to which fseek
* sets the file position. Defined unconditionally since ISO and POSIX
* say they are defined here. */
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
#ifndef RC_INVOKED
#ifndef __VALIST
#ifdef __GNUC__
#define __VALIST __gnuc_va_list
#else
#define __VALIST char*
#endif
#endif /* defined __VALIST */
/*
* The structure underlying the FILE type.
*
* Some believe that nobody in their right mind should make use of the
* internals of this structure. Provided by Pedro A. Aranda Gutiirrez
* <paag@tid.es>.
*/
#ifndef _FILE_DEFINED
#define _FILE_DEFINED
typedef struct _iobuf
{
char* _ptr;
int _cnt;
char* _base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char* _tmpfname;
} FILE;
#endif /* Not _FILE_DEFINED */
/*
* The standard file handles
*/
#ifndef __DECLSPEC_SUPPORTED
extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
#define _iob (*_imp___iob) /* An array of FILE */
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT FILE _iob[]; /* An array of FILE imported from DLL. */
#endif /* __DECLSPEC_SUPPORTED */
#define stdin (&_iob[STDIN_FILENO])
#define stdout (&_iob[STDOUT_FILENO])
#define stderr (&_iob[STDERR_FILENO])
#ifdef __cplusplus
extern "C" {
#endif
/*
* File Operations
*/
_CRTIMP FILE* __cdecl __MINGW_NOTHROW fopen (const char*, const char*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW freopen (const char*, const char*, FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW fflush (FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW fclose (FILE*);
/* MS puts remove & rename (but not wide versions) in io.h also */
_CRTIMP int __cdecl __MINGW_NOTHROW remove (const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW rename (const char*, const char*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW tmpfile (void);
_CRTIMP char* __cdecl __MINGW_NOTHROW tmpnam (char*);
#ifndef __STRICT_ANSI__
_CRTIMP char* __cdecl __MINGW_NOTHROW _tempnam (const char*, const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _rmtmp(void);
_CRTIMP int __cdecl __MINGW_NOTHROW _unlink (const char*);
#ifndef NO_OLDNAMES
_CRTIMP char* __cdecl __MINGW_NOTHROW tempnam (const char*, const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW rmtmp(void);
_CRTIMP int __cdecl __MINGW_NOTHROW unlink (const char*);
#endif
#endif /* __STRICT_ANSI__ */
_CRTIMP int __cdecl __MINGW_NOTHROW setvbuf (FILE*, char*, int, size_t);
_CRTIMP void __cdecl __MINGW_NOTHROW setbuf (FILE*, char*);
/*
* Formatted Output
*
* MSVCRT implementations are not ANSI C99 conformant...
* we offer these conforming alternatives from libmingwex.a
*/
#undef __mingw_stdio_redirect__
#define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __mingw_##F
extern int __mingw_stdio_redirect__(fprintf)(FILE*, const char*, ...);
extern int __mingw_stdio_redirect__(printf)(const char*, ...);
extern int __mingw_stdio_redirect__(sprintf)(char*, const char*, ...);
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);
extern int __mingw_stdio_redirect__(vfprintf)(FILE*, const char*, __VALIST);
extern int __mingw_stdio_redirect__(vprintf)(const char*, __VALIST);
extern int __mingw_stdio_redirect__(vsprintf)(char*, const char*, __VALIST);
extern int __mingw_stdio_redirect__(vsnprintf)(char*, size_t, const char*, __VALIST);
#if __USE_MINGW_ANSI_STDIO
/*
* User has expressed a preference for C99 conformance...
*/
# undef __mingw_stdio_redirect__
# ifdef __cplusplus
/*
* For C++ we use inline implementations, to avoid interference
* with namespace qualification, which may result from using #defines.
*/
# define __mingw_stdio_redirect__ inline __cdecl __MINGW_NOTHROW
# elif defined __GNUC__
/*
* FIXME: Is there any GCC version prerequisite here?
*
* We also prefer inline implementations for C, when we can be confident
* that the GNU specific __inline__ mechanism is supported.
*/
# define __mingw_stdio_redirect__ static __inline__ __cdecl __MINGW_NOTHROW
# else
/*
* Can't use inlines; fall back on module local static stubs.
*/
# define __mingw_stdio_redirect__ static __cdecl __MINGW_NOTHROW
# endif
__mingw_stdio_redirect__
int fprintf (FILE *__stream, const char *__format, ...)
{
register int __retval;
__builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
__retval = __mingw_vfprintf( __stream, __format, __local_argv );
__builtin_va_end( __local_argv );
return __retval;
}
__mingw_stdio_redirect__
int printf (const char *__format, ...)
{
register int __retval;
__builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
__retval = __mingw_vprintf( __format, __local_argv );
__builtin_va_end( __local_argv );
return __retval;
}
__mingw_stdio_redirect__
int sprintf (char *__stream, const char *__format, ...)
{
register int __retval;
__builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
__retval = __mingw_vsprintf( __stream, __format, __local_argv );
__builtin_va_end( __local_argv );
return __retval;
}
__mingw_stdio_redirect__
int vfprintf (FILE *__stream, const char *__format, __VALIST __local_argv)
{
return __mingw_vfprintf( __stream, __format, __local_argv );
}
__mingw_stdio_redirect__
int vprintf (const char *__format, __VALIST __local_argv)
{
return __mingw_vprintf( __format, __local_argv );
}
__mingw_stdio_redirect__
int vsprintf (char *__stream, const char *__format, __VALIST __local_argv)
{
return __mingw_vsprintf( __stream, __format, __local_argv );
}
#else
/*
* Default configuration: simply direct all calls to MSVCRT...
*/
_CRTIMP int __cdecl __MINGW_NOTHROW fprintf (FILE*, const char*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW printf (const char*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW sprintf (char*, const char*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW vfprintf (FILE*, const char*, __VALIST);
_CRTIMP int __cdecl __MINGW_NOTHROW vprintf (const char*, __VALIST);
_CRTIMP int __cdecl __MINGW_NOTHROW vsprintf (char*, const char*, __VALIST);
#endif
/*
* Regardless of user preference, always offer these alternative
* entry points, for direct access to the MSVCRT implementations.
*/
#undef __mingw_stdio_redirect__
#define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __msvcrt_##F
_CRTIMP int __mingw_stdio_redirect__(fprintf)(FILE*, const char*, ...);
_CRTIMP int __mingw_stdio_redirect__(printf)(const char*, ...);
_CRTIMP int __mingw_stdio_redirect__(sprintf)(char*, const char*, ...);
_CRTIMP int __mingw_stdio_redirect__(vfprintf)(FILE*, const char*, __VALIST);
_CRTIMP int __mingw_stdio_redirect__(vprintf)(const char*, __VALIST);
_CRTIMP int __mingw_stdio_redirect__(vsprintf)(char*, const char*, __VALIST);
#undef __mingw_stdio_redirect__
/* The following pair ALWAYS refer to the MSVCRT implementations...
*/
_CRTIMP int __cdecl __MINGW_NOTHROW _snprintf (char*, size_t, const char*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _vsnprintf (char*, size_t, const char*, __VALIST);
_CRTIMP int __cdecl __MINGW_NOTHROW _vscprintf (const char*, __VALIST);
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
/*
* Microsoft does not provide implementations for the following,
* which are required by C99. Note in particular that the corresponding
* Microsoft implementations of _snprintf() and _vsnprintf() are *not*
* compatible with C99, but the following are; if you want the MSVCRT
* behaviour, you *must* use the Microsoft uglified names.
*/
int __cdecl __MINGW_NOTHROW snprintf (char *, size_t, const char *, ...);
int __cdecl __MINGW_NOTHROW vsnprintf (char *, size_t, const char *, __VALIST);
int __cdecl __MINGW_NOTHROW vscanf (const char * __restrict__, __VALIST);
int __cdecl __MINGW_NOTHROW vfscanf (FILE * __restrict__, const char * __restrict__,
__VALIST);
int __cdecl __MINGW_NOTHROW vsscanf (const char * __restrict__,
const char * __restrict__, __VALIST);
#endif /* !__NO_ISOCEXT */
/*
* Formatted Input
*/
_CRTIMP int __cdecl __MINGW_NOTHROW fscanf (FILE*, const char*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW scanf (const char*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW sscanf (const char*, const char*, ...);
/*
* Character Input and Output Functions
*/
_CRTIMP int __cdecl __MINGW_NOTHROW fgetc (FILE*);
_CRTIMP char* __cdecl __MINGW_NOTHROW fgets (char*, int, FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW fputc (int, FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW fputs (const char*, FILE*);
_CRTIMP char* __cdecl __MINGW_NOTHROW gets (char*);
_CRTIMP int __cdecl __MINGW_NOTHROW puts (const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW ungetc (int, FILE*);
/* Traditionally, getc and putc are defined as macros. but the
standard doesn't say that they must be macros.
We use inline functions here to allow the fast versions
to be used in C++ with namespace qualification, eg., ::getc.
_filbuf and _flsbuf are not thread-safe. */
_CRTIMP int __cdecl __MINGW_NOTHROW _filbuf (FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW _flsbuf (int, FILE*);
#if !defined _MT
__CRT_INLINE int __cdecl __MINGW_NOTHROW getc (FILE*);
__CRT_INLINE int __cdecl __MINGW_NOTHROW getc (FILE* __F)
{
return (--__F->_cnt >= 0)
? (int) (unsigned char) *__F->_ptr++
: _filbuf (__F);
}
__CRT_INLINE int __cdecl __MINGW_NOTHROW putc (int, FILE*);
__CRT_INLINE int __cdecl __MINGW_NOTHROW putc (int __c, FILE* __F)
{
return (--__F->_cnt >= 0)
? (int) (unsigned char) (*__F->_ptr++ = (char)__c)
: _flsbuf (__c, __F);
}
__CRT_INLINE int __cdecl __MINGW_NOTHROW getchar (void);
__CRT_INLINE int __cdecl __MINGW_NOTHROW getchar (void)
{
return (--stdin->_cnt >= 0)
? (int) (unsigned char) *stdin->_ptr++
: _filbuf (stdin);
}
__CRT_INLINE int __cdecl __MINGW_NOTHROW putchar(int);
__CRT_INLINE int __cdecl __MINGW_NOTHROW putchar(int __c)
{
return (--stdout->_cnt >= 0)
? (int) (unsigned char) (*stdout->_ptr++ = (char)__c)
: _flsbuf (__c, stdout);}
#else /* Use library functions. */
_CRTIMP int __cdecl __MINGW_NOTHROW getc (FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW putc (int, FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW getchar (void);
_CRTIMP int __cdecl __MINGW_NOTHROW putchar (int);
#endif
/*
* Direct Input and Output Functions
*/
_CRTIMP size_t __cdecl __MINGW_NOTHROW fread (void*, size_t, size_t, FILE*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW fwrite (const void*, size_t, size_t, FILE*);
/*
* File Positioning Functions
*/
_CRTIMP int __cdecl __MINGW_NOTHROW fseek (FILE*, long, int);
_CRTIMP long __cdecl __MINGW_NOTHROW ftell (FILE*);
_CRTIMP void __cdecl __MINGW_NOTHROW rewind (FILE*);
#if __MSVCRT_VERSION__ >= 0x800
_CRTIMP int __cdecl __MINGW_NOTHROW _fseek_nolock (FILE*, long, int);
_CRTIMP long __cdecl __MINGW_NOTHROW _ftell_nolock (FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW _fseeki64 (FILE*, __int64, int);
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64 (FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW _fseeki64_nolock (FILE*, __int64, int);
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64_nolock (FILE*);
#endif
#ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */
/*
* Workaround for limitations on win9x where a file contents are
* not zero'd out if you seek past the end and then write.
*/
int __cdecl __MINGW_NOTHROW __mingw_fseek (FILE *, long, int);
size_t __cdecl __MINGW_NOTHROW __mingw_fwrite (const void*, size_t, size_t, FILE*);
#define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence)
#define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp)
#endif /* __USE_MINGW_FSEEK */
/*
* An opaque data type used for storing file positions... The contents of
* this type are unknown, but we (the compiler) need to know the size
* because the programmer using fgetpos and fsetpos will be setting aside
* storage for fpos_t structres. Actually I tested using a byte array and
* it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).
* Perhaps an unsigned long? TODO? It's definitely a 64-bit number in
* MSVCRT however, and for now `long long' will do.
*/
#ifdef __MSVCRT__
typedef long long fpos_t;
#else
typedef long fpos_t;
#endif
_CRTIMP int __cdecl __MINGW_NOTHROW fgetpos (FILE*, fpos_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW fsetpos (FILE*, const fpos_t*);
/*
* Error Functions
*/
_CRTIMP int __cdecl __MINGW_NOTHROW feof (FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW ferror (FILE*);
#ifdef __cplusplus
inline int __cdecl __MINGW_NOTHROW feof (FILE* __F)
{ return __F->_flag & _IOEOF; }
inline int __cdecl __MINGW_NOTHROW ferror (FILE* __F)
{ return __F->_flag & _IOERR; }
#else
#define feof(__F) ((__F)->_flag & _IOEOF)
#define ferror(__F) ((__F)->_flag & _IOERR)
#endif
_CRTIMP void __cdecl __MINGW_NOTHROW clearerr (FILE*);
_CRTIMP void __cdecl __MINGW_NOTHROW perror (const char*);
#ifndef __STRICT_ANSI__
/*
* Pipes
*/
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _popen (const char*, const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _pclose (FILE*);
#ifndef NO_OLDNAMES
_CRTIMP FILE* __cdecl __MINGW_NOTHROW popen (const char*, const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW pclose (FILE*);
#endif
/*
* Other Non ANSI functions
*/
_CRTIMP int __cdecl __MINGW_NOTHROW _flushall (void);
_CRTIMP int __cdecl __MINGW_NOTHROW _fgetchar (void);
_CRTIMP int __cdecl __MINGW_NOTHROW _fputchar (int);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _fdopen (int, const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _fileno (FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW _fcloseall (void);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _fsopen (const char*, const char*, int);
#ifdef __MSVCRT__
_CRTIMP int __cdecl __MINGW_NOTHROW _getmaxstdio (void);
_CRTIMP int __cdecl __MINGW_NOTHROW _setmaxstdio (int);
#endif
#if __MSVCRT_VERSION__ >= 0x800
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _get_output_format (void);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _set_output_format (unsigned int);
#define _TWO_DIGIT_EXPONENT 1
_CRTIMP int __cdecl __MINGW_NOTHROW _get_printf_count_output (void);
_CRTIMP int __cdecl __MINGW_NOTHROW _set_printf_count_output (int);
#endif
#ifndef _NO_OLDNAMES
_CRTIMP int __cdecl __MINGW_NOTHROW fgetchar (void);
_CRTIMP int __cdecl __MINGW_NOTHROW fputchar (int);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW fdopen (int, const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW fileno (FILE*);
#endif /* Not _NO_OLDNAMES */
#define _fileno(__F) ((__F)->_file)
#ifndef _NO_OLDNAMES
#define fileno(__F) ((__F)->_file)
#endif
#if defined (__MSVCRT__) && !defined (__NO_MINGW_LFS)
#include <sys/types.h>
__CRT_INLINE FILE* __cdecl __MINGW_NOTHROW fopen64 (const char*, const char*);
__CRT_INLINE FILE* __cdecl __MINGW_NOTHROW fopen64 (const char* filename, const char* mode)
{
return fopen (filename, mode);
}
int __cdecl __MINGW_NOTHROW fseeko64 (FILE*, off64_t, int);
#ifdef __USE_MINGW_FSEEK
int __cdecl __MINGW_NOTHROW __mingw_fseeko64 (FILE *, off64_t, int);
#define fseeko64(fp, offset, whence) __mingw_fseeko64(fp, offset, whence)
#endif
__CRT_INLINE off64_t __cdecl __MINGW_NOTHROW ftello64 (FILE *);
__CRT_INLINE off64_t __cdecl __MINGW_NOTHROW ftello64 (FILE * stream)
{
fpos_t pos;
if (fgetpos(stream, &pos))
return -1LL;
else
return ((off64_t) pos);
}
#endif /* __NO_MINGW_LFS */
#endif /* Not __STRICT_ANSI__ */
/* Wide versions */
#ifndef _WSTDIO_DEFINED
/* also in wchar.h - keep in sync */
_CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW wprintf (const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW vfwprintf (FILE*, const wchar_t*, __VALIST);
_CRTIMP int __cdecl __MINGW_NOTHROW vwprintf (const wchar_t*, __VALIST);
_CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
_CRTIMP int __cdecl __MINGW_NOTHROW _vscwprintf (const wchar_t*, __VALIST);
_CRTIMP int __cdecl __MINGW_NOTHROW fwscanf (FILE*, const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW wscanf (const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW swscanf (const wchar_t*, const wchar_t*, ...);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t, FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*);
/* These differ from the ISO C prototypes, which have a maxlen parameter (like snprintf). */
#ifndef __STRICT_ANSI__
_CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW vswprintf (wchar_t*, const wchar_t*, __VALIST);
#endif
#ifdef __MSVCRT__
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t);
#ifndef __STRICT_ANSI__
_CRTIMP void __cdecl __MINGW_NOTHROW _lock_file(FILE*);
_CRTIMP void __cdecl __MINGW_NOTHROW _unlock_file(FILE*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, const wchar_t *);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfsopen (const wchar_t*, const wchar_t*, int);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*);
_CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*);
#endif /* __STRICT_ANSI__ */
#endif /* __MSVCRT__ */
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
int __cdecl __MINGW_NOTHROW vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg);
#ifndef __NO_INLINE__
__CRT_INLINE int __cdecl __MINGW_NOTHROW
vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
{ return _vsnwprintf ( s, n, format, arg);}
#endif
int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST);
int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__,
const wchar_t * __restrict__, __VALIST);
int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__,
const wchar_t * __restrict__, __VALIST);
#endif
#define _WSTDIO_DEFINED
#endif /* _WSTDIO_DEFINED */
#ifndef __STRICT_ANSI__
#ifdef __MSVCRT__
#ifndef NO_OLDNAMES
_CRTIMP FILE* __cdecl __MINGW_NOTHROW wpopen (const wchar_t*, const wchar_t*);
#endif /* not NO_OLDNAMES */
#endif /* MSVCRT runtime */
/*
* Other Non ANSI wide functions
*/
_CRTIMP wint_t __cdecl __MINGW_NOTHROW _fgetwchar (void);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW _fputwchar (wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _getw (FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW _putw (int, FILE*);
#ifndef _NO_OLDNAMES
_CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwchar (void);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwchar (wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW getw (FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW putw (int, FILE*);
#endif /* Not _NO_OLDNAMES */
#endif /* __STRICT_ANSI */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* _STDIO_H_ */

View File

@ -1,564 +0,0 @@
/*
* stdlib.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Definitions for common types, variables, and functions.
*
*/
#ifndef _STDLIB_H_
#define _STDLIB_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* RC_INVOKED */
/*
* RAND_MAX is the maximum value that may be returned by rand.
* The minimum is zero.
*/
#define RAND_MAX 0x7FFF
/*
* These values may be used as exit status codes.
*/
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
/*
* Definitions for path name functions.
* NOTE: All of these values have simply been chosen to be conservatively high.
* Remember that with long file names we can no longer depend on
* extensions being short.
*/
#ifndef __STRICT_ANSI__
#ifndef MAX_PATH
#define MAX_PATH (260)
#endif
#define _MAX_PATH MAX_PATH
#define _MAX_DRIVE (3)
#define _MAX_DIR 256
#define _MAX_FNAME 256
#define _MAX_EXT 256
#endif /* Not __STRICT_ANSI__ */
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
#if !defined (__STRICT_ANSI__)
/*
* This seems like a convenient place to declare these variables, which
* give programs using WinMain (or main for that matter) access to main-ish
* argc and argv. environ is a pointer to a table of environment variables.
* NOTE: Strings in _argv and environ are ANSI strings.
*/
extern int _argc;
extern char** _argv;
/* imports from runtime dll of the above variables */
#ifdef __MSVCRT__
extern int* __cdecl __MINGW_NOTHROW __p___argc(void);
extern char*** __cdecl __MINGW_NOTHROW __p___argv(void);
extern wchar_t*** __cdecl __MINGW_NOTHROW __p___wargv(void);
#define __argc (*__p___argc())
#define __argv (*__p___argv())
#define __wargv (*__p___wargv())
#else /* !MSVCRT */
#ifndef __DECLSPEC_SUPPORTED
extern int* _imp____argc_dll;
extern char*** _imp____argv_dll;
#define __argc (*_imp____argc_dll)
#define __argv (*_imp____argv_dll)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT int __argc_dll;
__MINGW_IMPORT char** __argv_dll;
#define __argc __argc_dll
#define __argv __argv_dll
#endif /* __DECLSPEC_SUPPORTED */
#endif /* __MSVCRT */
#endif /* __STRICT_ANSI__ */
/*
* Also defined in ctype.h.
*/
#ifndef MB_CUR_MAX
#ifdef __DECLSPEC_SUPPORTED
# ifdef __MSVCRT__
# define MB_CUR_MAX __mb_cur_max
__MINGW_IMPORT int __mb_cur_max;
# else /* not __MSVCRT */
# define MB_CUR_MAX __mb_cur_max_dll
__MINGW_IMPORT int __mb_cur_max_dll;
# endif /* not __MSVCRT */
#else /* ! __DECLSPEC_SUPPORTED */
# ifdef __MSVCRT__
extern int* _imp____mb_cur_max;
# define MB_CUR_MAX (*_imp____mb_cur_max)
# else /* not __MSVCRT */
extern int* _imp____mb_cur_max_dll;
# define MB_CUR_MAX (*_imp____mb_cur_max_dll)
# endif /* not __MSVCRT */
#endif /* __DECLSPEC_SUPPORTED */
#endif /* MB_CUR_MAX */
/*
* MS likes to declare errno in stdlib.h as well.
*/
#ifdef _UWIN
#undef errno
extern int errno;
#else
_CRTIMP int* __cdecl __MINGW_NOTHROW _errno(void);
#define errno (*_errno())
#endif
_CRTIMP int* __cdecl __MINGW_NOTHROW __doserrno(void);
#define _doserrno (*__doserrno())
#if !defined (__STRICT_ANSI__)
/*
* Use environ from the DLL, not as a global.
*/
#ifdef __MSVCRT__
extern _CRTIMP char *** __cdecl __MINGW_NOTHROW __p__environ(void);
extern _CRTIMP wchar_t *** __cdecl __MINGW_NOTHROW __p__wenviron(void);
# define _environ (*__p__environ())
# define _wenviron (*__p__wenviron())
#else /* ! __MSVCRT__ */
# ifndef __DECLSPEC_SUPPORTED
extern char *** _imp___environ_dll;
# define _environ (*_imp___environ_dll)
# else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT char ** _environ_dll;
# define _environ _environ_dll
# endif /* __DECLSPEC_SUPPORTED */
#endif /* ! __MSVCRT__ */
#define environ _environ
#ifdef __MSVCRT__
/* One of the MSVCRTxx libraries */
#ifndef __DECLSPEC_SUPPORTED
extern int* _imp___sys_nerr;
# define sys_nerr (*_imp___sys_nerr)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT int _sys_nerr;
# ifndef _UWIN
# define sys_nerr _sys_nerr
# endif /* _UWIN */
#endif /* __DECLSPEC_SUPPORTED */
#else /* ! __MSVCRT__ */
/* CRTDLL run time library */
#ifndef __DECLSPEC_SUPPORTED
extern int* _imp___sys_nerr_dll;
# define sys_nerr (*_imp___sys_nerr_dll)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT int _sys_nerr_dll;
# define sys_nerr _sys_nerr_dll
#endif /* __DECLSPEC_SUPPORTED */
#endif /* ! __MSVCRT__ */
#ifndef __DECLSPEC_SUPPORTED
extern char*** _imp__sys_errlist;
#define sys_errlist (*_imp___sys_errlist)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT char* _sys_errlist[];
#ifndef _UWIN
#define sys_errlist _sys_errlist
#endif /* _UWIN */
#endif /* __DECLSPEC_SUPPORTED */
/*
* OS version and such constants.
*/
#ifdef __MSVCRT__
/* msvcrtxx.dll */
extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__osver(void);
extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winver(void);
extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winmajor(void);
extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winminor(void);
#ifndef __DECLSPEC_SUPPORTED
# define _osver (*__p__osver())
# define _winver (*__p__winver())
# define _winmajor (*__p__winmajor())
# define _winminor (*__p__winminor())
#else
__MINGW_IMPORT unsigned int _osver;
__MINGW_IMPORT unsigned int _winver;
__MINGW_IMPORT unsigned int _winmajor;
__MINGW_IMPORT unsigned int _winminor;
#endif /* __DECLSPEC_SUPPORTED */
#else
/* Not msvcrtxx.dll, thus crtdll.dll */
#ifndef __DECLSPEC_SUPPORTED
extern unsigned int* _imp___osver_dll;
extern unsigned int* _imp___winver_dll;
extern unsigned int* _imp___winmajor_dll;
extern unsigned int* _imp___winminor_dll;
#define _osver (*_imp___osver_dll)
#define _winver (*_imp___winver_dll)
#define _winmajor (*_imp___winmajor_dll)
#define _winminor (*_imp___winminor_dll)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT unsigned int _osver_dll;
__MINGW_IMPORT unsigned int _winver_dll;
__MINGW_IMPORT unsigned int _winmajor_dll;
__MINGW_IMPORT unsigned int _winminor_dll;
#define _osver _osver_dll
#define _winver _winver_dll
#define _winmajor _winmajor_dll
#define _winminor _winminor_dll
#endif /* __DECLSPEC_SUPPORTED */
#endif
#if defined __MSVCRT__
/* although the _pgmptr is exported as DATA,
* be safe and use the access function __p__pgmptr() to get it. */
_CRTIMP char** __cdecl __MINGW_NOTHROW __p__pgmptr(void);
#define _pgmptr (*__p__pgmptr())
_CRTIMP wchar_t** __cdecl __MINGW_NOTHROW __p__wpgmptr(void);
#define _wpgmptr (*__p__wpgmptr())
#else /* ! __MSVCRT__ */
# ifndef __DECLSPEC_SUPPORTED
extern char** __imp__pgmptr_dll;
# define _pgmptr (*_imp___pgmptr_dll)
# else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT char* _pgmptr_dll;
# define _pgmptr _pgmptr_dll
# endif /* __DECLSPEC_SUPPORTED */
/* no wide version in CRTDLL */
#endif /* __MSVCRT__ */
/*
* This variable determines the default file mode.
* TODO: Which flags work?
*/
#if !defined (__DECLSPEC_SUPPORTED) || defined (__IN_MINGW_RUNTIME)
#ifdef __MSVCRT__
extern int* _imp___fmode;
#define _fmode (*_imp___fmode)
#else
/* CRTDLL */
extern int* _imp___fmode_dll;
#define _fmode (*_imp___fmode_dll)
#endif
#else /* __DECLSPEC_SUPPORTED */
#ifdef __MSVCRT__
__MINGW_IMPORT int _fmode;
#else /* ! __MSVCRT__ */
__MINGW_IMPORT int _fmode_dll;
#define _fmode _fmode_dll
#endif /* ! __MSVCRT__ */
#endif /* __DECLSPEC_SUPPORTED */
#endif /* Not __STRICT_ANSI__ */
_CRTIMP __int64 __cdecl _strtoi64(const char*, char **, int);
_CRTIMP __int64 __cdecl _strtoi64_l(const char *, char **, int, _locale_t);
_CRTIMP unsigned __int64 __cdecl _strtoui64(const char*, char **, int);
_CRTIMP unsigned __int64 __cdecl _strtoui64_l(const char *, char **, int, _locale_t);
_CRTIMP double __cdecl __MINGW_NOTHROW atof (const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW atoi (const char*);
_CRTIMP long __cdecl __MINGW_NOTHROW atol (const char*);
#if !defined (__STRICT_ANSI__)
_CRTIMP double __cdecl __MINGW_NOTHROW _wtof (const wchar_t *);
_CRTIMP int __cdecl __MINGW_NOTHROW _wtoi (const wchar_t *);
_CRTIMP long __cdecl __MINGW_NOTHROW _wtol (const wchar_t *);
#endif
#if !defined __NO_ISOCEXT /* in libmingwex.a */
double __cdecl __MINGW_NOTHROW __strtod (const char*, char**);
extern double __cdecl __MINGW_NOTHROW
strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr);
float __cdecl __MINGW_NOTHROW strtof (const char * __restrict__, char ** __restrict__);
long double __cdecl __MINGW_NOTHROW strtold (const char * __restrict__, char ** __restrict__);
#else
_CRTIMP double __cdecl __MINGW_NOTHROW strtod (const char*, char**);
#endif /* __NO_ISOCEXT */
_CRTIMP long __cdecl __MINGW_NOTHROW strtol (const char*, char**, int);
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW strtoul (const char*, char**, int);
#ifndef _WSTDLIB_DEFINED
/* also declared in wchar.h */
_CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *, wchar_t **, int);
_CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *, wchar_t **, int, _locale_t);
_CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *, wchar_t **, int);
_CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *, wchar_t **, int, _locale_t);
_CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int);
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int);
_CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**);
#if !defined __NO_ISOCEXT /* in libmingwex.a */
float __cdecl __MINGW_NOTHROW wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__);
long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
#endif /* __NO_ISOCEXT */
#ifdef __MSVCRT__
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*);
_CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*);
_CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
_CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t);
#endif
#define _WSTDLIB_DEFINED
#endif
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcstombs (char*, const wchar_t*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW wctomb (char*, wchar_t);
_CRTIMP int __cdecl __MINGW_NOTHROW mblen (const char*, size_t);
_CRTIMP size_t __cdecl __MINGW_NOTHROW mbstowcs (wchar_t*, const char*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW mbtowc (wchar_t*, const char*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW rand (void);
_CRTIMP void __cdecl __MINGW_NOTHROW srand (unsigned int);
_CRTIMP void* __cdecl __MINGW_NOTHROW calloc (size_t, size_t) __MINGW_ATTRIB_MALLOC;
_CRTIMP void* __cdecl __MINGW_NOTHROW malloc (size_t) __MINGW_ATTRIB_MALLOC;
_CRTIMP void* __cdecl __MINGW_NOTHROW realloc (void*, size_t);
_CRTIMP void __cdecl __MINGW_NOTHROW free (void*);
_CRTIMP void __cdecl __MINGW_NOTHROW abort (void) __MINGW_ATTRIB_NORETURN;
_CRTIMP void __cdecl __MINGW_NOTHROW exit (int) __MINGW_ATTRIB_NORETURN;
/* Note: This is in startup code, not imported directly from dll */
int __cdecl __MINGW_NOTHROW atexit (void (*)(void));
_CRTIMP int __cdecl __MINGW_NOTHROW system (const char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW getenv (const char*);
/* bsearch and qsort are also in non-ANSI header search.h */
_CRTIMP void* __cdecl bsearch (const void*, const void*, size_t, size_t,
int (*)(const void*, const void*));
_CRTIMP void __cdecl qsort(void*, size_t, size_t,
int (*)(const void*, const void*));
_CRTIMP int __cdecl __MINGW_NOTHROW abs (int) __MINGW_ATTRIB_CONST;
_CRTIMP long __cdecl __MINGW_NOTHROW labs (long) __MINGW_ATTRIB_CONST;
/*
* div_t and ldiv_t are structures used to return the results of div and
* ldiv.
*
* NOTE: div and ldiv appear not to work correctly unless
* -fno-pcc-struct-return is specified. This is included in the
* mingw32 specs file.
*/
typedef struct { int quot, rem; } div_t;
typedef struct { long quot, rem; } ldiv_t;
_CRTIMP div_t __cdecl __MINGW_NOTHROW div (int, int) __MINGW_ATTRIB_CONST;
_CRTIMP ldiv_t __cdecl __MINGW_NOTHROW ldiv (long, long) __MINGW_ATTRIB_CONST;
#if !defined (__STRICT_ANSI__)
/*
* NOTE: Officially the three following functions are obsolete. The Win32 API
* functions SetErrorMode, Beep and Sleep are their replacements.
*/
_CRTIMP void __cdecl __MINGW_NOTHROW _beep (unsigned int, unsigned int) __MINGW_ATTRIB_DEPRECATED;
/* Not to be confused with _set_error_mode (int). */
_CRTIMP void __cdecl __MINGW_NOTHROW _seterrormode (int) __MINGW_ATTRIB_DEPRECATED;
_CRTIMP void __cdecl __MINGW_NOTHROW _sleep (unsigned long) __MINGW_ATTRIB_DEPRECATED;
_CRTIMP void __cdecl __MINGW_NOTHROW _exit (int) __MINGW_ATTRIB_NORETURN;
/* _onexit is MS extension. Use atexit for portability. */
/* Note: This is in startup code, not imported directly from dll */
typedef int (* _onexit_t)(void);
_onexit_t __cdecl __MINGW_NOTHROW _onexit( _onexit_t );
_CRTIMP int __cdecl __MINGW_NOTHROW _putenv (const char*);
_CRTIMP void __cdecl __MINGW_NOTHROW _searchenv (const char*, const char*, char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _ecvt (double, int, int*, int*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _fcvt (double, int, int*, int*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _gcvt (double, int, char*);
_CRTIMP void __cdecl __MINGW_NOTHROW _makepath (char*, const char*, const char*, const char*, const char*);
_CRTIMP void __cdecl __MINGW_NOTHROW _splitpath (const char*, char*, char*, char*, char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _fullpath (char*, const char*, size_t);
_CRTIMP char* __cdecl __MINGW_NOTHROW _itoa (int, char*, int);
_CRTIMP char* __cdecl __MINGW_NOTHROW _ltoa (long, char*, int);
_CRTIMP char* __cdecl __MINGW_NOTHROW _ultoa(unsigned long, char*, int);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _itow (int, wchar_t*, int);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ltow (long, wchar_t*, int);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ultow (unsigned long, wchar_t*, int);
#ifdef __MSVCRT__
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _atoi64(const char *);
_CRTIMP char* __cdecl __MINGW_NOTHROW _i64toa(__int64, char *, int);
_CRTIMP char* __cdecl __MINGW_NOTHROW _ui64toa(unsigned __int64, char *, int);
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _wtoi64(const wchar_t *);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _i64tow(__int64, wchar_t *, int);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ui64tow(unsigned __int64, wchar_t *, int);
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW (_rotl)(unsigned int, int) __MINGW_ATTRIB_CONST;
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW (_rotr)(unsigned int, int) __MINGW_ATTRIB_CONST;
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW (_lrotl)(unsigned long, int) __MINGW_ATTRIB_CONST;
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW (_lrotr)(unsigned long, int) __MINGW_ATTRIB_CONST;
_CRTIMP int __cdecl __MINGW_NOTHROW _set_error_mode (int);
# define _OUT_TO_DEFAULT 0
# define _OUT_TO_STDERR 1
# define _OUT_TO_MSGBOX 2
# define _REPORT_ERRMODE 3
# if __MSVCRT_VERSION__ >= 0x800
# ifndef _UINTPTR_T_DEFINED
# define _UINTPTR_T_DEFINED
# ifdef _WIN64
typedef unsigned __int64 uintptr_t;
# else
typedef unsigned int uintptr_t;
# endif
# endif
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _set_abort_behavior (unsigned int, unsigned int);
/* These masks work with msvcr80.dll version 8.0.50215.44 (a beta release). */
# define _WRITE_ABORT_MSG 1
# define _CALL_REPORTFAULT 2
typedef void
(* _invalid_parameter_handler) (
const wchar_t *,
const wchar_t *,
const wchar_t *,
unsigned int,
uintptr_t);
_invalid_parameter_handler _set_invalid_parameter_handler (_invalid_parameter_handler);
# endif /* __MSVCRT_VERSION__ >= 0x800 */
#endif /* __MSVCRT__ */
#ifndef _NO_OLDNAMES
_CRTIMP int __cdecl __MINGW_NOTHROW putenv (const char*);
_CRTIMP void __cdecl __MINGW_NOTHROW searchenv (const char*, const char*, char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW itoa (int, char*, int);
_CRTIMP char* __cdecl __MINGW_NOTHROW ltoa (long, char*, int);
#ifndef _UWIN
_CRTIMP char* __cdecl __MINGW_NOTHROW ecvt (double, int, int*, int*);
_CRTIMP char* __cdecl __MINGW_NOTHROW fcvt (double, int, int*, int*);
_CRTIMP char* __cdecl __MINGW_NOTHROW gcvt (double, int, char*);
#endif /* _UWIN */
#endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
/* C99 names */
#if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
/* C99 name for _exit */
void __cdecl __MINGW_NOTHROW _Exit(int) __MINGW_ATTRIB_NORETURN;
#if !defined __NO_INLINE__ && !defined __STRICT_ANSI__
__CRT_INLINE void __cdecl __MINGW_NOTHROW _Exit(int __status)
{ _exit (__status); }
#endif
typedef struct { long long quot, rem; } lldiv_t;
lldiv_t __cdecl __MINGW_NOTHROW lldiv (long long, long long) __MINGW_ATTRIB_CONST;
long long __cdecl __MINGW_NOTHROW llabs(long long);
#ifndef __NO_INLINE__
__CRT_INLINE long long __cdecl __MINGW_NOTHROW llabs(long long _j)
{return (_j >= 0 ? _j : -_j);}
#endif
long long __cdecl __MINGW_NOTHROW strtoll (const char* __restrict__, char** __restrict, int);
unsigned long long __cdecl __MINGW_NOTHROW strtoull (const char* __restrict__, char** __restrict__, int);
#if defined (__MSVCRT__) /* these are stubs for MS _i64 versions */
long long __cdecl __MINGW_NOTHROW atoll (const char *);
#if !defined (__STRICT_ANSI__)
long long __cdecl __MINGW_NOTHROW wtoll (const wchar_t *);
char* __cdecl __MINGW_NOTHROW lltoa (long long, char *, int);
char* __cdecl __MINGW_NOTHROW ulltoa (unsigned long long , char *, int);
wchar_t* __cdecl __MINGW_NOTHROW lltow (long long, wchar_t *, int);
wchar_t* __cdecl __MINGW_NOTHROW ulltow (unsigned long long, wchar_t *, int);
/* inline using non-ansi functions */
#ifndef __NO_INLINE__
__CRT_INLINE long long __cdecl __MINGW_NOTHROW atoll (const char * _c)
{ return _atoi64 (_c); }
__CRT_INLINE char* __cdecl __MINGW_NOTHROW lltoa (long long _n, char * _c, int _i)
{ return _i64toa (_n, _c, _i); }
__CRT_INLINE char* __cdecl __MINGW_NOTHROW ulltoa (unsigned long long _n, char * _c, int _i)
{ return _ui64toa (_n, _c, _i); }
__CRT_INLINE long long __cdecl __MINGW_NOTHROW wtoll (const wchar_t * _w)
{ return _wtoi64 (_w); }
__CRT_INLINE wchar_t* __cdecl __MINGW_NOTHROW lltow (long long _n, wchar_t * _w, int _i)
{ return _i64tow (_n, _w, _i); }
__CRT_INLINE wchar_t* __cdecl __MINGW_NOTHROW ulltow (unsigned long long _n, wchar_t * _w, int _i)
{ return _ui64tow (_n, _w, _i); }
#endif /* (__NO_INLINE__) */
#endif /* (__STRICT_ANSI__) */
#endif /* __MSVCRT__ */
#endif /* !__NO_ISOCEXT */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _STDLIB_H_ */

View File

@ -1,201 +0,0 @@
/*
* string.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Definitions for memory and string functions.
*
*/
#ifndef _STRING_H_
#define _STRING_H_
/* All the headers include this file. */
#include <_mingw.h>
/*
* Define size_t, wchar_t and NULL
*/
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
/*
* Prototypes of the ANSI Standard C library string functions.
*/
_CRTIMP void* __cdecl __MINGW_NOTHROW memchr (const void*, int, size_t) __MINGW_ATTRIB_PURE;
_CRTIMP int __cdecl __MINGW_NOTHROW memcmp (const void*, const void*, size_t) __MINGW_ATTRIB_PURE;
_CRTIMP void* __cdecl __MINGW_NOTHROW memcpy (void*, const void*, size_t);
_CRTIMP void* __cdecl __MINGW_NOTHROW memmove (void*, const void*, size_t);
_CRTIMP void* __cdecl __MINGW_NOTHROW memset (void*, int, size_t);
_CRTIMP char* __cdecl __MINGW_NOTHROW strcat (char*, const char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW strchr (const char*, int) __MINGW_ATTRIB_PURE;
_CRTIMP int __cdecl __MINGW_NOTHROW strcmp (const char*, const char*) __MINGW_ATTRIB_PURE;
_CRTIMP int __cdecl __MINGW_NOTHROW strcoll (const char*, const char*); /* Compare using locale */
_CRTIMP char* __cdecl __MINGW_NOTHROW strcpy (char*, const char*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW strcspn (const char*, const char*) __MINGW_ATTRIB_PURE;
_CRTIMP char* __cdecl __MINGW_NOTHROW strerror (int); /* NOTE: NOT an old name wrapper. */
_CRTIMP size_t __cdecl __MINGW_NOTHROW strlen (const char*) __MINGW_ATTRIB_PURE;
_CRTIMP char* __cdecl __MINGW_NOTHROW strncat (char*, const char*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW strncmp (const char*, const char*, size_t) __MINGW_ATTRIB_PURE;
_CRTIMP char* __cdecl __MINGW_NOTHROW strncpy (char*, const char*, size_t);
_CRTIMP char* __cdecl __MINGW_NOTHROW strpbrk (const char*, const char*) __MINGW_ATTRIB_PURE;
_CRTIMP char* __cdecl __MINGW_NOTHROW strrchr (const char*, int) __MINGW_ATTRIB_PURE;
_CRTIMP size_t __cdecl __MINGW_NOTHROW strspn (const char*, const char*) __MINGW_ATTRIB_PURE;
_CRTIMP char* __cdecl __MINGW_NOTHROW strstr (const char*, const char*) __MINGW_ATTRIB_PURE;
_CRTIMP char* __cdecl __MINGW_NOTHROW strtok (char*, const char*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW strxfrm (char*, const char*, size_t);
#ifndef __STRICT_ANSI__
/*
* Extra non-ANSI functions provided by the CRTDLL library
*/
_CRTIMP char* __cdecl __MINGW_NOTHROW _strerror (const char *);
_CRTIMP void* __cdecl __MINGW_NOTHROW _memccpy (void*, const void*, int, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _memicmp (const void*, const void*, size_t);
_CRTIMP char* __cdecl __MINGW_NOTHROW _strdup (const char*) __MINGW_ATTRIB_MALLOC;
_CRTIMP int __cdecl __MINGW_NOTHROW _strcmpi (const char*, const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _stricmp (const char*, const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _stricoll (const char*, const char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _strlwr (char*);
_CRTIMP int __cdecl __MINGW_NOTHROW _strnicmp (const char*, const char*, size_t);
_CRTIMP char* __cdecl __MINGW_NOTHROW _strnset (char*, int, size_t);
_CRTIMP char* __cdecl __MINGW_NOTHROW _strrev (char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _strset (char*, int);
_CRTIMP char* __cdecl __MINGW_NOTHROW _strupr (char*);
_CRTIMP void __cdecl __MINGW_NOTHROW _swab (const char*, char*, size_t);
#ifdef __MSVCRT__
_CRTIMP int __cdecl __MINGW_NOTHROW _strncoll(const char*, const char*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _strnicoll(const char*, const char*, size_t);
#endif
#ifndef _NO_OLDNAMES
/*
* Non-underscored versions of non-ANSI functions. They live in liboldnames.a
* and provide a little extra portability. Also a few extra UNIX-isms like
* strcasecmp.
*/
_CRTIMP void* __cdecl __MINGW_NOTHROW memccpy (void*, const void*, int, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW memicmp (const void*, const void*, size_t);
_CRTIMP char* __cdecl __MINGW_NOTHROW strdup (const char*) __MINGW_ATTRIB_MALLOC;
_CRTIMP int __cdecl __MINGW_NOTHROW strcmpi (const char*, const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW stricmp (const char*, const char*);
int __cdecl __MINGW_NOTHROW strcasecmp (const char*, const char *);
#ifndef __NO_INLINE__
__CRT_INLINE int __cdecl __MINGW_NOTHROW
strcasecmp (const char * __sz1, const char * __sz2)
{return _stricmp (__sz1, __sz2);}
#endif
_CRTIMP int __cdecl __MINGW_NOTHROW stricoll (const char*, const char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW strlwr (char*);
_CRTIMP int __cdecl __MINGW_NOTHROW strnicmp (const char*, const char*, size_t);
int __cdecl __MINGW_NOTHROW strncasecmp (const char *, const char *, size_t);
#ifndef __NO_INLINE__
__CRT_INLINE int __cdecl __MINGW_NOTHROW
strncasecmp (const char * __sz1, const char * __sz2, size_t __sizeMaxCompare)
{return _strnicmp (__sz1, __sz2, __sizeMaxCompare);}
#endif
_CRTIMP char* __cdecl __MINGW_NOTHROW strnset (char*, int, size_t);
_CRTIMP char* __cdecl __MINGW_NOTHROW strrev (char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW strset (char*, int);
_CRTIMP char* __cdecl __MINGW_NOTHROW strupr (char*);
#ifndef _UWIN
_CRTIMP void __cdecl __MINGW_NOTHROW swab (const char*, char*, size_t);
#endif /* _UWIN */
#endif /* _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
#ifndef _WSTRING_DEFINED
/*
* Unicode versions of the standard calls.
* Also in wchar.h, where they belong according to ISO standard.
*/
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t);
_CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*);
/* Note: _wcserror requires __MSVCRT_VERSION__ >= 0x0700. */
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp(const wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t);
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t);
#ifndef __STRICT_ANSI__
/*
* Unicode versions of non-ANSI string functions provided by CRTDLL.
*/
/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
#define _wcscmpi _wcsicmp
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicmp (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicoll (const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*);
#ifdef __MSVCRT__
_CRTIMP int __cdecl __MINGW_NOTHROW _wcsncoll(const wchar_t*, const wchar_t*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
#if __MSVCRT_VERSION__ >= 0x0700
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
#endif
#endif
#ifndef _NO_OLDNAMES
/* NOTE: There is no _wcscmpi, but this is for compatibility. */
int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2);
#ifndef __NO_INLINE__
__CRT_INLINE int __cdecl __MINGW_NOTHROW
wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
{return _wcsicmp (__ws1, __ws2);}
#endif
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*);
#endif /* Not _NO_OLDNAMES */
#endif /* Not strict ANSI */
#define _WSTRING_DEFINED
#endif /* _WSTRING_DEFINED */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _STRING_H_ */

View File

@ -1,12 +0,0 @@
/*
File: strings.h
Copyright: Public Domain
This file is provided because non ANSI fuctions are described in string.h
that belong in strings.h. These functions are provided for in the OLDNAME
libraries.
*/
#if !defined(_STRINGS_H_)
# define _STRINGS_H_ 1
# include <string.h>
#endif

View File

@ -1,7 +0,0 @@
/*
* This file is part of the Mingw32 package.
*
* This fcntl.h maps to the root fcntl.h
*/
#include <fcntl.h>

View File

@ -1,7 +0,0 @@
/*
* This file is part of the Mingw32 package.
*
* This file.h maps to the root fcntl.h
* TODO?
*/
#include <fcntl.h>

View File

@ -1,31 +0,0 @@
/*
* locking.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Constants for the mode parameter of the locking function.
*
*/
#ifndef _LOCKING_H_
#define _LOCKING_H_
/* All the headers include this file. */
#include <_mingw.h>
#define _LK_UNLCK 0 /* Unlock */
#define _LK_LOCK 1 /* Lock */
#define _LK_NBLCK 2 /* Non-blocking lock */
#define _LK_RLCK 3 /* Lock for read only */
#define _LK_NBRLCK 4 /* Non-blocking lock for read only */
#ifndef NO_OLDNAMES
#define LK_UNLCK _LK_UNLCK
#define LK_LOCK _LK_LOCK
#define LK_NBLCK _LK_NBLCK
#define LK_RLCK _LK_RLCK
#define LK_NBRLCK _LK_NBRLCK
#endif /* Not NO_OLDNAMES */
#endif /* Not _LOCKING_H_ */

View File

@ -1,26 +0,0 @@
/*
* param.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
*/
#ifndef _SYS_PARAM_H
#define _SYS_PARAM_H
#include <sys/types.h>
#include <limits.h>
/* These are useful for cross-compiling */
#define BIG_ENDIAN 4321
#define LITTLE_ENDIAN 1234
#define BYTE_ORDER LITTLE_ENDIAN
#ifdef PATH_MAX
#define MAXPATHLEN PATH_MAX
#else
#define MAXPATHLEN 260
#endif
#endif

View File

@ -1,279 +0,0 @@
/*
* stat.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Symbolic constants for opening and creating files, also stat, fstat and
* chmod functions.
*
*/
#ifndef _STAT_H_
#define _STAT_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_size_t
#define __need_wchar_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
#include <sys/types.h>
/*
* Constants for the stat st_mode member.
*/
#define _S_IFIFO 0x1000 /* FIFO */
#define _S_IFCHR 0x2000 /* Character */
#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
#define _S_IFDIR 0x4000 /* Directory */
#define _S_IFREG 0x8000 /* Regular */
#define _S_IFMT 0xF000 /* File type mask */
#define _S_IEXEC 0x0040
#define _S_IWRITE 0x0080
#define _S_IREAD 0x0100
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
#define _S_IXUSR _S_IEXEC
#define _S_IWUSR _S_IWRITE
#define _S_IRUSR _S_IREAD
#define _S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#define _S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO)
#define _S_ISCHR(m) (((m) & _S_IFMT) == _S_IFCHR)
#define _S_ISBLK(m) (((m) & _S_IFMT) == _S_IFBLK)
#define _S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
#ifndef _NO_OLDNAMES
#define S_IFIFO _S_IFIFO
#define S_IFCHR _S_IFCHR
#define S_IFBLK _S_IFBLK
#define S_IFDIR _S_IFDIR
#define S_IFREG _S_IFREG
#define S_IFMT _S_IFMT
#define S_IEXEC _S_IEXEC
#define S_IWRITE _S_IWRITE
#define S_IREAD _S_IREAD
#define S_IRWXU _S_IRWXU
#define S_IXUSR _S_IXUSR
#define S_IWUSR _S_IWUSR
#define S_IRUSR _S_IRUSR
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif /* Not _NO_OLDNAMES */
#ifndef RC_INVOKED
#ifndef _STAT_DEFINED
/*
* The structure manipulated and returned by stat and fstat.
*
* NOTE: If called on a directory the values in the time fields are not only
* invalid, they will cause localtime et. al. to return NULL. And calling
* asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
*/
struct _stat
{
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
_ino_t st_ino; /* Always zero ? */
_mode_t st_mode; /* See above constants */
short st_nlink; /* Number of links. */
short st_uid; /* User: Maybe significant on NT ? */
short st_gid; /* Group: Ditto */
_dev_t st_rdev; /* Seems useless (not even filled in) */
_off_t st_size; /* File size in bytes */
time_t st_atime; /* Accessed date (always 00:00 hrs local
* on FAT) */
time_t st_mtime; /* Modified time */
time_t st_ctime; /* Creation time */
};
#ifndef _NO_OLDNAMES
/* NOTE: Must be the same as _stat above. */
struct stat
{
dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
ino_t st_ino; /* Always zero ? */
mode_t st_mode; /* See above constants */
short st_nlink; /* Number of links. */
short st_uid; /* User: Maybe significant on NT ? */
short st_gid; /* Group: Ditto */
dev_t st_rdev; /* Seems useless (not even filled in) */
off_t st_size; /* File size in bytes */
time_t st_atime; /* Accessed date (always 00:00 hrs local
* on FAT) */
time_t st_mtime; /* Modified time */
time_t st_ctime; /* Creation time */
};
#endif /* _NO_OLDNAMES */
#if defined (__MSVCRT__)
struct _stati64 {
_dev_t st_dev;
_ino_t st_ino;
_mode_t st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
};
#if __MSVCRT_VERSION__ >= 0x0601
struct __stat64
{
_dev_t st_dev;
_ino_t st_ino;
_mode_t st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
#if __MSVCRT_VERSION__ >= 0x0800
struct __stat32
{
_dev_t st_dev;
_ino_t st_ino;
_mode_t st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int32 st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
};
struct _stat32i64 {
_dev_t st_dev;
_ino_t st_ino;
_mode_t st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
};
struct _stat64i32 {
_dev_t st_dev;
_ino_t st_ino;
_mode_t st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int32 st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#endif /* __MSVCRT__ */
#define _STAT_DEFINED
#endif /* _STAT_DEFINED */
#ifdef __cplusplus
extern "C" {
#endif
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat (int, struct _stat*);
#endif
_CRTIMP int __cdecl __MINGW_NOTHROW _chmod (const char*, int);
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _stat (const char*, struct _stat*);
#endif
#ifndef _NO_OLDNAMES
/* FIXME for __MSVCRT_VERSION__ >= 0x0800 */
/* These functions live in liboldnames.a. */
_CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*);
_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*);
#endif /* Not _NO_OLDNAMES */
#if defined (__MSVCRT__)
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _fstati64(int, struct _stati64 *);
_CRTIMP int __cdecl __MINGW_NOTHROW _stati64(const char *, struct _stati64 *);
#endif
/* These require newer versions of msvcrt.dll (6.10 or higher). */
#if __MSVCRT_VERSION__ >= 0x0601
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat64 (int, struct __stat64*);
_CRTIMP int __cdecl __MINGW_NOTHROW _stat64 (const char*, struct __stat64*);
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
#if __MSVCRT_VERSION__ >= 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat32 (int, struct __stat32*);
_CRTIMP int __cdecl __MINGW_NOTHROW _stat32 (const char*, struct __stat32*);
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat32i64 (int, struct _stat32i64*);
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat64i32 (int, struct _stat64i32*);
_CRTIMP int __cdecl __MINGW_NOTHROW _stat32i64 (const char*, struct _stat32i64*);
_CRTIMP int __cdecl __MINGW_NOTHROW _stat64i32 (const char*, struct _stat64i32*);
#ifndef _USE_32BIT_TIME_T
_CRTALIAS int __cdecl __MINGW_NOTHROW _fstat (int _v1, struct _stat* _v2) { return(_fstat64i32 (_v1,(struct _stat64i32*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _stat (const char* _v1, struct _stat* _v2) { return(_stat64i32 (_v1,(struct _stat64i32*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _fstati64 (int _v1, struct _stati64* _v2) { return(_fstat64 (_v1,(struct __stat64*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _stati64 (const char* _v1, struct _stati64* _v2) { return(_stat64 (_v1,(struct __stat64*)_v2)); }
#else
_CRTALIAS int __cdecl __MINGW_NOTHROW _fstat (int _v1, struct _stat* _v2) { return(_fstat32 (_v1,(struct __stat32*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _stat (const char* _v1, struct _stat* _v2) { return(_stat32 (_v1,(struct __stat32*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _fstati64 (int _v1, struct _stati64* _v2) { return(_fstat32i64 (_v1,(struct _stat32i64*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _stati64 (const char* _v1, struct _stati64* _v2) { return(_stat32i64 (_v1,(struct _stat32i64*)_v2)); }
#endif /* !_USE_32BIT_TIME_T */
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#if !defined ( _WSTAT_DEFINED) /* also declared in wchar.h */
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat(const wchar_t*, struct _stat*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t*, struct _stati64*);
#endif
#if __MSVCRT_VERSION__ >= 0x0601
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat64 (const wchar_t*, struct __stat64*);
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
#if __MSVCRT_VERSION__ >= 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat32 (const wchar_t*, struct __stat32*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat32i64 (const wchar_t*, struct _stat32i64*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat64i32 (const wchar_t*, struct _stat64i32*);
#ifndef _USE_32BIT_TIME_T
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstat (const wchar_t* _v1, struct _stat* _v2) { return(_wstat64i32 (_v1,(struct _stat64i32*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t* _v1, struct _stati64* _v2) { return(_wstat64 (_v1,(struct __stat64*)_v2)); }
#else
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstat (const wchar_t* _v1, struct _stat* _v2) { return(_wstat32 (_v1,(struct __stat32*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t* _v1, struct _stati64* _v2) { return(_wstat32i64 (_v1,(struct _stat32i64*)_v2)); }
#endif /* !_USE_32BIT_TIME_T */
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#define _WSTAT_DEFINED
#endif /* _WSTAT_DEFIND */
#endif /* __MSVCRT__ */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _STAT_H_ */

View File

@ -1,47 +0,0 @@
#ifndef _SYS_TIME_H_
#define _SYS_TIME_H_
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
#define _TIMEVAL_DEFINED
struct timeval {
long tv_sec;
long tv_usec;
};
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
#define timercmp(tvp, uvp, cmp) \
(((tvp)->tv_sec != (uvp)->tv_sec) ? \
((tvp)->tv_sec cmp (uvp)->tv_sec) : \
((tvp)->tv_usec cmp (uvp)->tv_usec))
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#endif /* _TIMEVAL_DEFINED */
/* Provided for compatibility with code that assumes that
the presence of gettimeofday function implies a definition
of struct timezone. */
struct timezone
{
int tz_minuteswest; /* of Greenwich */
int tz_dsttime; /* type of dst correction to apply */
};
/*
Implementation as per:
The Open Group Base Specifications, Issue 6
IEEE Std 1003.1, 2004 Edition
The timezone pointer arg is ignored. Errors are ignored.
*/
int __cdecl __MINGW_NOTHROW gettimeofday(struct timeval *__restrict__,
void *__restrict__ /* tzp (unused) */);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_TIME_H_ */

View File

@ -1,97 +0,0 @@
/*
* timeb.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Support for the UNIX System V ftime system call.
*
*/
#ifndef _TIMEB_H_
#define _TIMEB_H_
/* All the headers include this file. */
#include <_mingw.h>
#include <sys/types.h>
#ifndef RC_INVOKED
/*
* TODO: Structure not tested.
*/
struct _timeb
{
time_t time;
short millitm;
short timezone;
short dstflag;
};
#if __MSVCRT_VERSION__ >= 0x0800
/*
* TODO: Structure not tested.
*/
struct __timeb32
{
__time32_t time;
short millitm;
short timezone;
short dstflag;
};
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#ifndef _NO_OLDNAMES
/*
* TODO: Structure not tested.
*/
struct timeb
{
time_t time;
short millitm;
short timezone;
short dstflag;
};
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* TODO: Not tested. */
_CRTIMP void __cdecl __MINGW_NOTHROW _ftime (struct _timeb*);
#ifndef _NO_OLDNAMES
/* FIXME for __MSVCRT_VERSION__ >= 0x0800 */
_CRTIMP void __cdecl __MINGW_NOTHROW ftime (struct timeb*);
#endif /* Not _NO_OLDNAMES */
/* This requires newer versions of msvcrt.dll (6.10 or higher). */
#if __MSVCRT_VERSION__ >= 0x0601
struct __timeb64
{
__time64_t time;
short millitm;
short timezone;
short dstflag;
};
_CRTIMP void __cdecl __MINGW_NOTHROW _ftime64 (struct __timeb64*);
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
#if __MSVCRT_VERSION__ >= 0x0800
_CRTIMP void __cdecl __MINGW_NOTHROW _ftime32 (struct __timeb32*);
#ifndef _USE_32BIT_TIME_T
_CRTALIAS void __cdecl __MINGW_NOTHROW _ftime (struct _timeb* _v) { return(_ftime64 ((struct __timeb64*)_v)); }
#else
_CRTALIAS void __cdecl __MINGW_NOTHROW _ftime (struct _timeb* _v) { return(_ftime32 ((struct __timeb32*)_v)); }
#endif
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _TIMEB_H_ */

View File

@ -1,138 +0,0 @@
/*
* types.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* The definition of constants, data types and global variables.
*
*/
#ifndef _TYPES_H_
#define _TYPES_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_wchar_t
#define __need_size_t
#define __need_ptrdiff_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
#ifndef RC_INVOKED
#ifndef _TIME32_T_DEFINED
typedef __int32 __time32_t;
#define _TIME32_T_DEFINED
#endif
#ifndef _TIME64_T_DEFINED
typedef __int64 __time64_t;
#define _TIME64_T_DEFINED
#endif
#ifndef _TIME_T_DEFINED
/* FIXME __STRICT_ANSI__ ! */
#if __MSVCRT_VERSION__ >= 0x0800
#ifndef _USE_32BIT_TIME_T
typedef __time64_t time_t;
#else
typedef __time32_t time_t;
#endif /* !_USE_32BIT_TIME_T */
#else
typedef __time32_t time_t;
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#define _TIME_T_DEFINED
#endif
#ifndef _OFF_T_
#define _OFF_T_
typedef long _off_t;
#ifndef _NO_OLDNAMES
typedef _off_t off_t;
#endif
#endif /* Not _OFF_T_ */
#ifndef _DEV_T_
#define _DEV_T_
#ifdef __MSVCRT__
typedef unsigned int _dev_t;
#else
typedef short _dev_t;
#endif
#ifndef _NO_OLDNAMES
typedef _dev_t dev_t;
#endif
#endif /* Not _DEV_T_ */
#ifndef _INO_T_
#define _INO_T_
typedef short _ino_t;
#ifndef _NO_OLDNAMES
typedef _ino_t ino_t;
#endif
#endif /* Not _INO_T_ */
#ifndef _PID_T_
#define _PID_T_
typedef int _pid_t;
#ifndef _NO_OLDNAMES
typedef _pid_t pid_t;
#endif
#endif /* Not _PID_T_ */
#ifndef _MODE_T_
#define _MODE_T_
typedef unsigned short _mode_t;
#ifndef _NO_OLDNAMES
typedef _mode_t mode_t;
#endif
#endif /* Not _MODE_T_ */
#ifndef _SIGSET_T_
#define _SIGSET_T_
typedef int _sigset_t;
#ifndef _NO_OLDNAMES
typedef _sigset_t sigset_t;
#endif
#endif /* Not _SIGSET_T_ */
#ifndef _SSIZE_T_
#define _SSIZE_T_
typedef int _ssize_t;
#ifndef _NO_OLDNAMES
typedef _ssize_t ssize_t;
#endif
#endif /* Not _SSIZE_T_ */
#ifndef _FPOS64_T_
#define _FPOS64_T_
typedef long long fpos64_t;
#endif
#ifndef _OFF64_T_
#define _OFF64_T_
typedef long long off64_t;
#endif
#if !defined __NO_ISOCEXT
typedef unsigned int useconds_t;
#endif /* Not __NO_ISOCEXT */
#endif /* Not RC_INVOKED */
#endif /* Not _TYPES_H_ */

View File

@ -1,6 +0,0 @@
/*
* This file is part of the Mingw32 package.
*
* unistd.h maps (roughly) to io.h
*/
#include <io.h>

View File

@ -1,110 +0,0 @@
/*
* utime.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Support for the utime function.
*
*/
#ifndef _UTIME_H_
#define _UTIME_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_wchar_t
#define __need_size_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
#include <sys/types.h>
#ifndef RC_INVOKED
/*
* Structure used by _utime function.
*/
struct _utimbuf
{
time_t actime; /* Access time */
time_t modtime; /* Modification time */
};
#if __MSVCRT_VERSION__ >= 0x0800
struct __utimbuf32
{
__time32_t actime;
__time32_t modtime;
};
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#ifndef _NO_OLDNAMES
/* NOTE: Must be the same as _utimbuf above. */
struct utimbuf
{
time_t actime;
time_t modtime;
};
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
extern "C" {
#endif
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _utime (const char*, struct _utimbuf*);
#endif
#ifndef _NO_OLDNAMES
/* FIXME for __MSVCRT_VERSION__ >= 0x0800 */
_CRTIMP int __cdecl __MINGW_NOTHROW utime (const char*, struct utimbuf*);
#endif /* Not _NO_OLDNAMES */
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _futime (int, struct _utimbuf*);
#endif
/* The wide character version, only available for MSVCRT versions of the
* C runtime library. */
#ifdef __MSVCRT__
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _wutime (const wchar_t*, struct _utimbuf*);
#endif
#endif /* MSVCRT runtime */
/* These require newer versions of msvcrt.dll (6.10 or higher). */
#if __MSVCRT_VERSION__ >= 0x0601
struct __utimbuf64
{
__time64_t actime;
__time64_t modtime;
};
_CRTIMP int __cdecl __MINGW_NOTHROW _utime64 (const char*, struct __utimbuf64*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wutime64 (const wchar_t*, struct __utimbuf64*);
_CRTIMP int __cdecl __MINGW_NOTHROW _futime64 (int, struct __utimbuf64*);
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
#if __MSVCRT_VERSION__ >= 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _utime32 (const char*, struct __utimbuf32*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t*, struct __utimbuf32*);
_CRTIMP int __cdecl __MINGW_NOTHROW _futime32 (int, struct __utimbuf32*);
#ifndef _USE_32BIT_TIME_T
_CRTALIAS int __cdecl __MINGW_NOTHROW _utime (const char* _v1, struct _utimbuf* _v2) { return(_utime64 (_v1,(struct __utimbuf64*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) { return(_wutime64 (_v1,(struct __utimbuf64*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _futime (int _v1, struct _utimbuf* _v2) { return(_futime64 (_v1,(struct __utimbuf64*)_v2)); }
#else
_CRTALIAS int __cdecl __MINGW_NOTHROW _utime (const char* _v1, struct _utimbuf* _v2) { return(_utime32 (_v1,(struct __utimbuf32*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) { return(_wutime32 (_v1,(struct __utimbuf32*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _futime (int _v1, struct _utimbuf* _v2) { return(_futime32 (_v1,(struct __utimbuf32*)_v2)); }
#endif
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _UTIME_H_ */

View File

@ -1,484 +0,0 @@
/*
* tchar.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Unicode mapping layer for the standard C library. By including this
* file and using the 't' names for string functions
* (eg. _tprintf) you can make code which can be easily adapted to both
* Unicode and non-unicode environments. In a unicode enabled compile define
* _UNICODE before including tchar.h, otherwise the standard non-unicode
* library functions will be used.
*
* Note that you still need to include string.h or stdlib.h etc. to define
* the appropriate functions. Also note that there are several defines
* included for non-ANSI functions which are commonly available (but using
* the convention of prepending an underscore to non-ANSI library function
* names).
*
*/
#ifndef _TCHAR_H_
#define _TCHAR_H_
/* All the headers include this file. */
#include <_mingw.h>
/*
* NOTE: This tests _UNICODE, which is different from the UNICODE define
* used to differentiate Win32 API calls.
*/
#ifdef _UNICODE
/*
* Include <wchar.h> for wchar_t and WEOF if _UNICODE.
*/
#include <wchar.h>
/*
* Use TCHAR instead of char or wchar_t. It will be appropriately translated
* if _UNICODE is correctly defined (or not).
*/
#ifndef _TCHAR_DEFINED
#ifndef RC_INVOKED
typedef wchar_t TCHAR;
typedef wchar_t _TCHAR;
#endif /* Not RC_INVOKED */
#define _TCHAR_DEFINED
#endif
/*
* Use _TEOF instead of EOF or WEOF. It will be appropriately translated if
* _UNICODE is correctly defined (or not).
*/
#define _TEOF WEOF
/*
* __TEXT is a private macro whose specific use is to force the expansion of a
* macro passed as an argument to the macros _T or _TEXT. DO NOT use this
* macro within your programs. It's name and function could change without
* notice.
*/
#define __TEXT(q) L##q
/* for porting from other Windows compilers */
#if 0 /* no wide startup module */
#define _tmain wmain
#define _tWinMain wWinMain
#define _tenviron _wenviron
#define __targv __wargv
#endif
/*
* Unicode functions
*/
#define _tprintf wprintf
#define _ftprintf fwprintf
#define _stprintf swprintf
#define _sntprintf _snwprintf
#define _vtprintf vwprintf
#define _vftprintf vfwprintf
#define _vstprintf vswprintf
#define _vsntprintf _vsnwprintf
#define _vsctprintf _vscwprintf
#define _tscanf wscanf
#define _ftscanf fwscanf
#define _stscanf swscanf
#define _fgettc fgetwc
#define _fgettchar _fgetwchar
#define _fgetts fgetws
#define _fputtc fputwc
#define _fputtchar _fputwchar
#define _fputts fputws
#define _gettc getwc
#define _getts _getws
#define _puttc putwc
#define _puttchar putwchar
#define _putts _putws
#define _ungettc ungetwc
#define _tcstod wcstod
#define _tcstol wcstol
#define _tcstoul wcstoul
#define _itot _itow
#define _ltot _ltow
#define _ultot _ultow
#define _ttoi _wtoi
#define _ttol _wtol
#define _tcscat wcscat
#define _tcschr wcschr
#define _tcscmp wcscmp
#define _tcscpy wcscpy
#define _tcscspn wcscspn
#define _tcslen wcslen
#define _tcsncat wcsncat
#define _tcsncmp wcsncmp
#define _tcsncpy wcsncpy
#define _tcspbrk wcspbrk
#define _tcsrchr wcsrchr
#define _tcsspn wcsspn
#define _tcsstr wcsstr
#define _tcstok wcstok
#define _tcsdup _wcsdup
#define _tcsicmp _wcsicmp
#define _tcsnicmp _wcsnicmp
#define _tcsnset _wcsnset
#define _tcsrev _wcsrev
#define _tcsset _wcsset
#define _tcslwr _wcslwr
#define _tcsupr _wcsupr
#define _tcsxfrm wcsxfrm
#define _tcscoll wcscoll
#define _tcsicoll _wcsicoll
#define _istalpha iswalpha
#define _istupper iswupper
#define _istlower iswlower
#define _istdigit iswdigit
#define _istxdigit iswxdigit
#define _istspace iswspace
#define _istpunct iswpunct
#define _istalnum iswalnum
#define _istprint iswprint
#define _istgraph iswgraph
#define _istcntrl iswcntrl
#define _istascii iswascii
#define _totupper towupper
#define _totlower towlower
#define _tcsftime wcsftime
/* Macro functions */
#define _tcsdec _wcsdec
#define _tcsinc _wcsinc
#define _tcsnbcnt _wcsncnt
#define _tcsnccnt _wcsncnt
#define _tcsnextc _wcsnextc
#define _tcsninc _wcsninc
#define _tcsspnp _wcsspnp
#define _wcsdec(_wcs1, _wcs2) ((_wcs1)>=(_wcs2) ? NULL : (_wcs2)-1)
#define _wcsinc(_wcs) ((_wcs)+1)
#define _wcsnextc(_wcs) ((unsigned int) *(_wcs))
#define _wcsninc(_wcs, _inc) (((_wcs)+(_inc)))
#define _wcsncnt(_wcs, _cnt) ((wcslen(_wcs)>_cnt) ? _count : wcslen(_wcs))
#define _wcsspnp(_wcs1, _wcs2) ((*((_wcs1)+wcsspn(_wcs1,_wcs2))) ? ((_wcs1)+wcsspn(_wcs1,_wcs2)) : NULL)
#if 1 /* defined __MSVCRT__ */
/*
* These wide functions not in crtdll.dll.
* Define macros anyway so that _wfoo rather than _tfoo is undefined
*/
#define _ttoi64 _wtoi64
#define _i64tot _i64tow
#define _ui64tot _ui64tow
#define _tasctime _wasctime
#define _tctime _wctime
#if __MSVCRT_VERSION__ >= 0x0800
#define _tctime32 _wctime32
#define _tctime64 _wctime64
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#define _tstrdate _wstrdate
#define _tstrtime _wstrtime
#define _tutime _wutime
#if __MSVCRT_VERSION__ >= 0x0800
#define _tutime64 _wutime64
#define _tutime32 _wutime32
#endif /* __MSVCRT_VERSION__ > 0x0800 */
#define _tcsnccoll _wcsncoll
#define _tcsncoll _wcsncoll
#define _tcsncicoll _wcsnicoll
#define _tcsnicoll _wcsnicoll
#define _taccess _waccess
#define _tchmod _wchmod
#define _tcreat _wcreat
#define _tfindfirst _wfindfirst
#define _tfindnext _wfindnext
#if __MSVCRT_VERSION__ >= 0x0800
#define _tfindfirst64 _wfindfirst64
#define _tfindfirst32 _wfindfirst32
#define _tfindnext64 _wfindnext64
#define _tfindnext32 _wfindnext32
#endif /* __MSVCRT_VERSION__ > 0x0800 */
#define _tfdopen _wfdopen
#define _tfopen _wfopen
#define _tfreopen _wfreopen
#define _tfsopen _wfsopen
#define _tgetenv _wgetenv
#define _tputenv _wputenv
#define _tsearchenv _wsearchenv
#define _tsystem _wsystem
#define _tmakepath _wmakepath
#define _tsplitpath _wsplitpath
#define _tfullpath _wfullpath
#define _tmktemp _wmktemp
#define _topen _wopen
#define _tremove _wremove
#define _trename _wrename
#define _tsopen _wsopen
#define _tsetlocale _wsetlocale
#define _tunlink _wunlink
#define _tfinddata_t _wfinddata_t
#define _tfindfirsti64 _wfindfirsti64
#define _tfindnexti64 _wfindnexti64
#define _tfinddatai64_t _wfinddatai64_t
#if __MSVCRT_VERSION__ >= 0x0601
#define _tfinddata64_t _wfinddata64_t
#endif
#if __MSVCRT_VERSION__ >= 0x0800
#define _tfinddata32_t _wfinddata32_t
#define _tfinddata32i64_t _wfinddata32i64_t
#define _tfinddata64i32_t _wfinddata64i32_t
#define _tfindfirst32i64 _wfindfirst32i64
#define _tfindfirst64i32 _wfindfirst64i32
#define _tfindnext32i64 _wfindnext32i64
#define _tfindnext64i32 _wfindnext64i32
#endif /* __MSVCRT_VERSION__ > 0x0800 */
#define _tchdir _wchdir
#define _tgetcwd _wgetcwd
#define _tgetdcwd _wgetdcwd
#define _tmkdir _wmkdir
#define _trmdir _wrmdir
#define _tstat _wstat
#define _tstati64 _wstati64
#define _tstat64 _wstat64
#if __MSVCRT_VERSION__ >= 0x0800
#define _tstat32 _wstat32
#define _tstat32i64 _wstat32i64
#define _tstat64i32 _wstat64i32
#endif /* __MSVCRT_VERSION__ > 0x0800 */
#endif /* __MSVCRT__ */
/* dirent structures and functions */
#define _tdirent _wdirent
#define _TDIR _WDIR
#define _topendir _wopendir
#define _tclosedir _wclosedir
#define _treaddir _wreaddir
#define _trewinddir _wrewinddir
#define _ttelldir _wtelldir
#define _tseekdir _wseekdir
#else /* Not _UNICODE */
/*
* TCHAR, the type you should use instead of char.
*/
#ifndef _TCHAR_DEFINED
#ifndef RC_INVOKED
typedef char TCHAR;
typedef char _TCHAR;
#endif
#define _TCHAR_DEFINED
#endif
/*
* _TEOF, the constant you should use instead of EOF.
*/
#define _TEOF EOF
/*
* __TEXT is a private macro whose specific use is to force the expansion of a
* macro passed as an argument to the macros _T or _TEXT. DO NOT use this
* macro within your programs. It's name and function could change without
* notice.
*/
#define __TEXT(q) q
/* for porting from other Windows compilers */
#define _tmain main
#define _tWinMain WinMain
#define _tenviron _environ
#define __targv __argv
/*
* Non-unicode (standard) functions
*/
#define _tprintf printf
#define _ftprintf fprintf
#define _stprintf sprintf
#define _sntprintf _snprintf
#define _vtprintf vprintf
#define _vftprintf vfprintf
#define _vstprintf vsprintf
#define _vsntprintf _vsnprintf
#define _vsctprintf _vscprintf
#define _tscanf scanf
#define _ftscanf fscanf
#define _stscanf sscanf
#define _fgettc fgetc
#define _fgettchar _fgetchar
#define _fgetts fgets
#define _fputtc fputc
#define _fputtchar _fputchar
#define _fputts fputs
#define _tfdopen _fdopen
#define _tfopen fopen
#define _tfreopen freopen
#define _tfsopen _fsopen
#define _tgetenv getenv
#define _tputenv _putenv
#define _tsearchenv _searchenv
#define _tsystem system
#define _tmakepath _makepath
#define _tsplitpath _splitpath
#define _tfullpath _fullpath
#define _gettc getc
#define _getts gets
#define _puttc putc
#define _puttchar putchar
#define _putts puts
#define _ungettc ungetc
#define _tcstod strtod
#define _tcstol strtol
#define _tcstoul strtoul
#define _itot _itoa
#define _ltot _ltoa
#define _ultot _ultoa
#define _ttoi atoi
#define _ttol atol
#define _tcscat strcat
#define _tcschr strchr
#define _tcscmp strcmp
#define _tcscpy strcpy
#define _tcscspn strcspn
#define _tcslen strlen
#define _tcsncat strncat
#define _tcsncmp strncmp
#define _tcsncpy strncpy
#define _tcspbrk strpbrk
#define _tcsrchr strrchr
#define _tcsspn strspn
#define _tcsstr strstr
#define _tcstok strtok
#define _tcsdup _strdup
#define _tcsicmp _stricmp
#define _tcsnicmp _strnicmp
#define _tcsnset _strnset
#define _tcsrev _strrev
#define _tcsset _strset
#define _tcslwr _strlwr
#define _tcsupr _strupr
#define _tcsxfrm strxfrm
#define _tcscoll strcoll
#define _tcsicoll _stricoll
#define _istalpha isalpha
#define _istupper isupper
#define _istlower islower
#define _istdigit isdigit
#define _istxdigit isxdigit
#define _istspace isspace
#define _istpunct ispunct
#define _istalnum isalnum
#define _istprint isprint
#define _istgraph isgraph
#define _istcntrl iscntrl
#define _istascii isascii
#define _totupper toupper
#define _totlower tolower
#define _tasctime asctime
#define _tctime ctime
#if __MSVCRT_VERSION__ >= 0x0800
#define _tctime32 _ctime32
#define _tctime64 _ctime64
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#define _tstrdate _strdate
#define _tstrtime _strtime
#define _tutime _utime
#if __MSVCRT_VERSION__ >= 0x0800
#define _tutime64 _utime64
#define _tutime32 _utime32
#endif /* __MSVCRT_VERSION__ > 0x0800 */
#define _tcsftime strftime
/* Macro functions */
#define _tcsdec _strdec
#define _tcsinc _strinc
#define _tcsnbcnt _strncnt
#define _tcsnccnt _strncnt
#define _tcsnextc _strnextc
#define _tcsninc _strninc
#define _tcsspnp _strspnp
#define _strdec(_str1, _str2) ((_str1)>=(_str2) ? NULL : (_str2)-1)
#define _strinc(_str) ((_str)+1)
#define _strnextc(_str) ((unsigned int) *(_str))
#define _strninc(_str, _inc) (((_str)+(_inc)))
#define _strncnt(_str, _cnt) ((strlen(_str)>_cnt) ? _count : strlen(_str))
#define _strspnp(_str1, _str2) ((*((_str1)+strspn(_str1,_str2))) ? ((_str1)+strspn(_str1,_str2)) : NULL)
#define _tchmod _chmod
#define _tcreat _creat
#define _tfindfirst _findfirst
#define _tfindnext _findnext
#if __MSVCRT_VERSION__ >= 0x0800
#define _tfindfirst64 _findfirst64
#define _tfindfirst32 _findfirst32
#define _tfindnext64 _findnext64
#define _tfindnext32 _findnext32
#endif /* __MSVCRT_VERSION__ > 0x0800 */
#define _tmktemp _mktemp
#define _topen _open
#define _taccess _access
#define _tremove remove
#define _trename rename
#define _tsopen _sopen
#define _tsetlocale setlocale
#define _tunlink _unlink
#define _tfinddata_t _finddata_t
#define _tchdir _chdir
#define _tgetcwd _getcwd
#define _tgetdcwd _getdcwd
#define _tmkdir _mkdir
#define _trmdir _rmdir
#define _tstat _stat
#if 1 /* defined __MSVCRT__ */
/* Not in crtdll.dll. Define macros anyway? */
#define _ttoi64 _atoi64
#define _i64tot _i64toa
#define _ui64tot _ui64toa
#define _tcsnccoll _strncoll
#define _tcsncoll _strncoll
#define _tcsncicoll _strnicoll
#define _tcsnicoll _strnicoll
#define _tfindfirsti64 _findfirsti64
#define _tfindnexti64 _findnexti64
#define _tfinddatai64_t _finddatai64_t
#if __MSVCRT_VERSION__ >= 0x0601
#define _tfinddata64_t _finddata64_t
#endif
#if __MSVCRT_VERSION__ >= 0x0800
#define _tfinddata32_t _finddata32_t
#define _tfinddata32i64_t _finddata32i64_t
#define _tfinddata64i32_t _finddata64i32_t
#define _tfindfirst32i64 _findfirst32i64
#define _tfindfirst64i32 _findfirst64i32
#define _tfindnext32i64 _findnext32i64
#define _tfindnext64i32 _findnext64i32
#endif /* __MSVCRT_VERSION__ > 0x0800 */
#define _tstati64 _stati64
#define _tstat64 _stat64
#if __MSVCRT_VERSION__ >= 0x0800
#define _tstat32 _stat32
#define _tstat32i64 _stat32i64
#define _tstat64i32 _stat64i32
#endif /* __MSVCRT_VERSION__ > 0x0800 */
#endif /* __MSVCRT__ */
/* dirent structures and functions */
#define _tdirent dirent
#define _TDIR DIR
#define _topendir opendir
#define _tclosedir closedir
#define _treaddir readdir
#define _trewinddir rewinddir
#define _ttelldir telldir
#define _tseekdir seekdir
#endif /* Not _UNICODE */
/*
* UNICODE a constant string when _UNICODE is defined else returns the string
* unmodified. Also defined in w32api/winnt.h.
*/
#define _TEXT(x) __TEXT(x)
#define _T(x) __TEXT(x)
#endif /* Not _TCHAR_H_ */

View File

@ -1,280 +0,0 @@
/*
* time.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Date and time functions and types.
*
*/
#ifndef _TIME_H_
#define _TIME_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_wchar_t
#define __need_size_t
#define __need_NULL
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
/*
* Number of clock ticks per second. A clock tick is the unit by which
* processor time is measured and is returned by 'clock'.
*/
#define CLOCKS_PER_SEC ((clock_t)1000)
#define CLK_TCK CLOCKS_PER_SEC
#ifndef RC_INVOKED
/*
* A type for storing the current time and date. This is the number of
* seconds since midnight Jan 1, 1970.
* NOTE: This is also defined in non-ISO sys/types.h.
*/
#ifndef _TIME32_T_DEFINED
typedef __int32 __time32_t;
#define _TIME32_T_DEFINED
#endif
#ifndef __STRICT_ANSI__
/* A 64-bit time_t to get to Y3K */
#ifndef _TIME64_T_DEFINED
typedef __int64 __time64_t;
#define _TIME64_T_DEFINED
#endif
#endif
#ifndef _TIME_T_DEFINED
/* FIXME __STRICT_ANSI__ ! */
#if __MSVCRT_VERSION__ >= 0x0800
#ifndef _USE_32BIT_TIME_T
typedef __time64_t time_t;
#else
typedef __time32_t time_t;
#endif /* !_USE_32BIT_TIME_T */
#else
typedef __time32_t time_t;
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#define _TIME_T_DEFINED
#endif
/*
* A type for measuring processor time (in clock ticks).
*/
#ifndef _CLOCK_T_DEFINED
typedef long clock_t;
#define _CLOCK_T_DEFINED
#endif
#ifndef _TM_DEFINED
/*
* A structure for storing all kinds of useful information about the
* current (or another) time.
*/
struct tm
{
int tm_sec; /* Seconds: 0-59 (K&R says 0-61?) */
int tm_min; /* Minutes: 0-59 */
int tm_hour; /* Hours since midnight: 0-23 */
int tm_mday; /* Day of the month: 1-31 */
int tm_mon; /* Months *since* january: 0-11 */
int tm_year; /* Years since 1900 */
int tm_wday; /* Days since Sunday (0-6) */
int tm_yday; /* Days since Jan. 1: 0-365 */
int tm_isdst; /* +1 Daylight Savings Time, 0 No DST,
* -1 don't know */
};
#define _TM_DEFINED
#endif
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP clock_t __cdecl __MINGW_NOTHROW clock (void);
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP time_t __cdecl __MINGW_NOTHROW time (time_t*);
_CRTIMP double __cdecl __MINGW_NOTHROW difftime (time_t, time_t);
_CRTIMP time_t __cdecl __MINGW_NOTHROW mktime (struct tm*);
#endif
/*
* These functions write to and return pointers to static buffers that may
* be overwritten by other function calls. Yikes!
*
* NOTE: localtime, and perhaps the others of the four functions grouped
* below may return NULL if their argument is not 'acceptable'. Also note
* that calling asctime with a NULL pointer will produce an Invalid Page
* Fault and crap out your program. Guess how I know. Hint: stat called on
* a directory gives 'invalid' times in st_atime etc...
*/
_CRTIMP char* __cdecl __MINGW_NOTHROW asctime (const struct tm*);
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP char* __cdecl __MINGW_NOTHROW ctime (const time_t*);
_CRTIMP struct tm* __cdecl __MINGW_NOTHROW gmtime (const time_t*);
_CRTIMP struct tm* __cdecl __MINGW_NOTHROW localtime (const time_t*);
#endif
_CRTIMP size_t __cdecl __MINGW_NOTHROW strftime (char*, size_t, const char*, const struct tm*);
#ifndef __STRICT_ANSI__
extern _CRTIMP void __cdecl __MINGW_NOTHROW _tzset (void);
#ifndef _NO_OLDNAMES
extern _CRTIMP void __cdecl __MINGW_NOTHROW tzset (void);
#endif
_CRTIMP char* __cdecl __MINGW_NOTHROW _strdate(char*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _strtime(char*);
/* These require newer versions of msvcrt.dll (6.10 or higher). */
#if __MSVCRT_VERSION__ >= 0x0601
_CRTIMP __time64_t __cdecl __MINGW_NOTHROW _time64( __time64_t*);
_CRTIMP __time64_t __cdecl __MINGW_NOTHROW _mktime64 (struct tm*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _ctime64 (const __time64_t*);
_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _gmtime64 (const __time64_t*);
_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _localtime64 (const __time64_t*);
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
/* These require newer versions of msvcrt.dll (8.00 or higher). */
#if __MSVCRT_VERSION__ >= 0x0800
_CRTIMP __time32_t __cdecl __MINGW_NOTHROW _time32 (__time32_t*);
_CRTIMP double __cdecl __MINGW_NOTHROW _difftime32 (__time32_t, __time32_t);
_CRTIMP double __cdecl __MINGW_NOTHROW _difftime64 (__time64_t, __time64_t);
_CRTIMP __time32_t __cdecl __MINGW_NOTHROW _mktime32 (struct tm*);
_CRTIMP __time32_t __cdecl __MINGW_NOTHROW _mkgmtime32 (struct tm*);
_CRTIMP __time64_t __cdecl __MINGW_NOTHROW _mkgmtime64 (struct tm*);
_CRTIMP char* __cdecl __MINGW_NOTHROW _ctime32 (const __time32_t*);
_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _gmtime32 (const __time32_t*);
_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _localtime32 (const __time32_t*);
#ifndef _USE_32BIT_TIME_T
_CRTALIAS time_t __cdecl __MINGW_NOTHROW time (time_t* _v) { return(_time64 (_v)); }
_CRTALIAS double __cdecl __MINGW_NOTHROW difftime (time_t _v1, time_t _v2) { return(_difftime64 (_v1,_v2)); }
_CRTALIAS time_t __cdecl __MINGW_NOTHROW mktime (struct tm* _v) { return(_mktime64 (_v)); }
_CRTALIAS time_t __cdecl __MINGW_NOTHROW _mkgmtime (struct tm* _v) { return(_mkgmtime64 (_v)); }
_CRTALIAS char* __cdecl __MINGW_NOTHROW ctime (const time_t* _v) { return(_ctime64 (_v)); }
_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW gmtime (const time_t* _v) { return(_gmtime64 (_v)); }
_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW localtime (const time_t* _v) { return(_localtime64 (_v)); }
#else
_CRTALIAS time_t __cdecl __MINGW_NOTHROW time (time_t* _v) { return(_time32 (_v)); }
_CRTALIAS double __cdecl __MINGW_NOTHROW difftime (time_t _v1, time_t _v2) { return(_difftime32 (_v1,_v2)); }
_CRTALIAS time_t __cdecl __MINGW_NOTHROW mktime (struct tm* _v) { return(_mktime32 (_v)); }
_CRTALIAS time_t __cdecl __MINGW_NOTHROW _mkgmtime (struct tm* _v) { return(_mkgmtime32 (_v)); }
_CRTALIAS char* __cdecl __MINGW_NOTHROW ctime (const time_t* _v) { return(_ctime32 (_v)); }
_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW gmtime (const time_t* _v) { return(_gmtime32 (_v)); }
_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW localtime (const time_t* _v) { return(_localtime32 (_v)); }
#endif /* !_USE_32BIT_TIME_T */
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
/*
* _daylight: non zero if daylight savings time is used.
* _timezone: difference in seconds between GMT and local time.
* _tzname: standard/daylight savings time zone names (an array with two
* elements).
*/
#ifdef __MSVCRT__
/* These are for compatibility with pre-VC 5.0 suppied MSVCRT. */
extern _CRTIMP int* __cdecl __MINGW_NOTHROW __p__daylight (void);
extern _CRTIMP long* __cdecl __MINGW_NOTHROW __p__timezone (void);
extern _CRTIMP char** __cdecl __MINGW_NOTHROW __p__tzname (void);
__MINGW_IMPORT int _daylight;
__MINGW_IMPORT long _timezone;
__MINGW_IMPORT char *_tzname[2];
#else /* not __MSVCRT (ie. crtdll) */
#ifndef __DECLSPEC_SUPPORTED
extern int* _imp___daylight_dll;
extern long* _imp___timezone_dll;
extern char** _imp___tzname;
#define _daylight (*_imp___daylight_dll)
#define _timezone (*_imp___timezone_dll)
#define _tzname (*_imp___tzname)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT int _daylight_dll;
__MINGW_IMPORT long _timezone_dll;
__MINGW_IMPORT char* _tzname[2];
#define _daylight _daylight_dll
#define _timezone _timezone_dll
#endif /* __DECLSPEC_SUPPORTED */
#endif /* not __MSVCRT__ */
#endif /* Not __STRICT_ANSI__ */
#ifndef _NO_OLDNAMES
#ifdef __MSVCRT__
/* These go in the oldnames import library for MSVCRT. */
__MINGW_IMPORT int daylight;
__MINGW_IMPORT long timezone;
__MINGW_IMPORT char *tzname[2];
#else /* not __MSVCRT__ */
/* CRTDLL is royally messed up when it comes to these macros.
TODO: import and alias these via oldnames import library instead
of macros. */
#define daylight _daylight
/* NOTE: timezone not defined as macro because it would conflict with
struct timezone in sys/time.h.
Also, tzname used to a be macro, but now it's in moldname. */
__MINGW_IMPORT char *tzname[2];
#endif /* not __MSVCRT__ */
#endif /* Not _NO_OLDNAMES */
#ifndef _WTIME_DEFINED
/* wide function prototypes, also declared in wchar.h */
#ifndef __STRICT_ANSI__
#ifdef __MSVCRT__
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wasctime(const struct tm*);
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime(const time_t*);
#endif
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrdate(wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrtime(wchar_t*);
#if __MSVCRT_VERSION__ >= 0x0601
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64 (const __time64_t*);
#endif
#if __MSVCRT_VERSION__ >= 0x0800
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime32 (const __time32_t*);
#ifndef _USE_32BIT_TIME_T
_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime64 (_v)); }
#else
_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime32 (_v)); }
#endif
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#endif /* __MSVCRT__ */
#endif /* __STRICT_ANSI__ */
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
#define _WTIME_DEFINED
#endif /* _WTIME_DEFINED */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _TIME_H_ */

View File

@ -1,54 +0,0 @@
#ifndef _UNISTD_H
/*
* This file is part of the Mingw32 package.
*
* unistd.h maps (roughly) to io.h
* Other headers included by unistd.h may be selectively processed;
* __UNISTD_H_SOURCED__ enables such selective processing.
*/
#define _UNISTD_H
#define __UNISTD_H_SOURCED__ 1
#include <io.h>
#include <process.h>
#include <getopt.h>
/* These are also defined in stdio.h. */
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
#ifndef SEEK_CUR
#define SEEK_CUR 1
#endif
#ifndef SEEK_END
#define SEEK_END 2
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if !defined __NO_ISOCEXT
#include <sys/types.h> /* For useconds_t. */
int __cdecl __MINGW_NOTHROW usleep(useconds_t useconds);
#endif /* Not __NO_ISOCEXT */
/* This is defined as a real library function to allow autoconf
to verify its existence. */
int ftruncate(int, off_t);
#ifndef __NO_INLINE__
__CRT_INLINE int ftruncate(int __fd, off_t __length)
{
return _chsize (__fd, __length);
}
#endif
#ifdef __cplusplus
}
#endif
#undef __UNISTD_H_SOURCED__
#endif /* _UNISTD_H */

View File

@ -1 +0,0 @@
#include <sys/utime.h>

View File

@ -1,4 +0,0 @@
/*
* TODO: Nothing here yet. Should provide UNIX compatibility constants
* comparible to those in limits.h and float.h.
*/

View File

@ -1,7 +0,0 @@
/*
* This is just an RC_INVOKED guard for the real varargs.h
* fixincluded in gcc system dir. One day we will delete this file.
*/
#ifndef RC_INVOKED
#include_next<varargs.h>
#endif

View File

@ -1,651 +0,0 @@
/*
* wchar.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Defines of all functions for supporting wide characters. Actually it
* just includes all those headers, which is not a good thing to do from a
* processing time point of view, but it does mean that everything will be
* in sync.
*
*/
#ifndef _WCHAR_H_
#define _WCHAR_H_
/* All the headers include this file. */
#include <_mingw.h>
#ifndef RC_INVOKED
#define __need_size_t
#define __need_wint_t
#define __need_wchar_t
#define __need_NULL
#include <stddef.h>
#ifndef __VALIST
#if defined __GNUC__ && __GNUC__ >= 3
#define __need___va_list
#include <stdarg.h>
#define __VALIST __builtin_va_list
#else
#define __VALIST char*
#endif
#endif
#endif /* Not RC_INVOKED */
/*
* MSDN says that isw* char classifications are in wchar.h and wctype.h.
* Although the wctype names are ANSI, their exposure in this header is
* not.
*/
#include <wctype.h>
#ifndef __STRICT_ANSI__
/* This is necessary to support the the non-ANSI wchar declarations
here. */
#include <sys/types.h>
#endif /* __STRICT_ANSI__ */
#define WCHAR_MIN 0
#define WCHAR_MAX 0xffff
#ifndef WEOF
#define WEOF (wchar_t)(0xFFFF)
#endif
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _FILE_DEFINED /* Also in stdio.h */
#define _FILE_DEFINED
typedef struct _iobuf
{
char* _ptr;
int _cnt;
char* _base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char* _tmpfname;
} FILE;
#endif /* Not _FILE_DEFINED */
#ifndef _TIME_T_DEFINED /* Also in time.h */
typedef long time_t;
#define _TIME_T_DEFINED
#endif
#ifndef _TM_DEFINED /* Also in time.h */
struct tm {
int tm_sec; /* seconds after the minute - [0,59] */
int tm_min; /* minutes after the hour - [0,59] */
int tm_hour; /* hours since midnight - [0,23] */
int tm_mday; /* day of the month - [1,31] */
int tm_mon; /* months since January - [0,11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday - [0,6] */
int tm_yday; /* days since January 1 - [0,365] */
int tm_isdst; /* daylight savings time flag */
};
#define _TM_DEFINED
#endif
#ifndef _WSTDIO_DEFINED
/* Also in stdio.h - keep in sync */
_CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW wprintf (const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW vfwprintf (FILE*, const wchar_t*, __VALIST);
_CRTIMP int __cdecl __MINGW_NOTHROW vwprintf (const wchar_t*, __VALIST);
_CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
_CRTIMP int __cdecl __MINGW_NOTHROW fwscanf (FILE*, const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW wscanf (const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW swscanf (const wchar_t*, const wchar_t*, ...);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t, FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*);
/* These differ from the ISO C prototypes, which have a maxlen parameter like snprintf. */
#ifndef __STRICT_ANSI__
_CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW vswprintf (wchar_t*, const wchar_t*, __VALIST);
#endif
#ifdef __MSVCRT__
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t);
#ifndef __STRICT_ANSI__
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, const wchar_t *);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfsopen (const wchar_t*, const wchar_t*, int);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*);
_CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*);
#endif /* __STRICT_ANSI__ */
#endif /* __MSVCRT__ */
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
int __cdecl __MINGW_NOTHROW snwprintf (wchar_t*, size_t, const wchar_t*, ...);
int __cdecl __MINGW_NOTHROW vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
#ifndef __NO_INLINE__
__CRT_INLINE int __cdecl __MINGW_NOTHROW
vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
{ return _vsnwprintf ( s, n, format, arg);}
#endif
int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST);
int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__,
const wchar_t * __restrict__, __VALIST);
int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__,
const wchar_t * __restrict__, __VALIST);
#endif
#define _WSTDIO_DEFINED
#endif /* _WSTDIO_DEFINED */
#ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */
_CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int);
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int);
_CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**);
#if !defined __NO_ISOCEXT /* in libmingwex.a */
float __cdecl __MINGW_NOTHROW wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__);
long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
#endif /* __NO_ISOCEXT */
#ifdef __MSVCRT__
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*);
_CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*);
_CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
_CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t);
#endif
_CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *, wchar_t **, int);
_CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *, wchar_t **, int, _locale_t);
_CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *, wchar_t **, int);
_CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *, wchar_t **, int, _locale_t);
#define _WSTDLIB_DEFINED
#endif /* _WSTDLIB_DEFINED */
#ifndef _WTIME_DEFINED
#ifndef __STRICT_ANSI__
#ifdef __MSVCRT__
/* wide function prototypes, also declared in time.h */
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wasctime (const struct tm*);
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t*);
#endif
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrdate (wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrtime (wchar_t*);
#if __MSVCRT_VERSION__ >= 0x601
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64 (const __time64_t*);
#endif
#if __MSVCRT_VERSION__ >= 0x0800
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime32 (const __time32_t*);
#ifndef _USE_32BIT_TIME_T
_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime64 (_v)); }
#else
_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime32 (_v)); }
#endif
#endif
#endif /* __MSVCRT__ */
#endif /* __STRICT_ANSI__ */
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
#define _WTIME_DEFINED
#endif /* _WTIME_DEFINED */
#ifndef _WSTRING_DEFINED
/*
* Unicode versions of the standard string calls.
* Also in string.h.
*/
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t);
_CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*);
/* Note: _wcserror requires __MSVCRT_VERSION__ >= 0x0700. */
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp(const wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t);
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t);
#ifndef __STRICT_ANSI__
/*
* Unicode versions of non-ANSI functions provided by CRTDLL.
*/
/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
#define _wcscmpi _wcsicmp
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicmp (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicoll (const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*);
#ifdef __MSVCRT__
_CRTIMP int __cdecl __MINGW_NOTHROW _wcsncoll(const wchar_t*, const wchar_t*, size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
#if __MSVCRT_VERSION__ >= 0x0700
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
#endif
#endif
#ifndef _NO_OLDNAMES
/* NOTE: There is no _wcscmpi, but this is for compatibility. */
int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t *, const wchar_t *);
#ifndef __NO_INLINE__
__CRT_INLINE int __cdecl __MINGW_NOTHROW
wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
{return _wcsicmp (__ws1, __ws2);}
#endif
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*);
#endif /* Not _NO_OLDNAMES */
#endif /* Not strict ANSI */
#define _WSTRING_DEFINED
#endif /* _WSTRING_DEFINED */
/* These are resolved by -lmingwex. Alternatively, they can be resolved by
adding -lmsvcp60 to your command line, which will give you the VC++
versions of these functions. If you want the latter and don't have
msvcp60.dll in your windows system directory, you can easily obtain
it with a search from your favorite search engine. */
#ifndef __STRICT_ANSI__
typedef wchar_t _Wint_t;
#endif
typedef int mbstate_t;
wint_t __cdecl __MINGW_NOTHROW btowc(int);
size_t __cdecl __MINGW_NOTHROW mbrlen(const char * __restrict__, size_t,
mbstate_t * __restrict__);
size_t __cdecl __MINGW_NOTHROW mbrtowc(wchar_t * __restrict__, const char * __restrict__,
size_t, mbstate_t * __restrict__);
size_t __cdecl __MINGW_NOTHROW mbsrtowcs(wchar_t * __restrict__, const char ** __restrict__,
size_t, mbstate_t * __restrict__);
size_t __cdecl __MINGW_NOTHROW wcrtomb(char * __restrict__, wchar_t,
mbstate_t * __restrict__);
size_t __cdecl __MINGW_NOTHROW wcsrtombs(char * __restrict__, const wchar_t ** __restrict__,
size_t, mbstate_t * __restrict__);
int __cdecl __MINGW_NOTHROW wctob(wint_t);
#ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
int __cdecl __MINGW_NOTHROW fwide(FILE*, int);
int __cdecl __MINGW_NOTHROW mbsinit(const mbstate_t*);
#ifndef __NO_INLINE__
__CRT_INLINE int __cdecl __MINGW_NOTHROW fwide(FILE* __UNUSED_PARAM(stream),
int mode)
{return mode;} /* Nothing to do */
__CRT_INLINE int __cdecl __MINGW_NOTHROW mbsinit(const mbstate_t* __UNUSED_PARAM(ps))
{return 1;}
#endif
wchar_t* __cdecl __MINGW_NOTHROW wmemset(wchar_t *, wchar_t, size_t);
wchar_t* __cdecl __MINGW_NOTHROW wmemchr(const wchar_t*, wchar_t, size_t);
int wmemcmp(const wchar_t*, const wchar_t *, size_t);
wchar_t* __cdecl __MINGW_NOTHROW wmemcpy(wchar_t* __restrict__,
const wchar_t* __restrict__,
size_t);
wchar_t* __cdecl __MINGW_NOTHROW wmemmove(wchar_t* s1, const wchar_t *, size_t);
long long __cdecl __MINGW_NOTHROW wcstoll(const wchar_t * __restrict__,
wchar_t** __restrict__, int);
unsigned long long __cdecl __MINGW_NOTHROW wcstoull(const wchar_t * __restrict__,
wchar_t ** __restrict__, int);
#endif /* __NO_ISOCEXT */
#ifndef __STRICT_ANSI__
/* non-ANSI wide char functions from io.h, direct.h, sys/stat.h and locale.h. */
#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t;
#define _FSIZE_T_DEFINED
#endif
#ifndef _WFINDDATA_T_DEFINED
struct _wfinddata_t {
unsigned attrib;
time_t time_create; /* -1 for FAT file systems */
time_t time_access; /* -1 for FAT file systems */
time_t time_write;
_fsize_t size;
wchar_t name[260]; /* may include spaces. */
};
struct _wfinddatai64_t {
unsigned attrib;
time_t time_create;
time_t time_access;
time_t time_write;
__int64 size;
wchar_t name[260];
};
#if __MSVCRT_VERSION__ >= 0x0601
struct __wfinddata64_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
/* 8 bytes are returned so it can't be _fsize_t */
__int64 size;
wchar_t name[260];
};
#endif
#if __MSVCRT_VERSION__ >= 0x0800
#include <stdio.h>
struct __wfinddata32_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
__int32 size;
wchar_t name[FILENAME_MAX];
};
struct _wfinddata32i64_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
__int64 size;
wchar_t name[FILENAME_MAX];
};
struct _wfinddata64i32_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
__int32 size;
wchar_t name[FILENAME_MAX];
};
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#define _WFINDDATA_T_DEFINED
#endif
/* Wide character versions. Also defined in io.h. */
/* CHECK: I believe these only exist in MSVCRT, and not in CRTDLL. Also
applies to other wide character versions? */
#if !defined (_WIO_DEFINED)
#if defined (__MSVCRT__)
#include <stdint.h> /* For intptr_t. */
_CRTIMP int __cdecl __MINGW_NOTHROW _waccess (const wchar_t*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _wchmod (const wchar_t*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _wcreat (const wchar_t*, int);
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t*, struct _wfinddata_t *);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext (long, struct _wfinddata_t *);
#endif
_CRTIMP int __cdecl __MINGW_NOTHROW _wunlink (const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wopen (const wchar_t*, int, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _wsopen (const wchar_t*, int, int, ...);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wmktemp (wchar_t*);
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64 (long, struct _wfinddatai64_t*);
#else
_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst32i64 (const wchar_t*, struct _wfinddata32i64_t*);
_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst64i32 (const wchar_t*, struct _wfinddata64i32_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext32i64 (long, struct _wfinddata32i64_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext64i32 (long, struct _wfinddata64i32_t*);
#endif /* __MSVCRT_VERSION__ < 0x0800 */
#if __MSVCRT_VERSION__ >= 0x0601
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*);
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
#if __MSVCRT_VERSION__ >= 0x0800
_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst32 (const wchar_t*, struct __wfinddata32_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext32 (long, struct __wfinddata32_t*);
#ifndef _USE_32BIT_TIME_T
_CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t* _v1, struct _wfinddata_t* _v2) { return(_wfindfirst64i32 (_v1,(struct _wfinddata64i32_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext (long _v1, struct _wfinddata_t* _v2) { return(_wfindnext64i32 (_v1,(struct _wfinddata64i32_t*)_v2)); }
_CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t* _v1, struct _wfinddatai64_t* _v2) { return(_wfindfirst64 (_v1,(struct __wfinddata64_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnexti64 (long _v1, struct _wfinddatai64_t* _v2) { return(_wfindnext64 (_v1,(struct __wfinddata64_t*)_v2)); }
#else
_CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t* _v1, struct _wfinddata_t* _v2) { return(_wfindfirst32 (_v1,(struct __wfinddata32_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext (long _v1, struct _wfinddata_t* _v2) { return(_wfindnext32 (_v1,(struct __wfinddata32_t*)_v2)); }
_CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t* _v1, struct _wfinddatai64_t* _v2) { return(_wfindfirst32i64 (_v1,(struct _wfinddata32i64_t*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnexti64 (long _v1, struct _wfinddatai64_t* _v2) { return(_wfindnext32i64 (_v1,(struct _wfinddata32i64_t*)_v2)); }
#endif /* !_USE_32BIT_TIME_T*/
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#endif /* defined (__MSVCRT__) */
#define _WIO_DEFINED
#endif /* _WIO_DEFINED */
#ifndef _WDIRECT_DEFINED
/* Also in direct.h */
#ifdef __MSVCRT__
_CRTIMP int __cdecl __MINGW_NOTHROW _wchdir (const wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetcwd (wchar_t*, int);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetdcwd (int, wchar_t*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW _wmkdir (const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wrmdir (const wchar_t*);
#endif /* __MSVCRT__ */
#define _WDIRECT_DEFINED
#endif /* _WDIRECT_DEFINED */
#ifndef _STAT_DEFINED
/*
* The structure manipulated and returned by stat and fstat.
*
* NOTE: If called on a directory the values in the time fields are not only
* invalid, they will cause localtime et. al. to return NULL. And calling
* asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
*/
struct _stat
{
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
_ino_t st_ino; /* Always zero ? */
_mode_t st_mode; /* See above constants */
short st_nlink; /* Number of links. */
short st_uid; /* User: Maybe significant on NT ? */
short st_gid; /* Group: Ditto */
_dev_t st_rdev; /* Seems useless (not even filled in) */
_off_t st_size; /* File size in bytes */
time_t st_atime; /* Accessed date (always 00:00 hrs local
* on FAT) */
time_t st_mtime; /* Modified time */
time_t st_ctime; /* Creation time */
};
#ifndef _NO_OLDNAMES
/* NOTE: Must be the same as _stat above. */
struct stat
{
dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
ino_t st_ino; /* Always zero ? */
mode_t st_mode; /* See above constants */
short st_nlink; /* Number of links. */
short st_uid; /* User: Maybe significant on NT ? */
short st_gid; /* Group: Ditto */
dev_t st_rdev; /* Seems useless (not even filled in) */
off_t st_size; /* File size in bytes */
time_t st_atime; /* Accessed date (always 00:00 hrs local
* on FAT) */
time_t st_mtime; /* Modified time */
time_t st_ctime; /* Creation time */
};
#endif /* _NO_OLDNAMES */
#if defined (__MSVCRT__)
struct _stati64 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
};
#if __MSVCRT_VERSION__ >= 0x0601
struct __stat64
{
_dev_t st_dev;
_ino_t st_ino;
_mode_t st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};
#endif /* __MSVCRT_VERSION__ >= 0x0601*/
#if __MSVCRT_VERSION__ >= 0x0800
struct __stat32
{
_dev_t st_dev;
_ino_t st_ino;
_mode_t st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int32 st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
};
struct _stat32i64 {
_dev_t st_dev;
_ino_t st_ino;
_mode_t st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
};
struct _stat64i32 {
_dev_t st_dev;
_ino_t st_ino;
_mode_t st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int32 st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#endif /* __MSVCRT__ */
#define _STAT_DEFINED
#endif /* _STAT_DEFINED */
#if !defined ( _WSTAT_DEFINED)
/* also declared in sys/stat.h */
#if defined __MSVCRT__
#if __MSVCRT_VERSION__ < 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat (const wchar_t*, struct _stat*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t*, struct _stati64*);
#endif /* __MSVCRT_VERSION__ < 0x0800 */
#if __MSVCRT_VERSION__ >= 0x0601
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat64 (const wchar_t*, struct __stat64*);
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
#if __MSVCRT_VERSION__ >= 0x0800
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat32 (const wchar_t*, struct __stat32*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat32i64 (const wchar_t*, struct _stat32i64*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat64i32 (const wchar_t*, struct _stat64i32*);
#ifndef _USE_32BIT_TIME_T
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstat (const wchar_t* _v1, struct _stat* _v2) { return(_wstat64i32 (_v1,(struct _stat64i32*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t* _v1, struct _stati64* _v2) { return(_wstat64 (_v1,(struct __stat64*)_v2)); }
#else
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstat (const wchar_t* _v1, struct _stat* _v2) { return(_wstat32 (_v1,(struct __stat32*)_v2)); }
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t* _v1, struct _stati64* _v2) { return(_wstat32i64 (_v1,(struct _stat32i64*)_v2)); }
#endif /* !_USE_32BIT_TIME_T */
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
#endif /* __MSVCRT__ */
#define _WSTAT_DEFINED
#endif /* ! _WSTAT_DEFIND */
#ifndef _WLOCALE_DEFINED /* also declared in locale.h */
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wsetlocale (int, const wchar_t*);
#define _WLOCALE_DEFINED
#endif
#ifndef _WPROCESS_DEFINED /* also declared in process.h */
#include <stdint.h> /* For intptr_t. */
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecl (const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecle (const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexeclp (const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexeclpe (const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecv (const wchar_t*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecve (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecvp (const wchar_t*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecvpe (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnl (int, const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnle (int, const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnlp (int, const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnlpe (int, const wchar_t*, const wchar_t*, ...);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnv (int, const wchar_t*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnve (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnvp (int, const wchar_t*, const wchar_t* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnvpe (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
#define _WPROCESS_DEFINED
#endif
#endif /* not __STRICT_ANSI__ */
#ifdef __cplusplus
} /* end of extern "C" */
#endif
#endif /* Not RC_INVOKED */
#endif /* not _WCHAR_H_ */

View File

@ -1,168 +0,0 @@
/*
* wctype.h
*
* Functions for testing wide character types and converting characters.
*
* This file is part of the Mingw32 package.
*
* Contributors:
* Created by Mumit Khan <khan@xraylith.wisc.edu>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef _WCTYPE_H_
#define _WCTYPE_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_wchar_t
#define __need_wint_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
/*
* The following flags are used to tell iswctype and _isctype what character
* types you are looking for.
*/
#define _UPPER 0x0001
#define _LOWER 0x0002
#define _DIGIT 0x0004
#define _SPACE 0x0008
#define _PUNCT 0x0010
#define _CONTROL 0x0020
#define _BLANK 0x0040
#define _HEX 0x0080
#define _LEADBYTE 0x8000
#define _ALPHA 0x0103
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
#ifndef WEOF
#define WEOF (wchar_t)(0xFFFF)
#endif
#ifndef _WCTYPE_T_DEFINED
typedef wchar_t wctype_t;
#define _WCTYPE_T_DEFINED
#endif
/* Wide character equivalents - also in ctype.h */
_CRTIMP int __cdecl __MINGW_NOTHROW iswalnum(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswalpha(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswascii(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswcntrl(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswctype(wint_t, wctype_t);
_CRTIMP int __cdecl __MINGW_NOTHROW is_wctype(wint_t, wctype_t); /* Obsolete! */
_CRTIMP int __cdecl __MINGW_NOTHROW iswdigit(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswgraph(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswlower(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswprint(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswpunct(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswspace(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswupper(wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW iswxdigit(wint_t);
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined __STRICT_ANSI__ || defined __cplusplus
int __cdecl __MINGW_NOTHROW iswblank (wint_t);
#endif
/* Older MS docs uses wchar_t for arg and return type, while newer
online MS docs say arg is wint_t and return is int.
ISO C uses wint_t for both. */
_CRTIMP wint_t __cdecl __MINGW_NOTHROW towlower (wint_t);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW towupper (wint_t);
_CRTIMP int __cdecl __MINGW_NOTHROW isleadbyte (int);
/* Also in ctype.h */
#ifdef __DECLSPEC_SUPPORTED
# if __MSVCRT_VERSION__ <= 0x0700
__MINGW_IMPORT unsigned short _ctype[];
# endif
# ifdef __MSVCRT__
__MINGW_IMPORT unsigned short* _pctype;
# else /* CRTDLL */
__MINGW_IMPORT unsigned short* _pctype_dll;
# define _pctype _pctype_dll
# endif
#else /* ! __DECLSPEC_SUPPORTED */
# if __MSVCRT_VERSION__ <= 0x0700
extern unsigned short** _imp___ctype;
# define _ctype (*_imp___ctype)
# endif
# ifdef __MSVCRT__
extern unsigned short** _imp___pctype;
# define _pctype (*_imp___pctype)
# else /* CRTDLL */
extern unsigned short** _imp___pctype_dll;
# define _pctype (*_imp___pctype_dll)
# endif /* CRTDLL */
#endif /* __DECLSPEC_SUPPORTED */
#if !(defined (__NO_INLINE__) || defined(__NO_CTYPE_INLINES) \
|| defined(__WCTYPE_INLINES_DEFINED))
#define __WCTYPE_INLINES_DEFINED
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
__CRT_INLINE int __cdecl __MINGW_NOTHROW isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined __STRICT_ANSI__ || defined __cplusplus
__CRT_INLINE int __cdecl __MINGW_NOTHROW iswblank (wint_t wc)
{return (iswctype(wc, _BLANK) || wc == L'\t');}
#endif
#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
typedef wchar_t wctrans_t;
/* These are resolved by libmingwex.a. Note, that they are also exported
by the MS C++ runtime lib (msvcp60.dll). The msvcp60.dll implementations
of wctrans and towctrans are not C99 compliant in that wctrans("tolower")
returns 0, while std specifies that a non-zero value should be returned
for a valid string descriptor. If you want the MS behaviour (and you have
msvcp60.dll in your path) add -lmsvcp60 to your command line. */
wint_t __cdecl __MINGW_NOTHROW towctrans(wint_t, wctrans_t);
wctrans_t __cdecl __MINGW_NOTHROW wctrans(const char*);
wctype_t __cdecl __MINGW_NOTHROW wctype(const char*);
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _WCTYPE_H_ */

View File

@ -1,67 +0,0 @@
/*
* init.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Code to initialize standard file handles and command line arguments.
* This file is #included in both crt1.c and dllcrt1.c.
*
*/
/*
* Access to a standard 'main'-like argument count and list. Also included
* is a table of environment variables.
*/
int _argc = 0;
char **_argv = 0;
/* NOTE: Thanks to Pedro A. Aranda Gutiirrez <paag@tid.es> for pointing
* this out to me. GetMainArgs (used below) takes a fourth argument
* which is an int that controls the globbing of the command line. If
* _CRT_glob is non-zero the command line will be globbed (e.g. *.*
* expanded to be all files in the startup directory). In the mingw32
* library a _CRT_glob variable is defined as being -1, enabling
* this command line globbing by default. To turn it off and do all
* command line processing yourself (and possibly escape bogons in
* MS's globbing code) include a line in one of your source modules
* defining _CRT_glob and setting it to zero, like this:
* int _CRT_glob = 0;
*/
extern int _CRT_glob;
#ifdef __MSVCRT__
typedef struct {
int newmode;
} _startupinfo;
extern void __getmainargs (int *, char ***, char ***, int, _startupinfo *);
#else
extern void __GetMainArgs (int *, char ***, char ***, int);
#endif
/*
* Initialize the _argc, _argv and environ variables.
*/
static void
_mingw32_init_mainargs ()
{
/* The environ variable is provided directly in stdlib.h through
* a dll function call. */
char **dummy_environ;
#ifdef __MSVCRT__
_startupinfo start_info;
start_info.newmode = 0;
#endif
/*
* Microsoft's runtime provides a function for doing just that.
*/
#ifdef __MSVCRT__
(void) __getmainargs (&_argc, &_argv, &dummy_environ, _CRT_glob,
&start_info);
#else
/* CRTDLL version */
(void) __GetMainArgs (&_argc, &_argv, &dummy_environ, _CRT_glob);
#endif
}

View File

@ -1,253 +0,0 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile
([ -f $dstdir/$dstfile ] &&
$doit $mvcmd $dstdir/$dstfile $dstdir/$dstfile.$$ );
exec $doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

View File

@ -1,21 +0,0 @@
/*
* isascii.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Oldnames from ANSI header ctype.h
*
* Some wrapper functions for those old name functions whose appropriate
* equivalents are not simply underscore prefixed.
*
*/
#include <ctype.h>
int
isascii (int c)
{
return __isascii(c);
}

View File

@ -1,20 +0,0 @@
/*
* iscsym.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Oldnames from ANSI header ctype.h
*
* Some wrapper functions for those old name functions whose appropriate
* equivalents are not simply underscore prefixed.
*
*/
#include <ctype.h>
int
iscsym (int c)
{
return __iscsym(c);
}

View File

@ -1,21 +0,0 @@
/*
* iscsymf.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Oldnames from ANSI header ctype.h
*
* Some wrapper functions for those old name functions whose appropriate
* equivalents are not simply underscore prefixed.
*
*/
#include <ctype.h>
int
iscsymf (int c)
{
return __iscsymf(c);
}

View File

@ -1,71 +0,0 @@
#
# Jamfile for building various libraries and object files for the
# Minimalist GNU-Win32 package.
#* This file has no copyright assigned and is placed in the Public Domain.
#* This file is a part of the mingw-runtime package.
#* No warranty is given; refer to the file DISCLAIMER within the package.
#
# Change this line if you have installed Mingw32 in another directory.
#
LOCATE_TARGET = /mingw32/lib ;
RUNTIME default = crtdll ;
# Build the mingw32 library which contains startup code and extra support
# routines.
#
Library libmingw32.a :
CRTglob.c
CRTfmode.c
CRTinit.c
dirent.c
dllmain.c
gccmain.c
main.c
;
# Build the startup object files for normal applications and for DLLs.
# The crt2 and dllcrt2 versions are for MSVCRTxx.DLL runtimes. crt1 and
# dllcrt1 are for the CRTDLL.DLL runtime.
#
Object crt1.o : crt1.c ;
Object crt2.o : crt1.c ;
CCFLAGS on crt2.o += -D__MSVCRT__ ;
Object dllcrt1.o : dllcrt1.c ;
Object dllcrt2.o : dllcrt1.c ;
CCFLAGS on dllcrt2.o += -D__MSVCRT__ ;
DEPENDS all : crt1.o dllcrt1.o crt2.o dllcrt2.o ;
# Build an object file which contains a single global variable initialized
# so that globbing will not be performed on the command line.
#
Object CRT_noglob.o : CRT_noglob.c ;
LOCATE on CRT_noglob.o = $(LOCATE_TARGET) ;
DEPENDS all : CRT_noglob.o ;
# Build a special import library which contains mostly the imports defined
# in moldname.def, but with their leading underscores stripped off, plus the
# extra code in the C modules included.
#
ImportLib libmoldname.a : moldname.def ctype_old.c string_old.c ;
DLLNAME on libmoldname.a = $(RUNTIME).dll ;
DLLTOOLFLAGS on libmoldname.a += -U ;
# Build import libraries for the various runtimes.
#
ImportLib libcrtdll.a : crtdll.def ;
ImportLib libmsvcrt.a : msvcrt.def ;
ImportLib libmsvcrt20.a : msvcrt20.def ;
ImportLib libmsvcrt40.a : msvcrt40.def ;

View File

@ -1,79 +0,0 @@
/*
* main.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Extra startup code for applications which do not have a main function
* of their own (but do have a WinMain). Generally these are GUI
* applications, but they don't *have* to be.
*
*/
#include <stdlib.h>
#include <process.h>
#include <windows.h>
#define ISSPACE(a) (a == ' ' || a == '\t')
extern int PASCAL WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
LPSTR szCmdLine, int nShow);
int
main (int argc, char *argv[], char *environ[])
{
char *szCmd;
STARTUPINFO startinfo;
int nRet;
/* Get the command line passed to the process. */
szCmd = GetCommandLineA ();
GetStartupInfoA (&startinfo);
/* Strip off the name of the application and any leading
* whitespace. */
if (szCmd)
{
while (ISSPACE (*szCmd))
{
szCmd++;
}
/* On my system I always get the app name enclosed
* in quotes... */
if (*szCmd == '\"')
{
do
{
szCmd++;
}
while (*szCmd != '\"' && *szCmd != '\0');
if (*szCmd == '\"')
{
szCmd++;
}
}
else
{
/* If no quotes then assume first token is program
* name. */
while (!ISSPACE (*szCmd) && *szCmd != '\0')
{
szCmd++;
}
}
while (ISSPACE (*szCmd))
{
szCmd++;
}
}
nRet = WinMain (GetModuleHandle (NULL), NULL, szCmd,
(startinfo.dwFlags & STARTF_USESHOWWINDOW) ?
startinfo.wShowWindow : SW_SHOWDEFAULT);
return nRet;
}

View File

@ -1,474 +0,0 @@
.\" t
.TH DIRNAME 3 04-Jan-2007 MinGW "Programmer's Reference Manual"
.
.SH NAME
.
.BR dirname ,\0 basename
\- parse path name components
.
.
.SH SYNOPSIS
.
.B #include
.RB < libgen.h >
.PP
.B char *dirname( char
.BI * path
.B );
.br
.B char *basename( char
.BI * path
.B );
.
.
.SH DESCRIPTION
.
The
.B dirname
and
.B basename
functions parse a null\-terminated path name string,
and split it into its
.B directory name
and
.B file name
components.
Splitting is performed on the basis of the location of the
.B directory separator
characters,
which,
for this MS\-Windows(\(tm) implementation,
are the characters
.RB \(dq / \(dq
and
.RB \(dq \e \(dq,
each of which is interpreted as being equivalent.
Additionally,
if the
.I second
character of
.I path
is a colon
.RB (\(dq : \(dq),
the first two characters of
.I path
are interpreted as an MS\-Windows(\(tm) drive designator,
which will be included in the
.B directory name
component of
.IR path ,
but is never considered to form part of the
.B file name
component.
.
.PP
In normal usage,
.B dirname
returns a pointer to a string representing the path name component of
.IR path ,
up to but not including the rightmost directory separator,
while
.B basename
returns a pointer to the component following this separator.
Any trailing directory separators present in
.I path
are disregarded,
when determining the rightmost separator,
and, in the case of the return value from
.BR dirname ,
any internal sequences of recurring separator characters
are each reduced to a single such character.
.
.PP
If
.I path
contains no MS\-Windows(\(tm) drive designator,
and no directory separator character,
then
.B dirname
returns the string
.RB \(dq . \(dq,
and
.B basename
returns a copy of
.IR path.
If
.I path
does commence with an MS\-Windows(\(tm) drive designator,
but contains no directory separators,
then
.B dirname
returns the string
.RB \(dq d:. \(dq,
where
.RB \(dq d: \(dq
represents the drive designator,
while
.B basename
returns a copy of
.IR path ,
with its initial two characters,
(i.e.\ the drive designator),
deleted.
.
.PP
If
.I path
is a NULL pointer,
or is a pointer to an empty string,
then both
.B dirname
and
.B basename
return the string
.RB \(dq . \(dq.
.
.PP
If
.I path
is the string
.RB \(dq / \(dq,
or the string
.RB \(dq \e \(dq,
both
.B dirname
and
.B basename
return the string
.RB \(dq / \(dq,
or the string
.RB \(dq \e \(dq,
respectively.
.
.PP
If
.I path
commences with
.I exactly
two directory separator characters,
which must be similar,
then
.B dirname
will preserve these two characters in the returned path name.
This construct does not affect the string returned by
.BR basename ,
neither is this behaviour replicated by
.BR dirname ,
if
.I path
includes an MS\-Windows(\(tm) drive designator.
.
.PP
In the special case,
where
.I path
is specified as
.I exactly
two identical directory separator characters,
with no MS\-Windows(\(tm) drive designator,
and no following path name,
.B dirname
returns
.I path
unchanged;
.B basename
normalises the return string to only a single character,
either
.RB \(dq / \(dq
or
.RB \(dq \e \(dq,
matching the characters used to specify
.IR path .
.
.PP
Concatenating the string returned by
.BR dirname ,
a
.RB \(dq / \(dq
or a
.RB \(dq \e \(dq,
and the string returned by
.B basename
yields a complete path name.
.
.PP
The
.B dirname
and
.B basename
functions conform generally to SUSv3,
extended to accommodate the handling of
.RB \(dq / \(dq
and
.RB \(dq \e \(dq
as alternative directory separator characters,
and also to accommodate the likelihood of MS\-Windows(\(tm)
drive designators appearing in any path name specification.
The example,
which follows,
illustrates the conformance to SUSv3,
and also the effects of the extended behaviour.
.
.
.SH EXAMPLE
.
To verify the behaviour of the
.B dirname
and
.B basename
functions,
the test program defines the following function:\(em
.
.PP
.RS
.nf
#include <stdio.h>
#include <string.h>
#include <libgen.h>
void result( char *path )
{
char *dir = strdup( path );
char *file = strdup( path );
printf( " %-15s%-15s%-12s", path, dirname( dir ),
basename( file ) );
free( dir );
free( file );
}
.fi
.RE
.PP
This illustrates the correct use of the
.B dirname
and the
.B basename
functions,
with copies of the original
.I path
string being passed in the function calls.
Note that the return values from each function are used immediately,
in the
.B printf
call,
and the temporary copies of
.I path
are discarded,
and the associated memory is freed,
before these go out of scope.
.
.PP
Calling this example function illustrates the effect of each of the
.B dirname
and
.B basename
functions,
for various values of
.IR path .
The following,
taken from SUSv3,
illustrate general conformance with the standard:\(em
.RS
.TS
tab(!);
lB lB lB
lw(15n) lw(10n) lw(10n).
\0path!\0dirname!\0basename
\_!\_!\_
\0/usr/lib!\0/usr!\0lib
\0//usr//lib//!\0//usr!\0lib
\0///usr//lib//!\0/usr!\0lib
\0/usr/!\0/!\0usr
\0usr!\0.!\0usr
\0//!\0//!\0/
\0/!\0/!\0/
\0.!\0.!\0.
\0..!\0.!\0..
.TE
.RE
.
.PP
Similarly,
for the case where path names are expressed using the MS\-Windows(\(tm)
.RB \(dq \e \(dq
directory separator notation,
calling the example function displays:\(em
.RS
.TS
tab(!);
lB lB lB
lw(15n) lw(10n) lw(10n).
\0path!\0dirname!\0basename
\_!\_!\_
\0\eusr\elib!\0\eusr!\0lib
\0\e\eusr\e\elib\e\e!\0\e\eusr!\0lib
\0\e\e\eusr\e\elib\e\e!\0\eusr!\0lib
\0\eusr\e!\0\e!\0usr
\0usr!\0.!\0usr
\0\e\e!\0\e\e!\0\e
\0\e!\0\e!\0\e
\0.!\0.!\0.
\0..!\0.!\0..
.TE
.RE
.
.PP
and,
when an MS\-Windows(\(tm) drive designator is also specified,
this becomes:\(em
.RS
.TS
tab(!);
lB lB lB
lw(15n) lw(10n) lw(10n).
\0path!\0dirname!\0basename
\_!\_!\_
\0d:\eusr\elib!\0d:\eusr!\0lib
\0d:\e\eusr\e\elib\e\e!\0d:\eusr!\0lib
\0d:\e\e\eusr\e\elib\e\e!\0d:\eusr!\0lib
\0d:\eusr\e!\0d:\e!\0usr
\0d:usr!\0d:.!\0usr
\0d:\e\e!\0d:\e!\0\e
\0d:\e!\0d:\e!\0\e
\0d:.!\0d:.!\0.
\0d:..!\0d:.!\0..
.TE
.RE
.
.PP
Please note,
in particular,
the special handling of path names which begin with
.I exactly
two directory separator characters,
and also that this special handling is suppressed
when these two characters are dissimilar,
or when an MS\-Windows(\(tm) drive designator is specified:\(em
.RS
.TS
tab(!);
lB lB lB
lw(15n) lw(10n) lw(10n).
\0path!\0dirname!\0basename
\_!\_!\_
\0//usr//lib//!\0//usr!\0lib
\0\e\eusr\e\elib\e\e!\0\e\eusr!\0lib
\0/\eusr\e\elib\e\e!\0/usr!\0lib
\0\e/usr\e\elib\e\e!\0\eusr!\0lib
\0d:\e\eusr\e\elib\e\e!\0d:\eusr!\0lib
\0//!\0//!\0/
\0\e\e!\0\e\e!\0\e
\0/\e!\0/!\0/
\0\e/!\0\e!\0\e
\0d:\e\e!\0d:\e!\0\e
.TE
.RE
.
.
.SH RETURN VALUE
.
The
.B dirname
function returns a pointer to a null terminated string,
which represents the directory path component of the passed
.I path
string,
without any trailing directory separator character,
and with all internal sequences of directory separator characters
normalised to a single separator at each level of directory nesting.
.
.PP
The
.B basename
function
returns a pointer to a null terminated string,
which represents the rightmost element of the passed
.I path
string,
with all trailing directory separator characters removed.
.
.PP
If any MS\-Windows(\(tm) drive designator is specified in the input
.I path
string,
it is included in the return value of the
.B dirname
function,
but not in that of the
.B basename
function.
.
.
.SH ERROR RETURNS
.
None.
.
.
.SH CAVEATS AND BUGS
.
The
.B dirname
and
.B basename
functions may modify the
.I path
string passed to them.
Therefore, it is an error to pass a character constant as the
.I path
parameter;
to do so may result in memory violation errors,
(segmentation faults),
and consequent abnormal program termination.
.PP
Also note that,
since the
.I path
argument may be modified by the
.B dirname
or the
.B basename
function call,
if you wish to preserve the original content of
.IR path ,
you should pass a copy to the function.
Furthermore,
either function may return its result in a statically allocated buffer,
which may be overwritten on a subsequent function call.
.PP
Although the
.B dirname
and
.B basename
functions parse path name strings,
they are basically just
.I string
functions.
The presence of an MS\-Windows(\(tm) drive designator is determined
by the appearance of a colon
.RB (\(dq : \(dq)
as the second character of the
.I path
string,
but neither function performs any check
to ensure that the first character represents a valid file system device;
neither is any form of validation performed,
to ensure that the remainder of the string
represents a valid path name.
.
.
.SH AUTHOR
.
This manpage was written for the MinGW implementation of the
.B dirname
and
.B basename
functions by Keith\ Marshall,
<keithmarshall@users.sourceforge.net>.
It may copied, modified and redistributed,
without restriction of copyright,
provided this acknowledgement of contribution by
the original author remains unchanged.
.
.
.\" EOF

View File

@ -1,349 +0,0 @@
#
# mingw/mingwex/Makefile.in: This file is part of Mingw runtime.
#
# This makefile requires GNU make.
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = $(srcdir):$(srcdir)/math:$(srcdir)/stdio:$(srcdir)/complex $(srcdir)/gdtoa
# FIXME: I see no reason to define `objdir';
# it appears to be unused, and could be removed.
objdir = .
target_alias = @target_alias@
prefix = @prefix@
datarootdir = @datarootdir@
program_transform_name = @program_transform_name@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
# FIXME: Use of `target_alias' is extremely suspect here;
# (see relevant note in top level Makefile).
tooldir = $(exec_prefix)/$(target_alias)
datadir = @datadir@
infodir = @infodir@
includedir = @includedir@
SHELL = /bin/sh
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
DISTFILES = \
Makefile.in \
_Exit.c atoll.c dirent.c feclearexcept.c fegetenv.c \
fegetexceptflag.c fegetround.c feholdexcept.c feraiseexcept.c \
fesetenv.c fesetexceptflag.c fesetround.c fetestexcept.c \
feupdateenv.c ftruncate.c fwide.c getopt.c imaxabs.c imaxdiv.c \
lltoa.c lltow.c mbsinit.c membarrier.c mingw-aligned-malloc.c \
mingw-fseek.c sitest.c strtoimax.c strtoumax.c \
testwmem.c tst-aligned-malloc.c ulltoa.c ulltow.c wcstof.c \
wcstoimax.c wcstold.c wcstoumax.c wctrans.c wctype.c \
wdirent.c wmemchr.c wmemcmp.c wmemcpy.c wmemmove.c wmemset.c wtoll.c \
wcrtomb.c wctob.c mbrtowc.c btowc.c mb_wc_common.h \
gettimeofday.c isblank.c iswblank.c \
basename.c dirname.c usleep.c \
tsearch.c twalk.c tdelete.c tfind.c
MATH_DISTFILES = \
acosf.c acosl.c asinf.c asinl.c atan2f.c atan2l.c \
atanf.c atanl.c cbrt.c cbrtf.c cbrtl.c ceilf.S ceill.S \
cephes_mconf.h \
copysign.S copysignf.S copysignl.S cosf.S coshf.c coshl.c cosl.S \
erfl.c exp2.S exp2f.S exp2l.S expf.c expl.c expm1.c expm1l.c expm1f.c \
fabs.c fabsf.c fabsl.c \
fdim.c fdimf.c fdiml.c floorf.S floorl.S fma.S fmaf.S fmal.c \
fmax.c fmaxf.c fmaxl.c fmin.c fminf.c fminl.c fmodf.c \
fmodl.c fp_consts.c fp_consts.h fp_constsf.c fp_constsl.c \
fpclassify.c fpclassifyf.c fpclassifyl.c \
frexpf.c frexpl.S fucom.c hypotf.c hypotl.c ilogb.S ilogbf.S \
ilogbl.S isnan.c isnanf.c isnanl.c ldexpf.c ldexpl.c \
lgamma.c lgammaf.c lgammal.c llrint.c llrintf.c llrintl.c \
log10f.S log10l.S log1p.S log1pf.S log1pl.S log2.S log2f.S \
log2l.S logb.c logbf.c logbl.c logf.S logl.S lrint.c lrintf.c \
lrintl.c lround_generic.c modff.c modfl.c \
nearbyint.S nearbyintf.S nearbyintl.S \
nextafterf.c nextafterl.c nexttowardf.c nexttoward.c \
powf.c powi.c powif.c powil.c powl.c \
remainder.S remainderf.S remainderl.S remquo.S \
remquof.S remquol.S rint.c rintf.c rintl.c round_internal.h \
round_generic.c scalbn.S scalbnf.S scalbnl.S s_erf.c sf_erf.c \
signbit.c signbitf.c signbitl.c sinf.S sinhf.c sinhl.c sinl.S \
sqrtf.c sqrtl.c tanf.S tanhf.c tanhl.c tanl.S tgamma.c \
tgammaf.c tgammal.c trunc.c truncf.c truncl.c \
acosh.c acoshf.c acoshl.c asinh.c asinhf.c asinhl.c \
atanh.c atanhf.c atanhl.c fastmath.h
STDIO_DISTFILES = \
fopen64.c fseeko64.c ftello64.c lseek64.c \
vfscanf.c vfwscanf.c vscanf.c vsscanf.c vswscanf.c vwscanf.c \
pformat.c pformat.h printf.c fprintf.c sprintf.c snprintf.c \
vprintf.c vfprintf.c vsprintf.c vsnprintf.c \
snwprintf.c vsnwprintf.c
COMPLEX_DISTFILES = \
cabs.c cabsf.c cabsl.c cacos.c cacosf.c cacosl.c cacosh.c \
cacoshf.c cacoshl.c carg.c cargf.c cargl.c casin.c casinf.c \
casinl.c casinh.c casinhf.c casinhl.c catan.c catanf.c catanl.c \
catanh.c catanhf.c catanhl.c ccos.c ccosf.c ccosl.c ccosh.c \
ccoshf.c ccoshl.c cexp.c cexpf.c cexpl.c cimag.c cimagf.c \
cimagl.c clog.c clogf.c clogl.c cpow.c cpowf.c cpowl.c cproj.c \
cprojf.c cprojl.c creal.c crealf.c creall.c csin.c csinf.c \
csinl.c csinh.c csinhf.c csinhl.c csqrt.c csqrtf.c csqrtl.c \
ctan.c ctanf.c ctanl.c ctanh.c ctanhf.c ctanhl.c
GDTOA_DISTFILES = \
arithchk.c dmisc.c dtoa.c g__fmt.c g_dfmt.c g_ffmt.c g_xfmt.c \
gd_arith.h gd_qnan.h gdtoa.c gdtoa.h gdtoaimp.h gethex.c gmisc.c \
hd_init.c hexnan.c misc.c qnan.c README smisc.c strtodg.c strtodnrp.c \
strtof.c strtopx.c sum.c ulp.c
CC = @CC@
# FIXME: Which is it, CC or CC_FOR_TARGET?
CC_FOR_TARGET = $(CC)
AS_FOR_TARGET = $(AS)
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
OPTFLAGS = -fomit-frame-pointer
WARNFLAGS = -Wall
# compiling with Cygwin?
NO_CYGWIN := @NO_CYGWIN@
ifdef NO_CYGWIN
#
# FIXME: What is the purpose of this hideous kludge?
#
# `CC' should have been appropriately set by the configure script;
# to mess with it, in this fashion, should neither be necessary,
# nor accepted.
#
override CC := ${NO_CYGWIN} $(firstword $(filter-out ${NO_CYGWIN},${CC}))
endif
W32API_INCLUDE = @W32API_INCLUDE@
INCLUDES = -I${srcdir} -I${top_srcdir} -I${top_srcdir}/include \
-nostdinc \
-iwithprefixbefore include
ALL_CFLAGS = $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) $(W32API_INCLUDE)
ALL_CXXFLAGS = $(CXXFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE)
AS = @AS@
AR = @AR@
LD = @LD@
AR_FLAGS = rcv
RANLIB = @RANLIB@
DLLTOOL = @DLLTOOL@
DLLTOOLFLAGS =
DLLTOOL_FOR_TARGET = $(DLLTOOL)
DLLTOOL_FLAGS = --as $(AS_FOR_TARGET)
LIBMINGWEX_A = libmingwex.a
Q8_OBJS = \
fwide.o imaxabs.o imaxdiv.o mbsinit.o \
strtoimax.o strtoumax.o wcstoimax.o wcstoumax.o \
wmemchr.o wmemcmp.o wmemcpy.o wmemmove.o wmemset.o \
wctrans.o wctype.o wcrtomb.o wctob.o mbrtowc.o btowc.o \
wcstof.o wcstold.o
CTYPE_OBJS = \
isblank.o iswblank.o
STDLIB_STUB_OBJS = \
lltoa.o ulltoa.o \
lltow.o ulltow.o \
atoll.o wtoll.o \
_Exit.o
STDIO_OBJS = \
fopen64.o fseeko64.o ftello64.o lseek64.o \
vfscanf.o vfwscanf.o vscanf.o vsscanf.o vswscanf.o vwscanf.o \
pformat.o snprintf.o vsnprintf.o snwprintf.o vsnwprintf.o \
printf.o fprintf.o sprintf.o vprintf.o vfprintf.o vsprintf.o
MATH_OBJS = \
acosf.o acosl.o asinf.o asinl.o atan2f.o atan2l.o \
atanf.o atanl.o cbrt.o cbrtf.o cbrtl.o ceilf.o ceill.o \
copysign.o copysignf.o copysignl.o cosf.o coshf.o coshl.o cosl.o \
erfl.o exp2.o exp2f.o exp2l.o expf.o expl.o expm1.o expm1l.o expm1f.o \
fabs.o fabsf.o fabsl.o \
fdim.o fdimf.o fdiml.o floorf.o floorl.o fma.o fmaf.o fmal.o \
fmax.o fmaxf.o fmaxl.o fmin.o fminf.o fminl.o fmodf.o \
fmodl.o fp_consts.o fp_constsf.o fp_constsl.o \
fpclassify.o fpclassifyf.o fpclassifyl.o \
frexpf.o frexpl.o fucom.o hypotf.o hypotl.o ilogb.o ilogbf.o \
ilogbl.o isnan.o isnanf.o isnanl.o ldexpf.o ldexpl.o \
lgamma.o lgammaf.o lgammal.o llrint.o llrintf.o llrintl.o \
log10f.o log10l.o log1p.o log1pf.o log1pl.o log2.o log2f.o \
log2l.o logb.o logbf.o logbl.o logf.o logl.o \
lrint.o lrintf.o lrintl.o modff.o modfl.o \
nearbyint.o nearbyintf.o nearbyintl.o \
nextafterf.o nextafterl.o nexttowardf.o nexttoward.o \
powf.o powi.o powif.o powil.o powl.o \
remainder.o remainderf.o remainderl.o remquo.o \
remquof.o remquol.o rint.o rintf.o rintl.o \
scalbn.o scalbnf.o scalbnl.o s_erf.o sf_erf.o \
signbit.o signbitf.o signbitl.o sinf.o sinhf.o sinhl.o sinl.o \
sqrtf.o sqrtl.o tanf.o tanhf.o tanhl.o tanl.o tgamma.o \
tgammaf.o tgammal.o trunc.o truncf.o truncl.o \
acosh.o acoshf.o acoshl.o asinh.o asinhf.o asinhl.o \
atanh.o atanhf.o atanhl.o
MATH_ROUND_OBJS = round.o roundf.o roundl.o
MATH_LROUND_OBJS = lround.o lroundf.o lroundl.o
MATH_LLROUND_OBJS = llround.o llroundf.o llroundl.o
FENV_OBJS = fesetround.o fegetround.o \
fegetenv.o fesetenv.o feupdateenv.o \
feclearexcept.o feholdexcept.o fegetexceptflag.o \
feraiseexcept.o fetestexcept.o fesetexceptflag.o
POSIX_OBJS = \
dirent.o wdirent.o getopt.o ftruncate.o gettimeofday.o usleep.o \
basename.o dirname.o tsearch.o twalk.o tdelete.o tfind.o
REPLACE_OBJS = \
membarrier.o mingw-aligned-malloc.o mingw-fseek.o
COMPLEX_OBJS = \
cabs.o cabsf.o cabsl.o cacos.o cacosf.o cacosl.o cacosh.o \
cacoshf.o cacoshl.o carg.o cargf.o cargl.o casin.o casinf.o \
casinl.o casinh.o casinhf.o casinhl.o catan.o catanf.o catanl.o \
catanh.o catanhf.o catanhl.o ccos.o ccosf.o ccosl.o ccosh.o \
ccoshf.o ccoshl.o cexp.o cexpf.o cexpl.o cimag.o cimagf.o \
cimagl.o clog.o clogf.o clogl.o cpow.o cpowf.o cpowl.o cproj.o \
cprojf.o cprojl.o creal.o crealf.o creall.o csin.o csinf.o \
csinl.o csinh.o csinhf.o csinhl.o csqrt.o csqrtf.o csqrtl.o \
ctan.o ctanf.o ctanl.o ctanh.o ctanhf.o ctanhl.o
GDTOA_OBJS = \
dmisc.o dtoa.o g__fmt.o g_dfmt.o g_ffmt.o g_xfmt.o gdtoa.o \
gethex.o gmisc.o hd_init.o hexnan.o misc.o smisc.o \
strtodg.o strtodnrp.o strtof.o strtopx.o sum.o ulp.o
LIB_OBJS = $(Q8_OBJS) $(CTYPE_OBJS) $(STDLIB_STUB_OBJS) \
$(STDIO_OBJS) $(MATH_OBJS) $(MATH_ROUND_OBJS) \
$(MATH_LROUND_OBJS) $(MATH_LLROUND_OBJS) $(FENV_OBJS) \
$(POSIX_OBJS) $(REPLACE_OBJS) $(COMPLEX_OBJS) \
$(GDTOA_OBJS)
LIBS = $(LIBMINGWEX_A)
DLLS =
all: $(LIBMINGWEX_A)
$(LIBMINGWEX_A): $(LIB_OBJS)
rm -f $(LIBMINGWEX_A)
$(AR) $(ARFLAGS) $@ $(LIB_OBJS)
$(RANLIB) $@
$(MATH_ROUND_OBJS): round_generic.c
$(CC) $(ALL_CFLAGS) -I$(srcdir)/math -c -o $@ \
-D FUNCTION=$* $(srcdir)/math/round_generic.c
$(MATH_LROUND_OBJS) $(MATH_LLROUND_OBJS): lround_generic.c
$(CC) $(ALL_CFLAGS) -I$(srcdir)/math -c -o $@ \
-D FUNCTION=$* $(srcdir)/math/lround_generic.c
top_builddir = @top_builddir@
Makefile: Makefile.in ${top_builddir}/config.status ${top_srcdir}/configure
cd ${top_builddir}; $(SHELL) config.status
${top_builddir}/config.status: ${top_srcdir}/configure
cd ${top_builddir}; $(SHELL) config.status --recheck
info:
info-html:
install-info: info
need-DESTDIR-compatibility = prefix libdir
.PHONY: $(need-DESTDIR-compatibility) fail-DESTDIR-compatibility
$(need-DESTDIR-compatibility):
@test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
$(MAKE) --no-print-directory reject="$@" fail-DESTDIR-compatibility ;; \
esac
fail-DESTDIR-compatibility:
$(error DESTDIR is not supported when $(reject) contains Win32 path `$($(reject))'; \
try `make install $(reject)=$(shell echo '$($(reject))' | sed s,:,:$(DESTDIR),) ...' instead)
install: all $(need-DESTDIR-compatibility)
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
for i in $(LIBS); do \
$(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \
done
clean:
-rm -f $(LIB_OBJS) $(LIBMINGWEX_A)
distclean:
-rm -f *.o *.a *~ core a.out
-rm -f config.cache config.status config.log
-rm -f Makefile
.c.o:
$(CC) -c $(ALL_CFLAGS) $< -o $@
.S.o:
$(CC) -c $< -o $@
.s.o:
$(CC) -c $< -o $@
# pformat.o needs an explicit build rule; we always build it
# assuming __MSVCRT_VERSION__ >= 0x0800, relying on ofmt_stub.s
# (in the parent directory) to maintain forward compatibility
# for earlier versions of MSVCRT.DLL
#
PFORMAT_CFLAGS = $(ALL_CFLAGS) -I $(srcdir)/gdtoa -D__MSVCRT_VERSION__=0x0800
pformat.o: pformat.c pformat.h
$(CC) -c $(PFORMAT_CFLAGS) $(srcdir)/stdio/$*.c -o $@
#
# Dependencies
#
wdirent.o: $(srcdir)/dirent.c $(srcdir)/wdirent.c
acosh.o acoshf.o acoshl.o \
asinh.o asinhf.o asinhl.o \
atanh.o atanhf.o atanhl.o: fastmath.h
mbrtowc.o wcrtomb.o wcstof.o wcstold.o: mb_wc_common.h
$(GDTOA_OBJS): gd_arith.h gdtoa.h gdtoaimp.h gd_qnan.h
$(MATH_ROUND_OBJS) $(MATH_LROUND_OBJS) $(MATH_LLROUND_OBJS): round_internal.h
printf.o: printf.c pformat.h
fprintf.o: fprintf.c pformat.h
sprintf.o: sprintf.c pformat.h
snprintf.o: snprintf.c pformat.h
vprintf.o: vprintf.c pformat.h
vfprintf.o: vfprintf.c pformat.h
vsprintf.o: vsprintf.c pformat.h
vsnprintf.o: vsnprintf.c pformat.h
dist:
mkdir $(distdir)/mingwex
chmod 755 $(distdir)/mingwex
@for i in $(DISTFILES); do\
cp -p $(srcdir)/$$i $(distdir)/mingwex/$$i ; \
done
mkdir $(distdir)/mingwex/math
chmod 755 $(distdir)/mingwex/math
@for i in $(MATH_DISTFILES); do\
cp -p $(srcdir)/math/$$i $(distdir)/mingwex/math/$$i ; \
done
mkdir $(distdir)/mingwex/stdio
chmod 755 $(distdir)/mingwex/stdio
@for i in $(STDIO_DISTFILES); do\
cp -p $(srcdir)/stdio/$$i $(distdir)/mingwex/stdio/$$i ; \
done
mkdir $(distdir)/mingwex/complex
chmod 755 $(distdir)/mingwex/complex
@for i in $(COMPLEX_DISTFILES); do\
cp -p $(srcdir)/complex/$$i $(distdir)/mingwex/complex/$$i ; \
done
mkdir $(distdir)/mingwex/gdtoa
chmod 755 $(distdir)/mingwex/gdtoa
@for i in $(GDTOA_DISTFILES); do\
cp -p $(srcdir)/gdtoa/$$i $(distdir)/mingwex/gdtoa/$$i ; \
done
# $RCSfile$: end of file

View File

@ -1,3 +0,0 @@
#include <stdlib.h>
void _Exit(int status)
{ _exit(status); }

View File

@ -1,3 +0,0 @@
#include <stdlib.h>
long long atoll (const char * _c)
{ return _atoi64 (_c); }

View File

@ -1,167 +0,0 @@
/* basename.c
*
* $Id$
*
* Provides an implementation of the "basename" function, conforming
* to SUSv3, with extensions to accommodate Win32 drive designators,
* and suitable for use on native Microsoft(R) Win32 platforms.
*
* Written by Keith Marshall <keithmarshall@users.sourceforge.net>
*
* This is free software. You may redistribute and/or modify it as you
* see fit, without restriction of copyright.
*
* This software is provided "as is", in the hope that it may be useful,
* but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
* MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
* time will the author accept any form of liability for any damages,
* however caused, resulting from the use of this software.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libgen.h>
#include <locale.h>
#ifndef __cdecl /* If compiling on any non-Win32 platform ... */
#define __cdecl /* this may not be defined. */
#endif
__cdecl char *basename( char *path )
{
size_t len;
static char *retfail = NULL;
/* to handle path names for files in multibyte character locales,
* we need to set up LC_CTYPE to match the host file system locale
*/
char *locale = setlocale( LC_CTYPE, NULL );
if( locale != NULL ) locale = strdup( locale );
setlocale( LC_CTYPE, "" );
if( path && *path )
{
/* allocate sufficient local storage space,
* in which to create a wide character reference copy of path
*/
wchar_t refcopy[1 + (len = mbstowcs( NULL, path, 0 ))];
/* create the wide character reference copy of path,
* and step over the drive designator, if present ...
*/
wchar_t *refpath = refcopy;
if( ((len = mbstowcs( refpath, path, len )) > 1) && (refpath[1] == L':') )
{
/* FIXME: maybe should confirm *refpath is a valid drive designator */
refpath += 2;
}
/* ensure that our wide character reference path is NUL terminated */
refcopy[ len ] = L'\0';
/* check again, just to ensure we still have a non-empty path name ... */
if( *refpath )
{
/* and, when we do, process it in the wide character domain ...
* scanning from left to right, to the char after the final dir separator
*/
wchar_t *refname;
for( refname = refpath ; *refpath ; ++refpath )
{
if( (*refpath == L'/') || (*refpath == L'\\') )
{
/* we found a dir separator ...
* step over it, and any others which immediately follow it
*/
while( (*refpath == L'/') || (*refpath == L'\\') )
++refpath;
/* if we didn't reach the end of the path string ... */
if( *refpath )
/* then we have a new candidate for the base name */
refname = refpath;
/* otherwise ...
* strip off any trailing dir separators which we found
*/
else while( (refpath > refname)
&& ((*--refpath == L'/') || (*refpath == L'\\')) )
*refpath = L'\0';
}
}
/* in the wide character domain ...
* refname now points at the resolved base name ...
*/
if( *refname )
{
/* if it's not empty,
* then we transform the full normalised path back into
* the multibyte character domain, and skip over the dirname,
* to return the resolved basename.
*/
if( (len = wcstombs( path, refcopy, len )) != (size_t)(-1) )
path[ len ] = '\0';
*refname = L'\0';
if( (len = wcstombs( NULL, refcopy, 0 )) != (size_t)(-1) )
path += len;
}
else
{
/* the basename is empty, so return the default value of "/",
* transforming from wide char to multibyte char domain, and
* returning it in our own buffer.
*/
retfail = realloc( retfail, len = 1 + wcstombs( NULL, L"/", 0 ));
wcstombs( path = retfail, L"/", len );
}
/* restore the caller's locale, clean up, and return the result */
setlocale( LC_CTYPE, locale );
free( locale );
return( path );
}
/* or we had an empty residual path name, after the drive designator,
* in which case we simply fall through ...
*/
}
/* and, if we get to here ...
* the path name is either NULL, or it decomposes to an empty string;
* in either case, we return the default value of "." in our own buffer,
* reloading it with the correct value, transformed from the wide char
* to the multibyte char domain, just in case the caller trashed it
* after a previous call.
*/
retfail = realloc( retfail, len = 1 + wcstombs( NULL, L".", 0 ));
wcstombs( retfail, L".", len );
/* restore the caller's locale, clean up, and return the result */
setlocale( LC_CTYPE, locale );
free( locale );
return( retfail );
}
/* $RCSfile$$Revision$: end of file */

View File

@ -1,19 +0,0 @@
#include "mb_wc_common.h"
#include <wchar.h>
#include <stdio.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
wint_t btowc (int c)
{
if (c == EOF)
return (WEOF);
else
{
unsigned char ch = c;
wchar_t wc = WEOF;
MultiByteToWideChar (get_codepage(), MB_ERR_INVALID_CHARS,
(char*)&ch, 1, &wc, 1);
return wc;
}
}

View File

@ -1,7 +0,0 @@
#include <math.h>
#include <complex.h>
double cabs (double complex Z)
{
return _hypot ( __real__ Z, __imag__ Z);
}

View File

@ -1,7 +0,0 @@
#include <math.h>
#include <complex.h>
float cabsf (float complex Z)
{
return (float) _hypot ( __real__ Z, __imag__ Z);
}

View File

@ -1,7 +0,0 @@
#include <math.h>
#include <complex.h>
long double cabsl (long double complex Z)
{
return hypotl ( __real__ Z, __imag__ Z);
}

View File

@ -1,82 +0,0 @@
/*
cacos.c
Contributed by Danny Smith
2003-10-20
*/
#include <math.h>
#include <complex.h>
#if 0
/* cacos (Z) = -I * clog(Z + I * csqrt(1 - Z * Z)) */
double complex cacos (double complex Z)
{
double complex Res;
double x, y;
x = __real__ Z;
y = __imag__ Z;
if (y == 0.0)
{
__real__ Res = acos (x);
__imag__ Res = 0.0;
}
else
{
double complex ZZ;
/* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
/* caculate 1 - Z * Z */
__real__ ZZ = 1.0 - (x - y) * (x + y);
__imag__ ZZ = -2.0 * x * y;
Res = csqrt(ZZ);
/* calculate ZZ + I * sqrt (ZZ) */
__real__ ZZ = x - __imag__ Res;
__imag__ ZZ = y + __real__ Res;
ZZ = clog(ZZ);
/* mult by -I */
__real__ Res = __imag__ ZZ;
__imag__ Res = - __real__ ZZ;
}
return Res;
}
#else
/* cacos ( Z ) = pi/2 - casin ( Z ) */
double complex cacos (double complex Z)
{
double complex Res = casin (Z);
__real__ Res = M_PI_2 - __real__ Res;
__imag__ Res = - __imag__ Res;
return Res;
}
#endif
#if 0
#include <stdio.h>
int main()
{
double z;
double complex bar = 0.7 + 1.2 * I;
double complex foo = cacos (bar);
printf ("%.16e\t%.16e\n", __real__ foo, __imag__ foo);
foo = cacos (bar);
printf ("%.16e\t%.16e\n", __real__ foo, __imag__ foo);
return 1;
}
#endif

View File

@ -1,64 +0,0 @@
/*
cacosf.c
Contributed by Danny Smith
2004-12-24
*/
#include <math.h>
#include <complex.h>
#if 0
/* cacos (Z) = -I * clog(Z + I * csqrt(1 - Z * Z)) */
float complex cacos (float complex Z)
{
float complex Res;
float x, y;
x = __real__ Z;
y = __imag__ Z;
if (y == 0.0f)
{
__real__ Res = acosf (x);
__imag__ Res = 0.0f;
}
else
{
float complex ZZ;
/* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
/* caculate 1 - Z * Z */
__real__ ZZ = 1.0f - (x - y) * (x + y);
__imag__ ZZ = -2.0f * x * y;
Res = csqrtf(ZZ);
/* calculate ZZ + I * sqrt (ZZ) */
__real__ ZZ = x - __imag__ Res;
__imag__ ZZ = y + __real__ Res;
ZZ = clog(ZZ);
/* mult by -I */
__real__ Res = __imag__ ZZ;
__imag__ Res = - __real__ ZZ;
}
return Res;
}
#else
/* cacos ( Z ) = pi/2 - casin ( Z ) */
float complex cacosf (float complex Z)
{
float complex Res = casinf (Z);
__real__ Res = M_PI_2 - __real__ Res;
__imag__ Res = - __imag__ Res;
return Res;
}
#endif

Some files were not shown because too many files have changed in this diff Show More