You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(16) |
Aug
(203) |
Sep
(142) |
Oct
(113) |
Nov
(73) |
Dec
(27) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(7) |
Feb
(38) |
Mar
(6) |
Apr
(1) |
May
(9) |
Jun
(104) |
Jul
(6) |
Aug
(11) |
Sep
(13) |
Oct
(6) |
Nov
(15) |
Dec
(37) |
2008 |
Jan
(17) |
Feb
(4) |
Mar
(6) |
Apr
(4) |
May
(2) |
Jun
(5) |
Jul
(1) |
Aug
(3) |
Sep
(21) |
Oct
(7) |
Nov
|
Dec
(3) |
2009 |
Jan
(4) |
Feb
(15) |
Mar
|
Apr
(34) |
May
(44) |
Jun
(12) |
Jul
(6) |
Aug
(15) |
Sep
(20) |
Oct
(10) |
Nov
(1) |
Dec
(20) |
2010 |
Jan
(19) |
Feb
(5) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dan...@us...> - 2006-10-29 21:15:01
|
Revision: 757 http://svn.sourceforge.net/cegcc/?rev=757&view=rev Author: dannybackx Date: 2006-10-29 13:14:57 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Use the arm-wince-cegcc target. Modified Paths: -------------- trunk/cegcc/test/Cplusplus/Makefile This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2006-10-29 21:14:04
|
Revision: 756 http://svn.sourceforge.net/cegcc/?rev=756&view=rev Author: dannybackx Date: 2006-10-29 13:13:55 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Use the arm-wince-cegcc target now. Modified Paths: -------------- trunk/cegcc/test/shared/Makefile This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2006-10-29 21:14:03
|
Revision: 756 http://svn.sourceforge.net/cegcc/?rev=756&view=rev Author: dannybackx Date: 2006-10-29 13:13:55 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Use the arm-wince-cegcc target now. Modified Paths: -------------- trunk/cegcc/test/shared/Makefile Modified: trunk/cegcc/test/shared/Makefile =================================================================== --- trunk/cegcc/test/shared/Makefile 2006-10-29 21:06:37 UTC (rev 755) +++ trunk/cegcc/test/shared/Makefile 2006-10-29 21:13:55 UTC (rev 756) @@ -1,4 +1,4 @@ -T= arm-wince-pe +T= arm-wince-cegcc CC= ${T}-gcc -g DLLTOOL= ${T}-dlltool This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2006-10-29 21:06:54
|
Revision: 755 http://svn.sourceforge.net/cegcc/?rev=755&view=rev Author: dannybackx Date: 2006-10-29 13:06:37 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Temporary workaround Modified Paths: -------------- trunk/cegcc/scripts/linux/build.sh Modified: trunk/cegcc/scripts/linux/build.sh =================================================================== --- trunk/cegcc/scripts/linux/build.sh 2006-10-29 18:25:20 UTC (rev 754) +++ trunk/cegcc/scripts/linux/build.sh 2006-10-29 21:06:37 UTC (rev 755) @@ -102,8 +102,9 @@ sh $SCRIPTDIR/build-stub.sh || exit 1 sh $SCRIPTDIR/install-stub.sh || exit 1 # - sh $SCRIPTDIR/build-mingw.sh || exit 1 - sh $SCRIPTDIR/install-mingw.sh || exit 1 + if [ $TGT_ARCH = arm-wince-cegcc ]; then + sh $SCRIPTDIR/build-mingw.sh && sh $SCRIPTDIR/install-mingw.sh + fi # done # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2006-10-29 21:06:42
|
Revision: 755 http://svn.sourceforge.net/cegcc/?rev=755&view=rev Author: dannybackx Date: 2006-10-29 13:06:37 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Temporary workaround Modified Paths: -------------- trunk/cegcc/scripts/linux/build.sh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Pedro A. <ped...@po...> - 2006-10-29 18:28:55
|
dan...@us... wrote: > Revision: 753 > http://svn.sourceforge.net/cegcc/?rev=753&view=rev > Author: dannybackx > Date: 2006-10-29 10:13:51 -0800 (Sun, 29 Oct 2006) > > Log Message: > ----------- > Add a parameter so we can use the Makefile for both cegcc and mingw32ce. > > dlls for mingw32ce runtime should be generated with src/script.sh ... There is the issue of deciding if we want to go the dll route, or leave everything static so we don't have any dll dependency. That is the way MinGW desktop version works, but there are some known problems with it using recent versions of gcc in passing std::string around dlls, and with exception propagation across dlls, so they may switch to dll versions too when they switch to gcc-4.x (they still use gcc-3.x). Cheers, Pedro Alves |
From: <dan...@us...> - 2006-10-29 18:25:41
|
Revision: 754 http://svn.sourceforge.net/cegcc/?rev=754&view=rev Author: dannybackx Date: 2006-10-29 10:25:20 -0800 (Sun, 29 Oct 2006) Log Message: ----------- This should implement a much cleaner and more complete build. Modified Paths: -------------- trunk/cegcc/scripts/linux/build-gdb.sh trunk/cegcc/scripts/linux/build-gpp.sh trunk/cegcc/scripts/linux/build-newlib.sh trunk/cegcc/scripts/linux/build-stub.sh trunk/cegcc/scripts/linux/build.sh trunk/cegcc/scripts/linux/install-docs.sh trunk/cegcc/scripts/linux/install-gdb.sh trunk/cegcc/scripts/linux/install-gpp.sh trunk/cegcc/scripts/linux/install-libs2.sh trunk/cegcc/scripts/linux/install-mingw.sh trunk/cegcc/scripts/linux/install-newlib.sh trunk/cegcc/scripts/linux/install-stub.sh Modified: trunk/cegcc/scripts/linux/build-gdb.sh =================================================================== --- trunk/cegcc/scripts/linux/build-gdb.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/build-gdb.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -15,12 +15,6 @@ rm -rf $BUILD_DIR/gdb fi # -# -# Not in the MingW target -# -if [ $TGT_ARCH = arm-wince-mingw32ce ]; then - exit 0 -fi mkdir -p $BUILD_DIR/gdb || exit 1 cd $BUILD_DIR/gdb # Modified: trunk/cegcc/scripts/linux/build-gpp.sh =================================================================== --- trunk/cegcc/scripts/linux/build-gpp.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/build-gpp.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -14,13 +14,6 @@ rm -rf $BUILD_DIR/gpp fi # -# Temporary hack - not in the MingW target -# FIX ME -# -if [ $TGT_ARCH = arm-wince-mingw32ce ]; then - exit 0 -fi -# mkdir -p $BUILD_DIR/gpp || exit 1 cd $BUILD_DIR/gpp || exit 1 # Modified: trunk/cegcc/scripts/linux/build-newlib.sh =================================================================== --- trunk/cegcc/scripts/linux/build-newlib.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/build-newlib.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -8,6 +8,12 @@ . scripts/linux/settings.sh fi # +# Don't do this in MinGW +# +if [ $TGT_ARCH = arm-wince-mingw32ce ]; then + exit 0 +fi +# # Put the cleanup here instead of in the calling script # if [ -d $BUILD_DIR/newlib ]; then Modified: trunk/cegcc/scripts/linux/build-stub.sh =================================================================== --- trunk/cegcc/scripts/linux/build-stub.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/build-stub.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -7,13 +7,7 @@ else . scripts/linux/settings.sh fi - # -# Not in the MingW target -# -if [ $TGT_ARCH = arm-wince-mingw32ce ]; then - exit 0 -fi CFLAGS="-mwin32 -D_WINSOCKAPI_" LDFLAGS="-e WinMainCRTStartup -lws2" Modified: trunk/cegcc/scripts/linux/build.sh =================================================================== --- trunk/cegcc/scripts/linux/build.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/build.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -21,7 +21,7 @@ # if [ x$PREFIX != x ]; then if [ -d $PREFIX -a $PREFIX = /usr/ppc ]; then - for i in $TGT_ARCH bin info lib man include libexec share + for i in bin info lib man include libexec share arm-wince-pe arm-wince-cegcc arm-wince-mingw32ce do if [ -d $PREFIX/$i ]; then echo "rm -rf $PREFIX/$i" @@ -50,7 +50,8 @@ for TGT_ARCH in arm-wince-cegcc arm-wince-mingw32ce # arm-wince-pe do export TGT_ARCH -# + echo "Running build-arch.sh with TGT_ARCH = " $TGT_ARCH + # sh $SCRIPTDIR/build-binutils.sh || exit 1 sh $SCRIPTDIR/install-binutils.sh || exit 1 # @@ -65,21 +66,23 @@ sh $SCRIPTDIR/install-gcc.sh || exit 1 # sh $SCRIPTDIR/install-mingw-crt.sh || exit 1 + sh $SCRIPTDIR/build-libs.sh || exit 1 + sh $SCRIPTDIR/install-libs.sh || exit 1 # - sh $SCRIPTDIR/build-mingw.sh || exit 1 - sh $SCRIPTDIR/install-mingw.sh || exit 1 + if [ $TGT_ARCH = arm-wince-mingw32ce ]; then + sh $SCRIPTDIR/build-mingw.sh || exit 1 + sh $SCRIPTDIR/install-mingw.sh || exit 1 + else + sh $SCRIPTDIR/build-newlib.sh || exit 1 + sh $SCRIPTDIR/install-newlib.sh || exit 1 + fi # - sh $SCRIPTDIR/build-newlib.sh || exit 1 - sh $SCRIPTDIR/install-newlib.sh || exit 1 - # # Some of the stuff here applies to both targets # - sh $SCRIPTDIR/build-libs.sh || exit 1 - sh $SCRIPTDIR/install-libs.sh || exit 1 sh $SCRIPTDIR/build-dll.sh || exit 1 sh $SCRIPTDIR/install-dll.sh || exit 1 # - # Build the compiler better (not needed for mingw?). + # Build the compiler better. # sh $SCRIPTDIR/build-gpp.sh || exit 1 sh $SCRIPTDIR/install-gpp.sh || exit 1 @@ -98,7 +101,10 @@ sh $SCRIPTDIR/install-gdb.sh || exit 1 sh $SCRIPTDIR/build-stub.sh || exit 1 sh $SCRIPTDIR/install-stub.sh || exit 1 -# + # + sh $SCRIPTDIR/build-mingw.sh || exit 1 + sh $SCRIPTDIR/install-mingw.sh || exit 1 + # done # sh $SCRIPTDIR/install-docs.sh || exit 1 Modified: trunk/cegcc/scripts/linux/install-docs.sh =================================================================== --- trunk/cegcc/scripts/linux/install-docs.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/install-docs.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -16,5 +16,7 @@ cp docs/examples/*.{c,exe,h,rc,tar.gz} ${DOCDIR}/docs/examples || exit 1 cp website/*.html ${DOCDIR} || exit 1 cp website/images/*.png ${DOCDIR}/images || exit 1 +cp src/gcc/COPYING ${PREFIX} || exit 1 +cp NEWS README ${PREFIX} || exit 1 # exit 0 Modified: trunk/cegcc/scripts/linux/install-gdb.sh =================================================================== --- trunk/cegcc/scripts/linux/install-gdb.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/install-gdb.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -8,11 +8,6 @@ . scripts/linux/settings.sh fi # -# Not in the MingW target -# -if [ $TGT_ARCH = arm-wince-mingw32ce ]; then - exit 0 -fi cd $BUILD_DIR/gdb || exit 1 # make install-gdb || exit 1 Modified: trunk/cegcc/scripts/linux/install-gpp.sh =================================================================== --- trunk/cegcc/scripts/linux/install-gpp.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/install-gpp.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -11,9 +11,9 @@ # Temporary hack - not in the MingW target # FIX ME # -if [ $TGT_ARCH = arm-wince-mingw32ce ]; then - exit 0 -fi +# if [ $TGT_ARCH = arm-wince-mingw32ce ]; then +# exit 0 +# fi cd $BUILD_DIR/gpp || exit 1 # make install || exit 1 Modified: trunk/cegcc/scripts/linux/install-libs2.sh =================================================================== --- trunk/cegcc/scripts/linux/install-libs2.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/install-libs2.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -8,21 +8,13 @@ . scripts/linux/settings.sh fi # -# if [ -d $BUILD_DIR/libs ]; then -# rm -rf $BUILD_DIR/libs -# fi +# Non-standard build # -# Not in the MingW target -# -if [ $TGT_ARCH = arm-wince-mingw32ce ]; then - exit 0 +if [ $TGT_ARCH = arm-wince-cegcc ]; then + cd $TOP_SRCDIR/src/cegcc/cegccthrd || exit 1 + make PREFIX=$PREFIX TARGET=$TGT_ARCH install || exit 1 fi # -# Non-standard build -# -cd $TOP_SRCDIR/src/cegcc/cegccthrd || exit 1 -make PREFIX=$PREFIX TARGET=$TGT_ARCH install || exit 1 -# cd $TOP_SRCDIR/src/cegcc/libstdc++ || exit 1 make PREFIX=$PREFIX TARGET=$TGT_ARCH install || exit 1 # Modified: trunk/cegcc/scripts/linux/install-mingw.sh =================================================================== --- trunk/cegcc/scripts/linux/install-mingw.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/install-mingw.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -15,8 +15,14 @@ cd $BUILD_DIR/profile || exit 1 make install || exit 1 else +# +# Too risky to run the $BUILD_DIR/profile "make install" +# because it'll install incompatible stuff in arm-wince-cegcc. +# +# Take only what we really need. +# cd $BUILD_DIR/profile/profile || exit 1 - cp libgmon.a gcrt1.o gcrt2.o ${PREFIX}/${TGT_ARCH}/lib + cp libgmon.a gcrt3.o ${PREFIX}/${TGT_ARCH}/lib ${TGT_ARCH}-ranlib ${PREFIX}/${TGT_ARCH}/lib/libgmon.a fi # Modified: trunk/cegcc/scripts/linux/install-newlib.sh =================================================================== --- trunk/cegcc/scripts/linux/install-newlib.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/install-newlib.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -8,6 +8,12 @@ . scripts/linux/settings.sh fi # +# Don't do this in MinGW +# +if [ $TGT_ARCH = arm-wince-mingw32ce ]; then + exit 0 +fi +# cd $BUILD_DIR/newlib || exit 1 # make install || exit 1 Modified: trunk/cegcc/scripts/linux/install-stub.sh =================================================================== --- trunk/cegcc/scripts/linux/install-stub.sh 2006-10-29 18:13:51 UTC (rev 753) +++ trunk/cegcc/scripts/linux/install-stub.sh 2006-10-29 18:25:20 UTC (rev 754) @@ -8,12 +8,6 @@ . scripts/linux/settings.sh fi # -# Not in the MingW target -# -if [ $TGT_ARCH = arm-wince-mingw32ce ]; then - exit 0 -fi - LIBS="" INCLUDES="" CFLAGS="-mwin32 ${INCLUDES}" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2006-10-29 18:14:10
|
Revision: 753 http://svn.sourceforge.net/cegcc/?rev=753&view=rev Author: dannybackx Date: 2006-10-29 10:13:51 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Add a parameter so we can use the Makefile for both cegcc and mingw32ce. Modified Paths: -------------- trunk/cegcc/scripts/linux/build-libs2.sh trunk/cegcc/src/cegcc/libstdc++/Makefile Modified: trunk/cegcc/scripts/linux/build-libs2.sh =================================================================== --- trunk/cegcc/scripts/linux/build-libs2.sh 2006-10-29 06:13:13 UTC (rev 752) +++ trunk/cegcc/scripts/linux/build-libs2.sh 2006-10-29 18:13:51 UTC (rev 753) @@ -8,25 +8,22 @@ . scripts/linux/settings.sh fi # -#if [ -d $BUILD_DIR/libs ]; then -# rm -rf $BUILD_DIR/libs -#fi +# Non-standard build, for both libs. # -# Not in the MingW target -# -if [ $TGT_ARCH = arm-wince-mingw32ce ]; then - exit 0 +if [ $TGT_ARCH = arm-wince-cegcc ]; then + cd $TOP_SRCDIR/src/cegcc/cegccthrd || exit 1 + make clean TARGET=$TGT_ARCH || exit 1 + make all PREFIX=$PREFIX TARGET=$TGT_ARCH || exit 1 fi # -# Non-standard build -# -cd $TOP_SRCDIR/src/cegcc/cegccthrd || exit 1 -make clean TARGET=$TGT_ARCH || exit 1 -make all PREFIX=$PREFIX TARGET=$TGT_ARCH || exit 1 -# cd $TOP_SRCDIR/src/cegcc/libstdc++ || exit 1 make clean TARGET=$TGT_ARCH || exit 1 -make all PREFIX=$PREFIX TARGET=$TGT_ARCH || exit 1 +if [ $TGT_ARCH = arm-wince-mingw32ce ]; then + TSL="-lcoredll" +else + TSL="-lcegcc -lcoredll" +fi +make all PREFIX=$PREFIX TARGET=$TGT_ARCH THE_SYSTEM_LIBS=${TSL} || exit 1 # # End # Modified: trunk/cegcc/src/cegcc/libstdc++/Makefile =================================================================== --- trunk/cegcc/src/cegcc/libstdc++/Makefile 2006-10-29 06:13:13 UTC (rev 752) +++ trunk/cegcc/src/cegcc/libstdc++/Makefile 2006-10-29 18:13:51 UTC (rev 753) @@ -16,6 +16,8 @@ STRIP=$(TARGET)-strip WINDRES=$(TARGET)-windres +THE_SYSTEM_LIBS?="-lcegcc -lcoredll" + LIB_PATH=$(PREFIX)/$(TARGET)/lib LDFLAGS += -Wl,-Map,${MY_DIR}/$(DLLNAME).map @@ -44,8 +46,8 @@ done extract: - cd ${MY_DIR}/_tmp; $(AR) -x $(PREFIX)/lib/libsupc++.a - cd ${MY_DIR}/_tmp; $(AR) -x $(PREFIX)/lib/libstdc++.a + cd ${MY_DIR}/_tmp; $(AR) -x $(PREFIX)/$(TARGET)/lib/libsupc++.a + cd ${MY_DIR}/_tmp; $(AR) -x $(PREFIX)/$(TARGET)/lib/libstdc++.a ${MY_DIR}/stripped/$(DLLNAME): @mkdir -p ${MY_DIR}/stripped @@ -54,6 +56,19 @@ $(STRIP) ${MY_DIR}/$(DLLNAME)-stripped.dll @mv -vf ${MY_DIR}/$(DLLNAME)-stripped.dll ${MY_DIR}/stripped/$(DLLNAME) +# ${MY_DIR}/$(DLLNAME).a \ +# ${MY_DIR}/$(DLLNAME).def \ +# ${MY_DIR}/$(DLLNAME): +# $(CC) $(LDFLAGS) -shared \ +# -Wl,--enable-auto-import \ +# -Wl,--enable-runtime-pseudo-reloc \ +# -Wl,--export-all-symbols \ +# -o ${MY_DIR}/$(DLLNAME) \ +# -Wl,--out-implib,${MY_DIR}/$(DLLNAME).a \ +# -Wl,--output-def,${MY_DIR}/$(DLLNAME).def \ +# -Wl,--whole-archive ${MY_DIR}/_tmp/*.o \ +# -Wl,-no-whole-archive -lcegcc -lcoredll + ${MY_DIR}/$(DLLNAME).a \ ${MY_DIR}/$(DLLNAME).def \ ${MY_DIR}/$(DLLNAME): @@ -65,7 +80,7 @@ -Wl,--out-implib,${MY_DIR}/$(DLLNAME).a \ -Wl,--output-def,${MY_DIR}/$(DLLNAME).def \ -Wl,--whole-archive ${MY_DIR}/_tmp/*.o \ - -Wl,-no-whole-archive -lcegcc -lcoredll + -Wl,-no-whole-archive ${THE_SYSTEM_LIBS} installdll: ${MY_DIR}/stripped/$(DLLNAME) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2006-10-29 06:13:20
|
Revision: 752 http://svn.sourceforge.net/cegcc/?rev=752&view=rev Author: dannybackx Date: 2006-10-28 23:13:13 -0700 (Sat, 28 Oct 2006) Log Message: ----------- Define WS_EX_NODRAG (required to compile the examples in the Boling book). Use a value that many pages show when you look for this word on Yahoo!. Modified Paths: -------------- trunk/cegcc/src/w32api/ChangeLog.ce trunk/cegcc/src/w32api/include/winuser.h Modified: trunk/cegcc/src/w32api/ChangeLog.ce =================================================================== --- trunk/cegcc/src/w32api/ChangeLog.ce 2006-10-27 22:18:16 UTC (rev 751) +++ trunk/cegcc/src/w32api/ChangeLog.ce 2006-10-29 06:13:13 UTC (rev 752) @@ -1,3 +1,7 @@ +2006-10-29 Danny Backx <dan...@us...> + + * include/winuser.h (WS_EX_NODRAG) : Define. + 2006-10-16 Pedro Alves <ped...@po...> * include/kfuncs.h (EventModify) : Declare. Modified: trunk/cegcc/src/w32api/include/winuser.h =================================================================== --- trunk/cegcc/src/w32api/include/winuser.h 2006-10-27 22:18:16 UTC (rev 751) +++ trunk/cegcc/src/w32api/include/winuser.h 2006-10-29 06:13:13 UTC (rev 752) @@ -373,6 +373,9 @@ #define WS_EX_TOPMOST 8 #define WS_EX_TRANSPARENT 32 #define WS_EX_WINDOWEDGE 256 +#if (_WIN32_WCE >= 0x0400) +#define WS_EX_NODRAG 0x40000000L +#endif #define WINSTA_ALL_ACCESS 895 #define WINSTA_ACCESSCLIPBOARD 4 #define WINSTA_ACCESSGLOBALATOMS 32 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-27 22:18:35
|
Revision: 751 http://svn.sourceforge.net/cegcc/?rev=751&view=rev Author: pedroalves Date: 2006-10-27 15:18:16 -0700 (Fri, 27 Oct 2006) Log Message: ----------- * build-mingw32ce.sh : Remove duplicated build_all function. (copy_headers) : Add error handlers. * build-cegcc.sh (copy_w32api_headers) : Add missing ${BASE_DIRECTORY}. Add error handler. Modified Paths: -------------- trunk/cegcc/src/ChangeLog trunk/cegcc/src/build-cegcc.sh trunk/cegcc/src/build-mingw32ce.sh Modified: trunk/cegcc/src/ChangeLog =================================================================== --- trunk/cegcc/src/ChangeLog 2006-10-22 18:38:54 UTC (rev 750) +++ trunk/cegcc/src/ChangeLog 2006-10-27 22:18:16 UTC (rev 751) @@ -1,3 +1,10 @@ +2006-10-27 Pedro Alves <ped...@po...> + + * build-mingw32ce.sh : Remove duplicated build_all function. + (copy_headers) : Add error handlers. + * build-cegcc.sh (copy_w32api_headers) : Add missing ${BASE_DIRECTORY}. + Add error handler. + 2006-10-12 Pedro Alves <ped...@po...> * build-mingw32ce.sh : Make ${BUILD_DIR} absolute in default case. Modified: trunk/cegcc/src/build-cegcc.sh =================================================================== --- trunk/cegcc/src/build-cegcc.sh 2006-10-22 18:38:54 UTC (rev 750) +++ trunk/cegcc/src/build-cegcc.sh 2006-10-27 22:18:16 UTC (rev 751) @@ -21,14 +21,14 @@ fi export TARGET="arm-wince-cegcc" +export PATH=${PREFIX}/bin:${PATH} +#export CFLAGS="-g3 -O0" echo "Building cegcc:" echo "source: ${BASE_DIRECTORY}" echo "build: ${BUILD_DIR}" echo "prefix: ${PREFIX}" -export PATH=${PREFIX}/bin:${PATH} - mkdir -p ${BUILD_DIR} || exit 1 mkdir -p ${PREFIX} || exit 1 @@ -76,7 +76,7 @@ echo "" mkdir -p ${PREFIX}/${TARGET}/include/w32api - cp -rf w32api/include/*.h ${PREFIX}/${TARGET}/include/w32api + cp -rf ${BASE_DIRECTORY}/w32api/include/*.h ${PREFIX}/${TARGET}/include/w32api || exit 1 } function build_dummy_cegccdll() Modified: trunk/cegcc/src/build-mingw32ce.sh =================================================================== --- trunk/cegcc/src/build-mingw32ce.sh 2006-10-22 18:38:54 UTC (rev 750) +++ trunk/cegcc/src/build-mingw32ce.sh 2006-10-27 22:18:16 UTC (rev 751) @@ -25,31 +25,17 @@ export TARGET="arm-wince-mingw32ce" export BUILD=`sh ${BASE_DIRECTORY}/gcc/config.guess` +export PATH=${PREFIX}/bin:${PATH} +#export CFLAGS="-g3 -O0" echo "Building mingw32ce:" echo "source: ${BASE_DIRECTORY}" echo "build: ${BUILD_DIR}" echo "prefix: ${PREFIX}" -export PATH=${PREFIX}/bin:${PATH} - mkdir -p ${BUILD_DIR} || exit 1 mkdir -p ${PREFIX} || exit 1 -function build_all -{ - build_binutils - build_import_libs - build_mingw_fake_runtime - copy_headers - build_bootstrap_gcc - build_mingw_runtime - build_gcc -# build_gdb -# build_gdbstub -} - - function build_binutils() { echo "" @@ -98,8 +84,8 @@ echo "" mkdir -p ${PREFIX}/${TARGET}/include/ - cp -rfp ${BASE_DIRECTORY}/mingw/include/*.h ${PREFIX}/${TARGET}/include/ - cp -rfp ${BASE_DIRECTORY}/w32api/include/*.h ${PREFIX}/${TARGET}/include/ + cp -rfp ${BASE_DIRECTORY}/mingw/include/*.h ${PREFIX}/${TARGET}/include/ || exit 1 + cp -rfp ${BASE_DIRECTORY}/w32api/include/*.h ${PREFIX}/${TARGET}/include/ || exit 1 } function build_bootstrap_gcc() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-22 18:00:08
|
Revision: 749 http://svn.sourceforge.net/cegcc/?rev=749&view=rev Author: pedroalves Date: 2006-10-22 10:59:25 -0700 (Sun, 22 Oct 2006) Log Message: ----------- * configure.in [AC_CONFIG_SUBDIRS]: Add mingwex. * configure : Regenerate. * mingwex/Makefile.in (VPATH): Add wince subdir. (WINCE_DISTFILES): New. (WINCE_OBJS): New. (LIB_OBJS): Special case for wince. Build WINCE_OBJS. (dist): Install WINCE_DISTFILES. * mingwex/wince: New subdir. * mingwex/wince/time.c: New file. * mingwex/wince/freopen.c: New file. * mingwex/wince/unlink.c: New file. * mingwex/wince/tempnam.c: New file. * mingwex/wince/wcsftime.c: New file. * mingwex/wince/gmtime.c: New file. * mingwex/wince/asctime.c: New file. * mingwex/wince/mktime.c: New file. * mingwex/wince/localtime.c: New file. * mingwex/wince/strftime.c: New file. * include/time.h (time, mktime, asctime, ctime, gmtime, localtime, strftime, wcsftime): Expose on __COREDLL__. * include/stdio.h (freopen, _tempnam, tempnam, _wtempnam): Likewise. * include/io.h: Expose the header. Needed for unlink. (_unlink, unlink): Expose functions on __COREDLL__. Modified Paths: -------------- trunk/cegcc/src/mingw/ChangeLog.mingw32ce trunk/cegcc/src/mingw/configure trunk/cegcc/src/mingw/configure.in trunk/cegcc/src/mingw/include/io.h trunk/cegcc/src/mingw/include/stdio.h trunk/cegcc/src/mingw/include/time.h trunk/cegcc/src/mingw/mingwex/Makefile.in trunk/cegcc/src/mingw/moldname.def.in Added Paths: ----------- trunk/cegcc/src/mingw/mingwex/wince/ trunk/cegcc/src/mingw/mingwex/wince/asctime.c trunk/cegcc/src/mingw/mingwex/wince/freopen.c trunk/cegcc/src/mingw/mingwex/wince/gmtime.c trunk/cegcc/src/mingw/mingwex/wince/localtime.c trunk/cegcc/src/mingw/mingwex/wince/mktime.c trunk/cegcc/src/mingw/mingwex/wince/strftime.c trunk/cegcc/src/mingw/mingwex/wince/tempnam.c trunk/cegcc/src/mingw/mingwex/wince/time.c trunk/cegcc/src/mingw/mingwex/wince/unlink.c trunk/cegcc/src/mingw/mingwex/wince/wcsftime.c Modified: trunk/cegcc/src/mingw/ChangeLog.mingw32ce =================================================================== --- trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-22 17:46:45 UTC (rev 748) +++ trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-22 17:59:25 UTC (rev 749) @@ -1,5 +1,32 @@ 2006-10-22 Pedro Alves <ped...@po...> + * configure.in [AC_CONFIG_SUBDIRS]: Add mingwex. + * configure : Regenerate. + * mingwex/Makefile.in (VPATH): Add wince subdir. + (WINCE_DISTFILES): New. + (WINCE_OBJS): New. + (LIB_OBJS): Special case for wince. Build WINCE_OBJS. + (dist): Install WINCE_DISTFILES. + * mingwex/wince: New subdir. + * mingwex/wince/time.c: New file. + * mingwex/wince/freopen.c: New file. + * mingwex/wince/unlink.c: New file. + * mingwex/wince/tempnam.c: New file. + * mingwex/wince/wcsftime.c: New file. + * mingwex/wince/gmtime.c: New file. + * mingwex/wince/asctime.c: New file. + * mingwex/wince/mktime.c: New file. + * mingwex/wince/localtime.c: New file. + * mingwex/wince/strftime.c: New file. + * include/time.h (time, mktime, asctime, + ctime, gmtime, localtime, strftime, wcsftime): Expose on __COREDLL__. + * include/stdio.h (freopen, _tempnam, + tempnam, _wtempnam): Likewise. + * include/io.h: Expose the header. Needed for unlink. + (_unlink, unlink): Expose functions on __COREDLL__. + +2006-10-22 Pedro Alves <ped...@po...> + * test_headers.c: Adapt to __COREDLL__. 2006-10-22 Pedro Alves <ped...@po...> Modified: trunk/cegcc/src/mingw/configure =================================================================== --- trunk/cegcc/src/mingw/configure 2006-10-22 17:46:45 UTC (rev 748) +++ trunk/cegcc/src/mingw/configure 2006-10-22 17:59:25 UTC (rev 749) @@ -272,7 +272,7 @@ PACKAGE_BUGREPORT= ac_unique_file="dllmain.c" -ac_subdirs_all="$ac_subdirs_all profile" +ac_subdirs_all="$ac_subdirs_all profile mingwex" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT all_dlls_host install_dlls_host AR ac_ct_AR AS ac_ct_AS RANLIB ac_ct_RANLIB LD ac_ct_LD DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP WINDRES ac_ct_WINDRES ALLOCA CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os subdirs MKINSTALLDIRS MNO_CYGWIN THREAD_DLL LIBM_A LIBGMON_A HEADER_SUBDIR W32API_INCLUDE DLL_ENTRY MINGWEX_DIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LIBOBJS LTLIBOBJS' ac_subst_files='' @@ -906,7 +906,7 @@ else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd $ac_popdir + cd "$ac_popdir" done fi @@ -1903,8 +1903,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -1962,8 +1961,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2079,8 +2077,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2134,8 +2131,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2180,8 +2176,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2225,8 +2220,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3128,8 +3122,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3210,8 +3203,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3352,8 +3344,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3573,10 +3564,9 @@ -subdirs="$subdirs profile" +subdirs="$subdirs profile mingwex" - case "$target_os" in *cygwin*) MNO_CYGWIN=-mno-cygwin @@ -4543,11 +4533,6 @@ *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ @@ -4586,6 +4571,12 @@ fi;; esac done` || { (exit 1); exit 1; } + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub @@ -4818,7 +4809,7 @@ { (exit 1); exit 1; }; } fi - cd $ac_popdir + cd "$ac_popdir" done fi Modified: trunk/cegcc/src/mingw/configure.in =================================================================== --- trunk/cegcc/src/mingw/configure.in 2006-10-22 17:46:45 UTC (rev 748) +++ trunk/cegcc/src/mingw/configure.in 2006-10-22 17:59:25 UTC (rev 749) @@ -54,18 +54,8 @@ W32API_INCLUDE='-I $(srcdir)/../w32api/include' -AC_CONFIG_SUBDIRS(profile) +AC_CONFIG_SUBDIRS(profile mingwex) -dnl case "$target_os" in -dnl *cegcc* | *mingw32ce*) -dnl #subdirs not ported yet. -dnl AC_CONFIG_SUBDIRS(profile) -dnl ;; -dnl *) -dnl AC_CONFIG_SUBDIRS(profile mingwex) -dnl ;; -dnl esac - case "$target_os" in *cygwin*) MNO_CYGWIN=-mno-cygwin Modified: trunk/cegcc/src/mingw/include/io.h =================================================================== --- trunk/cegcc/src/mingw/include/io.h 2006-10-22 17:46:45 UTC (rev 748) +++ trunk/cegcc/src/mingw/include/io.h 2006-10-22 17:59:25 UTC (rev 749) @@ -8,15 +8,9 @@ * */ -#ifdef __COREDLL__ -# include_next <io.h> -#else /* __COREDLL__ */ - #ifndef _IO_H_ #define _IO_H_ -#ifndef __COREDLL__ - /* All the headers include this file. */ #include <_mingw.h> @@ -27,6 +21,8 @@ #include <sys/types.h> /* To get time_t. */ #include <stdint.h> /* For intptr_t. */ +#ifndef __COREDLL__ + /* * Attributes of files as returned by _findfirst et al. */ @@ -38,7 +34,6 @@ #define _A_SUBDIR 0x00000010 #define _A_ARCH 0x00000020 - #ifndef RC_INVOKED #ifndef _FSIZE_T_DEFINED @@ -118,6 +113,8 @@ #define _WFINDDATA_T_DEFINED #endif +#endif /* __COREDLL__ */ + #ifdef __cplusplus extern "C" { #endif @@ -129,6 +126,9 @@ * and 0 if a match was found. Call _findclose when you are finished. */ /* FIXME: Should these all use intptr_t, as per recent MSDN docs? */ + +#ifndef __COREDLL__ + _CRTIMP long __cdecl _findfirst (const char*, struct _finddata_t*); _CRTIMP int __cdecl _findnext (long, struct _finddata_t*); _CRTIMP int __cdecl _findclose (long); @@ -140,6 +140,8 @@ _CRTIMP int __cdecl _rmdir (const char*); _CRTIMP int __cdecl _chmod (const char*, int); +#endif /* __COREDLL__ */ + #ifdef __MSVCRT__ _CRTIMP __int64 __cdecl _filelengthi64(int); _CRTIMP long __cdecl _findfirsti64(const char*, struct _finddatai64_t*); @@ -163,14 +165,14 @@ #ifndef _NO_OLDNAMES -#ifndef _UWIN +#if !defined (_UWIN) && !defined (__COREDLL__) _CRTIMP int __cdecl chdir (const char*); _CRTIMP char* __cdecl getcwd (char*, int); _CRTIMP int __cdecl mkdir (const char*); _CRTIMP char* __cdecl mktemp (char*); _CRTIMP int __cdecl rmdir (const char*); _CRTIMP int __cdecl chmod (const char*, int); -#endif /* _UWIN */ +#endif /* _UWIN && __COREDLL__ */ #endif /* Not _NO_OLDNAMES */ @@ -197,6 +199,8 @@ extern "C" { #endif +#ifndef __COREDLL__ + _CRTIMP int __cdecl _access (const char*, int); _CRTIMP int __cdecl _chsize (int, long); _CRTIMP int __cdecl _close (int); @@ -241,8 +245,11 @@ _CRTIMP long __cdecl _tell (int); /* Should umask be in sys/stat.h and/or sys/types.h instead? */ _CRTIMP int __cdecl _umask (int); +#endif /* __COREDLL__ */ _CRTIMP int __cdecl _unlink (const char*); +#ifndef __COREDLL__ _CRTIMP int __cdecl _write (int, const void*, unsigned int); +#endif /* __COREDLL__ */ /* Wide character versions. Also declared in wchar.h. */ /* Not in crtdll.dll */ @@ -274,6 +281,7 @@ */ #ifndef _UWIN +#ifndef __COREDLL__ _CRTIMP int __cdecl access (const char*, int); _CRTIMP int __cdecl chsize (int, long ); _CRTIMP int __cdecl close (int); @@ -290,8 +298,11 @@ _CRTIMP int __cdecl sopen (const char*, int, int, ...); _CRTIMP long __cdecl tell (int); _CRTIMP int __cdecl umask (int); +#endif /* __COREDLL__ */ _CRTIMP int __cdecl unlink (const char*); +#ifndef __COREDLL__ _CRTIMP int __cdecl write (int, const void*, unsigned int); +#endif /* __COREDLL__ */ #endif /* _UWIN */ /* Wide character versions. Also declared in wchar.h. */ @@ -317,8 +328,4 @@ #endif /* Not RC_INVOKED */ -#endif /* __COREDLL__ */ - #endif /* _IO_H_ not defined */ - -#endif /* Not __COREDLL__ */ Modified: trunk/cegcc/src/mingw/include/stdio.h =================================================================== --- trunk/cegcc/src/mingw/include/stdio.h 2006-10-22 17:46:45 UTC (rev 748) +++ trunk/cegcc/src/mingw/include/stdio.h 2006-10-22 17:59:25 UTC (rev 749) @@ -196,9 +196,7 @@ * File Operations */ _CRTIMP FILE* __cdecl fopen (const char*, const char*); -#ifndef __COREDLL__ _CRTIMP FILE* __cdecl freopen (const char*, const char*, FILE*); -#endif _CRTIMP int __cdecl fflush (FILE*); _CRTIMP int __cdecl fclose (FILE*); @@ -208,17 +206,19 @@ _CRTIMP int __cdecl rename (const char*, const char*); _CRTIMP FILE* __cdecl tmpfile (void); _CRTIMP char* __cdecl tmpnam (char*); - +#endif /* __COREDLL__ */ #ifndef __STRICT_ANSI__ _CRTIMP char* __cdecl _tempnam (const char*, const char*); +#ifndef __COREDLL__ _CRTIMP int __cdecl _rmtmp(void); - +#endif /* __COREDLL__ */ #ifndef NO_OLDNAMES _CRTIMP char* __cdecl tempnam (const char*, const char*); -_CRTIMP int __cdecl rmtmp(void); -#endif +#ifndef __COREDLL__ +CRTIMP int __cdecl rmtmp(void); +#endif /* __COREDLL__ */ +#endif /* NO_OLDNAMES */ #endif /* __STRICT_ANSI__ */ -#endif /* Not __COREDLL__ */ _CRTIMP int __cdecl setvbuf (FILE*, char*, int, size_t); @@ -522,6 +522,7 @@ #endif /* __MSVCRT__ */ #ifdef __COREDLL__ +_CRTIMP wchar_t* __cdecl _wtempnam (const wchar_t*, const wchar_t*); __CRT_INLINE wint_t __cdecl getwc(FILE* f) { return fgetwc(f); } __CRT_INLINE wint_t __cdecl putwc(wint_t c, FILE* f) { return fputwc(c, f); } #endif Modified: trunk/cegcc/src/mingw/include/time.h =================================================================== --- trunk/cegcc/src/mingw/include/time.h 2006-10-22 17:46:45 UTC (rev 748) +++ trunk/cegcc/src/mingw/include/time.h 2006-10-22 17:59:25 UTC (rev 749) @@ -83,9 +83,9 @@ #ifndef __COREDLL__ _CRTIMP clock_t __cdecl clock (void); +#endif _CRTIMP time_t __cdecl time (time_t*); _CRTIMP time_t __cdecl mktime (struct tm*); -#endif _CRTIMP double __cdecl difftime (time_t, time_t); /* @@ -98,14 +98,12 @@ * Fault and crap out your program. Guess how I know. Hint: stat called on * a directory gives 'invalid' times in st_atime etc... */ -#ifndef __COREDLL__ _CRTIMP char* __cdecl asctime (const struct tm*); _CRTIMP char* __cdecl ctime (const time_t*); _CRTIMP struct tm* __cdecl gmtime (const time_t*); _CRTIMP struct tm* __cdecl localtime (const time_t*); _CRTIMP size_t __cdecl strftime (char*, size_t, const char*, const struct tm*); -#endif #ifndef __STRICT_ANSI__ @@ -210,9 +208,7 @@ #endif #endif /* __MSVCRT__ */ #endif /* __STRICT_ANSI__ */ -#ifndef __COREDLL__ _CRTIMP size_t __cdecl wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); -#endif #define _WTIME_DEFINED #endif /* _WTIME_DEFINED */ Modified: trunk/cegcc/src/mingw/mingwex/Makefile.in =================================================================== --- trunk/cegcc/src/mingw/mingwex/Makefile.in 2006-10-22 17:46:45 UTC (rev 748) +++ trunk/cegcc/src/mingw/mingwex/Makefile.in 2006-10-22 17:59:25 UTC (rev 749) @@ -4,7 +4,7 @@ # This makefile requires GNU make. srcdir = @srcdir@ -VPATH = $(srcdir):$(srcdir)/math:$(srcdir)/stdio:$(srcdir)/complex +VPATH = $(srcdir):$(srcdir)/math:$(srcdir)/stdio:$(srcdir)/complex:$(srcdir)/wince objdir = . target_alias = @target_alias@ @@ -83,6 +83,10 @@ 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 +WINCE_DISTFILES = \ + asctime.c freopen.c gmtime.c localtime.c mktime.c strftime.c time.c \ + tempnam.c unlink.c wcsftime.c + CC = @CC@ # FIXME: Which is it, CC or CC_FOR_TARGET? CC_FOR_TARGET = $(CC) @@ -179,10 +183,17 @@ 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 +WINCE_OBJS = \ + asctime.o freopen.o gmtime.o localtime.o mktime.o strftime.o time.o \ + tempnam.o unlink.o wcsftime.o +ifneq (,$(findstring wince,$(target_alias))) +LIB_OBJS = $(WINCE_OBJS) +else LIB_OBJS = $(Q8_OBJS) $(CTYPE_OBJS) $(STDLIB_OBJS) $(STDLIB_STUB_OBJS) \ $(STDIO_OBJS) $(MATH_OBJS) $(FENV_OBJS) \ $(POSIX_OBJS) $(REPLACE_OBJS) $(COMPLEX_OBJS) +endif LIBS = $(LIBMINGWEX_A) DLLS = @@ -261,4 +272,9 @@ @for i in $(COMPLEX_DISTFILES); do\ cp -p $(srcdir)/complex/$$i $(distdir)/mingwex/complex/$$i ; \ done + mkdir $(distdir)/mingwex/wince + chmod 755 $(distdir)/mingwex/wince + @for i in $(WINCE_DISTFILES); do\ + cp -p $(srcdir)/complex/$$i $(distdir)/mingwex/wince/$$i ; \ + done Added: trunk/cegcc/src/mingw/mingwex/wince/asctime.c =================================================================== --- trunk/cegcc/src/mingw/mingwex/wince/asctime.c (rev 0) +++ trunk/cegcc/src/mingw/mingwex/wince/asctime.c 2006-10-22 17:59:25 UTC (rev 749) @@ -0,0 +1,22 @@ +#include <windows.h> +#include <stdio.h> +#include <time.h> + +static const char const wday_name[7][3] = + { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; + +static const char const mon_name[12][3] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" +}; + +char * +asctime (const struct tm *timeptr) +{ + static char result[26]; + sprintf (result, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n", + wday_name[timeptr->tm_wday], mon_name[timeptr->tm_mon], + timeptr->tm_mday, timeptr->tm_hour, timeptr->tm_min, + timeptr->tm_sec, 1900 + timeptr->tm_year); + return result; +} Property changes on: trunk/cegcc/src/mingw/mingwex/wince/asctime.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingw/mingwex/wince/freopen.c =================================================================== --- trunk/cegcc/src/mingw/mingwex/wince/freopen.c (rev 0) +++ trunk/cegcc/src/mingw/mingwex/wince/freopen.c 2006-10-22 17:59:25 UTC (rev 749) @@ -0,0 +1,24 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#define MAX_MODE 64 + +FILE * +freopen (const char *__restrict__ filename, + const char *__restrict__ mode, FILE * __restrict__ stream) +{ + size_t sizef = strlen (filename) + 1; + size_t sizem = strlen (mode) + 1; + + wchar_t wfilename[MAX_PATH]; + wchar_t wmode[MAX_MODE]; + + if (sizem > MAX_MODE || sizef > MAX_PATH) + return NULL; + + mbstowcs (wfilename, filename, sizef); + mbstowcs (wmode, mode, sizem); + + return _wfreopen (wfilename, wmode, stream); +} Property changes on: trunk/cegcc/src/mingw/mingwex/wince/freopen.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingw/mingwex/wince/gmtime.c =================================================================== --- trunk/cegcc/src/mingw/mingwex/wince/gmtime.c (rev 0) +++ trunk/cegcc/src/mingw/mingwex/wince/gmtime.c 2006-10-22 17:59:25 UTC (rev 749) @@ -0,0 +1,78 @@ +#include <windows.h> +#include <stdio.h> +#include <time.h> + +static struct tm mytm; + +static const int DMonth[13] = + { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; + +static const int monthCodes[12] = { 6, 2, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4 }; + +static int +calc_day_of_week (const struct tm *nTM) +{ + int day; + + day = (nTM->tm_year % 100); + day += day / 4; + day += monthCodes[nTM->tm_mon]; + day += nTM->tm_mday; + while (day >= 7) + day -= 7; + + return day; +} + +struct tm * +gmtime (const time_t * timer) +{ + unsigned long x = *timer; + int imin, ihrs, iday, iyrs; + int sec, min, hrs, day, mon, yrs; + int lday, qday, jday, mday; + + imin = x / 60; // whole minutes since 1/1/70 + sec = x - (60 * imin); // leftover seconds + ihrs = imin / 60; // whole hours since 1/1/70 + min = imin - 60 * ihrs; // leftover minutes + iday = ihrs / 24; // whole days since 1/1/70 + hrs = ihrs - 24 * iday; // leftover hours + iday = iday + 365 + 366; // whole days since 1/1/68 + lday = iday / ((4 * 365) + 1); // quadyr = 4 yr period = 1461 days + qday = iday % ((4 * 365) + 1); // days since current quadyr began + if (qday >= (31 + 29)) // if past feb 29 then + lday = lday + 1; // add this quadyr\x92s leap day to the + // # of quadyrs (leap days) since 68 + iyrs = (iday - lday) / 365; // whole years since 1968 + jday = iday - (iyrs * 365) - lday; // days since 1 /1 of current year. + if (qday <= 365 && qday >= 60) // if past 2/29 and a leap year then + jday = jday + 1; // add a leap day to the # of whole + // days since 1/1 of current year + yrs = iyrs + 1968; // compute year + mon = 13; // estimate month ( +1) + mday = 366; // max days since 1/1 is 365 + while (jday < mday) // mday = # of days passed from 1/1 + { // until first day of current month + mon = mon - 1; // mon = month (estimated) + mday = DMonth[mon]; // # elapsed days at first of mon + if ((mon > 2) && (yrs % 4) == 0) // if past 2/29 and leap year then + mday = mday + 1; // add leap day + // compute month by decrementing + } // month until found + + day = jday - mday + 1; // compute day of month + + mytm.tm_sec = sec; + mytm.tm_min = min; + mytm.tm_hour = hrs; + mytm.tm_mday = day; + mytm.tm_mon = mon; + mytm.tm_year = yrs - 1900; + + mytm.tm_wday = calc_day_of_week (&mytm); + mytm.tm_yday = jday; + mytm.tm_isdst = 0; + + return &mytm; +} Property changes on: trunk/cegcc/src/mingw/mingwex/wince/gmtime.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingw/mingwex/wince/localtime.c =================================================================== --- trunk/cegcc/src/mingw/mingwex/wince/localtime.c (rev 0) +++ trunk/cegcc/src/mingw/mingwex/wince/localtime.c 2006-10-22 17:59:25 UTC (rev 749) @@ -0,0 +1,7 @@ +#include <time.h> + +struct tm * +localtime (const time_t * timer) +{ + return gmtime (timer); +} Property changes on: trunk/cegcc/src/mingw/mingwex/wince/localtime.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingw/mingwex/wince/mktime.c =================================================================== --- trunk/cegcc/src/mingw/mingwex/wince/mktime.c (rev 0) +++ trunk/cegcc/src/mingw/mingwex/wince/mktime.c 2006-10-22 17:59:25 UTC (rev 749) @@ -0,0 +1,38 @@ +#include <windows.h> +#include <stdio.h> +#include <time.h> + +static const int month_to_day[12] = + { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; + +time_t +mktime (struct tm *t) +{ + short month, year; + time_t result; + + month = t->tm_mon; + year = t->tm_year + month / 12 + 1900; + month %= 12; + if (month < 0) + { + year -= 1; + month += 12; + } + result = (year - 1970) * 365 + (year - 1969) / 4 + month_to_day[month]; + result = (year - 1970) * 365 + month_to_day[month]; + if (month <= 1) + year -= 1; + result += (year - 1968) / 4; + result -= (year - 1900) / 100; + result += (year - 1600) / 400; + result += t->tm_mday; + result -= 1; + result *= 24; + result += t->tm_hour; + result *= 60; + result += t->tm_min; + result *= 60; + result += t->tm_sec; + return (result); +} Property changes on: trunk/cegcc/src/mingw/mingwex/wince/mktime.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingw/mingwex/wince/strftime.c =================================================================== --- trunk/cegcc/src/mingw/mingwex/wince/strftime.c (rev 0) +++ trunk/cegcc/src/mingw/mingwex/wince/strftime.c 2006-10-22 17:59:25 UTC (rev 749) @@ -0,0 +1,457 @@ +#include <windows.h> +#include <stdio.h> +#include <time.h> + +/* strftime() - taken from OpenBSD. */ + +#define IN_NONE 0 +#define IN_SOME 1 +#define IN_THIS 2 +#define IN_ALL 3 +#define CHAR_BIT 8 + +#define TYPE_BIT(type) (sizeof (type) * CHAR_BIT) +#define TYPE_SIGNED(type) (((type) -1) < 0) + +#define INT_STRLEN_MAXIMUM(type) \ + ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 + TYPE_SIGNED(type)) + +#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) + +#define MONSPERYEAR 12 +#define DAYSPERWEEK 7 +#define TM_YEAR_BASE 1900 +#define HOURSPERDAY 24 +#define DAYSPERNYEAR 365 +#define DAYSPERLYEAR 366 + +static char wildabbr[] = "WILDABBR"; + +static char *tzname[2] = +{ + wildabbr, + wildabbr +}; + + +#define Locale (&C_time_locale) + +struct lc_time_T +{ + const char *mon[MONSPERYEAR]; + const char *month[MONSPERYEAR]; + const char *wday[DAYSPERWEEK]; + const char *weekday[DAYSPERWEEK]; + const char *X_fmt; + const char *x_fmt; + const char *c_fmt; + const char *am; + const char *pm; + const char *date_fmt; +}; + +static const struct lc_time_T C_time_locale = { + { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }, { + "January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December" + }, { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" + }, { + "Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday" + }, + + /* X_fmt */ + "%H:%M:%S", + + /* + ** x_fmt + ** C99 requires this format. + ** Using just numbers (as here) makes Quakers happier; + ** it's also compatible with SVR4. + */ + "%m/%d/%y", + + /* + ** c_fmt + ** C99 requires this format. + ** Previously this code used "%D %X", but we now conform to C99. + ** Note that + ** "%a %b %d %H:%M:%S %Y" + ** is used by Solaris 2.3. + */ + "%a %b %e %T %Y", + + /* am */ + "AM", + + /* pm */ + "PM", + + /* date_fmt */ + "%a %b %e %H:%M:%S %Z %Y" +}; + + +static char * +_add (const char *str, char *pt, const char *const ptlim) +{ + while (pt < ptlim && (*pt = *str++) != '\0') + ++pt; + return pt; +} + + +static char * +_conv (const int n, const char *const format, char *const pt, + const char *const ptlim) +{ + char buf[INT_STRLEN_MAXIMUM (int) + 1]; + + (void) _snprintf (buf, sizeof (buf), format, n); + return _add (buf, pt, ptlim); +} + + +static char * +_fmt (const char *format, const struct tm *const t, char *pt, + const char *const ptlim, int *warnp) +{ + for (; *format; ++format) + { + if (*format == '%') + { + label: + switch (*++format) + { + case '\0': + --format; + break; + case 'A': + pt = _add ((t->tm_wday < 0 || + t->tm_wday >= DAYSPERWEEK) ? + "?" : Locale->weekday[t->tm_wday], pt, ptlim); + continue; + case 'a': + pt = _add ((t->tm_wday < 0 || + t->tm_wday >= DAYSPERWEEK) ? + "?" : Locale->wday[t->tm_wday], pt, ptlim); + continue; + case 'B': + pt = _add ((t->tm_mon < 0 || + t->tm_mon >= MONSPERYEAR) ? + "?" : Locale->month[t->tm_mon], pt, ptlim); + continue; + case 'b': + case 'h': + pt = _add ((t->tm_mon < 0 || + t->tm_mon >= MONSPERYEAR) ? + "?" : Locale->mon[t->tm_mon], pt, ptlim); + continue; + case 'C': + /* + ** %C used to do a... + ** _fmt("%a %b %e %X %Y", t); + ** ...whereas now POSIX 1003.2 calls for + ** something completely different. + ** (ado, 1993-05-24) + */ + pt = _conv ((t->tm_year + TM_YEAR_BASE) / 100, + "%02d", pt, ptlim); + continue; + case 'c': + { + int warn2 = IN_SOME; + + pt = _fmt (Locale->c_fmt, t, pt, ptlim, warnp); + if (warn2 == IN_ALL) + warn2 = IN_THIS; + if (warn2 > *warnp) + *warnp = warn2; + } + continue; + case 'D': + pt = _fmt ("%m/%d/%y", t, pt, ptlim, warnp); + continue; + case 'd': + pt = _conv (t->tm_mday, "%02d", pt, ptlim); + continue; + case 'E': + case 'O': + /* + ** C99 locale modifiers. + ** The sequences + ** %Ec %EC %Ex %EX %Ey %EY + ** %Od %oe %OH %OI %Om %OM + ** %OS %Ou %OU %OV %Ow %OW %Oy + ** are supposed to provide alternate + ** representations. + */ + goto label; + case 'e': + pt = _conv (t->tm_mday, "%2d", pt, ptlim); + continue; + case 'F': + pt = _fmt ("%Y-%m-%d", t, pt, ptlim, warnp); + continue; + case 'H': + pt = _conv (t->tm_hour, "%02d", pt, ptlim); + continue; + case 'I': + pt = _conv ((t->tm_hour % 12) ? + (t->tm_hour % 12) : 12, "%02d", pt, ptlim); + continue; + case 'j': + pt = _conv (t->tm_yday + 1, "%03d", pt, ptlim); + continue; + case 'k': + /* + ** This used to be... + ** _conv(t->tm_hour % 12 ? + ** t->tm_hour % 12 : 12, 2, ' '); + ** ...and has been changed to the below to + ** match SunOS 4.1.1 and Arnold Robbins' + ** strftime version 3.0. That is, "%k" and + ** "%l" have been swapped. + ** (ado, 1993-05-24) + */ + pt = _conv (t->tm_hour, "%2d", pt, ptlim); + continue; +#ifdef KITCHEN_SINK + case 'K': + /* + ** After all this time, still unclaimed! + */ + pt = _add ("kitchen sink", pt, ptlim); + continue; +#endif /* defined KITCHEN_SINK */ + case 'l': + /* + ** This used to be... + ** _conv(t->tm_hour, 2, ' '); + ** ...and has been changed to the below to + ** match SunOS 4.1.1 and Arnold Robbin's + ** strftime version 3.0. That is, "%k" and + ** "%l" have been swapped. + ** (ado, 1993-05-24) + */ + pt = _conv ((t->tm_hour % 12) ? + (t->tm_hour % 12) : 12, "%2d", pt, ptlim); + continue; + case 'M': + pt = _conv (t->tm_min, "%02d", pt, ptlim); + continue; + case 'm': + pt = _conv (t->tm_mon + 1, "%02d", pt, ptlim); + continue; + case 'n': + pt = _add ("\n", pt, ptlim); + continue; + case 'p': + pt = _add ((t->tm_hour >= (HOURSPERDAY / 2)) ? + Locale->pm : Locale->am, pt, ptlim); + continue; + case 'R': + pt = _fmt ("%H:%M", t, pt, ptlim, warnp); + continue; + case 'r': + pt = _fmt ("%I:%M:%S %p", t, pt, ptlim, warnp); + continue; + case 'S': + pt = _conv (t->tm_sec, "%02d", pt, ptlim); + continue; + case 's': + { + struct tm tm; + char buf[INT_STRLEN_MAXIMUM (time_t) + 1]; + time_t mkt; + + tm = *t; + mkt = mktime (&tm); + if (TYPE_SIGNED (time_t)) + (void) _snprintf (buf, sizeof buf, "%ld", (long) mkt); + else + (void) _snprintf (buf, sizeof buf, + "%lu", (unsigned long) mkt); + pt = _add (buf, pt, ptlim); + } + continue; + case 'T': + pt = _fmt ("%H:%M:%S", t, pt, ptlim, warnp); + continue; + case 't': + pt = _add ("\t", pt, ptlim); + continue; + case 'U': + pt = _conv ((t->tm_yday + DAYSPERWEEK - + t->tm_wday) / DAYSPERWEEK, "%02d", pt, ptlim); + continue; + case 'u': + /* + ** From Arnold Robbins' strftime version 3.0: + ** "ISO 8601: Weekday as a decimal number + ** [1 (Monday) - 7]" + ** (ado, 1993-05-24) + */ + pt = _conv ((t->tm_wday == 0) ? + DAYSPERWEEK : t->tm_wday, "%d", pt, ptlim); + continue; + case 'V': /* ISO 8601 week number */ + case 'G': /* ISO 8601 year (four digits) */ + case 'g': /* ISO 8601 year (two digits) */ + { + int year; + int yday; + int wday; + int w; + + year = t->tm_year + TM_YEAR_BASE; + yday = t->tm_yday; + wday = t->tm_wday; + for (;;) + { + int len; + int bot; + int top; + + len = isleap (year) ? DAYSPERLYEAR : DAYSPERNYEAR; + /* + ** What yday (-3 ... 3) does + ** the ISO year begin on? + */ + bot = ((yday + 11 - wday) % DAYSPERWEEK) - 3; + /* + ** What yday does the NEXT + ** ISO year begin on? + */ + top = bot - (len % DAYSPERWEEK); + if (top < -3) + top += DAYSPERWEEK; + top += len; + if (yday >= top) + { + ++year; + w = 1; + break; + } + if (yday >= bot) + { + w = 1 + ((yday - bot) / DAYSPERWEEK); + break; + } + --year; + yday += isleap (year) ? DAYSPERLYEAR : DAYSPERNYEAR; + } + if (*format == 'V') + pt = _conv (w, "%02d", pt, ptlim); + else if (*format == 'g') + { + *warnp = IN_ALL; + pt = _conv (year % 100, "%02d", pt, ptlim); + } + else + pt = _conv (year, "%04d", pt, ptlim); + } + continue; + case 'v': + pt = _fmt ("%e-%b-%Y", t, pt, ptlim, warnp); + continue; + case 'W': + pt = _conv ((t->tm_yday + DAYSPERWEEK - + (t->tm_wday ? + (t->tm_wday - 1) : + (DAYSPERWEEK - 1))) / DAYSPERWEEK, + "%02d", pt, ptlim); + continue; + case 'w': + pt = _conv (t->tm_wday, "%d", pt, ptlim); + continue; + case 'X': + pt = _fmt (Locale->X_fmt, t, pt, ptlim, warnp); + continue; + case 'x': + { + int warn2 = IN_SOME; + + pt = _fmt (Locale->x_fmt, t, pt, ptlim, &warn2); + if (warn2 == IN_ALL) + warn2 = IN_THIS; + if (warn2 > *warnp) + *warnp = warn2; + } + continue; + case 'y': + *warnp = IN_ALL; + pt = _conv ((t->tm_year + TM_YEAR_BASE) % 100, + "%02d", pt, ptlim); + continue; + case 'Y': + pt = _conv (t->tm_year + TM_YEAR_BASE, "%04d", pt, ptlim); + continue; + case 'Z': + if (t->tm_isdst >= 0) + pt = _add (tzname[t->tm_isdst != 0], pt, ptlim); + /* + ** C99 says that %Z must be replaced by the + ** empty string if the time zone is not + ** determinable. + */ + continue; + case 'z': + { + int diff; + char const *sign; + + if (t->tm_isdst < 0) + continue; + continue; + if (diff < 0) + { + sign = "-"; + diff = -diff; + } + else + sign = "+"; + pt = _add (sign, pt, ptlim); + diff /= 60; + pt = _conv ((diff / 60) * 100 + diff % 60, "%04d", pt, ptlim); + } + continue; + case '+': + pt = _fmt (Locale->date_fmt, t, pt, ptlim, warnp); + continue; + case '%': + default: + break; + } + } + if (pt == ptlim) + break; + *pt++ = *format; + } + return pt; +} + + +size_t +strftime (char *const s, const size_t maxsize, + const char *const format, const struct tm * const t) +{ + char *p; + int warn; + + warn = IN_NONE; + p = _fmt (((format == NULL) ? "%c" : format), t, s, s + maxsize, &warn); + + if (p == s + maxsize) + { + if (maxsize > 0) + s[maxsize - 1] = '\0'; + return 0; + } + *p = '\0'; + return p - s; +} Property changes on: trunk/cegcc/src/mingw/mingwex/wince/strftime.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingw/mingwex/wince/tempnam.c =================================================================== --- trunk/cegcc/src/mingw/mingwex/wince/tempnam.c (rev 0) +++ trunk/cegcc/src/mingw/mingwex/wince/tempnam.c 2006-10-22 17:59:25 UTC (rev 749) @@ -0,0 +1,54 @@ +#include <stdio.h> +#include <windows.h> + +typedef void *(*dupfun_t) (wchar_t *); + +static void * +tempnam_imp (const wchar_t * dir, const wchar_t * prefix, dupfun_t dupfun) +{ + wchar_t tmpbuf[MAX_PATH]; + wchar_t tmp_dir[MAX_PATH]; + + DWORD ret = GetTempPathW (MAX_PATH, tmp_dir); + if (ret > 0 && ret <= MAX_PATH) + { + dir = tmp_dir; + } + + if (!dir || !*dir || !(GetFileAttributes (dir) & FILE_ATTRIBUTE_DIRECTORY)) + { + dir = _wP_tmpdir; + } + + if (GetTempFileNameW (dir, prefix, 0, tmpbuf)) + { + DeleteFileW (tmpbuf); + return dupfun (tmpbuf); + } + return NULL; +} + +static void * +wcstombs_dup (wchar_t * str) +{ + size_t len = wcslen (str) + 1; + char *s = malloc (len); + wcstombs (s, str, len); + return s; +} + +wchar_t * +_wtempnam (const wchar_t * dir, const wchar_t * prefix) +{ + return tempnam_imp (dir, prefix, (dupfun_t) wcsdup); +} + +char * +_tempnam (const char *dir, const char *prefix) +{ + wchar_t wdir[MAX_PATH]; + wchar_t wprefix[MAX_PATH]; + mbstowcs (wdir, dir, MAX_PATH); + mbstowcs (wprefix, prefix, MAX_PATH); + return tempnam_imp (wdir, wprefix, wcstombs_dup); +} Property changes on: trunk/cegcc/src/mingw/mingwex/wince/tempnam.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingw/mingwex/wince/time.c =================================================================== --- trunk/cegcc/src/mingw/mingwex/wince/time.c (rev 0) +++ trunk/cegcc/src/mingw/mingwex/wince/time.c 2006-10-22 17:59:25 UTC (rev 749) @@ -0,0 +1,27 @@ +#include <time.h> +#include <windows.h> + +time_t +time (time_t * timer) +{ + SYSTEMTIME systime; + struct tm tmtime; + time_t tt; + + GetLocalTime (&systime); + + tmtime.tm_year = systime.wYear - 1900; + tmtime.tm_mon = systime.wMonth - 1; + tmtime.tm_mday = systime.wDay; + tmtime.tm_wday = systime.wDayOfWeek; + tmtime.tm_hour = systime.wHour; + tmtime.tm_min = systime.wMinute; + tmtime.tm_sec = systime.wSecond; + + tt = mktime (&tmtime); + + if (timer) + *timer = tt; + + return tt; +} Property changes on: trunk/cegcc/src/mingw/mingwex/wince/time.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingw/mingwex/wince/unlink.c =================================================================== --- trunk/cegcc/src/mingw/mingwex/wince/unlink.c (rev 0) +++ trunk/cegcc/src/mingw/mingwex/wince/unlink.c 2006-10-22 17:59:25 UTC (rev 749) @@ -0,0 +1,12 @@ +#include <stdio.h> +#include <windows.h> + +int +_unlink (const char *file) +{ + wchar_t wfile[MAX_PATH]; + size_t conv = mbstowcs (wfile, file, MAX_PATH); + if (conv > 0 && conv < MAX_PATH && DeleteFileW (wfile)) + return 0; + return -1; +} Property changes on: trunk/cegcc/src/mingw/mingwex/wince/unlink.c ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/cegcc/src/mingw/mingwex/wince/wcsftime.c =================================================================== --- trunk/cegcc/src/mingw/mingwex/wince/wcsftime.c (rev 0) +++ trunk/cegcc/src/mingw/mingwex/wince/wcsftime.c 2006-10-22 17:59:25 UTC (rev 749) @@ -0,0 +1,21 @@ +#include <string.h> +#include <stdlib.h> +#include <time.h> + +size_t +wcsftime (wchar_t *const ws, const size_t maxsize, + const wchar_t *const wformat, const struct tm * const t) +{ + size_t format_size = wcslen (wformat) + 1; + char *format = malloc (format_size); + char *s = malloc (maxsize); + size_t ret; + + wcstombs (format, wformat, format_size); + ret = strftime (s, maxsize, format, t); + if (ret >= 0) + ret = mbstowcs (ws, s, ret); + free (format); + free (s); + return ret; +} Property changes on: trunk/cegcc/src/mingw/mingwex/wince/wcsftime.c ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/cegcc/src/mingw/moldname.def.in =================================================================== --- trunk/cegcc/src/mingw/moldname.def.in 2006-10-22 17:46:45 UTC (rev 748) +++ trunk/cegcc/src/mingw/moldname.def.in 2006-10-22 17:59:25 UTC (rev 749) @@ -130,16 +130,20 @@ swab #ifndef __COREDLL__ tell +#endif /* __COREDLL__ */ tempnam #if (__MSVCRT__) timezone DATA #endif +#ifndef __COREDLL__ ; export tzname for both. See <time.h> tzname DATA tzset umask ungetch +#endif /* __COREDLL__ */ unlink +#ifndef __COREDLL__ utime #endif /* __COREDLL__ */ wcsdup This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-22 17:46:52
|
Revision: 748 http://svn.sourceforge.net/cegcc/?rev=748&view=rev Author: pedroalves Date: 2006-10-22 10:46:45 -0700 (Sun, 22 Oct 2006) Log Message: ----------- * test_headers.c: Adapt to __COREDLL__. Modified Paths: -------------- trunk/cegcc/src/mingw/ChangeLog.mingw32ce trunk/cegcc/src/mingw/test_headers.c Modified: trunk/cegcc/src/mingw/ChangeLog.mingw32ce =================================================================== --- trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-22 14:14:21 UTC (rev 747) +++ trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-22 17:46:45 UTC (rev 748) @@ -1,5 +1,9 @@ 2006-10-22 Pedro Alves <ped...@po...> + * test_headers.c: Adapt to __COREDLL__. + +2006-10-22 Pedro Alves <ped...@po...> + * include/stdio.h (puts) [__COREDLL__]: Add missing return. 2006-10-19 Pedro Alves <ped...@po...> Modified: trunk/cegcc/src/mingw/test_headers.c =================================================================== --- trunk/cegcc/src/mingw/test_headers.c 2006-10-22 14:14:21 UTC (rev 747) +++ trunk/cegcc/src/mingw/test_headers.c 2006-10-22 17:46:45 UTC (rev 748) @@ -1,20 +1,28 @@ #include <_mingw.h> #include <assert.h> +#ifndef __COREDLL__ #include <conio.h> +#endif #include <ctype.h> +#ifndef __COREDLL__ #include <dir.h> #include <direct.h> #include <dirent.h> #include <dos.h> #include <errno.h> +#endif #include <excpt.h> +#ifndef __COREDLL__ #include <fcntl.h> +#endif #include <fenv.h> #include <float.h> #include <inttypes.h> #include <io.h> #include <limits.h> +#ifndef __COREDLL__ #include <locale.h> +#endif #include <malloc.h> #include <math.h> #include <mbctype.h> @@ -25,7 +33,9 @@ #include <search.h> #include <setjmp.h> #include <share.h> +#ifndef __COREDLL__ #include <signal.h> +#endif #include <stdarg.h> #include <stddef.h> #include <stdint.h> @@ -35,12 +45,16 @@ #include <strings.h> #include <tchar.h> #include <time.h> +#ifndef __COREDLL__ #include <unistd.h> +#endif #include <values.h> #include <wchar.h> #include <wctype.h> +#ifndef __COREDLL__ #include <sys/fcntl.h> #include <sys/file.h> +#endif #include <sys/locking.h> #include <sys/param.h> #include <sys/stat.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-22 14:16:06
|
Revision: 747 http://svn.sourceforge.net/cegcc/?rev=747&view=rev Author: pedroalves Date: 2006-10-22 07:14:21 -0700 (Sun, 22 Oct 2006) Log Message: ----------- * include/stdio.h (puts) [__COREDLL__]: Add missing return. Modified Paths: -------------- trunk/cegcc/src/mingw/ChangeLog.mingw32ce trunk/cegcc/src/mingw/include/stdio.h Modified: trunk/cegcc/src/mingw/ChangeLog.mingw32ce =================================================================== --- trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-20 21:45:13 UTC (rev 746) +++ trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-22 14:14:21 UTC (rev 747) @@ -1,3 +1,7 @@ +2006-10-22 Pedro Alves <ped...@po...> + + * include/stdio.h (puts) [__COREDLL__]: Add missing return. + 2006-10-19 Pedro Alves <ped...@po...> * include/setjmp.h (_JBLEN) : Set to 11 on ARM. Modified: trunk/cegcc/src/mingw/include/stdio.h =================================================================== --- trunk/cegcc/src/mingw/include/stdio.h 2006-10-20 21:45:13 UTC (rev 746) +++ trunk/cegcc/src/mingw/include/stdio.h 2006-10-22 14:14:21 UTC (rev 747) @@ -322,7 +322,7 @@ #else /* __COREDLL__ */ __CRT_INLINE int __cdecl getc (FILE* __F) { return fgetc(__F); } -__CRT_INLINE int __cdecl putc (int __c, FILE* __F) { fputc (__c, __F); } +__CRT_INLINE int __cdecl putc (int __c, FILE* __F) { return fputc (__c, __F); } _CRTIMP int __cdecl getchar (void); _CRTIMP int __cdecl putchar(int __c); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-20 21:45:40
|
Revision: 746 http://svn.sourceforge.net/cegcc/?rev=746&view=rev Author: pedroalves Date: 2006-10-20 14:45:13 -0700 (Fri, 20 Oct 2006) Log Message: ----------- Remove svn:executable. Property Changed: ---------------- trunk/cegcc/src/gcc/gcc/config/i386/host-cygwin.c trunk/cegcc/src/gcc/gcc/config/i386/winnt-cxx.c trunk/cegcc/src/gcc/gcc/config/i386/winnt-stubs.c Property changes on: trunk/cegcc/src/gcc/gcc/config/i386/host-cygwin.c ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/cegcc/src/gcc/gcc/config/i386/winnt-cxx.c ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/cegcc/src/gcc/gcc/config/i386/winnt-stubs.c ___________________________________________________________________ Name: svn:executable - * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-19 01:12:51
|
Revision: 745 http://svn.sourceforge.net/cegcc/?rev=745&view=rev Author: pedroalves Date: 2006-10-18 18:12:37 -0700 (Wed, 18 Oct 2006) Log Message: ----------- * include/setjmp.h (_JBLEN) : Set to 11 on ARM. Modified Paths: -------------- trunk/cegcc/src/mingw/ChangeLog.mingw32ce trunk/cegcc/src/mingw/include/setjmp.h Modified: trunk/cegcc/src/mingw/ChangeLog.mingw32ce =================================================================== --- trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-18 19:00:31 UTC (rev 744) +++ trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-19 01:12:37 UTC (rev 745) @@ -1,3 +1,7 @@ +2006-10-19 Pedro Alves <ped...@po...> + + * include/setjmp.h (_JBLEN) : Set to 11 on ARM. + 2006-10-18 Pedro Alves <ped...@po...> * include/setjmp.h (setjmp) : Coredll.dll has setjmp not _setjmp. Modified: trunk/cegcc/src/mingw/include/setjmp.h =================================================================== --- trunk/cegcc/src/mingw/include/setjmp.h 2006-10-18 19:00:31 UTC (rev 744) +++ trunk/cegcc/src/mingw/include/setjmp.h 2006-10-19 01:12:37 UTC (rev 745) @@ -31,8 +31,7 @@ #if defined (__i386__) # define _JBLEN 16 #elif defined (__arm__) -# define _JBLEN 32 /* Safe value for now. */ -# warning "_JBLEN: test value with performing several setjmps/logjmp, and checking for clobber." +# define _JBLEN 11 #endif #define _JBTYPE int This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-18 19:42:55
|
Revision: 743 http://svn.sourceforge.net/cegcc/?rev=743&view=rev Author: pedroalves Date: 2006-10-18 11:56:22 -0700 (Wed, 18 Oct 2006) Log Message: ----------- Minor cleanup. Modified Paths: -------------- trunk/cegcc/src/mingw/include/stdio.h Modified: trunk/cegcc/src/mingw/include/stdio.h =================================================================== --- trunk/cegcc/src/mingw/include/stdio.h 2006-10-18 14:32:36 UTC (rev 742) +++ trunk/cegcc/src/mingw/include/stdio.h 2006-10-18 18:56:22 UTC (rev 743) @@ -159,7 +159,7 @@ #ifdef __COREDLL__ -# define stdin _getstdfilex(0) +# define stdin _getstdfilex(0) # define stdout _getstdfilex(1) # define stderr _getstdfilex(2) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-18 19:01:40
|
Revision: 744 http://svn.sourceforge.net/cegcc/?rev=744&view=rev Author: pedroalves Date: 2006-10-18 12:00:31 -0700 (Wed, 18 Oct 2006) Log Message: ----------- * include/setjmp.h (setjmp) : Coredll.dll has setjmp not _setjmp. (Leftover from previous commit.) * include/stdio.h : Minor cleanup. Modified Paths: -------------- trunk/cegcc/src/mingw/ChangeLog.mingw32ce trunk/cegcc/src/mingw/include/setjmp.h Modified: trunk/cegcc/src/mingw/ChangeLog.mingw32ce =================================================================== --- trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-18 18:56:22 UTC (rev 743) +++ trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-18 19:00:31 UTC (rev 744) @@ -1,5 +1,10 @@ 2006-10-18 Pedro Alves <ped...@po...> + * include/setjmp.h (setjmp) : Coredll.dll has setjmp not _setjmp. + * include/stdio.h : Minor cleanup. + +2006-10-18 Pedro Alves <ped...@po...> + * include/stdio.h : Expose fileno. We have it on libceoldname. 2006-10-17 Pedro Alves <ped...@po...> Modified: trunk/cegcc/src/mingw/include/setjmp.h =================================================================== --- trunk/cegcc/src/mingw/include/setjmp.h 2006-10-18 18:56:22 UTC (rev 743) +++ trunk/cegcc/src/mingw/include/setjmp.h 2006-10-18 19:00:31 UTC (rev 744) @@ -38,6 +38,9 @@ #define _JBTYPE int typedef _JBTYPE jmp_buf[_JBLEN]; +#ifdef __COREDLL__ +_CRTIMP int __cdecl setjmp (jmp_buf); +#else /* * The function provided by CRTDLL which appears to do the actual work * of setjmp. @@ -45,6 +48,7 @@ _CRTIMP int __cdecl _setjmp (jmp_buf); #define setjmp(x) _setjmp(x) +#endif /* * Return to the last setjmp call and act as if setjmp had returned This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-18 14:32:50
|
Revision: 742 http://svn.sourceforge.net/cegcc/?rev=742&view=rev Author: pedroalves Date: 2006-10-18 07:32:36 -0700 (Wed, 18 Oct 2006) Log Message: ----------- * include/stdio.h : Expose fileno. We have it on libceoldname. Modified Paths: -------------- trunk/cegcc/src/mingw/ChangeLog.mingw32ce trunk/cegcc/src/mingw/include/stdio.h Modified: trunk/cegcc/src/mingw/ChangeLog.mingw32ce =================================================================== --- trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-18 14:11:42 UTC (rev 741) +++ trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-18 14:32:36 UTC (rev 742) @@ -1,3 +1,7 @@ +2006-10-18 Pedro Alves <ped...@po...> + + * include/stdio.h : Expose fileno. We have it on libceoldname. + 2006-10-17 Pedro Alves <ped...@po...> * __dllonexit : Delete. Code merged into ... Modified: trunk/cegcc/src/mingw/include/stdio.h =================================================================== --- trunk/cegcc/src/mingw/include/stdio.h 2006-10-18 14:11:42 UTC (rev 741) +++ trunk/cegcc/src/mingw/include/stdio.h 2006-10-18 14:32:36 UTC (rev 742) @@ -436,6 +436,8 @@ _CRTIMP int __cdecl fputchar (int); _CRTIMP FILE* __cdecl fdopen (int, const char*); _CRTIMP int __cdecl fileno (FILE*); +#else +_CRTIMP void* __cdecl fileno (FILE*); #endif #endif /* Not _NO_OLDNAMES */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2006-10-17 22:11:47
|
Revision: 740 http://svn.sourceforge.net/cegcc/?rev=740&view=rev Author: dannybackx Date: 2006-10-17 15:11:24 -0700 (Tue, 17 Oct 2006) Log Message: ----------- Pedro corrected me on this, I overlooked the ChangeLog in the gcc subdirectory. Removed Paths: ------------- trunk/cegcc/src/gcc/ChangeLog.ce Deleted: trunk/cegcc/src/gcc/ChangeLog.ce =================================================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-17 18:48:05
|
Revision: 739 http://svn.sourceforge.net/cegcc/?rev=739&view=rev Author: pedroalves Date: 2006-10-17 11:47:31 -0700 (Tue, 17 Oct 2006) Log Message: ----------- * __dllonexit : Delete. Code merged into ... * atexit.c : ... this. Fix filename comment. Don't include __dllonexit.c. (__atexit_first) : New function. (__atexit_init): New function. (proc_exit_chain) : Delete. (__dllexit) : New function, copied from crt1.c. (__dllonexit) : New function. (_cexit) : Call __dllexit. * Makefile.in (dllcrt1.o, dllcrt2.o, atexit.o) : Remove dependency on __dllonexit.c. * dllcrt1.c : Don't implement a private atexit list on __COREDLL__, since the atexit implementation there is already image private. (DllMainCRTStartup) : Call __atexit_init. Use __atexit_first to get to the private first_atexit. (__dll_exit) : Hide on __COREDLL__. Don't include __dllonexit.c. * crt1.c (MainCRTStartup) : Call __atexit_init. Modified Paths: -------------- trunk/cegcc/src/mingw/ChangeLog.mingw32ce trunk/cegcc/src/mingw/Makefile.in trunk/cegcc/src/mingw/atexit.c trunk/cegcc/src/mingw/crt1.c trunk/cegcc/src/mingw/dllcrt1.c Removed Paths: ------------- trunk/cegcc/src/mingw/__dllonexit.c Modified: trunk/cegcc/src/mingw/ChangeLog.mingw32ce =================================================================== --- trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-17 17:53:38 UTC (rev 738) +++ trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-17 18:47:31 UTC (rev 739) @@ -1,5 +1,28 @@ 2006-10-17 Pedro Alves <ped...@po...> + * __dllonexit : Delete. Code merged into ... + * atexit.c : ... this. + Fix filename comment. + Don't include __dllonexit.c. + (__atexit_first) : New function. + (__atexit_init): New function. + (proc_exit_chain) : Delete. + (__dllexit) : New function, copied from crt1.c. + (__dllonexit) : New function. + (_cexit) : Call __dllexit. + * Makefile.in (dllcrt1.o, dllcrt2.o, atexit.o) : Remove + dependency on __dllonexit.c. + * dllcrt1.c : Don't implement a private atexit list on + __COREDLL__, since the atexit implementation there is already + image private. + (DllMainCRTStartup) : Call __atexit_init. Use __atexit_first to + get to the private first_atexit. + (__dll_exit) : Hide on __COREDLL__. + Don't include __dllonexit.c. + * crt1.c (MainCRTStartup) : Call __atexit_init. + +2006-10-17 Pedro Alves <ped...@po...> + * include/fcntl.h : Hide the file. * include/direct.h : Hide the file. Modified: trunk/cegcc/src/mingw/Makefile.in =================================================================== --- trunk/cegcc/src/mingw/Makefile.in 2006-10-17 17:53:38 UTC (rev 738) +++ trunk/cegcc/src/mingw/Makefile.in 2006-10-17 18:47:31 UTC (rev 739) @@ -503,8 +503,8 @@ crtmt.o: crtmt.c crtst.o: crtst.c ctype_old.o: ctype_old.c -dllcrt1.o: dllcrt1.c __dllonexit.c -dllcrt2.o: dllcrt1.c __dllonexit.c +dllcrt1.o: dllcrt1.c +dllcrt2.o: dllcrt1.c dllmain.o: dllmain.c main.o: main.c oldnames.o: oldnames.c @@ -512,7 +512,7 @@ CRT_fp8.o: CRT_fp8.c CRT_fp10.o: CRT_fp10.c abort.o: abort.c -atexit.o: atexit.c __dllonexit.c +atexit.o: atexit.c assert.o: assert.c Makefile: Makefile.in config.status configure Deleted: trunk/cegcc/src/mingw/__dllonexit.c =================================================================== --- trunk/cegcc/src/mingw/__dllonexit.c 2006-10-17 17:53:38 UTC (rev 738) +++ trunk/cegcc/src/mingw/__dllonexit.c 2006-10-17 18:47:31 UTC (rev 739) @@ -1,53 +0,0 @@ -/* - * __dllonexit.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 <stdlib.h> -#include <stdio.h> -#include <windows.h> - -#ifdef DEBUG -# define TRACE(FMT, ...) \ - printf ("trace: %s:%d : " FMT, __FILE__, __LINE__, ##__VA_ARGS__) - -# define FIXME(FMT, ...) \ - printf ("fixme: %s:%d : " FMT, __FILE__, __LINE__, ##__VA_ARGS__) -#else -# define TRACE(FMT, ...) do; while (0) -# define FIXME(FMT, ...) do; while (0) -#endif - -p_atexit_fn -__dllonexit(p_atexit_fn func, p_atexit_fn **start, p_atexit_fn **end) -{ - p_atexit_fn *tmp; - int len; - - TRACE("(%p,%p,%p)\n", func, start, end); - - if (!start || !end) - { - FIXME("bad table\n"); - return NULL; - } - - len = (*end - *start); - - TRACE("table start %p-%p, %d entries\n", *start, *end, len); - - if (++len <= 0) - return NULL; - - tmp = (p_atexit_fn *)realloc(*start, len * sizeof(tmp)); - if (!tmp) - return NULL; - *start = tmp; - *end = tmp + len; - tmp[len - 1] = func; - TRACE("new table start %p-%p, %d entries\n", *start, *end, len); - return func; -} Modified: trunk/cegcc/src/mingw/atexit.c =================================================================== --- trunk/cegcc/src/mingw/atexit.c 2006-10-17 17:53:38 UTC (rev 738) +++ trunk/cegcc/src/mingw/atexit.c 2006-10-17 18:47:31 UTC (rev 739) @@ -1,5 +1,5 @@ /* - * dllcrt1.c + * atexit.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. @@ -12,15 +12,26 @@ #include <process.h> #include <windows.h> +//#define DEBUG + +#ifdef DEBUG +# define TRACE(FMT, ...) \ + printf ("trace: %s:%d : " FMT, __FILE__, __LINE__, ##__VA_ARGS__) + +# define FIXME(FMT, ...) \ + printf ("fixme: %s:%d : " FMT, __FILE__, __LINE__, ##__VA_ARGS__) +#else +# define TRACE(FMT, ...) do; while (0) +# define FIXME(FMT, ...) do; while (0) +#endif + typedef void (* p_atexit_fn )(void); static p_atexit_fn* first_atexit; static p_atexit_fn* next_atexit; /* This is based on the function in the Wine project's exit.c */ -static p_atexit_fn __dllonexit (p_atexit_fn, p_atexit_fn**, p_atexit_fn**); +p_atexit_fn __dllonexit (p_atexit_fn, p_atexit_fn**, p_atexit_fn**); -//#define DEBUG - int atexit (p_atexit_fn pfn) { @@ -42,23 +53,88 @@ return ((_onexit_t) __dllonexit ((p_atexit_fn)pfn, &first_atexit, &next_atexit)); } -static void -proc_atexit_chain (void) +p_atexit_fn* __atexit_first(void) { - size_t len = next_atexit - first_atexit; + return first_atexit; +} - p_atexit_fn* pfn = next_atexit; - if (len != 0) +BOOL __atexit_init(void) +{ + /* Initialize atexit table. + 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 */ + { +#ifndef __COREDLL__ + errno=ENOMEM; +#endif + return FALSE; + } + *first_atexit = NULL; + next_atexit = first_atexit; + return TRUE; +} + +void __dll_exit(void) +/* Run LIFO terminators registered in private atexit table */ +{ + if ( first_atexit ) { - do - { - --pfn; - (*pfn)(); - } - while (pfn != 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); } +p_atexit_fn +__dllonexit(p_atexit_fn func, p_atexit_fn **start, p_atexit_fn **end) +{ + p_atexit_fn *tmp; + int len; + + TRACE("(%p,%p,%p)\n", func, start, end); + + if (!start || !*start || !end || !*end) + { + FIXME("bad table\n"); + return NULL; + } + + len = (*end - *start); + + TRACE("table start %p-%p, %d entries\n", *start, *end, len); + + if (++len <= 0) + return NULL; + + tmp = (p_atexit_fn *)realloc(*start, len * sizeof(tmp)); + if (!tmp) + return NULL; + *start = tmp; + *end = tmp + len; + tmp[len - 1] = func; + TRACE("new table start %p-%p, %d entries\n", *start, *end, len); + return func; +} + static void closeall_streams (void) { @@ -74,7 +150,7 @@ void _cexit (void) { - proc_atexit_chain (); + __dll_exit (); closeall_streams (); } @@ -97,5 +173,3 @@ closeall_streams (); ExitProcess (code); } - -#include "__dllonexit.c" Modified: trunk/cegcc/src/mingw/crt1.c =================================================================== --- trunk/cegcc/src/mingw/crt1.c 2006-10-17 17:53:38 UTC (rev 738) +++ trunk/cegcc/src/mingw/crt1.c 2006-10-17 18:47:31 UTC (rev 739) @@ -41,6 +41,8 @@ #else /* No environ. */ extern int main (int, char **); +/* No atexit on coredll, we must initialize our private version. */ +BOOL __atexit_init(void); #endif /* @@ -244,7 +246,14 @@ asm __volatile__ ("andl $-16, %%esp" : : : "%esp"); #endif +#ifdef __COREDLL__ /* + * Initialize the atexit table. + */ + __atexit_init(); +#endif + + /* * 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 Modified: trunk/cegcc/src/mingw/dllcrt1.c =================================================================== --- trunk/cegcc/src/mingw/dllcrt1.c 2006-10-17 17:53:38 UTC (rev 738) +++ trunk/cegcc/src/mingw/dllcrt1.c 2006-10-17 18:47:31 UTC (rev 739) @@ -34,20 +34,20 @@ #endif typedef void (* p_atexit_fn )(void); + +#ifndef __COREDLL__ static p_atexit_fn* first_atexit; static p_atexit_fn* next_atexit; -static void -__dll_exit (void); - +static void __dll_exit (void); /* This is based on the function in the Wine project's exit.c */ -#ifdef UNDER_CE -static p_atexit_fn __dllonexit (p_atexit_fn, p_atexit_fn**, p_atexit_fn**); -#else p_atexit_fn __dllonexit (p_atexit_fn, p_atexit_fn**, p_atexit_fn**); -#endif +#else /* __COREDLL__ */ +void __dll_exit (void); +BOOL __atexit_init(void); +p_atexit_fn* __atexit_first(void); +#endif /* __COREDLL__ */ - extern BOOL WINAPI DllMain (HANDLE, DWORD, LPVOID); extern void _pei386_runtime_relocator (void); @@ -64,19 +64,22 @@ printf ("%s: DLL_PROCESS_ATTACH (%d)\n", __FUNCTION__); #endif +#ifdef __COREDLL__ + if (!__atexit_init()) + return FALSE; +#else /* 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 */ { -#ifndef UNDER_CE errno=ENOMEM; -#endif return FALSE; } *first_atexit = NULL; next_atexit = first_atexit; +#endif /* Adust references to dllimported data (from other DLL's) that have non-zero offsets. */ @@ -121,6 +124,9 @@ #ifdef DEBUG printf ("%s: DLL_PROCESS_DETACH (%d)\n", __FUNCTION__); #endif +#ifdef __COREDLL__ + p_atexit_fn* first_atexit = __atexit_first(); +#endif /* If not attached, return FALSE. Cleanup already done above if failed attachment attempt. */ if (! first_atexit ) @@ -136,6 +142,7 @@ return bRet; } +#ifndef __COREDLL__ static void __dll_exit(void) @@ -201,6 +208,4 @@ return ((_onexit_t) __dllonexit ((p_atexit_fn)pfn, &first_atexit, &next_atexit)); } -#ifdef UNDER_CE -#include "__dllonexit.c" #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-17 17:54:01
|
Revision: 737 http://svn.sourceforge.net/cegcc/?rev=737&view=rev Author: pedroalves Date: 2006-10-17 10:51:48 -0700 (Tue, 17 Oct 2006) Log Message: ----------- 2006-10-17 Pedro Alves <ped...@po...> * pe-dll.c (autofilter_objlist) : Add gcrt3.o. * ChangeLog.ce : New file. Modified Paths: -------------- trunk/cegcc/src/binutils/ld/pe-dll.c Added Paths: ----------- trunk/cegcc/src/binutils/ld/ChangeLog.ce Added: trunk/cegcc/src/binutils/ld/ChangeLog.ce =================================================================== --- trunk/cegcc/src/binutils/ld/ChangeLog.ce (rev 0) +++ trunk/cegcc/src/binutils/ld/ChangeLog.ce 2006-10-17 17:51:48 UTC (rev 737) @@ -0,0 +1,3 @@ +2006-10-17 Pedro Alves <ped...@po...> + + * pe-dll.c (autofilter_objlist) : Add gcrt3.o. Modified: trunk/cegcc/src/binutils/ld/pe-dll.c =================================================================== --- trunk/cegcc/src/binutils/ld/pe-dll.c 2006-10-17 11:28:21 UTC (rev 736) +++ trunk/cegcc/src/binutils/ld/pe-dll.c 2006-10-17 17:51:48 UTC (rev 737) @@ -324,6 +324,7 @@ { STRING_COMMA_LEN ("gcrt0.o") }, { STRING_COMMA_LEN ("gcrt1.o") }, { STRING_COMMA_LEN ("gcrt2.o") }, + { STRING_COMMA_LEN ("gcrt3.o") }, { STRING_COMMA_LEN ("crtbegin.o") }, { STRING_COMMA_LEN ("crtend.o") }, { STRING_COMMA_LEN (NULL) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-17 17:53:56
|
Revision: 738 http://svn.sourceforge.net/cegcc/?rev=738&view=rev Author: pedroalves Date: 2006-10-17 10:53:38 -0700 (Tue, 17 Oct 2006) Log Message: ----------- Add missing entry to ChangeLog. * ChangeLog.ce : New file. Modified Paths: -------------- trunk/cegcc/src/binutils/ld/ChangeLog.ce Modified: trunk/cegcc/src/binutils/ld/ChangeLog.ce =================================================================== --- trunk/cegcc/src/binutils/ld/ChangeLog.ce 2006-10-17 17:51:48 UTC (rev 737) +++ trunk/cegcc/src/binutils/ld/ChangeLog.ce 2006-10-17 17:53:38 UTC (rev 738) @@ -1,3 +1,4 @@ 2006-10-17 Pedro Alves <ped...@po...> * pe-dll.c (autofilter_objlist) : Add gcrt3.o. + * ChangeLog.ce : New file. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-17 00:06:39
|
Revision: 735 http://svn.sourceforge.net/cegcc/?rev=735&view=rev Author: pedroalves Date: 2006-10-16 17:06:28 -0700 (Mon, 16 Oct 2006) Log Message: ----------- * include/fcntl.h : Hide the file. * include/direct.h : Hide the file. Modified Paths: -------------- trunk/cegcc/src/mingw/ChangeLog.mingw32ce trunk/cegcc/src/mingw/include/direct.h trunk/cegcc/src/mingw/include/fcntl.h Modified: trunk/cegcc/src/mingw/ChangeLog.mingw32ce =================================================================== --- trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-16 23:38:17 UTC (rev 734) +++ trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2006-10-17 00:06:28 UTC (rev 735) @@ -1,5 +1,10 @@ 2006-10-17 Pedro Alves <ped...@po...> + * include/fcntl.h : Hide the file. + * include/direct.h : Hide the file. + +2006-10-17 Pedro Alves <ped...@po...> + * profile/gcrt0.c : Remove __COREDLL__ hack. * profile/gmon.c : Don't include fcnctl.h on mingw32ce. * profile/Makefile.in : Add comment about coredll being CRT_ID 3. Modified: trunk/cegcc/src/mingw/include/direct.h =================================================================== --- trunk/cegcc/src/mingw/include/direct.h 2006-10-16 23:38:17 UTC (rev 734) +++ trunk/cegcc/src/mingw/include/direct.h 2006-10-17 00:06:28 UTC (rev 735) @@ -8,6 +8,11 @@ * plus functions for setting the current drive. * */ + +#ifdef __COREDLL__ +# include_next <direct.h> +#else /* __COREDLL__ */ + #ifndef _DIRECT_H_ #define _DIRECT_H_ @@ -75,3 +80,5 @@ #endif /* Not RC_INVOKED */ #endif /* Not _DIRECT_H_ */ + +#endif /* Not __COREDLL__ */ Modified: trunk/cegcc/src/mingw/include/fcntl.h =================================================================== --- trunk/cegcc/src/mingw/include/fcntl.h 2006-10-16 23:38:17 UTC (rev 734) +++ trunk/cegcc/src/mingw/include/fcntl.h 2006-10-17 00:06:28 UTC (rev 735) @@ -8,6 +8,10 @@ * in sys/stat.h (ick). * */ +#ifdef __COREDLL__ +# include_next <fcntl.h> +#else /* __COREDLL__ */ + #ifndef _FCNTL_H_ #define _FCNTL_H_ @@ -67,3 +71,5 @@ #endif /* Not _NO_OLDNAMES */ #endif /* Not _FCNTL_H_ */ + +#endif /* Not __COREDLL__ */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-16 23:38:31
|
Revision: 734 http://svn.sourceforge.net/cegcc/?rev=734&view=rev Author: pedroalves Date: 2006-10-16 16:38:17 -0700 (Mon, 16 Oct 2006) Log Message: ----------- * config/arm/wince-cegcc.h (STARTFILE_SPEC) : Add gcrt3.o instead of gcrt2.o. * config/arm/mingw32.h : Likewise. Modified Paths: -------------- trunk/cegcc/src/gcc/gcc/ChangeLog.ce trunk/cegcc/src/gcc/gcc/config/arm/mingw32.h trunk/cegcc/src/gcc/gcc/config/arm/wince-cegcc.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ped...@us...> - 2006-10-16 23:36:11
|
Revision: 733 http://svn.sourceforge.net/cegcc/?rev=733&view=rev Author: pedroalves Date: 2006-10-16 16:35:57 -0700 (Mon, 16 Oct 2006) Log Message: ----------- * profile/gcrt0.c : Remove __COREDLL__ hack. * profile/gmon.c : Don't include fcnctl.h on mingw32ce. * profile/Makefile.in : Add comment about coredll being CRT_ID 3. (ALL_CRT0S) : Add gcrt3.o. (gcrt3.o) : Add build rule. * profile/configure.in : Handle mingw32ce. * profile/configure : Regenerate. Modified Paths: -------------- trunk/cegcc/src/mingw/ChangeLog.mingw32ce trunk/cegcc/src/mingw/profile/Makefile.in trunk/cegcc/src/mingw/profile/configure trunk/cegcc/src/mingw/profile/configure.in trunk/cegcc/src/mingw/profile/gcrt0.c trunk/cegcc/src/mingw/profile/gmon.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |