mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c20551c194 | ||
|
|
93faef9065 | ||
|
|
4780e551f2 | ||
|
|
0319233e9b | ||
|
|
c0d113ce5e | ||
|
|
3342a05d6d | ||
|
|
f449657a2a | ||
|
|
1598c2d7c6 | ||
|
|
bf39b8a150 | ||
|
|
11e0dbe7bd | ||
|
|
e0dfa0f712 | ||
|
|
434ed78f23 | ||
|
|
9d4c25576e | ||
|
|
3482a0b686 | ||
|
|
dcca9f5e7a | ||
|
|
b441ad10f5 |
No files matched your search
@@ -1,337 +1,6 @@
|
||||
2007-09-18 Marek Habersack <mhabersack@novell.com>
|
||||
2006-12-06 Wade Berrier <wberrier@novell.com>
|
||||
|
||||
* configure.in: added additional Makefile to be generated in the
|
||||
mono/tests/assemblyresolve/ subdir.
|
||||
|
||||
2007-09-17 Zoltan Varga <[email protected]>
|
||||
|
||||
* docs/memory-management.txt: A new file describing metadata memory management.
|
||||
|
||||
2007-09-14 Jonathan Chambers <[email protected]>
|
||||
|
||||
* winconfig.h: Define WINVER and _WIN32_WINNT for VS
|
||||
build.
|
||||
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
2007-09-14 Jonathan Chambers <[email protected]>
|
||||
|
||||
* winconfig.h: Don't define HAVE_UNISTD_H on MSVC build.
|
||||
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
2007-09-03 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* configure.in : On windows, require advapi32.dll.
|
||||
|
||||
2007-08-23 Robert Jordan <[email protected]>
|
||||
|
||||
* configure.in: add get|setpriority detection.
|
||||
|
||||
Mon Aug 20 15:23:01 CEST 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: use more symbol renaming fo OSX (bug #82463).
|
||||
|
||||
2007-08-20 Jb Evain <[email protected]>
|
||||
|
||||
* scripts/smcs.in: use --runtime=moonlight instead of
|
||||
forcing MONO_PATH.
|
||||
|
||||
Mon Aug 20 12:34:36 CEST 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: check for gerusage().
|
||||
|
||||
Mon Jul 30 17:59:04 CEST 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: Enable sigaltstack handling check by default to get
|
||||
wider testing.
|
||||
|
||||
2007-07-26 Jb Evain <[email protected]>
|
||||
|
||||
* scripts/smcs.in: use smcs.exe.
|
||||
|
||||
2007-07-24 Wade Berrier <[email protected]>
|
||||
|
||||
* configure.in: version bump -> 1.2.5
|
||||
|
||||
2007-07-17 Jb Evain <[email protected]>
|
||||
|
||||
* scripts/Makefile.am: new monolinker script.
|
||||
|
||||
2007-07-11 Jb Evain <[email protected]>
|
||||
|
||||
* scripts/smcs.in, scripts/Makefile.am: new smcs script.
|
||||
|
||||
2007-07-05 Wade Berrier <[email protected]>
|
||||
|
||||
* scripts/mono-find-requires.in: add special 64bit case for ia64.
|
||||
(rpm used to provide libname as well as libname()(64bit) on ia64, but
|
||||
now it only provides the first.)
|
||||
|
||||
2007-06-28 Jonathan Pryor <[email protected]>
|
||||
|
||||
* configure.in: Add a check for `struct utimbuf'; needed by MonoPosixHelper.
|
||||
|
||||
2007-06-15 Wade Berrier <[email protected]>
|
||||
|
||||
* scripts/mono-find-requires.in: revert back to using package names
|
||||
for .config file dep scanning. This is because noarch packages can be
|
||||
built on either 32 or 64 bit arches, depending on either a 32bit or 64bit
|
||||
library, which is wrong.
|
||||
|
||||
2007-06-13 Randolph Chung <[email protected]>
|
||||
|
||||
* configure.in: Add hppa-linux target.
|
||||
Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
|
||||
|
||||
2007-06-13 Randolph Chung <[email protected]>
|
||||
|
||||
* configure.in: Add AM_PROG_AS, needed for handling assembly file
|
||||
targets.
|
||||
|
||||
2007-06-09 Wade Berrier <[email protected]>
|
||||
|
||||
* scripts/mono-find-requires.in: use lib name instead of package name
|
||||
for deps found in .config files. suse's rpmlint prefers it that way.
|
||||
|
||||
2007-05-29 Robert Jordan <[email protected]>
|
||||
|
||||
* data/config.in: add mono_win32_compat entries.
|
||||
|
||||
2007-05-11 Raja R Harinath <[email protected]>
|
||||
|
||||
* Makefile.am (get-monolite-latest): Redirect wget output too.
|
||||
|
||||
2007-05-07 Wade Berrier <[email protected]>
|
||||
|
||||
* scripts/mono-find-requires.in: don't use length() on arrays;
|
||||
doesn't work on older gawk versions. Calculate size manually instead.
|
||||
|
||||
2007-05-07 Raja R Harinath <[email protected]>
|
||||
|
||||
Fix parallel make.
|
||||
* runtime/Makefile.am (test-support-file): Remove. Move rules ...
|
||||
(_tmpinst/bin/mcs, _tmpinst/bin/gmcs, _tmpinst/bin/ilasm): ... here.
|
||||
Reported by "Stephen A. Jazdzewski" <[email protected]>
|
||||
|
||||
2007-05-05 Wade Berrier <[email protected]>
|
||||
|
||||
* scripts/mono-find-provides.in: don't use 'which' anymore (never solved
|
||||
anything since it broke symlinks)
|
||||
* scripts/mono-find-requires.in: also don't use 'which'
|
||||
Parse .config files to look for native libs. Honor 'os' attributes for
|
||||
dllmaps. Query rpm db for package that provides this lib. Support 64bit
|
||||
rpm configurations, as well as 32bit running on 64bit.
|
||||
|
||||
2007-04-27 Marek Habersack <[email protected]>
|
||||
|
||||
* data/net_2_0/web.config: use fully qualified assembly names in
|
||||
<compilation><assemblies>.
|
||||
|
||||
2007-04-19 Wade Berrier <[email protected]>
|
||||
|
||||
* configure.in: version bump -> 1.2.4
|
||||
|
||||
2007-04-15 Marek Habersack <[email protected]>
|
||||
|
||||
* data/net_2_0/web.config: add the default build providers
|
||||
configuration.
|
||||
|
||||
2007-04-06 Andreas Faerber <[email protected]>
|
||||
|
||||
* configure.in: Added support for Solaris/amd64. Fixes bug #81325
|
||||
|
||||
2007-04-06 Marek Habersack <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: corrected the xhtmlConformance
|
||||
entry to reference correct type.
|
||||
|
||||
* data/net_2_0/web.config: siteMap must be enabled by
|
||||
default. Fixes bug #80611
|
||||
|
||||
2007-04-05 Marek Habersack <[email protected]>
|
||||
|
||||
* data/browscap.ini: updated to the latest version.
|
||||
Applied Mono-specific changes.
|
||||
|
||||
2007-03-28 Raja R Harinath <[email protected]>
|
||||
|
||||
* runtime/mono-wrapper.in (PATH): Include _tmpinst/bin. Ensure
|
||||
that library invocations of 'mcs' and 'gmcs' pick the in-tree versions.
|
||||
* runtime/Makefile.am (mcs-do-run-test-profiles): Don't set PATH.
|
||||
(all-local, install-local): Depend on TEST_SUPPORT_FILES too.
|
||||
(test-support-files): Move creation of _tmpinst/bin directory ...
|
||||
($(tmpinst)/bin/mono): ... here.
|
||||
($(tmpinst)/bin/mbas, $(tmpinst)/bin/pedump): Remove.
|
||||
(test-support-file): Depend on $(tmpinst)/bin/mono.
|
||||
|
||||
2007-03-22 Marek Habersack <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: added a few missing sections, added
|
||||
missing allowDefinition and allowLocation attributes.
|
||||
|
||||
2007-03-16 Wade Berrier <[email protected]>
|
||||
|
||||
* configure.in: version bump -> 1.2.3.50 (RaceToLinux special release)
|
||||
|
||||
2007-03-16 Marek Habersack <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: added default profile provider
|
||||
configuration.
|
||||
|
||||
2007-03-15 Marek Habersack <[email protected]>
|
||||
|
||||
* runtime/Makefile.am: add browscap.ini to symlinks
|
||||
|
||||
* configure.in: make sure browscap.ini is symlinked to from
|
||||
runtime/etc/ so that no web tests that depend on the file's
|
||||
presence fail.
|
||||
|
||||
2007-03-15 Jonathan Chambers <[email protected]>
|
||||
|
||||
* winconfig.h: Don't use MONO_XEN_OPT on windows.
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
2007-03-14 Marek Habersack <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: add two missing section handlers.
|
||||
|
||||
2007-03-13 Wade Berrier <[email protected]>
|
||||
|
||||
* Makefile.am:
|
||||
* msvc/Makefile.am:
|
||||
Update EXTRA_DIST to take into account .vcproj file moves
|
||||
|
||||
2007-03-13 Jonathan Chambers <[email protected]>
|
||||
|
||||
* mono.sln, libmono.vcproj, mono.vcproj, genmdesc.vcproj, winsetup.bat,
|
||||
mono/monodiet.vcproj, mono/pedump.vcproj: Move to msvc directory.
|
||||
|
||||
2007-03-13 Jonathan Chambers <[email protected]>
|
||||
|
||||
* libmono.vcproj, mono.vcproj, genmdesc.vcproj, mono/monodiet.vcproj,
|
||||
mono/pedump.vcproj: Fix Release build target, add define to remove CRT warnings,
|
||||
structure output folders a bit better, begin WIN64 port, and change
|
||||
libmono to build a DLL instead of a static library.
|
||||
* mono.sln: Begin x64 target support.
|
||||
|
||||
Fri Mar 9 18:57:47 CET 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* Makefile.am, configure.in, msvc: add msvc directory to the
|
||||
distribution.
|
||||
* msvc/create-windef.pl, msvc/mono.def: added def file for exported
|
||||
functions.
|
||||
|
||||
2007-03-09 Zoltan Varga <[email protected]>
|
||||
|
||||
* docs/aot-compiler.txt: Update 'future work'.
|
||||
|
||||
2007-03-07 Zoltan Varga <[email protected]>
|
||||
|
||||
* docs/aot-compiler.txt: Add into about the PLT.
|
||||
|
||||
* docs/aot-compiler.txt: Update a bit to reflect recent changes.
|
||||
|
||||
2007-02-24 Raja R Harinath <[email protected]>
|
||||
|
||||
* data/config.in (odbc32.dll) [os=osx]: Fix misplaced ".
|
||||
|
||||
2007-02-20 Wade Berrier <[email protected]>
|
||||
|
||||
* scripts/Makefile.am: Add api-info and api-diff wrappers
|
||||
|
||||
2007-02-15 Marek Habersack <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: add default provider factories.
|
||||
|
||||
2007-02-01 Geoff Norton <[email protected]>
|
||||
|
||||
* configure.in: Support NetBSD GC.
|
||||
|
||||
Thu Feb 1 12:29:23 CET 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: include LIBS in libmono_ldflags on all archs.
|
||||
* mint.pc.in, mono-uninstalled.pc.in, mono.pc.in: removed extra -lm.
|
||||
|
||||
2007-02-01 Miguel de Icaza <[email protected]>
|
||||
|
||||
* configure.in: Naive attempt at getting -ldl in mono.pc
|
||||
|
||||
2007-01-31 Marek Habersack <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: prepare the configuration for the
|
||||
Mainsoft.Web administrative application.
|
||||
|
||||
2007-01-31 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* configure.in : w32 build fix; add -lwinmm as Tor suggested.
|
||||
|
||||
Mon Jan 29 12:04:38 CET 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in, mint.pc.in mono-uninstalled.pc.in mono.pc.in:
|
||||
put back the flag to export symbols from the binary which is
|
||||
no more provided by gmodule (thanks to Robert Jordan <[email protected]>
|
||||
for noticing).
|
||||
|
||||
2007-01-29 Robert Jordan <[email protected]>
|
||||
|
||||
* libmono.vcproj, winconfig.h: Reflect recent changes.
|
||||
|
||||
2007-01-12 Gert Driesen <[email protected]>
|
||||
|
||||
* scripts/Makefile.am: Added 'al2'.
|
||||
|
||||
2007-01-11 Dick Porter <[email protected]>
|
||||
|
||||
* acconfig.h:
|
||||
* configure.in: Check for IP_DONTFRAGMENT and IP_MTU_DISCOVER.
|
||||
|
||||
2007-01-11 Marek Habersack <[email protected]>
|
||||
|
||||
* data/net_2_0/machine.config: Added the DbProviderFactories
|
||||
section, together with the first entry - for SQLite.
|
||||
|
||||
2007-01-03 Wade Berrier <[email protected]>
|
||||
|
||||
* scripts/mono-find-provides.in:
|
||||
* scripts/mono-find-requires.in: error out if monodis isn't
|
||||
functioning properly. Otherwise when building rpms,
|
||||
the provides/requires isn't generated correctly if monodis
|
||||
isn't present.
|
||||
|
||||
Fixes: bnc #227362
|
||||
|
||||
2007-01-01 Miguel de Icaza <[email protected]>
|
||||
|
||||
* configure.in (darwin.CPPFLAGS): Temporary workaround for the bug
|
||||
reported in 77324. When we get a linker script for MacOS we can
|
||||
take this out, but for now lets keep it in here.
|
||||
|
||||
* scripts/mono-service.in (debug): Add --debug, --no-daemonize and
|
||||
make sure that this works with 2.0 (wrong binary was being
|
||||
refereced).
|
||||
|
||||
Fixes: #80309
|
||||
|
||||
Mon Dec 18 18:19:50 CET 2006 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: fixed compiler/linker options when
|
||||
configuring under hpux/ia64 (patch from [email protected]
|
||||
(Warren Smith)).
|
||||
|
||||
Mon Dec 18 15:28:49 CET 2006 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: detection code for dlopen ().
|
||||
|
||||
Mon Dec 11 10:23:18 CET 2006 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in, mono.pc.in, */Makefile.am: istall the header
|
||||
files in a API version specific directory.
|
||||
|
||||
2006-12-07 Vladimir Krasnov <[email protected]>
|
||||
|
||||
* data/browscap.ini: added msdomversion for ie6/7,
|
||||
fixed ecmascriptversion in ie6/7
|
||||
* configure.in: version bump to 1.2.2.1
|
||||
|
||||
2006-11-28 Marek Habersack <[email protected]>
|
||||
|
||||
|
||||
+16
-6
@@ -1,13 +1,15 @@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
ACLOCAL_AMFLAGS = -I .
|
||||
|
||||
SUBDIRS = $(libgc_dir) mono $(ikvm_native_dir) support docs data runtime scripts man samples web msvc
|
||||
SUBDIRS = $(libgc_dir) mono $(ikvm_native_dir) support docs data runtime scripts man samples web
|
||||
|
||||
# Keep in sync with SUBDIRS
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = libgc mono ikvm-native support docs data runtime scripts man samples web tools msvc
|
||||
DIST_SUBDIRS = libgc mono ikvm-native support docs data runtime scripts man samples web tools
|
||||
|
||||
EXTRA_DIST= mono-uninstalled.pc.in LICENSE
|
||||
vs_files = genmdesc.vcproj libmono.vcproj mono.vcproj mono.sln
|
||||
|
||||
EXTRA_DIST= mono.pc.in mint.pc.in mono-uninstalled.pc.in dotnet.pc.in mono-cairo.pc.in LICENSE $(vs_files)
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
|
||||
|
||||
@@ -17,20 +19,28 @@ dist-hook:
|
||||
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) PROFILE=default distdir=$$d dist-recursive
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
if JIT_SUPPORTED
|
||||
if INTERP_SUPPORTED
|
||||
pkgconfig_DATA= mono.pc mint.pc dotnet.pc mono-cairo.pc
|
||||
else
|
||||
pkgconfig_DATA= mono.pc dotnet.pc mono-cairo.pc
|
||||
endif
|
||||
else
|
||||
pkgconfig_DATA= mint.pc mono-cairo.pc
|
||||
endif
|
||||
noinst_DATA = mono-uninstalled.pc
|
||||
DISTCLEANFILES= mono-uninstalled.pc
|
||||
DISTCLEANFILES= mono.pc mint.pc mono-uninstalled.pc dotnet.pc mono-cairo.pc
|
||||
|
||||
.PHONY: get-monolite-latest mcs-do-compiler-tests compiler-tests bootstrap-world
|
||||
|
||||
# building with monolite
|
||||
mcslib = $(mcs_topdir)/class/lib
|
||||
monolite = $(mcslib)/monolite
|
||||
monolite_url = http://mono.ximian.com/daily/monolite-latest.tar.gz
|
||||
get-monolite-latest:
|
||||
-rm -fr $(mcslib)/monolite-*
|
||||
test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
|
||||
test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
|
||||
cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
|
||||
cd $(mcslib) && { wget -O- http://www.go-mono.com/daily/monolite-latest.tar.gz | gzip -d | tar xf - ; }
|
||||
cd $(mcslib) && mv -f monolite-* monolite
|
||||
|
||||
compiler-tests: mcs-do-clean
|
||||
|
||||
@@ -82,19 +82,6 @@ This is Mono.
|
||||
./autogen.sh --prefix=/usr/local
|
||||
make
|
||||
|
||||
For people with non-standard installations of the auto* utils and of
|
||||
pkg-config (common on misconfigured OSX and windows boxes), you could get
|
||||
an error like this:
|
||||
|
||||
./configure: line 19176: syntax error near unexpected token `PKG_CHECK_MODULES(BASE_DEPENDENCIES,' ...
|
||||
|
||||
This means that you need to set the ACLOCAL_FLAGS environment var
|
||||
when invoking autogen.sh, like this:
|
||||
|
||||
ACLOCAL_FLAGS="-I $acprefix/share/aclocal" ./autogen.sh --prefix=/usr/loca
|
||||
|
||||
where $acprefix is the prefix where aclocal has been installed.
|
||||
|
||||
This will automatically go into the mcs/ tree and build the
|
||||
binaries there.
|
||||
|
||||
@@ -208,10 +195,6 @@ This is Mono.
|
||||
|
||||
--with-sigaltstack=yes,no
|
||||
|
||||
Experimental: Use at your own risk, it is known to
|
||||
cause problems with garbage collection and is hard to
|
||||
reproduce those bugs.
|
||||
|
||||
This controls whether Mono will install a special
|
||||
signal handler to handle stack overflows. If set to
|
||||
"yes", it will turn stack overflows into the
|
||||
@@ -264,19 +247,6 @@ This is Mono.
|
||||
Whether you want to build libraries that are still not
|
||||
completed (The 2.0 APIs). It defaults to `yes'.
|
||||
|
||||
--with-moonlight=yes,no
|
||||
|
||||
Whether you want to generate the Silverlight/Moonlight
|
||||
libraries and toolchain in addition to the default
|
||||
(1.1 and 2.0 APIs).
|
||||
|
||||
This will produce the `smcs' compiler which will reference
|
||||
the Silvelright modified assemblies (mscorlib.dll,
|
||||
System.dll, System.Code.dll and System.Xml.Core.dll) and turn
|
||||
on the LINQ extensions for the compiler.
|
||||
|
||||
This option defaults to `no' and it is considered pre-alpha.
|
||||
|
||||
--with-libgdiplus=installed,sibling,<path>
|
||||
|
||||
This is used to configure where should Mono look for
|
||||
@@ -292,16 +262,6 @@ This is Mono.
|
||||
|
||||
Or you can specify a path to a libgdiplus.
|
||||
|
||||
--disable-shared-memory
|
||||
|
||||
Use this option to disable the use of shared memory in
|
||||
Mono (this is equivalent to setting the MONO_DISABLE_SHM
|
||||
environment variable, although this removes the feature
|
||||
completely).
|
||||
|
||||
Disabling the shared memory support will disable certain
|
||||
features like cross-process named mutexes.
|
||||
|
||||
--enable-minimal=LIST
|
||||
|
||||
Use this feature to specify optional runtime
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
#undef HAVE_SOL_IPV6
|
||||
#undef HAVE_IP_PKTINFO
|
||||
#undef HAVE_IPV6_PKTINFO
|
||||
#undef HAVE_IP_DONTFRAGMENT
|
||||
#undef HAVE_IP_MTU_DISCOVER
|
||||
#undef HAVE_STRUCT_IP_MREQN
|
||||
#undef HAVE_STRUCT_IP_MREQ
|
||||
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
|
||||
|
||||
+44
-182
@@ -6,12 +6,9 @@ AC_CANONICAL_SYSTEM
|
||||
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono,1.2.5)
|
||||
AM_INIT_AUTOMAKE(mono,1.2.2.1)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
API_VER=1.0
|
||||
AC_SUBST(API_VER)
|
||||
|
||||
AC_PROG_LN_S
|
||||
|
||||
# In case of cygwin, override LN_S, irrespective of what it determines.
|
||||
@@ -44,13 +41,12 @@ libmono_cflags=""
|
||||
libmono_ldflags=""
|
||||
AC_SUBST(libmono_cflags)
|
||||
AC_SUBST(libmono_ldflags)
|
||||
export_ldflags=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
|
||||
AC_SUBST(export_ldflags)
|
||||
|
||||
# Variable to have relocatable .pc files (lib, or lib64)
|
||||
reloc_libdir=`basename ${libdir}`
|
||||
AC_SUBST(reloc_libdir)
|
||||
|
||||
|
||||
dnl if linker handles the version script
|
||||
no_version_script=no
|
||||
|
||||
@@ -70,7 +66,7 @@ case "$host" in
|
||||
export CC
|
||||
fi
|
||||
HOST_CC="gcc"
|
||||
CPPFLAGS="$CPPFLAGS -DWIN32_THREADS -DFD_SETSIZE=1024 -DUNICODE -D_UNICODE"
|
||||
CPPFLAGS="$CPPFLAGS -DWIN32_THREADS -DFD_SETSIZE=1024"
|
||||
libmono_cflags="-mno-cygwin"
|
||||
libmono_ldflags="-mno-cygwin"
|
||||
libdl=
|
||||
@@ -83,15 +79,14 @@ case "$host" in
|
||||
;;
|
||||
*-*-*netbsd*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT -DGC_NETBSD_THREADS -D_GNU_SOURCE"
|
||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
|
||||
libmono_ldflags="-pthread"
|
||||
need_link_unlink=yes
|
||||
libdl="-ldl"
|
||||
libgc_threads=pthreads
|
||||
with_sigaltstack=no
|
||||
libdl=
|
||||
libgc_threads=no
|
||||
;;
|
||||
# these flags will work for all versions of -STABLE
|
||||
#
|
||||
@@ -195,14 +190,6 @@ case "$host" in
|
||||
*-*-hpux*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
|
||||
# +ESdbgasm only valid on bundled cc on RISC
|
||||
# silently ignored for ia64
|
||||
if test $GCC != "yes"; then
|
||||
CFLAGS="$CFLAGS +ESdbgasm"
|
||||
# Arrange for run-time dereferencing of null
|
||||
# pointers to produce a SIGSEGV signal.
|
||||
LDFLAGS="$LDFLAGS -z"
|
||||
fi
|
||||
CFLAGS="$CFLAGS +ESdbgasm"
|
||||
LDFLAGS="$LDFLAGS -z"
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
@@ -221,8 +208,7 @@ case "$host" in
|
||||
;;
|
||||
*-*-darwin*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP"
|
||||
CPPFLAGS="$CPPFLAGS -DGetCurrentProcess=MonoGetCurrentProcess -DGetCurrentThread=MonoGetCurrentThread -DCreateEvent=MonoCreateEvent"
|
||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX"
|
||||
libmono_cflags="-D_THREAD_SAFE"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
libmono_ldflags="-pthread"
|
||||
@@ -249,7 +235,6 @@ AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
|
||||
|
||||
AC_CHECK_TOOL(CC, gcc, gcc)
|
||||
AC_PROG_CC
|
||||
AM_PROG_AS
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_AWK
|
||||
@@ -303,26 +288,8 @@ AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
|
||||
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h)
|
||||
|
||||
AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
|
||||
if test x$have_zlib = xyes; then
|
||||
AC_TRY_COMPILE([#include <zlib.h>], [
|
||||
void main () {
|
||||
#if defined(ZLIB_VERNUM) && (ZLIB_VERNUM >= 0x1230)
|
||||
}
|
||||
#else
|
||||
#error No good zlib found
|
||||
#endif
|
||||
],[
|
||||
AC_MSG_RESULT(Using system zlib)
|
||||
zlib_msg="system zlib"
|
||||
],[
|
||||
AC_MSG_RESULT(Using embedded zlib)
|
||||
have_zlib=no
|
||||
zlib_msg="bundled zlib"
|
||||
])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_ZLIB, test x$have_zlib = xyes)
|
||||
AC_DEFINE(HAVE_ZLIB,1,[Have system zlib])
|
||||
|
||||
# for mono/metadata/debug-symfile.c
|
||||
AC_CHECK_HEADERS(elf.h)
|
||||
@@ -503,7 +470,7 @@ AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storag
|
||||
|
||||
# Enable support for using sigaltstack for SIGSEGV and stack overflow handling
|
||||
# This does not work on some platforms (bug #55253)
|
||||
AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack],[],[with_sigaltstack=yes])
|
||||
AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack],[],[with_sigaltstack=no])
|
||||
|
||||
AC_ARG_WITH(static_mono, [ --with-static_mono=yes,no link mono statically to libmono (faster)],[],[with_static_mono=yes])
|
||||
|
||||
@@ -712,41 +679,6 @@ dnl
|
||||
|
||||
if test x$platform_win32 = xno; then
|
||||
|
||||
dnl dynamic loader support
|
||||
AC_CHECK_FUNC(dlopen, DL_LIB="",
|
||||
AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl", dl_support=no)
|
||||
)
|
||||
if test x$dl_support = xno; then
|
||||
AC_MSG_WARN([No dynamic loading support available])
|
||||
else
|
||||
LIBS="$LIBS $DL_LIB"
|
||||
AC_DEFINE(HAVE_DL_LOADER,1,[dlopen-based dynamic loader available])
|
||||
dnl from glib's configure.in
|
||||
AC_CACHE_CHECK([for preceeding underscore in symbols],
|
||||
mono_cv_uscore,[
|
||||
AC_TRY_RUN([#include <dlfcn.h>
|
||||
int mono_underscore_test (void) { return 42; }
|
||||
int main() {
|
||||
void *f1 = (void*)0, *f2 = (void*)0, *handle;
|
||||
handle = dlopen ((void*)0, 0);
|
||||
if (handle) {
|
||||
f1 = dlsym (handle, "mono_underscore_test");
|
||||
f2 = dlsym (handle, "_mono_underscore_test");
|
||||
} return (!f2 || f1);
|
||||
}],
|
||||
[mono_cv_uscore=yes],
|
||||
[mono_cv_uscore=no],
|
||||
[])
|
||||
])
|
||||
if test "x$mono_cv_uscore" = "xyes"; then
|
||||
MONO_DL_NEED_USCORE=1
|
||||
else
|
||||
MONO_DL_NEED_USCORE=0
|
||||
fi
|
||||
AC_SUBST(MONO_DL_NEED_USCORE)
|
||||
AC_CHECK_FUNC(dlerror)
|
||||
fi
|
||||
|
||||
dnl ******************************************************************
|
||||
dnl *** Checks for the IKVM JNI interface library ***
|
||||
dnl ******************************************************************
|
||||
@@ -771,13 +703,6 @@ if test x$platform_win32 = xno; then
|
||||
AC_CHECK_FUNCS(kqueue)
|
||||
AC_CHECK_FUNCS(backtrace_symbols)
|
||||
AC_CHECK_FUNCS(mkstemp)
|
||||
AC_CHECK_FUNCS(mmap)
|
||||
AC_CHECK_FUNCS(madvise)
|
||||
AC_CHECK_FUNCS(getrusage)
|
||||
AC_CHECK_FUNCS(getpriority)
|
||||
AC_CHECK_FUNCS(setpriority)
|
||||
|
||||
AC_CHECK_FUNCS(sched_setaffinity)
|
||||
|
||||
dnl ******************************************************************
|
||||
dnl *** Check for large file support ***
|
||||
@@ -906,48 +831,20 @@ if test x$platform_win32 = xno; then
|
||||
])
|
||||
|
||||
dnl *****************************
|
||||
dnl *** Checks for IPV6_PKTINFO ***
|
||||
dnl *****************************
|
||||
AC_MSG_CHECKING(for IPV6_PKTINFO)
|
||||
AC_TRY_COMPILE([#include <netdb.h>], [
|
||||
int level = IPV6_PKTINFO;
|
||||
], [
|
||||
# Yes, we have it...
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_IPV6_PKTINFO)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
dnl **********************************
|
||||
dnl *** Checks for IP_DONTFRAGMENT ***
|
||||
dnl **********************************
|
||||
AC_MSG_CHECKING(for IP_DONTFRAGMENT)
|
||||
AC_TRY_COMPILE([#include <netdb.h>], [
|
||||
int level = IP_DONTFRAGMENT;
|
||||
], [
|
||||
# Yes, we have it...
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_IP_DONTFRAGMENT)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
dnl **********************************
|
||||
dnl *** Checks for IP_MTU_DISCOVER ***
|
||||
dnl **********************************
|
||||
AC_MSG_CHECKING(for IP_MTU_DISCOVER)
|
||||
AC_TRY_COMPILE([#include <netdb.h>], [
|
||||
int level = IP_MTU_DISCOVER;
|
||||
], [
|
||||
# Yes, we have it...
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_IP_MTU_DISCOVER)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
dnl *********************************
|
||||
dnl *** Checks for IPV6_PKTINFO ***
|
||||
dnl *****************************
|
||||
AC_MSG_CHECKING(for IPV6_PKTINFO)
|
||||
AC_TRY_COMPILE([#include <netdb.h>], [
|
||||
int level = IPV6_PKTINFO;
|
||||
], [
|
||||
# Yes, we have it...
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_IPV6_PKTINFO)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
dnl *********************************
|
||||
dnl *** Check for struct ip_mreqn ***
|
||||
dnl *********************************
|
||||
AC_MSG_CHECKING(for struct ip_mreqn)
|
||||
@@ -1399,9 +1296,6 @@ if test x$platform_win32 = xno; then
|
||||
#include <utime.h>])
|
||||
AC_CHECK_TYPES([struct timezone], [AC_DEFINE(HAVE_STRUCT_TIMEZONE)], ,
|
||||
[#include <sys/time.h>])
|
||||
AC_CHECK_TYPES([struct utimbuf], [AC_DEFINE(HAVE_STRUCT_UTIMBUF)], ,
|
||||
[#include <sys/types.h>
|
||||
#include <utime.h>])
|
||||
AC_CHECK_MEMBERS(
|
||||
[struct dirent.d_off, struct dirent.d_reclen, struct dirent.d_type],,,
|
||||
[#include <sys/types.h>
|
||||
@@ -1412,12 +1306,6 @@ if test x$platform_win32 = xno; then
|
||||
AC_CHECK_LIB(attr, lsetxattr, XATTR_LIB="-lattr",)
|
||||
)
|
||||
AC_SUBST(XATTR_LIB)
|
||||
|
||||
dnl *********************************
|
||||
dnl *** Checks for Windows compilation ***
|
||||
dnl *********************************
|
||||
AC_CHECK_HEADERS(sys/time.h)
|
||||
AC_CHECK_HEADERS(sys/param.h)
|
||||
|
||||
dnl *********************************
|
||||
dnl *** Check for Console 2.0 I/O ***
|
||||
@@ -1438,9 +1326,7 @@ else
|
||||
AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
|
||||
AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
|
||||
AC_CHECK_LIB(ole32, main, LIBS="$LIBS -lole32", AC_ERROR(bad mingw install?))
|
||||
AC_CHECK_LIB(winmm, main, LIBS="$LIBS -lwinmm", AC_ERROR(bad mingw install?))
|
||||
AC_CHECK_LIB(oleaut32, main, LIBS="$LIBS -loleaut32", AC_ERROR(bad mingw install?))
|
||||
AC_CHECK_LIB(advapi32, main, LIBS="$LIBS -ladvapi32", AC_ERROR(bad mingw install?))
|
||||
|
||||
dnl *********************************
|
||||
dnl *** Check for struct ip_mreqn ***
|
||||
@@ -1625,10 +1511,6 @@ case "$host" in
|
||||
solaris*)
|
||||
LIBC="libc.so"
|
||||
INTL="libintl.so"
|
||||
if test "x$ac_cv_sizeof_void_p" = "x8"; then
|
||||
TARGET=AMD64
|
||||
arch_target=amd64
|
||||
fi
|
||||
|
||||
# On solaris 10 x86, gcc prints a warning saying 'visibility attribute not supported on this configuration; ignored', but linking fails. A test case:
|
||||
# int astruct __attribute__ ((visibility ("hidden")));
|
||||
@@ -1642,6 +1524,7 @@ case "$host" in
|
||||
# ld: fatal: relocation error: R_386_GOTOFF: file /var/tmp//ccxYR96k.o: symbol astruct: relocation must bind locally
|
||||
have_visibility_hidden=no
|
||||
|
||||
libmono_ldflags="$libmono_ldflags $LIBS"
|
||||
esac
|
||||
;;
|
||||
x86_64-*-* | amd64-*-*)
|
||||
@@ -1675,6 +1558,7 @@ case "$host" in
|
||||
*)
|
||||
LIBC="libc.so"
|
||||
INTL="libintl.so"
|
||||
libmono_ldflags="$libmono_ldflags $LIBS"
|
||||
esac
|
||||
jit_wanted=true
|
||||
if test x"$GCC" = xyes; then
|
||||
@@ -1691,7 +1575,7 @@ case "$host" in
|
||||
JIT_SUPPORTED=yes
|
||||
jit_wanted=true
|
||||
arch_target=alpha;
|
||||
CFLAGS="$CFLAGS -mieee -O0"
|
||||
CFLAGS="$CFLAGS -mieee"
|
||||
case $host_os in
|
||||
linux*)
|
||||
LIBC="libc.so.6.1"
|
||||
@@ -1713,11 +1597,10 @@ case "$host" in
|
||||
;;
|
||||
hppa*linux*)
|
||||
TARGET=HPPA;
|
||||
AC_DEFINE(MONO_ARCH_REGPARMS,1,[Architecture uses registers for Parameters])
|
||||
arch_target=hppa;
|
||||
ACCESS_UNALIGNED="no"
|
||||
JIT_SUPPORTED=yes
|
||||
jit_wanted=true
|
||||
INTERP_SUPPORTED=yes
|
||||
interp_wanted=true
|
||||
;;
|
||||
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | \
|
||||
powerpc-*-sysv* | powerpc-*-darwin*)
|
||||
@@ -1866,7 +1749,7 @@ if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
|
||||
fi
|
||||
|
||||
mono_debugger_supported=no
|
||||
if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86" -o "x$TARGET" = "xALPHA"; then
|
||||
if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
|
||||
if test x$use_included_gc = xyes; then
|
||||
case "$host" in
|
||||
*-*-*linux*)
|
||||
@@ -1905,7 +1788,11 @@ if test ${TARGET} = ARM; then
|
||||
|
||||
AC_TRY_COMPILE([], [
|
||||
__asm__ ("ldfd f0, [r0]");
|
||||
], fpu=FPA, fpu=NONE)
|
||||
], fpu=FPA, [
|
||||
AC_TRY_COMPILE([], [
|
||||
__asm__ ("fldd d0, [r0]");
|
||||
], fpu=VFP, fpu=NONE)
|
||||
])
|
||||
|
||||
AC_MSG_RESULT($fpu)
|
||||
CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu=1"
|
||||
@@ -1922,23 +1809,13 @@ if test ${ACCESS_UNALIGNED} = no; then
|
||||
fi
|
||||
|
||||
PREVIEW=yes
|
||||
AC_ARG_WITH(preview, [ --with-preview=yes,no If you want to install the 2.0 FX preview],[
|
||||
AC_ARG_WITH(preview, [ --with-preview=yes,no If you want to install the 2.0 FX preview],[
|
||||
if test x$with_preview = xno; then
|
||||
PREVIEW=no
|
||||
fi
|
||||
])
|
||||
|
||||
MOONLIGHT=no
|
||||
AC_ARG_WITH(moonlight,[ --with-moonlight=yes,no If you want to build the Moonlight 2.1 assemblies],[
|
||||
if test x$with_moonlight = xyes; then
|
||||
MOONLIGHT=yes
|
||||
fi
|
||||
])
|
||||
|
||||
libmono_ldflags="$libmono_ldflags $LIBS"
|
||||
|
||||
AM_CONDITIONAL(INSTALL_2_0, test x$PREVIEW = xyes)
|
||||
AM_CONDITIONAL(INSTALL_2_1, test x$MOONLIGHT = xyes)
|
||||
|
||||
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
|
||||
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
|
||||
@@ -1965,7 +1842,7 @@ AC_SUBST(INTL)
|
||||
AC_SUBST(SQLITE)
|
||||
AC_SUBST(SQLITE3)
|
||||
AC_SUBST(X11)
|
||||
AC_DEFINE_UNQUOTED(ARCHITECTURE,"$arch_target",[The architecture this is running on])
|
||||
|
||||
AC_SUBST(arch_target)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CPPFLAGS)
|
||||
@@ -2035,22 +1912,12 @@ AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/web.config],
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/browscap.ini],
|
||||
[ depth=../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/
|
||||
cd runtime/etc/mono/
|
||||
rm -f browscap.ini
|
||||
$LN_S $reldir/data/browscap.ini browscap.ini
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
mint.pc
|
||||
mono.pc
|
||||
mono-cairo.pc
|
||||
dotnet.pc
|
||||
mono-uninstalled.pc
|
||||
scripts/mono-nunit.pc
|
||||
scripts/mono-find-provides
|
||||
@@ -2076,7 +1943,6 @@ mono/arch/mips/Makefile
|
||||
mono/interpreter/Makefile
|
||||
mono/tests/Makefile
|
||||
mono/tests/tests-config
|
||||
mono/tests/assemblyresolve/Makefile
|
||||
mono/tests/cas/Makefile
|
||||
mono/tests/cas/assembly/Makefile
|
||||
mono/tests/cas/demand/Makefile
|
||||
@@ -2097,18 +1963,12 @@ docs/Makefile
|
||||
data/Makefile
|
||||
data/net_1_1/Makefile
|
||||
data/net_2_0/Makefile
|
||||
data/mint.pc
|
||||
data/mono.pc
|
||||
data/mono-cairo.pc
|
||||
data/dotnet.pc
|
||||
data/cecil.pc
|
||||
samples/Makefile
|
||||
support/Makefile
|
||||
data/config
|
||||
tools/Makefile
|
||||
tools/locale-builder/Makefile
|
||||
runtime/Makefile
|
||||
msvc/Makefile
|
||||
])
|
||||
|
||||
if test x$platform_win32 = xyes; then
|
||||
@@ -2169,11 +2029,9 @@ echo "
|
||||
TLS: $with_tls
|
||||
SIGALTSTACK: $with_sigaltstack
|
||||
Engine: $jit_status
|
||||
2.0 Beta: $PREVIEW
|
||||
2.1 Alpha: $MOONLIGHT
|
||||
2.0 Alpha: $PREVIEW
|
||||
JNI support: $jdk_headers_found
|
||||
libgdiplus: $libgdiplus_msg
|
||||
zlib: $zlib_msg
|
||||
$disabled
|
||||
|
||||
"
|
||||
@@ -2181,6 +2039,10 @@ if test x$with_static_mono = xno -a "x$platform_win32" != "xyes"; then
|
||||
AC_MSG_WARN(Turning off static Mono is a risk, you might run into unexepcted bugs)
|
||||
fi
|
||||
|
||||
if test x$have_zlib = xno; then
|
||||
AC_MSG_WARN(ZLib devel files not available, compression file support in 2.0 won't work.)
|
||||
fi
|
||||
|
||||
if test x$gc = xsgen; then
|
||||
echo IMPORTANT:
|
||||
echo IMPORTANT: You have selected an experimental, work-in-progress
|
||||
|
||||
+2
-18
@@ -2,24 +2,8 @@ SUBDIRS = net_1_1 net_2_0
|
||||
|
||||
monodir = $(sysconfdir)/mono
|
||||
|
||||
EXTRA_DIST = \
|
||||
config.in \
|
||||
browscap.ini mono.supp README \
|
||||
mono.pc.in mint.pc.in dotnet.pc.in mono-cairo.pc.in cecil.pc.in
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
|
||||
if JIT_SUPPORTED
|
||||
if INTERP_SUPPORTED
|
||||
pkgconfig_DATA= mono.pc mint.pc dotnet.pc mono-cairo.pc cecil.pc
|
||||
else
|
||||
pkgconfig_DATA= mono.pc dotnet.pc mono-cairo.pc cecil.pc
|
||||
endif
|
||||
else
|
||||
pkgconfig_DATA= mint.pc mono-cairo.pc cecil.pc
|
||||
endif
|
||||
|
||||
DISTCLEANFILES= mono.pc mint.pc dotnet.pc mono-cairo.pc cecil.pc
|
||||
EXTRA_DIST = config.in \
|
||||
browscap.ini mono.supp README
|
||||
|
||||
mono_DATA = config \
|
||||
browscap.ini
|
||||
|
||||
+12383
-16312
File diff suppressed because it is too large.
Load diff
@@ -1,7 +0,0 @@
|
||||
assemblies_dir=@prefix@/lib/mono
|
||||
Libraries=${assemblies_dir}/gac/Mono.Cecil/0.5.0.1__0738eb9f132ed756/Mono.Cecil.dll
|
||||
|
||||
Name: Mono Internal -- Do not use.
|
||||
Description: Mono Internal Libraries -- Do not use
|
||||
Version: @VERSION@
|
||||
Libs: -r:Mono.Cecil.dll
|
||||
+15
-21
@@ -1,24 +1,18 @@
|
||||
<configuration>
|
||||
<dllmap dll="i:cygwin1.dll" target="@LIBC@" os="!windows" />
|
||||
<dllmap dll="libc" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="intl" target="@INTL@" os="!windows"/>
|
||||
<dllmap dll="libintl" target="@INTL@" os="!windows"/>
|
||||
<dllmap dll="i:libxslt.dll" target="libxslt@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="i:odbc32.dll" target="libodbc@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx"/>
|
||||
<dllmap dll="cygwin1.dll" target="@LIBC@" />
|
||||
<dllmap dll="libc" target="@LIBC@" />
|
||||
<dllmap dll="intl" target="@INTL@" />
|
||||
<dllmap dll="libintl" target="@INTL@" />
|
||||
<dllmap dll="libxslt.dll" target="libxslt@libsuffix@" />
|
||||
<dllmap dll="libmySQL.dll" target="libmysqlclient@libsuffix@" />
|
||||
<dllmap dll="odbc32.dll" target="libodbc@libsuffix@" />
|
||||
<dllmap os="osx" dll="odbc32.dll" target="libiodbc.dylib" />
|
||||
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="MonoPosixHelper" target="libMonoPosixHelper@libsuffix@" os="!windows" />
|
||||
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
|
||||
<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
|
||||
<dllmap dll="libX11" target="@X11@" os="!windows" />
|
||||
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
|
||||
<dllmap dll="i:kernel32.dll">
|
||||
<dllentry dll="__Internal" name="CopyMemory" target="mono_win32_compat_CopyMemory"/>
|
||||
<dllentry dll="__Internal" name="FillMemory" target="mono_win32_compat_FillMemory"/>
|
||||
<dllentry dll="__Internal" name="MoveMemory" target="mono_win32_compat_MoveMemory"/>
|
||||
<dllentry dll="__Internal" name="ZeroMemory" target="mono_win32_compat_ZeroMemory"/>
|
||||
</dllmap>
|
||||
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" />
|
||||
<dllmap dll="msvcrt" target="@LIBC@" />
|
||||
<dllmap dll="MonoPosixHelper" target="libMonoPosixHelper@libsuffix@" />
|
||||
<dllmap dll="sqlite" target="@SQLITE@" />
|
||||
<dllmap dll="sqlite3" target="@SQLITE3@" />
|
||||
<dllmap dll="libX11" target="@X11@" />
|
||||
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" />
|
||||
</configuration>
|
||||
@@ -24,9 +24,7 @@
|
||||
<%@ Import Namespace="System.CodeDom.Compiler" %>
|
||||
<%@ Import Namespace="Microsoft.CSharp" %>
|
||||
<%@ Import Namespace="Microsoft.VisualBasic" %>
|
||||
<%@ Import Namespace="System.Text" %>
|
||||
<%@ Import Namespace="System.Text.RegularExpressions" %>
|
||||
<%@ Import Namespace="System.Security.Cryptography.X509Certificates" %>
|
||||
<%@ Assembly name="System.Web.Services" %>
|
||||
<%@ Page debug="true" %>
|
||||
|
||||
@@ -308,13 +306,6 @@ bool HasFormResult
|
||||
get { return Request.QueryString ["ext"] == "testform"; }
|
||||
}
|
||||
|
||||
class NoCheckCertificatePolicy : ICertificatePolicy {
|
||||
public bool CheckValidationResult (ServicePoint a, X509Certificate b, WebRequest c, int d)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
string GetTestResult ()
|
||||
{
|
||||
if (!HasFormResult) return null;
|
||||
@@ -348,22 +339,7 @@ string GetTestResult ()
|
||||
{
|
||||
string url = location + "/" + CurrentOperationName;
|
||||
Uri uri = new Uri (url);
|
||||
WebRequest req;
|
||||
if (CurrentOperationProtocols.IndexOf ("HttpGet") < 0) {
|
||||
req = WebRequest.Create (url);
|
||||
req.Method = "POST";
|
||||
if (qs != null && qs.Length > 0) {
|
||||
req.ContentType = "application/x-www-form-urlencoded";
|
||||
byte [] postBuffer = Encoding.UTF8.GetBytes (qs);
|
||||
req.ContentLength = postBuffer.Length;
|
||||
using (Stream requestStream = req.GetRequestStream ())
|
||||
requestStream.Write (postBuffer, 0, postBuffer.Length);
|
||||
}
|
||||
}
|
||||
else
|
||||
req = WebRequest.Create (url + "?" + qs);
|
||||
if (url.StartsWith ("https:"))
|
||||
ServicePointManager.CertificatePolicy = new NoCheckCertificatePolicy ();
|
||||
WebRequest req = WebRequest.Create (url + "?" + qs);
|
||||
HttpCookieCollection cookies = Request.Cookies;
|
||||
int last = cookies.Count;
|
||||
if (last > 0) {
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
2007-09-05 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* machine.config : added WCF sectionGroups.
|
||||
|
||||
2007-09-04 Marek Habersack <[email protected]>
|
||||
|
||||
* machine.config: added an entry to ignore the <system.webServer>
|
||||
section. Fixes bug #82535
|
||||
|
||||
2007-07-03 Marek Habersack <[email protected]>
|
||||
|
||||
* DefaultWsdlHelpGenerator.aspx: make head server-side, for the
|
||||
service generator to run on sites which use stylesheet themes
|
||||
configured in web.config. Fixes bug #81994
|
||||
|
||||
2007-05-01 Marek Habersack <[email protected]>
|
||||
|
||||
* machine.config: added standard data provider factories, or
|
||||
otherwise the SqlDataSource tests will fail.
|
||||
|
||||
2007-04-27 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* DefaultWsdlHelpGenerator.aspx :
|
||||
ProfileViolations could be null, when there is no Binding. So,
|
||||
don't omit null check.
|
||||
|
||||
Stop your bad habit of missing ChangeLog. Former changes (as long
|
||||
as logged) can be seen in ../../ChangeLog.
|
||||
@@ -16,8 +16,6 @@
|
||||
<%@ Import Namespace="System.Xml.Schema" %>
|
||||
<%@ Import Namespace="System.Web.Services" %>
|
||||
<%@ Import Namespace="System.Web.Services.Description" %>
|
||||
<%@ Import Namespace="System.Web.Services.Configuration" %>
|
||||
<%@ Import Namespace="System.Web.Configuration" %>
|
||||
<%@ Import Namespace="System" %>
|
||||
<%@ Import Namespace="System.Net" %>
|
||||
<%@ Import Namespace="System.Globalization" %>
|
||||
@@ -27,9 +25,7 @@
|
||||
<%@ Import Namespace="System.CodeDom.Compiler" %>
|
||||
<%@ Import Namespace="Microsoft.CSharp" %>
|
||||
<%@ Import Namespace="Microsoft.VisualBasic" %>
|
||||
<%@ Import Namespace="System.Text" %>
|
||||
<%@ Import Namespace="System.Text.RegularExpressions" %>
|
||||
<%@ Import Namespace="System.Security.Cryptography.X509Certificates" %>
|
||||
<%@ Assembly name="System.Web.Services" %>
|
||||
<%@ Page debug="true" %>
|
||||
|
||||
@@ -92,9 +88,7 @@ void Page_Load(object sender, EventArgs e)
|
||||
Page.DataBind();
|
||||
|
||||
ProfileViolations = new BasicProfileViolationCollection ();
|
||||
foreach (WsiProfilesElement claims in ((WebServicesSection) WebConfigurationManager.GetSection("system.web/webServices")).ConformanceWarnings)
|
||||
if (claims.Name != WsiProfiles.None)
|
||||
WebServicesInteroperability.CheckConformance (claims.Name, descriptions, ProfileViolations);
|
||||
WebServicesInteroperability.CheckConformance (WsiProfiles.BasicProfile1_1, descriptions, ProfileViolations);
|
||||
}
|
||||
|
||||
void BuildOperationInfo ()
|
||||
@@ -128,10 +122,7 @@ void BuildOperationInfo ()
|
||||
CurrentOperationProtocols += (string) prots[n];
|
||||
}
|
||||
|
||||
WebServiceProtocols testProtocols = WebServiceProtocols.HttpGet | WebServiceProtocols.HttpPost;
|
||||
if (Context.Request.IsLocal)
|
||||
testProtocols |= WebServiceProtocols.HttpPostLocalhost;
|
||||
CurrentOperationSupportsTest = (WebServicesSection.Current.EnabledProtocols & testProtocols) != 0;
|
||||
CurrentOperationSupportsTest = prots.Contains ("HttpGet") || prots.Contains ("HttpPost");
|
||||
|
||||
// Operation format
|
||||
OperationBinding obin = FindOperation (binding, CurrentOperationName);
|
||||
@@ -322,13 +313,6 @@ bool HasFormResult
|
||||
get { return Request.QueryString ["ext"] == "testform"; }
|
||||
}
|
||||
|
||||
class NoCheckCertificatePolicy : ICertificatePolicy {
|
||||
public bool CheckValidationResult (ServicePoint a, X509Certificate b, WebRequest c, int d)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
string GetTestResult ()
|
||||
{
|
||||
if (!HasFormResult) return null;
|
||||
@@ -362,22 +346,7 @@ string GetTestResult ()
|
||||
{
|
||||
string url = location + "/" + CurrentOperationName;
|
||||
Uri uri = new Uri (url);
|
||||
WebRequest req;
|
||||
if (CurrentOperationProtocols.IndexOf ("HttpGet") < 0) {
|
||||
req = WebRequest.Create (url);
|
||||
req.Method="POST";
|
||||
if (!String.IsNullOrEmpty (qs)) {
|
||||
req.ContentType = "application/x-www-form-urlencoded";
|
||||
byte [] postBuffer = Encoding.UTF8.GetBytes (qs);
|
||||
req.ContentLength = postBuffer.Length;
|
||||
using (Stream requestStream = req.GetRequestStream())
|
||||
requestStream.Write (postBuffer, 0, postBuffer.Length);
|
||||
}
|
||||
}
|
||||
else
|
||||
req = WebRequest.Create (url + "?" + qs);
|
||||
if (url.StartsWith ("https:"))
|
||||
ServicePointManager.CertificatePolicy = new NoCheckCertificatePolicy ();
|
||||
WebRequest req = WebRequest.Create (url + "?" + qs);
|
||||
HttpCookieCollection cookies = Request.Cookies;
|
||||
int last = cookies.Count;
|
||||
if (last > 0) {
|
||||
@@ -1557,7 +1526,7 @@ public class HtmlSampleGenerator: SampleGenerator
|
||||
|
||||
</script>
|
||||
|
||||
<head runat="server">
|
||||
<head>
|
||||
<link rel="alternate" type="text/xml" href="<%=Request.FilePath%>?disco"/>
|
||||
|
||||
<title><%=WebServiceName%> Web Service</title>
|
||||
@@ -1644,9 +1613,9 @@ function clearForm ()
|
||||
<p class="label">Web Service Overview</p>
|
||||
<%=WebServiceDescription%>
|
||||
<br/><br/>
|
||||
<% if (ProfileViolations != null && ProfileViolations.Count > 0) { %>
|
||||
<% if (ProfileViolations.Count > 0) { %>
|
||||
<p class="label">Basic Profile Conformance</p>
|
||||
This web service does not conform to WS-I Basic Profile v1.1
|
||||
This web service does not conform to WS-I Basic Profile v1.0
|
||||
<%
|
||||
Response.Write ("<ul>");
|
||||
foreach (BasicProfileViolation vio in ProfileViolations) {
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
<%@ Import Namespace="System.Xml.Schema" %>
|
||||
<%@ Import Namespace="System.Web.Services" %>
|
||||
<%@ Import Namespace="System.Web.Services.Description" %>
|
||||
<%@ Import Namespace="System.Web.Services.Configuration" %>
|
||||
<%@ Import Namespace="System.Web.Configuration" %>
|
||||
<%@ Import Namespace="System" %>
|
||||
<%@ Import Namespace="System.Net" %>
|
||||
<%@ Import Namespace="System.Globalization" %>
|
||||
@@ -27,7 +25,6 @@
|
||||
<%@ Import Namespace="System.CodeDom.Compiler" %>
|
||||
<%@ Import Namespace="Microsoft.CSharp" %>
|
||||
<%@ Import Namespace="Microsoft.VisualBasic" %>
|
||||
<%@ Import Namespace="System.Text" %>
|
||||
<%@ Import Namespace="System.Text.RegularExpressions" %>
|
||||
<%@ Assembly name="System.Web.Services" %>
|
||||
<%@ Page debug="true" %>
|
||||
@@ -91,9 +88,7 @@ void Page_Load(object sender, EventArgs e)
|
||||
Page.DataBind();
|
||||
|
||||
ProfileViolations = new BasicProfileViolationCollection ();
|
||||
foreach (WsiProfilesElement claims in ((WebServicesSection) WebConfigurationManager.GetSection("system.web/webServices")).ConformanceWarnings)
|
||||
if (claims.Name != WsiProfiles.None)
|
||||
WebServicesInteroperability.CheckConformance (claims.Name, descriptions, ProfileViolations);
|
||||
//WebServicesInteroperability.CheckConformance (WsiClaims.BP10, descriptions, ProfileViolations);
|
||||
}
|
||||
|
||||
void BuildOperationInfo ()
|
||||
@@ -127,10 +122,7 @@ void BuildOperationInfo ()
|
||||
CurrentOperationProtocols += (string) prots[n];
|
||||
}
|
||||
|
||||
WebServiceProtocols testProtocols = WebServiceProtocols.HttpGet | WebServiceProtocols.HttpPost;
|
||||
if (Context.Request.IsLocal)
|
||||
testProtocols |= WebServiceProtocols.HttpPostLocalhost;
|
||||
CurrentOperationSupportsTest = (WebServicesSection.Current.EnabledProtocols & testProtocols) != 0;
|
||||
CurrentOperationSupportsTest = prots.Contains ("HttpGet") || prots.Contains ("HttpPost");
|
||||
|
||||
// Operation format
|
||||
OperationBinding obin = FindOperation (binding, CurrentOperationName);
|
||||
@@ -304,8 +296,7 @@ OperationBinding FindOperation (Binding binding, string name)
|
||||
|
||||
string FormatBindingName (string name)
|
||||
{
|
||||
if (name.EndsWith("Soap")) return "Soap 1.1";
|
||||
else if (name.EndsWith("Soap12")) return "Soap 1.2";
|
||||
if (name == DefaultBinding) return "Methods";
|
||||
else return "Methods for binding<br>" + name;
|
||||
}
|
||||
|
||||
@@ -355,20 +346,7 @@ string GetTestResult ()
|
||||
{
|
||||
string url = location + "/" + CurrentOperationName;
|
||||
Uri uri = new Uri (url);
|
||||
WebRequest req;
|
||||
if (CurrentOperationProtocols.IndexOf ("HttpGet") < 0) {
|
||||
req = WebRequest.Create (url + ".invoke");
|
||||
req.Method="POST";
|
||||
if (!String.IsNullOrEmpty (qs)) {
|
||||
req.ContentType = "application/x-www-form-urlencoded";
|
||||
byte [] postBuffer = Encoding.UTF8.GetBytes (qs);
|
||||
req.ContentLength = postBuffer.Length;
|
||||
using (Stream requestStream = req.GetRequestStream())
|
||||
requestStream.Write (postBuffer, 0, postBuffer.Length);
|
||||
}
|
||||
}
|
||||
else
|
||||
req = WebRequest.Create (url + ".invoke?" + qs);
|
||||
WebRequest req = WebRequest.Create (url + ".invoke?" + qs);
|
||||
HttpCookieCollection cookies = Request.Cookies;
|
||||
int last = cookies.Count;
|
||||
if (last > 0) {
|
||||
@@ -388,7 +366,7 @@ string GetTestResult ()
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string res = "<b style='color:red'>" + ex.Message + "</b>";
|
||||
string res = "<b style='color:red'>" + ex.Message + "<br/>" + ex.StackTrace.Replace("\n", "<br/>") + "</b>";
|
||||
WebException wex = ex as WebException;
|
||||
if (wex != null)
|
||||
{
|
||||
@@ -779,6 +757,7 @@ public class HtmlSampleGenerator: SampleGenerator
|
||||
static readonly XmlQualifiedName anyType = new XmlQualifiedName ("anyType",XmlSchema.Namespace);
|
||||
static readonly XmlQualifiedName arrayType = new XmlQualifiedName ("Array","http://schemas.xmlsoap.org/soap/encoding/");
|
||||
static readonly XmlQualifiedName arrayTypeRefName = new XmlQualifiedName ("arrayType","http://schemas.xmlsoap.org/soap/encoding/");
|
||||
const string SoapEnvelopeNamespace = "http://schemas.xmlsoap.org/soap/envelope/";
|
||||
const string WsdlNamespace = "http://schemas.xmlsoap.org/wsdl/";
|
||||
const string SoapEncodingNamespace = "http://schemas.xmlsoap.org/soap/encoding/";
|
||||
|
||||
@@ -913,10 +892,6 @@ public class HtmlSampleGenerator: SampleGenerator
|
||||
|
||||
public string GenerateSoapMessage (OperationBinding obin, Operation oper, OperationMessage msg)
|
||||
{
|
||||
string SoapEnvelopeNamespace = "http://schemas.xmlsoap.org/soap/envelope/";
|
||||
if(obin.Binding.Name.EndsWith("Soap12"))
|
||||
SoapEnvelopeNamespace = "http://www.w3.org/2003/05/soap-envelope";
|
||||
|
||||
SoapOperationBinding sob = obin.Extensions.Find (typeof(SoapOperationBinding)) as SoapOperationBinding;
|
||||
SoapBindingStyle style = (sob != null) ? sob.Style : SoapBindingStyle.Document;
|
||||
|
||||
@@ -1527,7 +1502,7 @@ public class HtmlSampleGenerator: SampleGenerator
|
||||
.title { color:dimgray; font-family: Arial; font-size:20pt; font-weight:900}
|
||||
.operationTitle { color:dimgray; font-family: Arial; font-size:15pt; font-weight:900}
|
||||
.method { font-size: x-small }
|
||||
.bindingLabel { font-size: medium; font-weight:bold; color:darkgray; line-height:8pt; display:block; margin-bottom:3px }
|
||||
.bindingLabel { font-size: x-small; font-weight:bold; color:darkgray; line-height:8pt; display:block; margin-bottom:3px }
|
||||
.label { font-size: small; font-weight:bold; color:darkgray }
|
||||
.paramTable { font-size: x-small }
|
||||
.paramTable TR { background-color: gainsboro }
|
||||
@@ -1576,10 +1551,8 @@ function clearForm ()
|
||||
<a class="method" href='<%=PageName%>'>Overview</a><br>
|
||||
<div class="smallSeparator"></div>
|
||||
<a class="method" href='<%=PageName + "?" + GetPageContext("wsdl")%>'>Service Description</a>
|
||||
<!--
|
||||
<div class="smallSeparator"></div>
|
||||
<a class="method" href='<%=PageName + "?" + GetPageContext("proxy")%>'>Client proxy</a>
|
||||
-->
|
||||
<br><br>
|
||||
<asp:repeater id="BindingsRepeater" runat=server>
|
||||
<itemtemplate>
|
||||
@@ -1608,7 +1581,7 @@ function clearForm ()
|
||||
<br/><br/>
|
||||
<% if (ProfileViolations.Count > 0) { %>
|
||||
<p class="label">Basic Profile Conformance</p>
|
||||
This web service does not conform to WS-I Basic Profile v1.1
|
||||
This web service does not conform to WS-I Basic Profile v1.0
|
||||
<%
|
||||
Response.Write ("<ul>");
|
||||
foreach (BasicProfileViolation vio in ProfileViolations) {
|
||||
|
||||
+25
-81
@@ -6,86 +6,58 @@
|
||||
<section name="configProtectedData" type="System.Configuration.ProtectedConfigurationSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="connectionStrings" type="System.Configuration.ConnectionStringsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="mscorlib" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
|
||||
<section name="runtime" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
|
||||
<section name="assemblyBinding" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<section name="satelliteassemblies" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
|
||||
<section name="mscorlib" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="runtime" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.data" type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<section name="windows" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<section name="strongNames" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<sectionGroup name="system.web" type="System.Web.Configuration.SystemWebSectionGroup, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="authorization" type="System.Web.Configuration.AuthorizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="clientTarget" type="System.Web.Configuration.ClientTargetSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="compilation" type="System.Web.Configuration.CompilationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="customErrors" type="System.Web.Configuration.CustomErrorsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="deployment" type="System.Web.Configuration.DeploymentSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" />
|
||||
<section name="globalization" type="System.Web.Configuration.GlobalizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="healthMonitoring" type="System.Web.Configuration.HealthMonitoringSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="hostingEnvironment" type="System.Web.Configuration.HostingEnvironmentSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="httpCookies" type="System.Web.Configuration.HttpCookiesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="httpModules" type="System.Web.Configuration.HttpModulesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="httpRuntime" type="System.Web.Configuration.HttpRuntimeSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="identity" type="System.Web.Configuration.IdentitySection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="machineKey" type="System.Web.Configuration.MachineKeySection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="membership" type="System.Web.Configuration.MembershipSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="pages" type="System.Web.Configuration.PagesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="processModel" type="System.Web.Configuration.ProcessModelSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" allowLocation="false" />
|
||||
<section name="profile" type="System.Web.Configuration.ProfileSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="roleManager" type="System.Web.Configuration.RoleManagerSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="securityPolicy" type="System.Web.Configuration.SecurityPolicySection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="sessionPageState" type="System.Web.Configuration.SessionPageStateSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="sessionState" type="System.Web.Configuration.SessionStateSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="siteMap" type="System.Web.Configuration.SiteMapSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="profile" type="System.Web.Configuration.ProfileSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="roleManager" type="System.Web.Configuration.RoleManagerSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="sessionState" type="System.Web.Configuration.SessionStateSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="siteMap" type="System.Web.Configuration.SiteMapSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="trace" type="System.Web.Configuration.TraceSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="trust" type="System.Web.Configuration.TrustSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="urlMappings" type="System.Web.Configuration.UrlMappingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="webControls" type="System.Web.Configuration.WebControlsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="webParts" type="System.Web.Configuration.WebPartsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="webServices" type="System.Web.Services.Configuration.WebServicesSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="xhtmlConformance" type="System.Web.Configuration.XhtmlConformanceSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="xhtmlConformance" type="System.Web.Services.Configuration.XhtmlConformanceSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<sectionGroup name="caching" type="System.Web.Configuration.SystemWebCachingSectionGroup, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<section name="cache" type="System.Web.Configuration.CacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="outputCache" type="System.Web.Configuration.OutputCacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="outputCacheSettings" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="sqlCacheDependency" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="cache" type="System.Web.Configuration.CacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="outputCache" type="System.Web.Configuration.OutputCacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="outputCacheSettings" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="sqlCacheDependency" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</sectionGroup>
|
||||
</sectionGroup>
|
||||
<sectionGroup name="system.net" type="System.Net.Configuration.NetSectionGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="authenticationModules" type="System.Net.Configuration.AuthenticationModulesSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="connectionManagement" type="System.Net.Configuration.ConnectionManagementSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="defaultProxy" type="System.Net.Configuration.DefaultProxySection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<sectionGroup name="mailSettings" type="System.Net.Configuration.MailSettingsSectionGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="smtp" type="System.Net.Configuration.SmtpSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</sectionGroup>
|
||||
<section name="requestCaching" type="System.Net.Configuration.RequestCachingSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="settings" type="System.Net.Configuration.SettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="webRequestModules" type="System.Net.Configuration.WebRequestModulesSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<sectionGroup name="system.net">
|
||||
<section name="settings"
|
||||
type="System.Net.Configuration.SettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="connectionManagement"
|
||||
type="System.Net.Configuration.ConnectionManagementSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="authenticationModules"
|
||||
type="System.Net.Configuration.NetAuthenticationModuleHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="defaultProxy"
|
||||
type="System.Net.Configuration.DefaultProxySection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="webRequestModules"
|
||||
type="System.Net.Configuration.WebRequestModulesSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</sectionGroup>
|
||||
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<sectionGroup name="system.serviceModel" type="System.ServiceModel.Configuration.ServiceModelSectionGroup, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="behaviors" type="System.ServiceModel.Configuration.BehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="bindings" type="System.ServiceModel.Configuration.BindingsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="client" type="System.ServiceModel.Configuration.ClientSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="commonBehaviors" type="System.ServiceModel.Configuration.CommonBehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="diagnostic" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="serviceModelHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</sectionGroup>
|
||||
<section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</configSections>
|
||||
|
||||
<!-- <connectionStrings>
|
||||
<add name="LocalSqlServer" connectionString="Data Source=|DataDirectory|/aspnetdb.sqlite;create=true;version=3" providerName="Mono.Data.SqliteClient"/>
|
||||
</connectionStrings> -->
|
||||
|
||||
<configProtectedData defaultProvider="RsaProtectedConfigurationProvider">
|
||||
<providers>
|
||||
<add name="RsaProtectedConfigurationProvider" type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
@@ -158,26 +130,6 @@
|
||||
<system.drawing>
|
||||
</system.drawing>
|
||||
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
<add name="Mono Sqlite Data Provider" invariant="Mono.Data.SqliteClient"
|
||||
description="Mono Framework Data Provider for SQLite"
|
||||
type="Mono.Data.SqliteClient.SqliteFactory, Mono.Data.SqliteClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"/>
|
||||
<add name="Odbc Data Provider" invariant="System.Data.Odbc"
|
||||
description=".Net Framework Data Provider for Odbc"
|
||||
type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<add name="OleDb Data Provider" invariant="System.Data.OleDb"
|
||||
description=".Net Framework Data Provider for OleDb"
|
||||
type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<add name="OracleClient Data Provider" invariant="System.Data.OracleClient"
|
||||
description=".Net Framework Data Provider for Oracle"
|
||||
type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<add name="SqlClient Data Provider" invariant="System.Data.SqlClient"
|
||||
description=".Net Framework Data Provider for SqlServer"
|
||||
type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
</DbProviderFactories>
|
||||
</system.data>
|
||||
|
||||
<mscorlib>
|
||||
<cryptographySettings>
|
||||
<cryptoNameMapping>
|
||||
@@ -209,22 +161,14 @@
|
||||
<membership>
|
||||
<providers>
|
||||
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" applicationName="/" connectionStringName="LocalSqlServer" />
|
||||
<!-- <add name="AspNetSqlMembershipProvider" type="Mainsoft.Web.Security.GenericMembershipProvider, Mainsoft.Web.Security" applicationName="/" connectionStringName="LocalSqlServer" /> -->
|
||||
</providers>
|
||||
</membership>
|
||||
|
||||
<roleManager>
|
||||
<providers>
|
||||
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" applicationName="/" connectionStringName="LocalSqlServer" />
|
||||
<!-- <add name="AspNetSqlRoleProvider" type="Mainsoft.Web.Security.GenericRoleProvider, Mainsoft.Web.Security" applicationName="/" connectionStringName="LocalSqlServer" /> -->
|
||||
</providers>
|
||||
</roleManager>
|
||||
|
||||
<profile>
|
||||
<providers>
|
||||
<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</providers>
|
||||
</profile>
|
||||
</system.web>
|
||||
</configuration>
|
||||
|
||||
|
||||
@@ -3,29 +3,20 @@
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<section name="assemblyBinding" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<section name="satelliteassemblies" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<section name="configProtectedData" type="System.Configuration.ProtectedConfigurationSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="connectionStrings" type="System.Configuration.ConnectionStringsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="mscorlib" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="runtime" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="system.codedom" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="system.data.dataset" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="system.data.odbc" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="system.data.oledb" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="system.data.oracleclient" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="system.data.sqlclient" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="system.windows.forms" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="windows" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<!-- <section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> -->
|
||||
<section name="system.data" type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<section name="strongNames" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<sectionGroup name="system.web" type="System.Web.Configuration.SystemWebSectionGroup, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="authorization" type="System.Web.Configuration.AuthorizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="clientTarget" type="System.Web.Configuration.ClientTargetSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="compilation" type="System.Web.Configuration.CompilationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
@@ -34,58 +25,37 @@
|
||||
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="httpModules" type="System.Web.Configuration.HttpModulesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="httpRuntime" type="System.Web.Configuration.HttpRuntimeSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="machineKey" type="System.Web.Configuration.MachineKeySection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="membership" type="System.Web.Configuration.MembershipSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="machineKey" type="System.Web.Configuration.MachineKeySection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="membership" type="System.Web.Configuration.MembershipSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="mobileControls" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="deviceFilters" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="pages" type="System.Web.Configuration.PagesSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="profile" type="System.Web.Configuration.ProfileSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="roleManager" type="System.Web.Configuration.RoleManagerSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="sessionState" type="System.Web.Configuration.SessionStateSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="siteMap" type="System.Web.Configuration.SiteMapSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="profile" type="System.Web.Configuration.ProfileSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="roleManager" type="System.Web.Configuration.RoleManagerSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="sessionState" type="System.Web.Configuration.SessionStateSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="siteMap" type="System.Web.Configuration.SiteMapSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="trace" type="System.Web.Configuration.TraceSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="urlMappings" type="System.Web.Configuration.UrlMappingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="urlMappings" type="System.Web.Configuration.UrlMappingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="webControls" type="System.Web.Configuration.WebControlsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="webServices" type="System.Web.Services.Configuration.WebServicesSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="xhtmlConformance" type="System.Web.Configuration.XhtmlConformanceSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="browserCaps" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="deployment" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" />
|
||||
<section name="healthMonitoring" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="hostingEnvironment" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="httpCookies" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="identity" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="processModel" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" allowLocation="false" />
|
||||
<section name="securityPolicy" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="sessionPageState" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="trust" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="webParts" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="xhtmlConformance" type="System.Web.Services.Configuration.XhtmlConformanceSection, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<sectionGroup name="caching" type="System.Web.Configuration.SystemWebCachingSectionGroup, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<section name="cache" type="System.Web.Configuration.CacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="outputCache" type="System.Web.Configuration.OutputCacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="outputCacheSettings" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="sqlCacheDependency" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
|
||||
<section name="cache" type="System.Web.Configuration.CacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="outputCache" type="System.Web.Configuration.OutputCacheSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="outputCacheSettings" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="sqlCacheDependency" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</sectionGroup>
|
||||
</sectionGroup>
|
||||
<sectionGroup name="system.xml.serialization" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<section name="schemaImporterExtensions" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="dateTimeSerialization" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="xmlSerializer" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="system.net" type="System.Net.Configuration.NetSectionGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="authenticationModules" type="System.Net.Configuration.AuthenticationModulesSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="connectionManagement" type="System.Net.Configuration.ConnectionManagementSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="defaultProxy" type="System.Net.Configuration.DefaultProxySection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<sectionGroup name="mailSettings" type="System.Net.Configuration.MailSettingsSectionGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="smtp" type="System.Net.Configuration.SmtpSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</sectionGroup>
|
||||
<section name="requestCaching" type="System.Net.Configuration.RequestCachingSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="settings" type="System.Net.Configuration.SettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="webRequestModules" type="System.Net.Configuration.WebRequestModulesSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="system.transactions" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<section name="defaultSettings" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="machineSettings" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" />
|
||||
<sectionGroup name="system.net">
|
||||
<section name="settings"
|
||||
type="System.Net.Configuration.SettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="connectionManagement"
|
||||
type="System.Net.Configuration.ConnectionManagementSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="authenticationModules"
|
||||
type="System.Net.Configuration.NetAuthenticationModuleHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="defaultProxy"
|
||||
type="System.Net.Configuration.DefaultProxySection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="webRequestModules"
|
||||
type="System.Net.Configuration.WebRequestModulesSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</sectionGroup>
|
||||
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<sectionGroup name="mainsoft.drawing">
|
||||
@@ -94,7 +64,7 @@
|
||||
<section name="codecsmetadata" type="Mainsoft.Drawing.Configuration.ResolutionConfigurationHandler" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="mainsoft.directoryservices">
|
||||
<section name="settings" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<section name="Settings" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
</sectionGroup>
|
||||
<sectionGroup name="Mainsoft.Data.Configuration">
|
||||
<section name="objectnameresolution"
|
||||
@@ -108,9 +78,6 @@
|
||||
<section name="OracleClientProviders"
|
||||
type="Mainsoft.Data.Configuration.ProvidersSectionHandler, System.Data" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="mainsoft.web" type="Mainsoft.Web.Configuration.MainsoftWebSectionGroup, Mainsoft.Configuration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<section name="pages" type="Mainsoft.Web.Configuration.PagesSection, Mainsoft.Configuration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<configProtectedData defaultProvider="RsaProtectedConfigurationProvider">
|
||||
@@ -186,7 +153,7 @@
|
||||
</system.drawing>
|
||||
|
||||
<connectionStrings>
|
||||
<add name="EmbeddedDerby" connectionString="JdbcDriverClassName=org.apache.derby.jdbc.EmbeddedDriver;JdbcURL=jdbc:derby:|DataDirectory|aspnetdb;create=true" providerName="System.Data.OleDb" />
|
||||
<add name="LocalSqlServer" connectionString="JdbcDriverClassName=org.apache.derby.jdbc.EmbeddedDriver;JdbcURL=jdbc:derby:|DataDirectory|aspnetdb;create=true" providerName="System.Data.OleDb" />
|
||||
</connectionStrings>
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
@@ -217,23 +184,14 @@
|
||||
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.Config" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.cs" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.vb" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.csproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.vbproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.licx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.dll" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.java" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.class" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.jar" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add verb="*" path="*.exclude" type="System.Web.HttpForbiddenHandler" validate="True" />
|
||||
<add verb="*" path="*.refresh" type="System.Web.HttpForbiddenHandler" validate="True" />
|
||||
<add verb="*" path="*.mdf" type="System.Web.HttpForbiddenHandler" validate="True" />
|
||||
<add verb="*" path="*.ldf" type="System.Web.HttpForbiddenHandler" validate="True" />
|
||||
<add verb="*" path="*.lck" type="System.Web.HttpForbiddenHandler" validate="True" />
|
||||
<add verb="*" path="*.properties" type="System.Web.HttpForbiddenHandler" validate="True" />
|
||||
<add verb="*" path="*.dat" type="System.Web.HttpForbiddenHandler" validate="True" />
|
||||
<add verb="*" path="*.ctrl" type="System.Web.HttpForbiddenHandler" validate="True" />
|
||||
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
|
||||
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
|
||||
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
@@ -243,7 +201,6 @@
|
||||
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />
|
||||
<add name="Session" type="System.Web.SessionState.SessionStateModule" />
|
||||
<!--add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" /-->
|
||||
<add name="ServletAuthentication" type="Mainsoft.Web.Security.SevletAuthenticationModule" />
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
|
||||
<!--add name="PassportAuthentication" type="System.Web.Security.PassportAuthenticationModule" /-->
|
||||
<add name="RoleManager" type="System.Web.Security.RoleManagerModule" />
|
||||
@@ -260,25 +217,14 @@
|
||||
culture="en-US"
|
||||
uiculture="en-US" />
|
||||
-->
|
||||
<sessionState
|
||||
mode="Custom"
|
||||
customProvider="ServletSessionStateStore"
|
||||
sessionIDManagerType="Mainsoft.Web.SessionState.ServletSessionIDManager">
|
||||
<providers>
|
||||
<add name="ServletSessionStateStore"
|
||||
type="Mainsoft.Web.SessionState.ServletSessionStateStoreProvider" />
|
||||
</providers>
|
||||
</sessionState>
|
||||
<sessionState mode="InProc" />
|
||||
<webServices>
|
||||
<protocols>
|
||||
<add name="HttpSoap"/>
|
||||
<add name="HttpSoap12"/>
|
||||
<add name="HttpPostLocalhost"/>
|
||||
<add name="HttpPost"/>
|
||||
<add name="HttpGet"/>
|
||||
<add name="Documentation"/>
|
||||
</protocols>
|
||||
<conformanceWarnings>
|
||||
<add name="BasicProfile1_1"/>
|
||||
</conformanceWarnings>
|
||||
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
|
||||
</webServices>
|
||||
<webControls clientScriptsLocation="/web_scripts" />
|
||||
@@ -320,23 +266,26 @@
|
||||
<add name="AspNetXmlSiteMapProvider"
|
||||
description="Default site map provider that reads in .sitemap xml files."
|
||||
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
siteMapFile="Web.sitemap" />
|
||||
siteMapFile="web.sitemap" />
|
||||
<add name="AspNetConfigXmlSiteMapProvider"
|
||||
description="Default site map provider for AspNet configuration utility."
|
||||
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
siteMapFile="aspnetconfig/web.sitemap" />
|
||||
</providers>
|
||||
</siteMap>
|
||||
<membership defaultProvider="AspNetDerbyMembershipProvider">
|
||||
<membership>
|
||||
<providers>
|
||||
<add name="AspNetDerbyMembershipProvider" connectionStringName="EmbeddedDerby" applicationName="/" type="Mainsoft.Web.Security.DerbyMembershipProvider, Mainsoft.Web" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
|
||||
<!-- add name="WPSMembershipProvider" applicationName="/" type="Mainsoft.Web.Security.WPSMembershipProvider, Mainsoft.Web.WAS" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" / -->
|
||||
<add name="AspNetSqlMembershipProvider" type="Mainsoft.Web.Security.DerbyMembershipProvider, Mainsoft.Web" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
|
||||
</providers>
|
||||
</membership>
|
||||
<profile defaultProvider="AspNetDerbyProfileProvider">
|
||||
<profile>
|
||||
<providers>
|
||||
<add name="AspNetDerbyProfileProvider" connectionStringName="EmbeddedDerby" applicationName="/" type="Mainsoft.Web.Profile.DerbyProfileProvider, Mainsoft.Web" />
|
||||
<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="Mainsoft.Web.Profile.DerbyProfileProvider, Mainsoft.Web" />
|
||||
</providers>
|
||||
</profile>
|
||||
<roleManager defaultProvider="AspNetDerbyRoleProvider">
|
||||
<roleManager>
|
||||
<providers>
|
||||
<add name="AspNetDerbyRoleProvider" connectionStringName="EmbeddedDerby" applicationName="/" type="Mainsoft.Web.Security.DerbyRoleProvider, Mainsoft.Web" />
|
||||
<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="Mainsoft.Web.Security.DerbyRoleProvider, Mainsoft.Web" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
</system.web>
|
||||
@@ -367,7 +316,6 @@
|
||||
<add key="type" value = "Mainsoft.Data.Jdbc.Providers.OleDbSqlServerProvider2005, System.Data" />
|
||||
<add key="keyMapping" value = "serverName=data source,server,address,addr;user=user id,user,uid;password=password,pwd;database=initial catalog,database;loginTimeout=connect timeout,connection timeout;" />
|
||||
<add key="keyExclude" value="provider,jndi-datasource-name,naming-provider-url,naming-factory-initial,jdbcdriverclassname,jdbcurl" />
|
||||
<add key="keyUnsupported" value="AttachDBFilename" />
|
||||
</provider>
|
||||
|
||||
<!-- Microsoft SQLServer driver 2005 (default) -->
|
||||
@@ -378,7 +326,6 @@
|
||||
<add key="type" value = "Mainsoft.Data.Jdbc.Providers.OleDbSqlServerProvider2005, System.Data" />
|
||||
<add key="keyMapping" value = "serverName=data source,server,address,addr;user=user id,user,uid;password=password,pwd;database=initial catalog,database;loginTimeout=connect timeout,connection timeout;" />
|
||||
<add key="keyExclude" value="provider,jndi-datasource-name,naming-provider-url,naming-factory-initial,jdbcdriverclassname,jdbcurl" />
|
||||
<add key="keyUnsupported" value="AttachDBFilename" />
|
||||
</provider>
|
||||
|
||||
<!-- Oracle driver -->
|
||||
@@ -423,7 +370,6 @@
|
||||
<add key="type" value = "Mainsoft.Data.Jdbc.Providers.OleDbSqlServerProvider2005, System.Data" />
|
||||
<add key="keyMapping" value = "serverName=data source,server,address,addr;user=user id,user,uid;password=password,pwd;database=initial catalog,database;loginTimeout=connect timeout,connection timeout;" />
|
||||
<add key="keyExclude" value="provider,jndi-datasource-name,naming-provider-url,naming-factory-initial,jdbcdriverclassname,jdbcurl" />
|
||||
<add key="keyUnsupported" value="AttachDBFilename" />
|
||||
</provider>
|
||||
|
||||
<!-- Microsoft SQLServer driver 2005 (default) -->
|
||||
@@ -434,7 +380,6 @@
|
||||
<add key="type" value = "Mainsoft.Data.Jdbc.Providers.OleDbSqlServerProvider2005, System.Data" />
|
||||
<add key="keyMapping" value = "serverName=data source,server,address,addr;user=user id,user,uid;password=password,pwd;database=initial catalog,database;loginTimeout=connect timeout,connection timeout;" />
|
||||
<add key="keyExclude" value="provider,jndi-datasource-name,naming-provider-url,naming-factory-initial,jdbcdriverclassname,jdbcurl" />
|
||||
<add key="keyUnsupported" value="AttachDBFilename" />
|
||||
</provider>
|
||||
</SqlClientProviders>
|
||||
|
||||
|
||||
+8
-29
@@ -60,14 +60,10 @@
|
||||
<webServices>
|
||||
<protocols>
|
||||
<add name="HttpSoap"/>
|
||||
<add name="HttpSoap12"/>
|
||||
<add name="HttpPost"/>
|
||||
<add name="HttpGet"/>
|
||||
<add name="Documentation"/>
|
||||
</protocols>
|
||||
<conformanceWarnings>
|
||||
<add name="BasicProfile1_1"/>
|
||||
</conformanceWarnings>
|
||||
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
|
||||
</webServices>
|
||||
<pages>
|
||||
@@ -100,13 +96,13 @@
|
||||
</compilers>
|
||||
<assemblies>
|
||||
<!--<add assembly="mscorlib" /> -->
|
||||
<add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="System" />
|
||||
<add assembly="System.Xml" />
|
||||
<add assembly="System.Configuration" />
|
||||
<add assembly="System.Data" />
|
||||
<add assembly="System.Web" />
|
||||
<add assembly="System.Web.Services" />
|
||||
<add assembly="System.Drawing" />
|
||||
<add assembly="*" /> <!-- Add assemblies in bin directory -->
|
||||
</assemblies>
|
||||
<expressionBuilders>
|
||||
@@ -117,23 +113,6 @@
|
||||
<add expressionPrefix="AppSettings"
|
||||
type="System.Web.Compilation.AppSettingsExpressionBuilder, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</expressionBuilders>
|
||||
<buildProviders>
|
||||
<add extension=".aspx" type="System.Web.Compilation.PageBuildProvider" />
|
||||
<add extension=".ascx" type="System.Web.Compilation.UserControlBuildProvider" />
|
||||
<add extension=".master" type="System.Web.Compilation.MasterPageBuildProvider" />
|
||||
<add extension=".asmx" type="System.Web.Compilation.WebServiceBuildProvider" />
|
||||
<add extension=".ashx" type="System.Web.Compilation.WebHandlerBuildProvider" />
|
||||
<add extension=".soap" type="System.Web.Compilation.WebServiceBuildProvider" />
|
||||
<add extension=".resx" type="System.Web.Compilation.ResXBuildProvider" />
|
||||
<add extension=".resources" type="System.Web.Compilation.ResourcesBuildProvider" />
|
||||
<add extension=".wsdl" type="System.Web.Compilation.WsdlBuildProvider" />
|
||||
<add extension=".xsd" type="System.Web.Compilation.XsdBuildProvider" />
|
||||
<add extension=".js" type="System.Web.Compilation.ForceCopyBuildProvider" />
|
||||
<add extension=".lic" type="System.Web.Compilation.IgnoreFileBuildProvider" />
|
||||
<add extension=".licx" type="System.Web.Compilation.IgnoreFileBuildProvider" />
|
||||
<add extension=".exclude" type="System.Web.Compilation.IgnoreFileBuildProvider" />
|
||||
<add extension=".refresh" type="System.Web.Compilation.IgnoreFileBuildProvider" />
|
||||
</buildProviders>
|
||||
</compilation>
|
||||
<httpRuntime executionTimeout="90"
|
||||
maxRequestLength="4096"
|
||||
@@ -148,7 +127,7 @@
|
||||
<add alias="downlevel" userAgent="Unknown" />
|
||||
</clientTarget>
|
||||
|
||||
<siteMap>
|
||||
<siteMap enabled="false">
|
||||
<providers>
|
||||
<add name="AspNetXmlSiteMapProvider"
|
||||
description="Default site map provider that reads in .sitemap xml files."
|
||||
|
||||
+6
-26
@@ -1,35 +1,15 @@
|
||||
EXTRA_DIST = \
|
||||
abc-removal.txt \
|
||||
aot-compiler.txt \
|
||||
assembly-bundle \
|
||||
embedded-api \
|
||||
exception-handling.txt \
|
||||
exceptions \
|
||||
file-share-modes \
|
||||
gc-issues \
|
||||
gc-variables-in-c \
|
||||
glossary.txt \
|
||||
internal-calls \
|
||||
ir-desc \
|
||||
jit-imt \
|
||||
jit-regalloc \
|
||||
embedded-api \
|
||||
exceptions \
|
||||
gc-issues \
|
||||
jit-thoughts \
|
||||
jit-trampolines \
|
||||
local-regalloc.txt \
|
||||
magic.diff \
|
||||
mini-doc.txt \
|
||||
mini-porting.txt \
|
||||
mono_handle_d \
|
||||
new-regalloc \
|
||||
object-layout \
|
||||
opcode-decomp.txt \
|
||||
precise-gc \
|
||||
release-notes-1.0.html \
|
||||
remoting \
|
||||
ssapre.txt \
|
||||
stack-alignment \
|
||||
stack-overflow.txt \
|
||||
threading \
|
||||
thread-safety.txt \
|
||||
tree-mover.txt \
|
||||
unmanaged-calls
|
||||
object-layout \
|
||||
unmanaged-calls \
|
||||
stack-alignment
|
||||
+266
-337
@@ -1,373 +1,302 @@
|
||||
|
||||
Arrays Bounds Check Elimination (ABC)
|
||||
in the Mono Runtime
|
||||
|
||||
Massimiliano Mantione ([email protected])
|
||||
|
||||
Here "abc" stays for "array bounds check", or "array bound checks", or
|
||||
some combination of the two.
|
||||
some combination of the two...
|
||||
|
||||
* Usage
|
||||
------------------------------------------------------------------------------
|
||||
USAGE
|
||||
|
||||
Simply use the "abcrem" optimization invoking mono.
|
||||
Simply use the "abcrem" optimization invoking mono.
|
||||
|
||||
To see if bound checks are actually removed, use "mono -v" and
|
||||
grep for "ARRAY-ACCESS" in the output, there should be a
|
||||
message for each check that has been removed.
|
||||
|
||||
To trace the algorithm execution, use "-v -v -v", and be
|
||||
prepared to be totally submersed by debugging messages...
|
||||
To see if bound checks are actually removed, use "mono -v" and grep for
|
||||
"ARRAY-ACCESS" in the output, there should be a message for each check
|
||||
that has been removed.
|
||||
|
||||
* Effectiveness
|
||||
To trace the algorithm execution, use "-v -v -v", and be prepared to be
|
||||
totally submersed by debugging messages...
|
||||
|
||||
The abc removal code can now always remove bound checks from
|
||||
"clean" array scans in loops, and generally anyway there are
|
||||
clear conditions that already state that the index is "safe".
|
||||
|
||||
To be clearer, and give an idea of what the algorithm can and
|
||||
cannot do without describing it in detail... keep in mind that
|
||||
only "redunant" checks cannot be removed. By "redundant", I
|
||||
mean "already explicitly checked" in the method code.
|
||||
|
||||
Unfortunately, analyzing complex expressions is not so easy
|
||||
(see below for details), so the capabilities of this "abc
|
||||
remover" are limited.
|
||||
|
||||
These are simple guidelines:
|
||||
------------------------------------------------------------------------------
|
||||
EFFECTIVENESS
|
||||
|
||||
- Only expressions of the following kinds are handled:
|
||||
- constant
|
||||
- variable [+/- constant]
|
||||
- Only comparisons between "handled" expressions are understood.
|
||||
- "switch" statements are not yet handled.
|
||||
|
||||
This means that code like this will be handled well:
|
||||
|
||||
for (int i = 0; i < a.Length; i++) {
|
||||
a [i] = .....
|
||||
}
|
||||
|
||||
The "i" variable could be declared out of the "for", the "for"
|
||||
could be a "while", and maybe even implemented with "goto",
|
||||
the array could be scanned in reverse order, and everything
|
||||
would still work.
|
||||
The abc removal code can now always remove bound checks from "clean"
|
||||
array scans in loops, and generally anyway there are clear conditions that
|
||||
already state that the index is "safe".
|
||||
|
||||
I could have a temporary variable storing the array length,
|
||||
and check on it inside the loop, and the abc removal would
|
||||
still occurr, like this:
|
||||
|
||||
int i = 0;
|
||||
int l = a.Length;
|
||||
while ( i < l ) {
|
||||
a [i] ......
|
||||
}
|
||||
|
||||
or this:
|
||||
|
||||
int l = a.Length;
|
||||
for (int i = l; i > 0; i--) {
|
||||
a [i] = .....
|
||||
}
|
||||
|
||||
The following two examples would work:
|
||||
|
||||
for (int i = 0; i < (a.Length -1); i++) .....
|
||||
for (int i = 0; i < a.Length; i += 2) .....
|
||||
|
||||
But just something like this
|
||||
|
||||
int delta = -1;
|
||||
for (int i = 0; i < (a.Length + delta); i++) .....
|
||||
|
||||
or like this
|
||||
|
||||
int delta = +2;
|
||||
for (int i = 0; i < a.Length; i += delta) .....
|
||||
|
||||
would not work, the check would stay there. (unless
|
||||
a combination of cfold, consprop and copyprop is used, too,
|
||||
which would make the constant value of "delta" explicit).
|
||||
|
||||
Just to make you understand how things are tricky... this would work!
|
||||
|
||||
int limit = a.Length - 1;
|
||||
for (int i = 0; i < limit; i++) {
|
||||
a [i] = .....
|
||||
}
|
||||
|
||||
A detailed explanation of the reason why things are done like
|
||||
this is given below.
|
||||
|
||||
* The Algorithm
|
||||
To be clearer, and give an idea of what the algorithm can and cannot do
|
||||
without describing it in detail... keep in mind that only "redunant" checks
|
||||
cannot be removed. By "redundant", I mean "already explicitly checked" in
|
||||
the method code.
|
||||
|
||||
This array bound check removal (abc removal) algorithm is
|
||||
based on symbolic execution concepts. I handle the removal
|
||||
like an "unreachable code elimination" (and in fact the
|
||||
optimization could be extended to remove also other
|
||||
unreachable sections of code, due to branches that "always go
|
||||
the same way").
|
||||
|
||||
In symbolic execution, variables do not have actual (numeric)
|
||||
values, but instead symbolic expressions (like "a", or "x+y").
|
||||
Also, branch conditions are handled like symbolic conditions
|
||||
(like "i<k"), which state relations between variable values.
|
||||
|
||||
The SSA representation inside mini is somewhat close to a
|
||||
symbolic representation of the execution of the compiled
|
||||
method.
|
||||
|
||||
Particularly, the representation of variable values is exactly
|
||||
a symbolic one. It is enough to find all CEE_STIND_*
|
||||
instructions which store to a local variable, and their second
|
||||
argument is exactly the variable value. Actually, "cfg->vars
|
||||
[<variable-index>]->def" should contain exactly those store
|
||||
instructions, and the "get_variable_value_from_ssa_store"
|
||||
function extracts the variable value from there.
|
||||
|
||||
On the other hand, the conditions under which each basic block
|
||||
is executed are not made fully explicit.
|
||||
|
||||
However, it is not difficult to make them so.
|
||||
Unfortunately, analyzing complex expressions is not so easy (see below for
|
||||
details), so the capabilities of this "abc remover" are limited.
|
||||
|
||||
Each BB that has more than one exit BB, in practice must end
|
||||
either with a conditional branch instruction or with a switch
|
||||
instruction.
|
||||
|
||||
In the first case, the BB has exactly two exit BBs, and their
|
||||
execution conditions are easy to get from the condition of the
|
||||
branch (see the "get_relation_from_branch_instruction"
|
||||
function, and expecially the end of "analyze_block" in
|
||||
abcremoval.c.
|
||||
These are simple guidelines:
|
||||
- Only expressions of the following kinds are handled:
|
||||
- constant
|
||||
- variable [+/- constant]
|
||||
- Only comparisons between "handled" expressions are understood.
|
||||
- "switch" statements are not yet handled.
|
||||
|
||||
If there is a switch, the jump condition of every exit BB is
|
||||
the equality of the switch argument with the particular index
|
||||
associated with its case (but the current implementation does
|
||||
not handle switch statements yet).
|
||||
|
||||
These individual conditions are in practice associated to each
|
||||
arc that connects BBs in the CFG (with the simple case that
|
||||
unconditional branches have a "TRUE" condition, because they
|
||||
always happen).
|
||||
|
||||
So, for each BB, its *proper* entry condition is the union of
|
||||
all the conditions associated to arcs that enter the BB. The
|
||||
"union" is like a logical "or", in the sense that either of
|
||||
the condition could be true, they are not necessarily all
|
||||
true. This means that if I can enter a BB in two ways, and in
|
||||
one case I know that "x>0", and in the other that "x==0",
|
||||
actually in the BB I know that "x>=0", which is a weaker
|
||||
condition (the union of the two).
|
||||
|
||||
Also, the *complete* entry condition for a BB is the
|
||||
"intersection" of all the entry conditions of its
|
||||
dominators. This is true because each dominator is the only
|
||||
way to reach the BB, so the entry condition of each dominator
|
||||
must be true if the control flow reached the BB. This
|
||||
translates to the logical "and" of all the "proper" conditions
|
||||
of the BBs met walking up in the dominator tree. So, if one
|
||||
says "x>0", and another "x==1", then I know that "x==1", which
|
||||
is a stronger condition (the intersection of the two).
|
||||
This means that code like this will be handled well:
|
||||
|
||||
Note that, if the two conditions were "x>0" and "x==0", then
|
||||
the block would be unreachable (the intersection is empty),
|
||||
because some branch is impossible.
|
||||
|
||||
Another observation is that, inside each BB, every variable is
|
||||
subject to the complete entry condition of that very same BB,
|
||||
and not the one in which it is defined (with the "complete
|
||||
entry condition" being the thing I defined before, sorry if
|
||||
these terms "proper" and "complete" are strange, I found
|
||||
nothing better).
|
||||
for (int i = 0; i < a.Length; i++) {
|
||||
a [i] = .....
|
||||
}
|
||||
|
||||
This happens because the branch conditions are related to the
|
||||
control flow. I can define "i=a", and if I am in a BB where
|
||||
"a>0", then "i>0", but not otherwise.
|
||||
|
||||
So, intuitively, if the available conditions say "i>=0", and i
|
||||
is used as an index in an array access, then the lower bound
|
||||
check can be omitted. If the condition also says
|
||||
"(i>=0)&&(i<array.length)", the abc removal can occur.
|
||||
|
||||
So, a complete solution to the problem of abc removal would be
|
||||
the following: for each array access, build a system of
|
||||
equations containing:
|
||||
The "i" variable could be declared out of the "for", the "for" could be a
|
||||
"while", and maybe even implemented with "goto", the array could be scanned
|
||||
in reverse order, and everything would still work.
|
||||
I could have a temporary variable storing the array length, and check on
|
||||
it inside the loop, and the abc removal would still occurr, like this:
|
||||
|
||||
[1] all the symbolic variable definitions
|
||||
|
||||
[2] the complete entry condition of the BB in which
|
||||
the array access occurs
|
||||
|
||||
[3] the two "goal functions" ("index >=0" and "index <
|
||||
array.length")
|
||||
|
||||
If the system is valid for *each possible* variable value, then the goal
|
||||
functions are always true, and the abc can be removed.
|
||||
|
||||
All this discussion is useful to give a precise specification
|
||||
to the problem we are trying to solve.
|
||||
int i = 0;
|
||||
int l = a.Length;
|
||||
while ( i < l ) {
|
||||
a [i] ......
|
||||
}
|
||||
|
||||
The trouble is that, in the general case, the resulting system
|
||||
of equations is like a predicate in first order logic, which
|
||||
is semi-decidable, and its general solution is anyway too
|
||||
complex to be attempted in a JIT compiler (which should not
|
||||
contain a full fledged theorem prover).
|
||||
|
||||
Therefore, we must cut some corner.
|
||||
|
||||
There is also another big problem, which is caused by
|
||||
"recursive" symbolic definitions. These definition can (and
|
||||
generally do) happen every time there is a loop. For instance,
|
||||
in the following piece of code:
|
||||
|
||||
for ( int i = 0; i < array.length; i++ ) {
|
||||
Console.WriteLine( "array [i] = " + array [i] );
|
||||
}
|
||||
|
||||
one of the definitions of i is a PHI that can be either 0 or
|
||||
"i + 1".
|
||||
|
||||
Now, we know that mathematically "i = i + 1" does not make
|
||||
sense, and in fact symbolic values are not "equations", they
|
||||
are "symbolic definitions".
|
||||
|
||||
The actual symbolic value of i is a generic "n", where "n" is
|
||||
the number of iterations of the loop, but this is terrible to
|
||||
handle (and in more complex examples the symbolic value of i
|
||||
simply cannot be written, because i is calculated in an
|
||||
iterative way).
|
||||
|
||||
However, the definition "i = i + 1" tells us something about
|
||||
i: it tells us that i "grows". So (from the PHI definition) we
|
||||
know that i is either 0, or "grows". This is enough to tell
|
||||
that "i>=0", which is what we want! It is important to note
|
||||
that recursive definitions can only occurr inside PHI
|
||||
definitions, because actually a variable cannot be defined
|
||||
*only* in terms of itself!
|
||||
|
||||
At this point, I can explain which corners I want to cut to
|
||||
make the problem solvable. It will not remove all the abc that
|
||||
could theoretically be removed, but at least it will work.
|
||||
|
||||
The easiest way to cut corners is to only handle expressions
|
||||
which are "reasonably simple", and ignore the rest.
|
||||
or this:
|
||||
|
||||
Keep in mind that ignoring an expression is not harmful in
|
||||
itself. The algorithm will be simply "less powerful", because
|
||||
it will ignore conditions that could have caused to the
|
||||
removal of an abc, but will not remove checks "by mistake" (so
|
||||
the resulting code will be in any case correct).
|
||||
|
||||
The expressions we handle are the following (all of integer
|
||||
type):
|
||||
int l = a.Length;
|
||||
for (int i = l; i > 0; i--) {
|
||||
a [i] = .....
|
||||
}
|
||||
|
||||
- constant
|
||||
- variable
|
||||
- variable + constant
|
||||
- constant + variable
|
||||
- variable - constant
|
||||
|
||||
And, of course, PHI definitions.
|
||||
The following two examples would work:
|
||||
|
||||
Any other expression causes the introduction of an "any" value
|
||||
in the evaluation, which makes all values that depend from it
|
||||
unknown as well.
|
||||
|
||||
We will call these kind of definitions "summarizable"
|
||||
definitions.
|
||||
|
||||
In a first attempt, we can consider only branch conditions
|
||||
that have the simplest possible form (the comparison of two
|
||||
summarizable expressions).
|
||||
|
||||
We can also simplify the effect of variable definitions,
|
||||
keeping only what is relevant to know: their value range with
|
||||
respect to zero and with respect to the length of the array we
|
||||
are currently handling.
|
||||
|
||||
One particular note on PHI functions: they work (obviously)
|
||||
like the logical "or" of their definitions, and therefore are
|
||||
equivalent to the "logical or" of the summarization of their
|
||||
definitions.
|
||||
|
||||
About recursive definitions (which, believe me, are the worst
|
||||
thing in all this mess), we handle only "monotonic" ones. That
|
||||
is, we try to understand if the recursive definition (which,
|
||||
as we said above, must happen because of a loop) always
|
||||
"grows" or "gets smaller". In all other cases, we decide we
|
||||
cannot handle it.
|
||||
|
||||
One critical thing, once we have defined all these data
|
||||
structures, is how the evaluation is actually performed.
|
||||
|
||||
In a first attempt I coded a "brute force" approach, which for
|
||||
each BB tried to examine all possible conditions between all
|
||||
variables, filling a sort of "evaluation matrix". The problem
|
||||
was that the complexity of this evaluation was quadratic (or
|
||||
worse) on the number of variables, and that many wariables
|
||||
were examined even if they were not involved in any array
|
||||
access.
|
||||
|
||||
Following the ABCD paper:
|
||||
for (int i = 0; i < (a.Length -1); i++) .....
|
||||
for (int i = 0; i < a.Length; i += 2) .....
|
||||
|
||||
http://citeseer.ist.psu.edu/bodik00abcd.html
|
||||
But just something like this
|
||||
|
||||
I rewrote the algorithm in a more "sparse" way.
|
||||
int delta = -1;
|
||||
for (int i = 0; i < (a.Length + delta); i++) .....
|
||||
|
||||
Now, the main data structure is a graph of relations between
|
||||
variables, and each attempt to remove a check performs a
|
||||
traversal of the graph, looking for a path from the index to
|
||||
the array length that satisfies the properties "index >= 0"
|
||||
and "index < length". If such a path is found, the check is
|
||||
removed. It is true that in theory *each* traversal has a
|
||||
complexity which is exponential on the number of variables,
|
||||
but in practice the graph is not very connected, so the
|
||||
traversal terminates quickly.
|
||||
|
||||
|
||||
Then, the algorithm to optimize one method looks like this:
|
||||
or like this
|
||||
|
||||
[1] Preparation:
|
||||
int delta = +2;
|
||||
for (int i = 0; i < a.Length; i += delta) .....
|
||||
|
||||
[1a] Build the SSA representation.
|
||||
would not work, the check would stay there, sorry :-(
|
||||
(unless a combination of cfold, consprop and copyprop is used, too, which
|
||||
would make the constant value of "delta" explicit).
|
||||
|
||||
[1b] Prepare the evaluation graph (empty)
|
||||
Just to make you understand how things are tricky... this would work!
|
||||
|
||||
[1b] Summarize each varible definition, and put
|
||||
the resulting relations in the evaluation
|
||||
graph
|
||||
int limit = a.Length - 1;
|
||||
for (int i = 0; i < limit; i++) {
|
||||
a [i] = .....
|
||||
}
|
||||
|
||||
[2] Analyze each BB, starting from the entry point and
|
||||
following the dominator tree:
|
||||
|
||||
[2a] Summarize its entry condition, and put the resulting relations
|
||||
in the evaluation graph (this is the reason
|
||||
why the BBs are examined following the
|
||||
dominator tree, so that conditions are added
|
||||
to the graph in a "cumulative" way)
|
||||
A detailed explanation of the reason why things are done like this is given
|
||||
below...
|
||||
|
||||
[2b] Scan the BB instructions, and for each array
|
||||
access perform step [3]
|
||||
------------------------------------------------------------------------------
|
||||
THE ALGORITHM
|
||||
|
||||
[2c] Process children BBs following the dominator
|
||||
tree (step [2])
|
||||
This array bound check removal (abc removal) algorithm is based on
|
||||
symbolic execution concepts. I handle the removal like an "unreachable
|
||||
code elimination" (and in fact the optimization could be extended to remove
|
||||
also other unreachable sections of code, due to branches that "always go the
|
||||
same way").
|
||||
|
||||
[2d] Remove from the evaluation area the conditions added at step [2a]
|
||||
(so that backtracking along the tree the area
|
||||
is properly cleared)
|
||||
In symbolic execution, variables do not have actual (numeric) values, but
|
||||
instead symbolic expressions (like "a", or "x+y").
|
||||
Also, branch conditions are handled like symbolic conditions (like "i<k"),
|
||||
which state relations between variable values.
|
||||
|
||||
[3] Attempt the removal:
|
||||
The SSA representation inside mini is somewhat close to a symbolic
|
||||
representation of the execution of the compiled method.
|
||||
Particularly, the representation of variable values is exactly a symbolic
|
||||
one. It is enough to find all CEE_STIND_* instructions which store to a
|
||||
local variable, and their second argument is exactly the variable value.
|
||||
Actually, "cfg->vars [<variable-index>]->def" should contain exactly
|
||||
those store instructions, and the "get_variable_value_from_ssa_store"
|
||||
function extracts the variable value from there.
|
||||
|
||||
[3a] Summarize the index expression, to see if we can handle it; there
|
||||
are three cases: the index is either a
|
||||
constant, or a variable (with an optional
|
||||
delta) or cannot be handled (is a "any")
|
||||
On the other hand, the conditions under which each basic block is
|
||||
executed are not made fully explicit.
|
||||
|
||||
[3b] If the index can be handled, traverse the evaluation area searching
|
||||
a path from the index variable to the array
|
||||
length (if the index is a constant, just
|
||||
examine the array length to see if it has
|
||||
some relation with this constant)
|
||||
However, it is not difficult to make them so.
|
||||
Each BB that has more than one exit BB, in practice must end either with
|
||||
a conditional branch instruction or with a switch instruction.
|
||||
In the first case, the BB has exactly two exit BBs, and their execution
|
||||
conditions are easy to get from the condition of the branch (see the
|
||||
"get_relation_from_branch_instruction" function, and expecially the end of
|
||||
"analyze_block" in abcremoval.c.
|
||||
If there is a switch, the jump condition of every exit BB is the equality
|
||||
of the switch argument with the particular index associated with its case
|
||||
(but the current implementation does not handle switch statements yet).
|
||||
|
||||
These individual conditions are in practice associated to each arc that
|
||||
connects BBs in the CFG (with the simple case that unconditional branches
|
||||
have a "TRUE" condition, because they always happen).
|
||||
|
||||
So, for each BB, its *proper* entry condition is the union of all the
|
||||
conditions associated to arcs that enter the BB. The "union" is like a
|
||||
logical "or", in the sense that either of the condition could be true,
|
||||
they are not necessarily all true. This means that if I can enter a BB
|
||||
in two ways, and in one case I know that "x>0", and in the other that
|
||||
"x==0", actually in the BB I know that "x>=0", which is a weaker
|
||||
condition (the union of the two).
|
||||
|
||||
Also, the *complete* entry condition for a BB is the "intersection" of all
|
||||
the entry conditions of its dominators. This is true because each dominator
|
||||
is the only way to reach the BB, so the entry condition of each dominator
|
||||
must be true if the control flow reached the BB. This translates to the
|
||||
logical "and" of all the "proper" conditions of the BBs met walking up in the
|
||||
dominator tree. So, if one says "x>0", and another "x==1", then I know
|
||||
that "x==1", which is a stronger condition (the intersection of the two).
|
||||
Note that, if the two conditions were "x>0" and "x==0", then the block would
|
||||
be unreachable (the intersection is empty), because some branch is impossible.
|
||||
|
||||
Another observation is that, inside each BB, every variable is subject to the
|
||||
complete entry condition of that very same BB, and not the one in which it is
|
||||
defined (with the "complete entry condition" being the thing I defined before,
|
||||
sorry if these terms "proper" and "complete" are strange, I found nothing
|
||||
better).
|
||||
This happens because the branch conditions are related to the control flow.
|
||||
I can define "i=a", and if I am in a BB where "a>0", then "i>0", but not
|
||||
otherwise.
|
||||
|
||||
So, intuitively, if the available conditions say "i>=0", and i is used as an
|
||||
index in an array access, then the lower bound check can be omitted.
|
||||
If the condition also says "(i>=0)&&(i<array.length)", the abc removal can
|
||||
occur.
|
||||
|
||||
So, a complete solution to the problem of abc removal would be the following:
|
||||
for each array access, build a system of equations containing:
|
||||
[1] all the symbolic variable definitions
|
||||
[2] the complete entry condition of the BB in which the array access occurs
|
||||
[3] the two "goal functions" ("index >=0" and "index < array.length")
|
||||
If the system is valid for *each possible* variable value, then the goal
|
||||
functions are always true, and the abc can be removed.
|
||||
|
||||
All this discussion is useful to give a precise specification to the problem
|
||||
we are trying to solve.
|
||||
The trouble is that, in the general case, the resulting system of equations
|
||||
is like a predicate in first order logic, which is semi-decidable, and its
|
||||
general solution is anyway too complex to be attempted in a JIT compiler
|
||||
(which should not contain a full fledged theorem prover).
|
||||
|
||||
Therefore, we must cut some corner.
|
||||
|
||||
|
||||
By the way, there is also another big problem, which is caused by "recursive"
|
||||
symbolic definitions. These definition can (and generally do) happen every
|
||||
time there is a loop. For instance, in the following piece of code
|
||||
|
||||
for ( int i = 0; i < array.length; i++ ) {
|
||||
Console.WriteLine( "array [i] = " + array [i] );
|
||||
}
|
||||
|
||||
one of the definitions of i is a PHI that can be either 0 or "i + 1".
|
||||
|
||||
Now, we know that mathematically "i = i + 1" does not make sense, and in
|
||||
fact symbolic values are not "equations", they are "symbolic definitions".
|
||||
|
||||
The actual symbolic value of i is a generic "n", where "n" is the number of
|
||||
iterations of the loop, but this is terrible to handle (and in more complex
|
||||
examples the symbolic value of i simply cannot be written, because i is
|
||||
calculated in an iterative way).
|
||||
|
||||
However, the definition "i = i + 1" tells us something about i: it tells us
|
||||
that i "grows". So (from the PHI definition) we know that i is either 0, or
|
||||
"grows". This is enough to tell that "i>=0", which is what we want!
|
||||
It is important to note that recursive definitions can only occurr inside
|
||||
PHI definitions, because actually a variable cannot be defined *only* in terms
|
||||
of itself!
|
||||
|
||||
|
||||
At this point, I can explain which corners I want to cut to make the
|
||||
problem solvable. It will not remove all the abc that could theoretically
|
||||
be removed, but at least it will work.
|
||||
|
||||
The easiest way to cut corners is to only handle expressions which are
|
||||
"reasonably simple", and ignore the rest.
|
||||
Keep in mind that ignoring an expression is not harmful in itself.
|
||||
The algorithm will be simply "less powerful", because it will ignore
|
||||
conditions that could have caused to the removal of an abc, but will
|
||||
not remove checks "by mistake" (so the resulting code will be in any case
|
||||
correct).
|
||||
|
||||
The expressions we handle are the following (all of integer type):
|
||||
- constant
|
||||
- variable
|
||||
- variable + constant
|
||||
- constant + variable
|
||||
- variable - constant
|
||||
|
||||
And, of course, PHI definitions.
|
||||
Any other expression causes the introduction of an "any" value in the
|
||||
evaluation, which makes all values that depend from it unknown as well.
|
||||
|
||||
We will call these kind of definitions "summarizable" definitions.
|
||||
|
||||
In a first attempt, we can consider only branch conditions that have the
|
||||
simplest possible form (the comparison of two summarizable expressions).
|
||||
|
||||
We can also simplify the effect of variable definitions, keeping only
|
||||
what is relevant to know: their value range with respect to zero and with
|
||||
respect to the length of the array we are currently handling.
|
||||
|
||||
One particular note on PHI functions: they work (obviously) like the logical
|
||||
"or" of their definitions, and therefore are equivalent to the "logical or"
|
||||
of the summarization of their definitions.
|
||||
|
||||
About recursive definitions (which, believe me, are the worst thing in all
|
||||
this mess), we handle only "monotonic" ones. That is, we try to understand
|
||||
if the recursive definition (which, as we said above, must happen because
|
||||
of a loop) always "grows" or "gets smaller". In all other cases, we decide
|
||||
we cannot handle it.
|
||||
|
||||
|
||||
One critical thing, once we have defined all these data structures, is how
|
||||
the evaluation is actually performed.
|
||||
|
||||
In a first attempt I coded a "brute force" approach, which for each BB
|
||||
tried to examine all possible conditions between all variables, filling
|
||||
a sort of "evaluation matrix". The problem was that the complexity of this
|
||||
evaluation was quadratic (or worse) on the number of variables, and that
|
||||
many wariables were examined even if they were not involved in any array
|
||||
access.
|
||||
|
||||
Following the ABCD paper (http://citeseer.ist.psu.edu/bodik00abcd.html),
|
||||
I rewrote the algorithm in a more "sparse" way.
|
||||
Now, the main data structure is a graph of relations between variables, and
|
||||
each attempt to remove a check performs a traversal of the graph, looking
|
||||
for a path from the index to the array length that satisfies the properties
|
||||
"index >= 0" and "index < length". If such a path is found, the check is
|
||||
removed. It is true that in theory *each* traversal has a complexity which
|
||||
is exponential on the number of variables, but in practice the graph is not
|
||||
very connected, so the traversal terminates quickly.
|
||||
|
||||
|
||||
Then, the algorithm to optimize one method looks like this:
|
||||
|
||||
[1] Preparation:
|
||||
[1a] Build the SSA representation.
|
||||
[1b] Prepare the evaluation graph (empty)
|
||||
[1b] Summarize each varible definition, and put the resulting relations
|
||||
in the evaluation graph
|
||||
[2] Analyze each BB, starting from the entry point and following the
|
||||
dominator tree:
|
||||
[2a] Summarize its entry condition, and put the resulting relations
|
||||
in the evaluation graph (this is the reason why the BBs are examined
|
||||
following the dominator tree, so that conditions are added to the
|
||||
graph in a "cumulative" way)
|
||||
[2b] Scan the BB instructions, and for each array access perform step [3]
|
||||
[2c] Process children BBs following the dominator tree (step [2])
|
||||
[2d] Remove from the evaluation area the conditions added at step [2a]
|
||||
(so that backtracking along the tree the area is properly cleared)
|
||||
[3] Attempt the removal:
|
||||
[3a] Summarize the index expression, to see if we can handle it; there
|
||||
are three cases: the index is either a constant, or a variable (with
|
||||
an optional delta) or cannot be handled (is a "any")
|
||||
[3b] If the index can be handled, traverse the evaluation area searching
|
||||
a path from the index variable to the array length (if the index is
|
||||
a constant, just examine the array length to see if it has some
|
||||
relation with this constant)
|
||||
[3c] Use the results of step [3b] to decide if the check is redundant
|
||||
|
||||
[3c] Use the results of step [3b] to decide if the check is redundant
|
||||
|
||||
|
||||
+32
-105
@@ -14,19 +14,6 @@ Mono Ahead Of Time Compiler
|
||||
assembly, while the -O=all flag instructs Mono to use all the
|
||||
available optimizations.
|
||||
|
||||
* Caching metadata
|
||||
------------------
|
||||
|
||||
Besides code, the AOT file also contains cached metadata information which allows
|
||||
the runtime to avoid certain computations at runtime, like the computation of
|
||||
generic vtables. This reduces both startup time, and memory usage. It is possible
|
||||
to create an AOT image which contains only this cached information and no code by
|
||||
using the 'metadata-only' option during compilation:
|
||||
|
||||
mono --aot=metadata-only assembly.exe
|
||||
|
||||
This works even on platforms where AOT is not normally supported.
|
||||
|
||||
* Position Independent Code
|
||||
---------------------------
|
||||
|
||||
@@ -89,18 +76,6 @@ Mono Ahead Of Time Compiler
|
||||
|
||||
svn diff -r 37739:38213 mini-x86.c
|
||||
|
||||
* The Program Linkage Table
|
||||
|
||||
As in ELF, calls made from AOT code do not go through the GOT. Instead, a direct call is
|
||||
made to an entry in the Program Linkage Table (PLT). This is based on the fact that on
|
||||
most architectures, call instructions use a displacement instead of an absolute address, so
|
||||
they are already position independent. An PLT entry is usually a jump instruction, which
|
||||
initially points to some trampoline code which transfers control to the AOT loader, which
|
||||
will compile the called method, and patch the PLT entry so that further calls are made
|
||||
directly to the called method.
|
||||
If the called method is in the same assembly, and does not need initialization (i.e. it
|
||||
doesn't have GOT slots etc), then the call is made directly, bypassing the PLT.
|
||||
|
||||
* The Precompiled File Format
|
||||
-----------------------------
|
||||
|
||||
@@ -150,97 +125,49 @@ Mono Ahead Of Time Compiler
|
||||
|
||||
A list of assemblies referenced by this AOT
|
||||
module.
|
||||
|
||||
methods
|
||||
|
||||
The precompiled code itself.
|
||||
|
||||
|
||||
method_offsets
|
||||
|
||||
Maps method indexes to offsets in the methods array.
|
||||
|
||||
ex_info
|
||||
|
||||
Contains information about methods which is rarely used during normal execution,
|
||||
like exception and debug info.
|
||||
|
||||
ex_info_offsets
|
||||
|
||||
Maps method indexes to offsets in the ex_info array.
|
||||
|
||||
class_info
|
||||
|
||||
Contains precomputed metadata used to speed up various runtime functions.
|
||||
|
||||
class_info_offsets
|
||||
|
||||
Maps class indexes to offsets in the class_info array.
|
||||
|
||||
class_name_table
|
||||
|
||||
A hash table mapping class names to class indexes. Used to speed up
|
||||
mono_class_from_name ().
|
||||
|
||||
plt
|
||||
|
||||
The Program Linkage Table
|
||||
|
||||
plt_info
|
||||
|
||||
Contains information needed to find the method belonging to a given PLT entry.
|
||||
The equivalent to a procedure linkage table.
|
||||
|
||||
* Performance considerations
|
||||
----------------------------
|
||||
|
||||
Using AOT code is a trade-off which might lead to higher or
|
||||
slower performance, depending on a lot of circumstances. Some
|
||||
of these are:
|
||||
|
||||
- AOT code needs to be loaded from disk before being used, so
|
||||
cold startup of an application using AOT code MIGHT be
|
||||
slower than using JITed code. Warm startup (when the code is
|
||||
already in the machines cache) should be faster. Also,
|
||||
JITing code takes time, and the JIT compiler also need to
|
||||
load additional metadata for the method from the disk, so
|
||||
startup can be faster even in the cold startup case.
|
||||
Using AOT code is a trade-off which might lead to higher or slower performance,
|
||||
depending on a lot of circumstances. Some of these are:
|
||||
|
||||
- AOT code is usually compiled with all optimizations turned
|
||||
on, while JITted code is usually compiled with default
|
||||
optimizations, so the generated code in the AOT case should
|
||||
be faster.
|
||||
- AOT code needs to be loaded from disk before being used, so cold startup of
|
||||
an application using AOT code MIGHT be slower than using JITed code. Warm
|
||||
startup (when the code is already in the machines cache) should be faster.
|
||||
Also, JITing code takes time, and the JIT compiler also need to load
|
||||
additional metadata for the method from the disk, so startup can be faster
|
||||
even in the cold startup case.
|
||||
- AOT code is usually compiled with all optimizations turned on, while JITted
|
||||
code is usually compiled with default optimizations, so the generated code
|
||||
in the AOT case should be faster.
|
||||
- JITted code can directly access runtime data structures and helper functions,
|
||||
while AOT code needs to go through an indirection (the GOT) to access them,
|
||||
so it will be slower and somewhat bigger as well.
|
||||
- When JITting code, the JIT compiler needs to load a lot of metadata about
|
||||
methods and types into memory.
|
||||
- JITted code has better locality, meaning that if A method calls B, then
|
||||
the native code for A and B is usually quite close in memory, leading to
|
||||
better cache behaviour thus improved performance. In contrast, the native
|
||||
code of methods inside the AOT file is in a somewhat random order.
|
||||
|
||||
- JITted code can directly access runtime data structures and
|
||||
helper functions, while AOT code needs to go through an
|
||||
indirection (the GOT) to access them, so it will be slower
|
||||
and somewhat bigger as well.
|
||||
|
||||
- When JITting code, the JIT compiler needs to load a lot of
|
||||
metadata about methods and types into memory.
|
||||
|
||||
- JITted code has better locality, meaning that if A method
|
||||
calls B, then the native code for A and B is usually quite
|
||||
close in memory, leading to better cache behaviour thus
|
||||
improved performance. In contrast, the native code of
|
||||
methods inside the AOT file is in a somewhat random order.
|
||||
|
||||
* Future Work
|
||||
-------------
|
||||
|
||||
- Currently, when an AOT module is loaded, all of its
|
||||
dependent assemblies are also loaded eagerly, and these
|
||||
assemblies need to be exactly the same as the ones loaded
|
||||
when the AOT module was created ('hard binding'). Non-hard
|
||||
binding should be allowed.
|
||||
- Currently, the runtime needs to setup some data structures and fill out
|
||||
GOT entries before a method is first called. This means that even calls to
|
||||
a method whose code is in the same AOT image need to go through the GOT,
|
||||
instead of using a direct call.
|
||||
- On x86, the generated code uses call 0, pop REG, add GOTOFFSET, REG to
|
||||
materialize the GOT address. Newer versions of gcc use a separate function
|
||||
to do this, maybe we need to do the same.
|
||||
- Currently, we get vtable addresses from the GOT. Another solution would be
|
||||
to store the data from the vtables in the .bss section, so accessing them
|
||||
would involve less indirection.
|
||||
|
||||
- On x86, the generated code uses call 0, pop REG, add
|
||||
GOTOFFSET, REG to materialize the GOT address. Newer
|
||||
versions of gcc use a separate function to do this, maybe we
|
||||
need to do the same.
|
||||
|
||||
- Currently, we get vtable addresses from the GOT. Another
|
||||
solution would be to store the data from the vtables in the
|
||||
.bss section, so accessing them would involve less
|
||||
indirection.
|
||||
|
||||
|
||||
|
||||
+204
-281
@@ -2,329 +2,252 @@
|
||||
Exception Handling In the Mono Runtime
|
||||
--------------------------------------
|
||||
|
||||
* Introduction
|
||||
--------------
|
||||
Introduction
|
||||
------------
|
||||
|
||||
There are many types of exceptions which the runtime needs to
|
||||
handle. These are:
|
||||
There are many types of exceptions which the runtime needs to handle. These
|
||||
are:
|
||||
- exceptions thrown from managed code using the 'throw' or 'rethrow' CIL
|
||||
instructions.
|
||||
- exceptions thrown by some IL instructions like InvalidCastException thrown
|
||||
by the 'castclass' CIL instruction.
|
||||
- exceptions thrown by runtime code
|
||||
- synchronous signals received while in managed code
|
||||
- synchronous signals received while in native code
|
||||
- asynchronous signals
|
||||
|
||||
- exceptions thrown from managed code using the 'throw' or 'rethrow' CIL
|
||||
instructions.
|
||||
Since exception handling is very arch dependent, parts of the exception
|
||||
handling code reside in the arch specific exceptions-<ARCH>.c files. The
|
||||
architecture independent parts are in mini-exceptions.c. The different
|
||||
exception types listed above are generated in different parts of the runtime,
|
||||
but ultimately, they all end up in the mono_handle_exception () function in
|
||||
mini-exceptions.c.
|
||||
|
||||
- exceptions thrown by some IL instructions like InvalidCastException thrown
|
||||
by the 'castclass' CIL instruction.
|
||||
Exceptions throw programmatically from managed code
|
||||
---------------------------------------------------
|
||||
|
||||
- exceptions thrown by runtime code
|
||||
These exceptions are thrown from managed code using 'throw' or 'rethrow' CIL
|
||||
instructions. The JIT compiler will translate them to a call to a helper
|
||||
function called 'mono_arch_throw/rethrow_exception'. These helper functions do
|
||||
not exist at compile time, they are created dynamically at run time by the
|
||||
code in the exceptions-<ARCH>.c files. They perform various stack
|
||||
manipulation magic, then call a helper function usually named throw_exception (), which
|
||||
does further processing in C code, then calls mono_handle_exception () to do the rest.
|
||||
|
||||
- synchronous signals received while in managed code
|
||||
Exceptions thrown implicitly from managed code
|
||||
----------------------------------------------
|
||||
|
||||
- synchronous signals received while in native code
|
||||
These exceptions are thrown by some IL instructions when something goes wrong.
|
||||
When the JIT needs to throw such an exception, it emits a forward conditional
|
||||
branch and remembers its position, along with the exception which needs to
|
||||
be emitted. This is usually done in macros named EMIT_COND_SYSTEM_EXCEPTION in
|
||||
the mini-<ARCH>.c files. After the machine code for the method is emitted, the
|
||||
JIT calls the arch dependent mono_arch_emit_exceptions () function which will
|
||||
add the exception throwing code to the end of the method, and patches up the
|
||||
previous forward branches so they will point to this code. This has the
|
||||
advantage that the rarely-executed exception throwing code is kept separate
|
||||
from the method body, leading to better icache performance.
|
||||
The exception throwing code braches to the dynamically generated
|
||||
mono_arch_throw_corlib_exception helper function, which will create the
|
||||
proper exception object, does some stack manipulation, then calls
|
||||
throw_exception ().
|
||||
|
||||
- asynchronous signals
|
||||
|
||||
Since exception handling is very arch dependent, parts of the
|
||||
exception handling code reside in the arch specific
|
||||
exceptions-<ARCH>.c files. The architecture independent parts
|
||||
are in mini-exceptions.c. The different exception types listed
|
||||
above are generated in different parts of the runtime, but
|
||||
ultimately, they all end up in the mono_handle_exception ()
|
||||
function in mini-exceptions.c.
|
||||
|
||||
* Exceptions throw programmatically from managed code
|
||||
-----------------------------------------------------
|
||||
Exceptions thrown by runtime code
|
||||
---------------------------------
|
||||
|
||||
These exceptions are thrown from managed code using 'throw' or
|
||||
'rethrow' CIL instructions. The JIT compiler will translate
|
||||
them to a call to a helper function called
|
||||
'mono_arch_throw/rethrow_exception'.
|
||||
These exceptions are usually thrown by the implementations of InternalCalls
|
||||
(icalls). First an appropriate exception object is created with the help of
|
||||
various helper functions in metadata/exception.c, which has a separate helper
|
||||
function for allocating each kind of exception object used by the runtime code.
|
||||
Then the mono_raise_exception () function is called to actually throw the
|
||||
exception. That function never returns.
|
||||
|
||||
These helper functions do not exist at compile time, they are
|
||||
created dynamically at run time by the code in the
|
||||
exceptions-<ARCH>.c files.
|
||||
An example:
|
||||
if (something_is_wrong)
|
||||
mono_raise_exception (mono_get_exception_index_out_of_range ());
|
||||
|
||||
They perform various stack manipulation magic, then call a
|
||||
helper function usually named throw_exception (), which does
|
||||
further processing in C code, then calls
|
||||
mono_handle_exception() to do the rest.
|
||||
|
||||
* Exceptions thrown implicitly from managed code
|
||||
------------------------------------------------
|
||||
mono_raise_exception () simply passes the exception to the JIT side through
|
||||
an API, where it will be received by helper created by mono_arch_throw_exception (). From now on, it is treated as an exception thrown from managed code.
|
||||
|
||||
These exceptions are thrown by some IL instructions when
|
||||
something goes wrong. When the JIT needs to throw such an
|
||||
exception, it emits a forward conditional branch and remembers
|
||||
its position, along with the exception which needs to be
|
||||
emitted. This is usually done in macros named
|
||||
EMIT_COND_SYSTEM_EXCEPTION in the mini-<ARCH>.c files.
|
||||
Synchronous signals
|
||||
-------------------
|
||||
|
||||
After the machine code for the method is emitted, the JIT
|
||||
calls the arch dependent mono_arch_emit_exceptions () function
|
||||
which will add the exception throwing code to the end of the
|
||||
method, and patches up the previous forward branches so they
|
||||
will point to this code.
|
||||
For performance reasons, the runtime does not do same checks required by the
|
||||
CLI spec. Instead, it relies on the CPU to do them. The two main checks which
|
||||
are omitted are null-pointer checks, and arithmetic checks. When a null
|
||||
pointer is dereferenced by JITted code, the CPU will notify the kernel through
|
||||
an interrupt, and the kernel will send a SIGSEGV signal to the process. The
|
||||
runtime installs a signal handler for SIGSEGV, which is
|
||||
sigsegv_signal_handler () in mini.c. The signal handler creates the appropriate
|
||||
exception object and calls mono_handle_exception () with it. Arithmetic
|
||||
exceptions like division by zero are handled similarly.
|
||||
|
||||
This has the advantage that the rarely-executed exception
|
||||
throwing code is kept separate from the method body, leading
|
||||
to better icache performance.
|
||||
Synchronous signals in native code
|
||||
----------------------------------
|
||||
|
||||
The exception throwing code braches to the dynamically
|
||||
generated mono_arch_throw_corlib_exception helper function,
|
||||
which will create the proper exception object, does some stack
|
||||
manipulation, then calls throw_exception ().
|
||||
|
||||
* Exceptions thrown by runtime code
|
||||
-----------------------------------
|
||||
Receiving a signal such as SIGSEGV while in native code means something very
|
||||
bad has happened. Because of this, the runtime will abort after trying to print a
|
||||
managed plus a native stack trace. The logic is in the mono_handle_native_sigsegv ()
|
||||
function.
|
||||
Note that there are two kinds of native code which can be the source of the signal:
|
||||
- code inside the runtime
|
||||
- code inside a native library loaded by an application, ie. libgtk+
|
||||
|
||||
These exceptions are usually thrown by the implementations of
|
||||
InternalCalls (icalls). First an appropriate exception object
|
||||
is created with the help of various helper functions in
|
||||
metadata/exception.c, which has a separate helper function for
|
||||
allocating each kind of exception object used by the runtime
|
||||
code. Then the mono_raise_exception () function is called to
|
||||
actually throw the exception. That function never returns.
|
||||
|
||||
An example:
|
||||
Stack overflow checking
|
||||
-----------------------
|
||||
|
||||
if (something_is_wrong)
|
||||
mono_raise_exception (mono_get_exception_index_out_of_range ());
|
||||
|
||||
mono_raise_exception () simply passes the exception to the JIT
|
||||
side through an API, where it will be received by helper
|
||||
created by mono_arch_throw_exception (). From now on, it is
|
||||
treated as an exception thrown from managed code.
|
||||
|
||||
* Synchronous signals
|
||||
---------------------
|
||||
|
||||
For performance reasons, the runtime does not do same checks
|
||||
required by the CLI spec. Instead, it relies on the CPU to do
|
||||
them. The two main checks which are omitted are null-pointer
|
||||
checks, and arithmetic checks. When a null pointer is
|
||||
dereferenced by JITted code, the CPU will notify the kernel
|
||||
through an interrupt, and the kernel will send a SIGSEGV
|
||||
signal to the process. The runtime installs a signal handler
|
||||
for SIGSEGV, which is sigsegv_signal_handler () in mini.c. The
|
||||
signal handler creates the appropriate exception object and
|
||||
calls mono_handle_exception () with it. Arithmetic exceptions
|
||||
like division by zero are handled similarly.
|
||||
|
||||
* Synchronous signals in native code
|
||||
------------------------------------
|
||||
Stack overflow exceptions need special handling. When a thread overflows its
|
||||
stack, the kernel sends it a normal SIGSEGV signal, but the signal handler
|
||||
tries to execute on the same as the thread leading to a further SIGSEGV which
|
||||
will terminate the thread. A solution is to use an alternative signal stack
|
||||
supported by UNIX operating systems through the sigaltstack (2) system call.
|
||||
When a thread starts up, the runtime will install an altstack using the
|
||||
mono_setup_altstack () function in mini-exceptions.c. When a SIGSEGV is
|
||||
received, the signal handler checks whenever the fault address is near the
|
||||
bottom of the threads normal stack. If it is, a StackOverflowException is
|
||||
created instead of a NullPointerException. This exception is handled like
|
||||
any other exception, with some minor differences.
|
||||
Working sigaltstack support is very much os/kernel/libc dependent, so it is
|
||||
disabled by default.
|
||||
|
||||
Receiving a signal such as SIGSEGV while in native code means
|
||||
something very bad has happened. Because of this, the runtime
|
||||
will abort after trying to print a managed plus a native stack
|
||||
trace. The logic is in the mono_handle_native_sigsegv ()
|
||||
function.
|
||||
Asynchronous signals
|
||||
--------------------
|
||||
|
||||
Note that there are two kinds of native code which can be the
|
||||
source of the signal:
|
||||
Async signals are used by the runtime to notify a thread that it needs to
|
||||
change its state somehow. Currently, it is used for implementing
|
||||
thread abort/suspend/resume.
|
||||
|
||||
- code inside the runtime
|
||||
- code inside a native library loaded by an application, ie. libgtk+
|
||||
|
||||
* Stack overflow checking
|
||||
-------------------------
|
||||
Handling async signals correctly is a very hard problem, since the receiving
|
||||
thread can be in basically any state upon receipt of the signal. It can
|
||||
execute managed code, native code, it can hold various managed/native locks, or
|
||||
it can be in a process of acquiring them, it can be starting up, shutting down
|
||||
etc. Most of the C APIs used by the runtime are not asynch-signal safe,
|
||||
meaning it is not safe to call them from an async signal handler. In
|
||||
particular, the pthread locking functions are not async-safe, so if a
|
||||
signal handler interrupted code which was in the process of acquiring a lock,
|
||||
and the signal handler tries to acquire a lock, the thread will deadlock.
|
||||
Unfortunately, the current signal handling code does acquire locks, so
|
||||
sometimes it does deadlock.
|
||||
|
||||
Stack overflow exceptions need special handling. When a thread
|
||||
overflows its stack, the kernel sends it a normal SIGSEGV
|
||||
signal, but the signal handler tries to execute on the same as
|
||||
the thread leading to a further SIGSEGV which will terminate
|
||||
the thread. A solution is to use an alternative signal stack
|
||||
supported by UNIX operating systems through the sigaltstack
|
||||
(2) system call. When a thread starts up, the runtime will
|
||||
install an altstack using the mono_setup_altstack () function
|
||||
in mini-exceptions.c. When a SIGSEGV is received, the signal
|
||||
handler checks whenever the fault address is near the bottom
|
||||
of the threads normal stack. If it is, a
|
||||
StackOverflowException is created instead of a
|
||||
NullPointerException. This exception is handled like any other
|
||||
exception, with some minor differences.
|
||||
When receiving an async signal, the signal handler first tries to determine
|
||||
whenever the thread was executing managed code when it was interrupted. If
|
||||
it did, then it is safe to interrupt it, so a ThreadAbortException is
|
||||
constructed and thrown. If the thread was executing native code, then it is
|
||||
generally not safe to interrupt it. In this case, the runtime sets a flag
|
||||
then returns from the signal handler. That flag is checked every time the
|
||||
runtime returns from native code to managed code, and the exception is thrown
|
||||
then. Also, a platform specific mechanism is used to cause the thread to
|
||||
interrupt any blocking operation it might be doing.
|
||||
|
||||
There are two reasons why sigaltstack is disabled by default:
|
||||
The async signal handler is in sigusr1_signal_handler () in mini.c, while
|
||||
the logic which determines whenever an exception is safe to be thrown is in
|
||||
mono_thread_request_interruption ().
|
||||
|
||||
* The main problem with sigaltstack() is that the stack
|
||||
employed by it is not visible to the GC and it is possible
|
||||
that the GC will miss it.
|
||||
Stack unwinding during exception handling
|
||||
-----------------------------------------
|
||||
|
||||
* Working sigaltstack support is very much os/kernel/libc
|
||||
dependent, so it is disabled by default.
|
||||
The execution state of a thread during exception handling is stored in an
|
||||
arch-specific structure called MonoContext. This structure contains the values
|
||||
of all the CPU registers relevant during exception handling, which
|
||||
usually means:
|
||||
- IP (instruction pointer)
|
||||
- SP (stack pointer)
|
||||
- FP (frame pointer)
|
||||
- callee saved registers
|
||||
|
||||
|
||||
* Asynchronous signals
|
||||
----------------------
|
||||
Callee saved registers are the registers which are required by any procedure
|
||||
to be saved/restored before/after using them. They are usually defined by
|
||||
each platforms ABI (Application Binary Interface). For example, on x86, they
|
||||
are EBX, ESI and EDI.
|
||||
|
||||
Async signals are used by the runtime to notify a thread that
|
||||
it needs to change its state somehow. Currently, it is used
|
||||
for implementing thread abort/suspend/resume.
|
||||
|
||||
Handling async signals correctly is a very hard problem,
|
||||
since the receiving thread can be in basically any state upon
|
||||
receipt of the signal. It can execute managed code, native
|
||||
code, it can hold various managed/native locks, or it can be
|
||||
in a process of acquiring them, it can be starting up,
|
||||
shutting down etc. Most of the C APIs used by the runtime are
|
||||
not asynch-signal safe, meaning it is not safe to call them
|
||||
from an async signal handler. In particular, the pthread
|
||||
locking functions are not async-safe, so if a signal handler
|
||||
interrupted code which was in the process of acquiring a lock,
|
||||
and the signal handler tries to acquire a lock, the thread
|
||||
will deadlock. Unfortunately, the current signal handling
|
||||
code does acquire locks, so sometimes it does deadlock.
|
||||
|
||||
When receiving an async signal, the signal handler first tries
|
||||
to determine whenever the thread was executing managed code
|
||||
when it was interrupted. If it did, then it is safe to
|
||||
interrupt it, so a ThreadAbortException is constructed and
|
||||
thrown. If the thread was executing native code, then it is
|
||||
generally not safe to interrupt it. In this case, the runtime
|
||||
sets a flag then returns from the signal handler. That flag is
|
||||
checked every time the runtime returns from native code to
|
||||
managed code, and the exception is thrown then. Also, a
|
||||
platform specific mechanism is used to cause the thread to
|
||||
interrupt any blocking operation it might be doing.
|
||||
|
||||
The async signal handler is in sigusr1_signal_handler () in
|
||||
mini.c, while the logic which determines whenever an exception
|
||||
is safe to be thrown is in mono_thread_request_interruption
|
||||
().
|
||||
|
||||
* Stack unwinding during exception handling
|
||||
-------------------------------------------
|
||||
The code which calls mono_handle_exception () is required to construct the
|
||||
initial MonoContext. How this is done depends on the caller. For exceptions
|
||||
thrown from managed code, the mono_arch_throw_exception helper function
|
||||
saves the values of the required registers and passes them to throw_exception (), which will save them in the MonoContext structure. For exceptions thrown from
|
||||
signal handlers, the MonoContext stucture is initialized from the signal info
|
||||
received from the kernel.
|
||||
|
||||
The execution state of a thread during exception handling is
|
||||
stored in an arch-specific structure called MonoContext. This
|
||||
structure contains the values of all the CPU registers
|
||||
relevant during exception handling, which usually means:
|
||||
|
||||
- IP (instruction pointer)
|
||||
- SP (stack pointer)
|
||||
- FP (frame pointer)
|
||||
- callee saved registers
|
||||
|
||||
Callee saved registers are the registers which are required by
|
||||
any procedure to be saved/restored before/after using
|
||||
them. They are usually defined by each platforms ABI
|
||||
(Application Binary Interface). For example, on x86, they are
|
||||
EBX, ESI and EDI.
|
||||
|
||||
The code which calls mono_handle_exception () is required to
|
||||
construct the initial MonoContext. How this is done depends on
|
||||
the caller. For exceptions thrown from managed code, the
|
||||
mono_arch_throw_exception helper function saves the values of
|
||||
the required registers and passes them to throw_exception (),
|
||||
which will save them in the MonoContext structure. For
|
||||
exceptions thrown from signal handlers, the MonoContext
|
||||
stucture is initialized from the signal info received from the
|
||||
kernel.
|
||||
|
||||
During exception handling, the runtime needs to 'unwind' the
|
||||
stack, i.e. given the state of the thread at a stack frame,
|
||||
construct the state at its callers. Since this is platform
|
||||
specific, it is done by a platform specific function called
|
||||
mono_arch_find_jit_info ().
|
||||
|
||||
Two kinds of stack frames need handling:
|
||||
During exception handling, the runtime needs to 'unwind' the stack, i.e.
|
||||
given the state of the thread at a stack frame, construct the state at its
|
||||
callers. Since this is platform specific, it is done by a platform specific
|
||||
function called mono_arch_find_jit_info ().
|
||||
|
||||
- Managed frames are easier. The JIT will store some
|
||||
information about each managed method, like which
|
||||
callee-saved registers it uses. Based on this information,
|
||||
mono_arch_find_jit_info () can find the values of the
|
||||
registers on the thread stack, and restore them.
|
||||
Two kinds of stack frames need handling:
|
||||
- Managed frames are easier. The JIT will store some information about each
|
||||
managed method, like which callee-saved registers it uses. Based on this
|
||||
information, mono_arch_find_jit_info () can find the values of the registers
|
||||
on the thread stack, and restore them.
|
||||
- Native frames are problematic, since we have no information about how to
|
||||
unwind through them. Some compilers generate unwind information for code,
|
||||
some don't. Also, there is no general purpose library to obtain and decode
|
||||
this unwind information. So the runtime uses a different solution. When
|
||||
managed code needs to call into native code, it does through a
|
||||
managed->native wrapper function, which is generated by the JIT. This
|
||||
function is responsible for saving the machine state into a per-thread
|
||||
structure called MonoLMF (Last Managed Frame). These LMF structures are
|
||||
stored on the threads stack, and are linked together using one of their
|
||||
fields. When the unwinder encounters a native frame, it simply pops
|
||||
one entry of the LMF 'stack', and uses it to restore the frame state to the
|
||||
moment before control passed to native code. In effect, all successive native
|
||||
frames are skipped together.
|
||||
|
||||
- Native frames are problematic, since we have no information
|
||||
about how to unwind through them. Some compilers generate
|
||||
unwind information for code, some don't. Also, there is no
|
||||
general purpose library to obtain and decode this unwind
|
||||
information. So the runtime uses a different solution. When
|
||||
managed code needs to call into native code, it does through
|
||||
a managed->native wrapper function, which is generated by
|
||||
the JIT. This function is responsible for saving the machine
|
||||
state into a per-thread structure called MonoLMF (Last
|
||||
Managed Frame). These LMF structures are stored on the
|
||||
threads stack, and are linked together using one of their
|
||||
fields. When the unwinder encounters a native frame, it
|
||||
simply pops one entry of the LMF 'stack', and uses it to
|
||||
restore the frame state to the moment before control passed
|
||||
to native code. In effect, all successive native frames are
|
||||
skipped together.
|
||||
|
||||
Problems/future work
|
||||
--------------------
|
||||
|
||||
1. Async signal safety
|
||||
----------------------
|
||||
|
||||
The current async signal handling code is not async safe, so
|
||||
it can and does deadlock in practice. It needs to be rewritten
|
||||
to avoid taking locks at least until it can determine that it
|
||||
was interrupting managed code.
|
||||
|
||||
Another problem is the managed stack frame unwinding code. It
|
||||
blindly assumes that if the IP points into a managed frame,
|
||||
then all the callee saved registers + the stack pointer are
|
||||
saved on the stack. This is not true if the thread was
|
||||
interrupted while executing the method prolog/epilog.
|
||||
|
||||
The current async signal handling code is not async safe, so it can and does
|
||||
deadlock in practice. It needs to be rewritten to avoid taking locks at least
|
||||
until it can determine that it was interrupting managed code.
|
||||
|
||||
Another problem is the managed stack frame unwinding code. It blindly assumes
|
||||
that if the IP points into a managed frame, then all the callee saved
|
||||
registers + the stack pointer are saved on the stack. This is not true if
|
||||
the thread was interrupted while executing the method prolog/epilog.
|
||||
|
||||
2. Raising exceptions from native code
|
||||
--------------------------------------
|
||||
|
||||
Currently, exceptions are raised by calling
|
||||
mono_raise_exception () in the middle of runtime code. This
|
||||
has two problems:
|
||||
Currently, exceptions are raised by calling mono_raise_exception () in
|
||||
the middle of runtime code. This has two problems:
|
||||
- No cleanup is done, ie. if the caller of the function which throws an
|
||||
exception has taken locks, or allocated memory, that is not cleaned up. For
|
||||
this reason, it is only safe to call mono_raise_exception () 'very close' to
|
||||
managed code, ie. in the icall functions themselves.
|
||||
- To allow mono_raise_exception () to unwind through native code, we need to
|
||||
save the LMF structures which can add a lot of overhead even in the common
|
||||
case when no exception is thrown. So this is not zero-cost exception handling.
|
||||
|
||||
- No cleanup is done, ie. if the caller of the function which
|
||||
throws an exception has taken locks, or allocated memory,
|
||||
that is not cleaned up. For this reason, it is only safe to
|
||||
call mono_raise_exception () 'very close' to managed code,
|
||||
ie. in the icall functions themselves.
|
||||
An alternative might be to use a JNI style set-pending-exception API.
|
||||
Runtime code could call mono_set_pending_exception (), then return to its
|
||||
caller with an error indication allowing the caller to clean up. When execution
|
||||
returns to managed code, then managed->native wrapper could check whenever
|
||||
there is a pending exception and throw it if neccesary. Since we already check
|
||||
for pending thread interruption, this would have no overhead, allowing us
|
||||
to drop the LMF saving/restoring code, or significant parts of it.
|
||||
|
||||
- To allow mono_raise_exception () to unwind through native
|
||||
code, we need to save the LMF structures which can add a lot
|
||||
of overhead even in the common case when no exception is
|
||||
thrown. So this is not zero-cost exception handling.
|
||||
|
||||
An alternative might be to use a JNI style
|
||||
set-pending-exception API. Runtime code could call
|
||||
mono_set_pending_exception (), then return to its caller with
|
||||
an error indication allowing the caller to clean up. When
|
||||
execution returns to managed code, then managed->native
|
||||
wrapper could check whenever there is a pending exception and
|
||||
throw it if neccesary. Since we already check for pending
|
||||
thread interruption, this would have no overhead, allowing us
|
||||
to drop the LMF saving/restoring code, or significant parts of
|
||||
it.
|
||||
|
||||
4. libunwind
|
||||
------------
|
||||
|
||||
There is an OSS project called libunwind which is a standalone
|
||||
stack unwinding library. It is currently in development, but
|
||||
it is used by default by gcc on ia64 for its stack
|
||||
unwinding. The mono runtime also uses it on ia64. It has
|
||||
several advantages in relation to our current unwinding code:
|
||||
There is an OSS project called libunwind which is a standalone stack unwinding
|
||||
library. It is currently in development, but it is used by default by gcc on
|
||||
ia64 for its stack unwinding. The mono runtime also uses it on ia64. It has
|
||||
several advantages in relation to our current unwinding code:
|
||||
- it has a platform independent API, i.e. the same unwinding code can be used
|
||||
on multiple platforms.
|
||||
- it can generate unwind tables which are correct at every instruction, i.e.
|
||||
can be used for unwinding from async signals.
|
||||
- given sufficient unwind info generated by a C compiler, it can unwind through
|
||||
C code.
|
||||
- most of its API is async-safe
|
||||
- it implements the gcc C++ exception handling API, so in theory it can
|
||||
be used to implement mixed-language exception handling (i.e. C++ exception
|
||||
caught in mono, mono exception caught in C++).
|
||||
- it is MIT licensed
|
||||
|
||||
- it has a platform independent API, i.e. the same unwinding
|
||||
code can be used on multiple platforms.
|
||||
The biggest problem with libuwind is its platform support. ia64 support is
|
||||
complete/well tested, while support for other platforms is missing/incomplete.
|
||||
|
||||
- it can generate unwind tables which are correct at every
|
||||
instruction, i.e. can be used for unwinding from async
|
||||
signals.
|
||||
http://www.hpl.hp.com/research/linux/libunwind/
|
||||
|
||||
- given sufficient unwind info generated by a C compiler, it
|
||||
can unwind through C code.
|
||||
|
||||
- most of its API is async-safe
|
||||
|
||||
- it implements the gcc C++ exception handling API, so in
|
||||
theory it can be used to implement mixed-language exception
|
||||
handling (i.e. C++ exception caught in mono, mono exception
|
||||
caught in C++).
|
||||
|
||||
- it is MIT licensed
|
||||
|
||||
The biggest problem with libuwind is its platform support. ia64 support is
|
||||
complete/well tested, while support for other platforms is missing/incomplete.
|
||||
|
||||
http://www.hpl.hp.com/research/linux/libunwind/
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
Based on some Q&A:
|
||||
|
||||
|
||||
Global Register Allocation: This is about placing in registers values
|
||||
that are used a lot in performance-critical code: local variables and
|
||||
method arguments if possible will be placed in the callee-saved
|
||||
registers that are returned by th arch-specific code in the function:
|
||||
mono_arch_get_global_int_regs().
|
||||
|
||||
|
||||
Stack Unwinding: is the process that happens during exception
|
||||
handling: when an exception is thrown in a called method and caught in
|
||||
a caller method, me need to put the processor registers in the state
|
||||
they were in the caller, at the point where the catch handler can run.
|
||||
|
||||
This happens in the mono_handle_exception_internal() and
|
||||
mono_arch_find_jit_info(): see the other architectures implementations
|
||||
for ideas: they basically need to know how big was the stack allocated
|
||||
in each call frame and they need to restore the callee-save registers
|
||||
that were saved in the stack in the prolog in the called functions (
|
||||
during stack unwindong the epilog of a method is not executed and the
|
||||
register restoration needs to be done manually in the above
|
||||
functions).
|
||||
@@ -1,94 +0,0 @@
|
||||
|
||||
The mono JIT can use an IMT-style invocation system to call interface methods.
|
||||
This considerably reduces the runtime memory usage when many interface types
|
||||
are loaded, because the old system required an array in MonoVTable indexed
|
||||
by the interface id, which grows linearly as more interfaces are loaded.
|
||||
|
||||
IMT instead uses a fixed-size table and hashes each method in the implemented
|
||||
interfaces to a slot in the IMT table. To be able to resolve collisions, at each
|
||||
callsite we store the interface MonoMethod in a well-known register and the
|
||||
IMT table will contain a snippet of code that uses it to jumpt to the
|
||||
proper vtable slot. The interface invocation sequence becomes (in pseud-ocode):
|
||||
|
||||
mov magic_reg, interface_monomethod
|
||||
call vtable [imt_slot]
|
||||
|
||||
The IMT table is stored at negative addresses in the vtable, like the old
|
||||
interface array used to be.
|
||||
|
||||
In case of collisions in the IMT slot, the JIT performs a linear search if
|
||||
the colliding methods are few or a binary search otherwise.
|
||||
To make this easier for each JIT port, a sort of internal representation
|
||||
of the code is created: this is an array of MonoIMTCheckItem structures
|
||||
built in a way to allow easy generation of a bsearch, when the list of colliding
|
||||
methods becomes large.
|
||||
|
||||
Each item in the array represents either a direct check for a method to be invoked
|
||||
of a bisection check in the bsearch algorithm.
|
||||
|
||||
struct _MonoIMTCheckItem {
|
||||
MonoMethod *method;
|
||||
int check_target_idx;
|
||||
int vtable_slot;
|
||||
guint8 *jmp_code;
|
||||
guint8 *code_target;
|
||||
guint8 is_equals;
|
||||
guint8 compare_done;
|
||||
guint8 chunk_size;
|
||||
guint8 short_branch;
|
||||
};
|
||||
|
||||
For a direct check, the is_equals value is non-zero and the emitted code
|
||||
should be equivalent to:
|
||||
if (magic_reg != item->method)
|
||||
jump_to_item (array [item->check_target_idx]);
|
||||
jump_to_vtable (item->vtable_slot);
|
||||
|
||||
Note that if item->check_target_idx is 0, the jump should be omitted
|
||||
since this is the end of a linear sequence (you might want to insert a jump to
|
||||
a breakpoint, tough, for debugging).
|
||||
|
||||
For a bisect check the code is even simpler:
|
||||
|
||||
if (magic_reg >= item->method)
|
||||
jump_to_item (array [item->check_target_idx]);
|
||||
|
||||
In this case item->check_target_idx is always non-zero.
|
||||
Note that in both cases item->method becomes an immediate constant in the
|
||||
jitted code.
|
||||
|
||||
The other fields in the structure are there to provide to the backend
|
||||
common storage for data needed during emission.
|
||||
As each item's code is emitted, the start of it is stored in the code_target
|
||||
field. At the same time when a conditional branch is inserted, its address
|
||||
is stored in jmp_code: this way with a single forward pass on the array at
|
||||
the end of the emission phase the branches can be patched to point to the
|
||||
proper target item's code.
|
||||
|
||||
chunk_size can be used to store the size of the code generated for the item: this
|
||||
can be used to optimize the short/long branch instructions, together with
|
||||
info stored in short_branch.
|
||||
|
||||
The compare_done field can be used to avoid doing an additional compare
|
||||
in a is_equals item for the same MonoMethod that was just compare in a
|
||||
bisecting item. Suppose we have 4 methods colliding in a slot, A, B, C and D.
|
||||
The generated code will look like (M is the method to call):
|
||||
|
||||
compare (C, M)
|
||||
goto upper_sequence if bigger_equals
|
||||
/* linear sequence */
|
||||
compare (M, A)
|
||||
goto B_found if not_equals
|
||||
jump to A's slot
|
||||
B_found:
|
||||
jump to B's slot
|
||||
|
||||
upper_sequence:
|
||||
/* we just did a compare against C, no need to compare again */
|
||||
goto D_found if not_equals
|
||||
jump to C's slot
|
||||
D_found:
|
||||
jump to D's slot
|
||||
|
||||
This optimization is of course valid for architectures with flags registers.
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
Metadata memory management
|
||||
--------------------------
|
||||
|
||||
Most metadata structures have a lifetime which is equal to the MonoImage where they are
|
||||
loaded from. These structures should be allocated from the memory pool of the
|
||||
corresponding MonoImage. The memory pool is protected by the loader lock.
|
||||
Examples of metadata structures in this category:
|
||||
- MonoClass
|
||||
- MonoMethod
|
||||
- MonoType
|
||||
Memory owned by these structures should be allocated from the image mempool as well.
|
||||
Examples include: klass->methods, klass->fields, method->signature etc.
|
||||
|
||||
Generics complicates things. A generic class could have many instantinations where the
|
||||
generic arguments are from different assemblies. Where should we allocate memory for
|
||||
instantinations ? We can allocate from the mempool of the image which contains the
|
||||
generic type definition, but that would mean that the instantinations would remain in
|
||||
memory even after the assemblies containing their type arguments are unloaded, leading
|
||||
to a memory leak. Therefore, we do the following:
|
||||
- data structures representing the generic definitions are allocated from the image
|
||||
mempool as usual. These include:
|
||||
- generic class definition (MonoGenericClass->container_class)
|
||||
- generic method definitions
|
||||
- type parameters (MonoGenericParam)
|
||||
- data structures representing inflated classes/images are allocated from the heap. These
|
||||
structures are kept in a cache, indexed by type arguments of the instantinations. When
|
||||
an assembly is unloaded, this cache is searched and all instantinations referencing
|
||||
types from the assembly are freed. This is done by mono_metadata_clean_for_image ()
|
||||
in metadata.c. The structures handled this way include:
|
||||
- MonoGenericClass
|
||||
- MonoGenericInst
|
||||
- inflated MonoMethods
|
||||
@@ -1,17 +0,0 @@
|
||||
Stack Overflow Detection
|
||||
|
||||
Mono supports converting a stack overflow into a
|
||||
StackOverflowException that the user can use to
|
||||
pinpoint problems in his software.
|
||||
|
||||
The detection works by:
|
||||
|
||||
* Setting up a number of guard pages below a certain
|
||||
point in the thread stack and unprotect them if we get a
|
||||
segv there.
|
||||
|
||||
* If a segv is caught on those pages, control is
|
||||
transfered to the standard exception handling code.
|
||||
|
||||
* During the unwinding, the stack pages are protected
|
||||
again.
|
||||
File renamed without changes.
-114
@@ -1,117 +1,3 @@
|
||||
2007-06-13 Jonathan Chambers <[email protected]>
|
||||
|
||||
* src/gunicode.c: Add g_unichar_isxdigit and g_unichar_xdigit_value.
|
||||
* src/gmisc.c: Add g_win32_getlocale stub.
|
||||
* src/glib.h: Add declarations of above functions,
|
||||
GFreeFunc typedef, and CLAMP, GUINT_TO_LE, and threading
|
||||
macros.
|
||||
|
||||
* test/string-util.c: Fix warning.
|
||||
* test/utf8.c: Add test for g_unichar_xdigit_value.
|
||||
|
||||
Contribution is licensed as MIT/X11.
|
||||
|
||||
2007-05-05 Aaron Bockover <[email protected]>
|
||||
|
||||
* src/gstr.c:
|
||||
* src/glib.h: Added g_ascii_tolower implementation; make g_ascii_strdown
|
||||
use it to do the transformation
|
||||
|
||||
* test/string-util.c: Added a test for g_ascii_strdown
|
||||
|
||||
2007-04-27 Jonathan Chambers <[email protected]>
|
||||
|
||||
* src/gstr.c: Fix off by one error in g_strdup allocation.
|
||||
|
||||
2007-04-27 Jonathan Chambers <[email protected]>
|
||||
|
||||
* src/eglib-config.hw: Forgot to add for msvc build.
|
||||
* src/vasprintf: Forgot to add for msvc build.
|
||||
|
||||
2007-04-27 Jonathan Chambers <[email protected]>
|
||||
|
||||
* src/gstr.c: Fix off by one error for NULL terminator.
|
||||
|
||||
2007-04-27 Jonathan Chambers <[email protected]>
|
||||
|
||||
Combined patch from Michael Jerris <[email protected]> and me.
|
||||
* winconfig.h: Config file for msvc builds.
|
||||
* configure.ac: Add AC_CHECK_HEADERS for getopt.h, sys/time.h,
|
||||
sys/wait.h, and pwd.h.
|
||||
|
||||
* src/gspawn.c: Include config.h and use HAVE_* macros.
|
||||
* src/eglib-config.h.in: Add inclusion guards.
|
||||
* src/ghashtable.c: Fix warnings.
|
||||
* src/gmisc.c: Windows implementation of g_getenv, g_setenv,
|
||||
and g_unsetenv.
|
||||
* src/gpath.c: Include config.h and use HAVE_* macros.
|
||||
* src/gmarkup.c: Fix warnings.
|
||||
* src/gptrarray.c: Fix warnings.
|
||||
* src/gstr.c: Fix warnings and use HAVE_* macros.
|
||||
* src/glib.h: Move macros to eglib-config.h and include it.
|
||||
* src/gdate.c: Implement g_get_current_time on windows.
|
||||
* src/gpattern.c: Fix warnings.
|
||||
* src/gdir.c: Implement g_dir on windows.
|
||||
* src/gfile.c: Implement mkstemp and g_file_test on windows.
|
||||
* src/gtimer.c: Implement g_timer on windows.
|
||||
* src/gmodule.c: Fix warnings.
|
||||
* src/gunicode.c: Fix warnings.
|
||||
* src/gutf8.c: Fix warnings.
|
||||
|
||||
* test/ptrarray.c: Fix warnings.
|
||||
* test/string.c: Fix warnings.
|
||||
* test/list.c: Fix warnings.
|
||||
* test/pattern.c: Use HAVE_* macros.
|
||||
* test/dir.c: Use HAVE_* macros.
|
||||
* test/file.c: Use HAVE_* macros and use system specific files for tests.
|
||||
* test/test.c: Fix warnings and use HAVE_* macros.
|
||||
* test/timer.c: Use HAVE_* macros.
|
||||
* test/string-util.c: Fix warnings.
|
||||
* test/test.h: Supress warnings on msvc.
|
||||
* test/module.c: Use HAVE_* macros.
|
||||
* test/utf8.c: Fix warnings.
|
||||
* test/spawn.c: Use HAVE_* macros.
|
||||
* test/driver.c: Fix warnings and use HAVE_* macros.
|
||||
* test/path.c: Use HAVE_* macros and use system specific files for tests.
|
||||
* test/sizes.c: Fix warnings.
|
||||
|
||||
2007-04-24 Jonathan Chambers <[email protected]>
|
||||
|
||||
Patch from Michael Jerris <[email protected]>
|
||||
* src/gspawn.c: Start msvc build.
|
||||
* src/gpath.c: Start msvc build.
|
||||
* src/gmarkup.c: Start msvc build.
|
||||
* src/gshell.c: Start msvc build.
|
||||
* src/gstr.c: Start msvc build.
|
||||
* src/glist.c: Start msvc build.
|
||||
* src/glib.h: Start msvc build.
|
||||
* src/gdate.c: Start msvc build.
|
||||
* src/gpattern.c: Start msvc build.
|
||||
* src/gdir.c: Start msvc build.
|
||||
* src/gfile.c: Start msvc build.
|
||||
* src/gtimer.c: Start msvc build.
|
||||
* src/gmodule.c: Start msvc build.
|
||||
* src/gunicode.c: Start msvc build.
|
||||
|
||||
2007-01-27 Robert Jordan <[email protected]>
|
||||
|
||||
* test/Makefile.am: Add linker option to be able to
|
||||
load symbols from the main program.
|
||||
* test/module.c: Clean-ups.
|
||||
|
||||
2007-01-26 Robert Jordan <[email protected]>
|
||||
|
||||
* configure.ac: Add PLATFORM_WIN32 conditional.
|
||||
* src/Makefile.ac: Use PLATFORM_WIN32 conditional for psapi, iconv
|
||||
* test/module.c, test/tests.h, test/Makefile.am: New test for gmodule.
|
||||
* src/gmodule.h: Add G_MODULE_{IMPORT|EXPORT} defines.
|
||||
* src/gmodule.c (g_module_symbol): Implement in-proc symbol lookup
|
||||
for Win32.
|
||||
* src/gmodule.c: Add GModule.main_module, consider it in
|
||||
g_module_close ().
|
||||
* src/gpath.c (g_get_home_dir): Add dummy Win32 implementation to
|
||||
fix the build.
|
||||
|
||||
2006-11-03 Miguel de Icaza <[email protected]>
|
||||
|
||||
* src/gpath.c (g_path_get_dirname): If the pathname starts with a
|
||||
|
||||
@@ -44,14 +44,11 @@ esac
|
||||
AC_SUBST(PATHSEP)
|
||||
AC_SUBST(SEARCHSEP)
|
||||
AC_SUBST(OS)
|
||||
AM_CONDITIONAL(PLATFORM_WIN32, test x$OS = xWIN32)
|
||||
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_FUNCS(strlcpy)
|
||||
|
||||
AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h)
|
||||
|
||||
if test $ac_cv_sizeof_void_p != $ac_cv_sizeof_int; then
|
||||
GPOINTER_TO_INT="((gint)(long) (ptr))"
|
||||
GPOINTER_TO_UINT="((guint)(long) (ptr))"
|
||||
|
||||
@@ -34,11 +34,7 @@ libeglib_la_CFLAGS = -Wall -Werror -D_FORTIFY_SOURCE=2
|
||||
|
||||
INCLUDES = -I$(srcdir)
|
||||
|
||||
if PLATFORM_WIN32
|
||||
libeglib_la_LIBADD = -lm -liconv -lpsapi
|
||||
else
|
||||
libeglib_la_LIBADD = -lm
|
||||
endif
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
#ifndef __EGLIB_CONFIG_H
|
||||
#define __EGLIB_CONFIG_H
|
||||
|
||||
/*
|
||||
* System-dependent settings
|
||||
*/
|
||||
@@ -24,5 +21,3 @@ typedef signed @GSIZE@ gssize;
|
||||
|
||||
#define G_GSIZE_FORMAT @GSIZE_FORMAT@
|
||||
#define G_GUINT64_FORMAT @G_GUINT64_FORMAT@
|
||||
|
||||
#endif
|
||||
@@ -1,72 +0,0 @@
|
||||
#ifndef __EGLIB_CONFIG_H
|
||||
#define __EGLIB_CONFIG_H
|
||||
|
||||
/*
|
||||
* System-dependent settings
|
||||
*/
|
||||
#define G_OS_WIN32 1
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#include <io.h>
|
||||
|
||||
#define G_GNUC_PRETTY_FUNCTION __FUNCTION__
|
||||
#define G_GNUC_UNUSED
|
||||
#define G_BYTE_ORDER 1234
|
||||
#define G_GNUC_NORETURN
|
||||
#define G_BREAKPOINT() __debugbreak()
|
||||
#define MAXPATHLEN 242
|
||||
|
||||
typedef uintptr_t gsize;
|
||||
typedef intptr_t gssize;
|
||||
typedef int pid_t;
|
||||
|
||||
#define G_DIR_SEPARATOR '\\'
|
||||
#define G_DIR_SEPARATOR_S "\\"
|
||||
#define G_SEARCHPATH_SEPARATOR_S ";"
|
||||
#define G_SEARCHPATH_SEPARATOR ';'
|
||||
#define G_GSIZE_FORMAT "d"
|
||||
#define G_GUINT64_FORMAT "d"
|
||||
#define GPOINTER_TO_INT(ptr) ((gint)(intptr_t) (ptr))
|
||||
#define GPOINTER_TO_UINT(ptr) ((guint)(intptr_t) (ptr))
|
||||
#define GINT_TO_POINTER(v) ((gpointer)(intptr_t) (v))
|
||||
#define GUINT_TO_POINTER(v) ((gpointer)(intptr_t) (v))
|
||||
|
||||
#define INT32_MAX 2147483647
|
||||
#define INT32_MIN (~ INT32_MAX)
|
||||
#define INT64_MAX 9223372036854775807i64
|
||||
#define INT64_MIN (~INT64_MAX)
|
||||
#define UINT32_MAX 0xffffffffU
|
||||
|
||||
#define STDOUT_FILENO (int)(intptr_t)stdout
|
||||
#define STDERR_FILENO (int)(intptr_t)stderr
|
||||
|
||||
|
||||
/* FIXME: what should this be ?*/
|
||||
#define X_OK 4 /* This is really read */
|
||||
#define WNOHANG 1
|
||||
#define F_SETFD 1
|
||||
#define FD_CLOEXEC 1
|
||||
|
||||
#undef inline
|
||||
#define inline __inline
|
||||
|
||||
#define strtok_r strtok_s
|
||||
|
||||
#undef G_HAVE_UNISTD_H
|
||||
#undef G_HAVE_SYS_TIME_H
|
||||
#undef G_HAVE_SYS_WAIT_H
|
||||
#undef G_HAVE_PWD_H
|
||||
#undef G_HAVE_STRNDUP
|
||||
#define G_HAVE_GETOPT_H 1
|
||||
|
||||
int vasprintf(char **ret, const char *fmt, va_list ap);
|
||||
|
||||
/* disable the following warnings
|
||||
* C4100: The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored.
|
||||
* C4127: conditional expression is constant
|
||||
*/
|
||||
#pragma warning(disable:4100 4127)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+1
-14
@@ -27,29 +27,16 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
void
|
||||
g_get_current_time (GTimeVal *result)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
long int l = GetTickCount();
|
||||
|
||||
g_return_if_fail (result != NULL);
|
||||
|
||||
result->tv_sec = l / 1000;
|
||||
result->tv_usec = (l % 1000) * 1000;
|
||||
#else
|
||||
struct timeval tv;
|
||||
|
||||
g_return_if_fail (result != NULL);
|
||||
gettimeofday (&tv, NULL);
|
||||
result->tv_sec = tv.tv_sec;
|
||||
result->tv_usec = tv.tv_usec;
|
||||
#endif
|
||||
}
|
||||
|
||||
+4
-97
@@ -28,25 +28,14 @@
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#else
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
struct _GDir {
|
||||
#ifdef G_OS_WIN32
|
||||
HANDLE handle;
|
||||
gchar* current;
|
||||
gchar* next;
|
||||
#else
|
||||
DIR *dir;
|
||||
#endif
|
||||
@@ -56,54 +45,7 @@ GDir *
|
||||
g_dir_open (const gchar *path, guint flags, GError **error)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
GDir *dir;
|
||||
gunichar2* path_utf16;
|
||||
gunichar2* path_utf16_search;
|
||||
WIN32_FIND_DATA find_data;
|
||||
|
||||
g_return_val_if_fail (path != NULL, NULL);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
|
||||
dir = g_new0 (GDir, 1);
|
||||
|
||||
path_utf16 = u8to16 (path);
|
||||
|
||||
dir->handle = FindFirstFile (path_utf16, &find_data);
|
||||
if (dir->handle == INVALID_HANDLE_VALUE) {
|
||||
if (error) {
|
||||
gint err = errno;
|
||||
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
|
||||
}
|
||||
g_free (dir);
|
||||
g_free (path_utf16);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* now get files */
|
||||
FindClose (dir->handle);
|
||||
path_utf16_search = g_malloc ((wcslen(path_utf16) + 3)*sizeof(gunichar2));
|
||||
wcscpy (path_utf16_search, path_utf16);
|
||||
wcscat (path_utf16_search, L"\\*");
|
||||
|
||||
dir->handle = FindFirstFile (path_utf16_search, &find_data);
|
||||
g_free (path_utf16_search);
|
||||
|
||||
while ((wcscmp (find_data.cFileName, L".") == 0) || (wcscmp (find_data.cFileName, L"..") == 0)) {
|
||||
if (!FindNextFile (dir->handle, &find_data)) {
|
||||
if (error) {
|
||||
gint err = errno;
|
||||
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
|
||||
}
|
||||
g_free (dir);
|
||||
g_free (path_utf16);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
dir->current = NULL;
|
||||
dir->next = u16to8 (find_data.cFileName);
|
||||
|
||||
g_free (path_utf16);
|
||||
return dir;
|
||||
return NULL;
|
||||
#else
|
||||
GDir *dir;
|
||||
|
||||
@@ -129,30 +71,7 @@ const gchar *
|
||||
g_dir_read_name (GDir *dir)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
WIN32_FIND_DATA find_data;
|
||||
|
||||
g_return_val_if_fail (dir != NULL && dir->handle != 0, NULL);
|
||||
|
||||
if (dir->current)
|
||||
g_free (dir->current);
|
||||
dir->current = NULL;
|
||||
|
||||
dir->current = dir->next;
|
||||
|
||||
if (!dir->current)
|
||||
return NULL;
|
||||
|
||||
dir->next = NULL;
|
||||
|
||||
do {
|
||||
if (!FindNextFile (dir->handle, &find_data)) {
|
||||
dir->next = NULL;
|
||||
return dir->current;
|
||||
}
|
||||
} while ((wcscmp (find_data.cFileName, L".") == 0) || (wcscmp (find_data.cFileName, L"..") == 0));
|
||||
|
||||
dir->next = u16to8 (find_data.cFileName);
|
||||
return dir->current;
|
||||
return NULL;
|
||||
#else
|
||||
struct dirent *entry;
|
||||
|
||||
@@ -181,23 +100,11 @@ void
|
||||
g_dir_close (GDir *dir)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
g_return_if_fail (dir != NULL && dir->handle != 0);
|
||||
|
||||
if (dir->current)
|
||||
g_free (dir->current);
|
||||
dir->current = NULL;
|
||||
if (dir->next)
|
||||
g_free (dir->next);
|
||||
dir->next = NULL;
|
||||
FindClose (dir->handle);
|
||||
dir->handle = 0;
|
||||
g_free (dir);
|
||||
#else
|
||||
g_return_if_fail (dir != NULL && dir->dir != 0);
|
||||
g_return_if_fail (dir != NULL && dir->dir != NULL);
|
||||
closedir (dir->dir);
|
||||
dir->dir = NULL;
|
||||
g_free (dir);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+5
-86
@@ -25,26 +25,15 @@
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <io.h>
|
||||
#define open _open
|
||||
#define S_ISREG(x) ((x & _S_IFMT) == _S_IFREG)
|
||||
#define S_ISDIR(x) ((x & _S_IFMT) == _S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
GFileError
|
||||
g_file_error_from_errno (gint err_no)
|
||||
{
|
||||
@@ -164,35 +153,13 @@ g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GEr
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
int mkstemp (char *tmp_template)
|
||||
{
|
||||
int fd;
|
||||
gunichar2* utf16_template;
|
||||
|
||||
utf16_template = u8to16 (tmp_template);
|
||||
|
||||
fd = -1;
|
||||
utf16_template = _wmktemp( utf16_template);
|
||||
if (utf16_template && *utf16_template) {
|
||||
/* FIXME: _O_TEMPORARY causes file to disappear on close causing a test to fail */
|
||||
fd = _wopen( utf16_template, _O_BINARY | _O_CREAT /*| _O_TEMPORARY*/ | _O_EXCL, _S_IREAD | _S_IWRITE);
|
||||
}
|
||||
|
||||
sprintf (tmp_template + strlen (tmp_template) - 6, "%S", utf16_template + wcslen (utf16_template) - 6);
|
||||
|
||||
g_free (utf16_template);
|
||||
return fd;
|
||||
}
|
||||
#endif
|
||||
|
||||
gint
|
||||
g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **error)
|
||||
{
|
||||
const static gchar *default_tmpl = ".XXXXXX";
|
||||
gchar *t;
|
||||
gint fd;
|
||||
size_t len;
|
||||
gint len;
|
||||
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, -1);
|
||||
|
||||
@@ -215,9 +182,7 @@ g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **error)
|
||||
}
|
||||
|
||||
t = g_build_filename (g_get_tmp_dir (), tmpl, NULL);
|
||||
|
||||
fd = mkstemp (t);
|
||||
|
||||
if (fd == -1) {
|
||||
if (error) {
|
||||
int err = errno;
|
||||
@@ -235,55 +200,9 @@ g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **error)
|
||||
return fd;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4701)
|
||||
#endif
|
||||
|
||||
gboolean
|
||||
g_file_test (const gchar *filename, GFileTest test)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
struct _stat64 stat;
|
||||
int ret = 0;
|
||||
gunichar2* utf16_filename = NULL;
|
||||
|
||||
if (filename == NULL || test == 0)
|
||||
return FALSE;
|
||||
|
||||
utf16_filename = u8to16 (filename);
|
||||
ret = _wstati64 (utf16_filename, &stat);
|
||||
g_free (utf16_filename);
|
||||
|
||||
if ((test & G_FILE_TEST_EXISTS) != 0) {
|
||||
if (ret == 0)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (ret != 0)
|
||||
return FALSE;
|
||||
|
||||
if ((test & G_FILE_TEST_IS_EXECUTABLE) != 0) {
|
||||
if (stat.st_mode & _S_IEXEC)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ((test & G_FILE_TEST_IS_REGULAR) != 0) {
|
||||
if (stat.st_mode & _S_IFREG)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ((test & G_FILE_TEST_IS_DIR) != 0) {
|
||||
if (stat.st_mode & _S_IFDIR)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* make this last in case it is OR'd with something else */
|
||||
if ((test & G_FILE_TEST_IS_SYMLINK) != 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
#else
|
||||
struct stat st;
|
||||
gboolean have_stat;
|
||||
|
||||
@@ -291,7 +210,8 @@ g_file_test (const gchar *filename, GFileTest test)
|
||||
return FALSE;
|
||||
|
||||
have_stat = FALSE;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#else
|
||||
if ((test & G_FILE_TEST_EXISTS) != 0) {
|
||||
if (access (filename, F_OK) == 0)
|
||||
return TRUE;
|
||||
@@ -306,6 +226,7 @@ g_file_test (const gchar *filename, GFileTest test)
|
||||
if (have_stat && S_ISLNK (st.st_mode))
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((test & G_FILE_TEST_IS_REGULAR) != 0) {
|
||||
if (!have_stat)
|
||||
@@ -320,7 +241,5 @@ g_file_test (const gchar *filename, GFileTest test)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ struct _GHashTable {
|
||||
GDestroyNotify value_destroy_func, key_destroy_func;
|
||||
};
|
||||
|
||||
static const guint prime_tbl[] = {
|
||||
static const int prime_tbl[] = {
|
||||
11, 19, 37, 73, 109, 163, 251, 367, 557, 823, 1237,
|
||||
1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627,
|
||||
47431, 71143, 106721, 160073, 240101, 360163,
|
||||
@@ -164,7 +164,7 @@ do_rehash (GHashTable *hash)
|
||||
static void
|
||||
rehash (GHashTable *hash)
|
||||
{
|
||||
int diff = ABS (hash->last_rehash - hash->in_use);
|
||||
int diff = ABS (hash->last_rehash, hash->in_use);
|
||||
|
||||
/* These are the factors to play with to change the rehashing strategy */
|
||||
/* I played with them with a large range, and could not really get */
|
||||
|
||||
+13
-68
@@ -5,15 +5,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma include_alias(<eglib-config.h>, <eglib-config.hw>)
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <eglib-config.h>
|
||||
|
||||
#ifndef offsetof
|
||||
@@ -21,7 +15,6 @@
|
||||
#endif
|
||||
|
||||
#define __EGLIB_X11 1
|
||||
|
||||
/*
|
||||
* Basic data types
|
||||
*/
|
||||
@@ -37,19 +30,6 @@ typedef const void * gconstpointer;
|
||||
typedef char gchar;
|
||||
typedef unsigned char guchar;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
typedef __int8 gint8;
|
||||
typedef unsigned __int8 guint8;
|
||||
typedef __int16 gint16;
|
||||
typedef unsigned __int16 guint16;
|
||||
typedef __int32 gint32;
|
||||
typedef unsigned __int32 guint32;
|
||||
typedef __int64 gint64;
|
||||
typedef unsigned __int64 guint64;
|
||||
typedef float gfloat;
|
||||
typedef double gdouble;
|
||||
typedef unsigned __int16 gunichar2;
|
||||
#else
|
||||
/* Types defined in terms of the stdint.h */
|
||||
typedef int8_t gint8;
|
||||
typedef uint8_t guint8;
|
||||
@@ -62,8 +42,6 @@ typedef uint64_t guint64;
|
||||
typedef float gfloat;
|
||||
typedef double gdouble;
|
||||
typedef uint16_t gunichar2;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macros
|
||||
*/
|
||||
@@ -84,7 +62,7 @@ typedef uint16_t gunichar2;
|
||||
|
||||
#define G_USEC_PER_SEC 1000000
|
||||
|
||||
#define ABS(a) ((a) > 0 ? (a) : -(a))
|
||||
#define ABS(a,b) (((a)>(b)) ? ((a)-(b)) : ((b)-(a)))
|
||||
|
||||
#define G_STRUCT_OFFSET(p_type,field) offsetof(p_type,field)
|
||||
|
||||
@@ -135,8 +113,6 @@ const gchar * g_getenv(const gchar *variable);
|
||||
gboolean g_setenv(const gchar *variable, const gchar *value, gboolean overwrite);
|
||||
void g_unsetenv(const gchar *variable);
|
||||
|
||||
gchar* g_win32_getlocale(void);
|
||||
|
||||
/*
|
||||
* Precondition macros
|
||||
*/
|
||||
@@ -155,7 +131,6 @@ typedef gboolean (*GHRFunc) (gpointer key, gpointer value, gpointer user_
|
||||
typedef void (*GDestroyNotify) (gpointer data);
|
||||
typedef guint (*GHashFunc) (gconstpointer key);
|
||||
typedef gboolean (*GEqualFunc) (gconstpointer a, gconstpointer b);
|
||||
typedef void (*GFreeFunc) (gpointer data);
|
||||
|
||||
GHashTable *g_hash_table_new (GHashFunc hash_func, GEqualFunc key_equal_func);
|
||||
GHashTable *g_hash_table_new_full (GHashFunc hash_func, GEqualFunc key_equal_func,
|
||||
@@ -237,9 +212,12 @@ gint g_snprintf (gchar *string, gulong n, gchar const *format, ..
|
||||
#define g_vsnprintf vsnprintf
|
||||
#define g_vasprintf vasprintf
|
||||
|
||||
#ifdef HAVE_STRLCPY
|
||||
#define g_strlcpy strlcpy
|
||||
#else
|
||||
gsize g_strlcpy (gchar *dest, const gchar *src, gsize dest_size);
|
||||
#endif
|
||||
|
||||
gchar g_ascii_tolower (gchar c);
|
||||
gchar *g_ascii_strdown (const gchar *str, gssize len);
|
||||
gint g_ascii_strncasecmp (const gchar *s1, const gchar *s2, gsize n);
|
||||
gint g_ascii_xdigit_value (gchar c);
|
||||
@@ -249,18 +227,10 @@ gint g_ascii_xdigit_value (gchar c);
|
||||
#define g_ascii_isxdigit(c) (isxdigit (c) != 0)
|
||||
|
||||
/* FIXME: g_strcasecmp supports utf8 unicode stuff */
|
||||
#ifdef _MSC_VER
|
||||
#define g_strcasecmp stricmp
|
||||
#define g_ascii_strcasecmp stricmp
|
||||
#define g_strncasecmp strnicmp
|
||||
#define g_strstrip(a) g_strchug (g_strchomp (a))
|
||||
#else
|
||||
#define g_strcasecmp strcasecmp
|
||||
#define g_ascii_strcasecmp strcasecmp
|
||||
#define g_strncasecmp strncasecmp
|
||||
#define g_strstrip(a) g_strchug (g_strchomp (a))
|
||||
#endif
|
||||
|
||||
|
||||
#define G_STR_DELIMITERS "_-|> <."
|
||||
|
||||
@@ -469,14 +439,14 @@ GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags f
|
||||
void g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args);
|
||||
void g_log (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, ...);
|
||||
|
||||
#define g_error(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, __VA_ARGS__)
|
||||
#define g_critical(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, __VA_ARGS__)
|
||||
#define g_warning(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, __VA_ARGS__)
|
||||
#define g_message(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, __VA_ARGS__)
|
||||
#define g_debug(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format, __VA_ARGS__)
|
||||
#define g_error(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format)
|
||||
#define g_critical(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format)
|
||||
#define g_warning(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format)
|
||||
#define g_message(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format)
|
||||
#define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
|
||||
|
||||
#define g_log_set_handler(a,b,c,d)
|
||||
#define g_printerr(format, ...) fprintf (stderr, format, __VA_ARGS__)
|
||||
#define g_printerr(format...) fprintf (stderr, format)
|
||||
/*
|
||||
* Conversions
|
||||
*/
|
||||
@@ -497,8 +467,6 @@ typedef enum {
|
||||
|
||||
gunichar g_unichar_tolower (gunichar c);
|
||||
GUnicodeType g_unichar_type (gunichar c);
|
||||
gboolean g_unichar_isxdigit (gunichar c);
|
||||
gint g_unichar_xdigit_value (gunichar c);
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) (((a)>(b)) ? (a) : (b))
|
||||
@@ -508,10 +476,6 @@ gint g_unichar_xdigit_value (gunichar c);
|
||||
#define MIN(a,b) (((a)<(b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef CLAMP
|
||||
#define CLAMP(a,low,high) (((a) < (low)) ? (low) : (((a) > (high)) ? (high) : (a)))
|
||||
#endif
|
||||
|
||||
/* FIXME: Implement these two for gcc */
|
||||
#define G_LIKELY(x) (x)
|
||||
#define G_UNLIKELY(x) (x)
|
||||
@@ -534,19 +498,11 @@ typedef enum {
|
||||
gunichar2 *g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **error);
|
||||
gchar *g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **error);
|
||||
|
||||
#define u8to16(str) g_utf8_to_utf16(str, (glong)strlen(str), NULL, NULL, NULL)
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#define u16to8(str) g_utf16_to_utf8(str, (glong)wcslen(str), NULL, NULL, NULL)
|
||||
#else
|
||||
#define u16to8(str) g_utf16_to_utf8(str, (glong)strlen(str), NULL, NULL, NULL)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Path
|
||||
*/
|
||||
gchar *g_build_path (const gchar *separator, const gchar *first_element, ...);
|
||||
#define g_build_filename(x, ...) g_build_path(G_DIR_SEPARATOR_S, x, __VA_ARGS__)
|
||||
#define g_build_filename(x...) g_build_path(G_DIR_SEPARATOR_S, x)
|
||||
gchar *g_path_get_dirname (const gchar *filename);
|
||||
gchar *g_path_get_basename (const char *filename);
|
||||
gchar *g_find_program_in_path (const gchar *program);
|
||||
@@ -746,13 +702,6 @@ gboolean g_utf8_validate (const gchar *str, gssize max_len, const gchar **
|
||||
#define g_thread_supported() TRUE
|
||||
#define g_thread_init(x) G_STMT_START { if (x != NULL) { g_error ("No vtable supported in g_thread_init"); } } G_STMT_END
|
||||
|
||||
#define G_LOCK_DEFINE(name)
|
||||
#define G_LOCK_DEFINE_STATIC(name)
|
||||
#define G_LOCK_EXTERN(name)
|
||||
#define G_LOCK(name)
|
||||
#define G_TRYLOCK(name)
|
||||
#define G_UNLOCK(name)
|
||||
|
||||
#define GUINT16_SWAP_LE_BE(x) ((guint16) (((guint16) x) >> 8) | ((((guint16)(x)) & 0xff) << 8))
|
||||
#define GUINT32_SWAP_LE_BE(x) ((guint32) \
|
||||
( (((guint32) (x)) << 24)| \
|
||||
@@ -769,18 +718,15 @@ gboolean g_utf8_validate (const gchar *str, gssize max_len, const gchar **
|
||||
# define GUINT32_TO_LE(x) (x)
|
||||
# define GUINT64_TO_LE(x) (x)
|
||||
# define GUINT16_TO_LE(x) (x)
|
||||
# define GUINT_TO_LE(x) (x)
|
||||
#else
|
||||
# define GUINT32_TO_LE(x) GUINT32_SWAP_LE_BE(x)
|
||||
# define GUINT64_TO_LE(x) GUINT64_SWAP_LE_BE(x)
|
||||
# define GUINT16_TO_LE(x) GUINT16_SWAP_LE_BE(x)
|
||||
# define GUINT_TO_LE(x) GUINT32_SWAP_LE_BE(x)
|
||||
#endif
|
||||
|
||||
#define GUINT32_FROM_LE(x) (GUINT32_TO_LE (x))
|
||||
#define GUINT64_FROM_LE(x) (GUINT64_TO_LE (x))
|
||||
#define GUINT16_FROM_LE(x) (GUINT16_TO_LE (x))
|
||||
#define GUINT_FROM_LE(x) (GUINT_TO_LE (x))
|
||||
|
||||
#define _EGLIB_MAJOR 2
|
||||
#define _EGLIB_MIDDLE 4
|
||||
@@ -790,4 +736,3 @@ gboolean g_utf8_validate (const gchar *str, gssize max_len, const gchar **
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+2
-3
@@ -205,8 +205,7 @@ g_list_insert_sorted (GList *list, gpointer data, GCompareFunc func)
|
||||
{
|
||||
GList *prev = NULL;
|
||||
GList *current;
|
||||
GList *node;
|
||||
|
||||
|
||||
if (!func)
|
||||
return list;
|
||||
|
||||
@@ -217,7 +216,7 @@ g_list_insert_sorted (GList *list, gpointer data, GCompareFunc func)
|
||||
prev = current;
|
||||
}
|
||||
|
||||
node = new_node (prev, data, current);
|
||||
GList *node = new_node (prev, data, current);
|
||||
return list == current ? node : list;
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -42,7 +42,7 @@
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
|
||||
#define set_error(msg, ...) do { if (error != NULL) *error = g_error_new (GINT_TO_POINTER (1), 1, msg, __VA_ARGS__); } while (0);
|
||||
#define set_error(msg...) do { if (error != NULL) *error = g_error_new (GINT_TO_POINTER (1), 1, msg); } while (0);
|
||||
|
||||
typedef enum {
|
||||
START,
|
||||
@@ -114,7 +114,7 @@ parse_value (const char *p, const char *end, char **value, GError **error)
|
||||
int l;
|
||||
|
||||
if (*p != '"'){
|
||||
set_error ("%s", "Expected the attribute value to start with a quote");
|
||||
set_error ("Expected the attribute value to start with a quote");
|
||||
return end;
|
||||
}
|
||||
start = ++p;
|
||||
@@ -122,7 +122,7 @@ parse_value (const char *p, const char *end, char **value, GError **error)
|
||||
;
|
||||
if (p == end)
|
||||
return end;
|
||||
l = (int)(p - start);
|
||||
l = p - start;
|
||||
p++;
|
||||
*value = malloc (l + 1);
|
||||
if (*value == NULL)
|
||||
@@ -143,7 +143,7 @@ parse_name (const char *p, const char *end, char **value)
|
||||
if (p == end)
|
||||
return end;
|
||||
|
||||
l = (int)(p - start);
|
||||
l = p - start;
|
||||
*value = malloc (l + 1);
|
||||
if (*value == NULL)
|
||||
return end;
|
||||
@@ -258,7 +258,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
context->state = START_ELEMENT;
|
||||
continue;
|
||||
}
|
||||
set_error ("%s", "Expected < to start the document");
|
||||
set_error ("Expected < to start the document");
|
||||
goto fail;
|
||||
|
||||
case SKIP_XML_DECLARATION:
|
||||
@@ -271,7 +271,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
for (; p < end && isspace (*p); p++)
|
||||
;
|
||||
if (p == end){
|
||||
set_error ("%s", "Unfinished element");
|
||||
set_error ("Unfinished element");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -282,14 +282,14 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
}
|
||||
|
||||
if (!(isascii (*p) && isalpha (*p))){
|
||||
set_error ("%s", "Expected an element name");
|
||||
set_error ("Expected an element name");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
for (++p; p < end && (isalnum (*p) || (*p == '.')); p++)
|
||||
;
|
||||
if (p == end){
|
||||
set_error ("%s", "Expected an element");
|
||||
set_error ("Expected an element");
|
||||
goto fail;
|
||||
}
|
||||
element_end = p;
|
||||
@@ -297,7 +297,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
for (; p < end && isspace (*p); p++)
|
||||
;
|
||||
if (p == end){
|
||||
set_error ("%s", "Unfinished element");
|
||||
set_error ("Unfinished element");
|
||||
goto fail;
|
||||
}
|
||||
p = parse_attributes (p, end, &names, &values, error, &full_stop, context->state);
|
||||
@@ -308,10 +308,10 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
}
|
||||
/* Only set the error if parse_attributes did not */
|
||||
if (error != NULL && *error == NULL)
|
||||
set_error ("%s", "Unfinished sequence");
|
||||
set_error ("Unfinished sequence");
|
||||
goto fail;
|
||||
}
|
||||
l = (int)(element_end - element_start);
|
||||
l = element_end - element_start;
|
||||
ename = malloc (l + 1);
|
||||
if (ename == NULL)
|
||||
goto fail;
|
||||
@@ -396,7 +396,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
char *text;
|
||||
|
||||
if (context->level == NULL){
|
||||
set_error ("%s", "Too many closing tags, not enough open tags");
|
||||
set_error ("Too many closing tags, not enough open tags");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,79 +29,21 @@
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
const gchar *
|
||||
g_getenv(const gchar *variable)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
gunichar2 *var, *buffer;
|
||||
gchar* val = NULL;
|
||||
gint32 buffer_size = 1024;
|
||||
gint32 retval;
|
||||
var = u8to16(variable);
|
||||
buffer = g_malloc(buffer_size*sizeof(gunichar2));
|
||||
retval = GetEnvironmentVariable (var, buffer, buffer_size);
|
||||
if (retval != 0) {
|
||||
if (retval > buffer_size) {
|
||||
g_free (buffer);
|
||||
buffer_size = retval;
|
||||
buffer = g_malloc(buffer_size*sizeof(gunichar2));
|
||||
retval = GetEnvironmentVariable (var, buffer, buffer_size);
|
||||
}
|
||||
val = u16to8 (buffer);
|
||||
}
|
||||
g_free(var);
|
||||
g_free(buffer);
|
||||
return val;
|
||||
#else
|
||||
return getenv(variable);
|
||||
#endif
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_setenv(const gchar *variable, const gchar *value, gboolean overwrite)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
gunichar2 *var, *val;
|
||||
gboolean result;
|
||||
var = u8to16(variable);
|
||||
val = u8to16(value);
|
||||
result = (SetEnvironmentVariable(var, val) != 0) ? TRUE : FALSE;
|
||||
g_free(var);
|
||||
g_free(val);
|
||||
return result;
|
||||
#else
|
||||
return setenv(variable, value, overwrite) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
g_unsetenv(const gchar *variable)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
gunichar2 *var;
|
||||
var = u8to16(variable);
|
||||
SetEnvironmentVariable(var, TEXT(""));
|
||||
g_free(var);
|
||||
#else
|
||||
unsetenv(variable);
|
||||
#endif
|
||||
}
|
||||
|
||||
gchar*
|
||||
g_win32_getlocale(void)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
/* FIXME: Use GetThreadLocale
|
||||
* and convert LCID to standard
|
||||
* string form, "en_US" */
|
||||
return strdup ("en_US");
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+15
-89
@@ -4,7 +4,6 @@
|
||||
* Author:
|
||||
* Gonzalo Paniagua Javier ([email protected])
|
||||
* Jonathan Chambers ([email protected])
|
||||
* Robert Jordan ([email protected])
|
||||
*
|
||||
* (C) 2006 Novell, Inc.
|
||||
* (C) 2006 Jonathan Chambers
|
||||
@@ -99,14 +98,12 @@ g_module_close (GModule *module)
|
||||
|
||||
#elif defined (G_OS_WIN32)
|
||||
#include <windows.h>
|
||||
#include <psapi.h>
|
||||
|
||||
#define LIBSUFFIX ".dll"
|
||||
#define LIBPREFIX ""
|
||||
#define LIBPREFIX
|
||||
|
||||
struct _GModule {
|
||||
HMODULE handle;
|
||||
int main_module;
|
||||
};
|
||||
|
||||
GModule *
|
||||
@@ -117,89 +114,21 @@ g_module_open (const gchar *file, GModuleFlags flags)
|
||||
if (module == NULL)
|
||||
return NULL;
|
||||
|
||||
if (file != NULL) {
|
||||
gunichar2 *file16;
|
||||
file16 = u8to16(file);
|
||||
module->main_module = FALSE;
|
||||
module->handle = LoadLibrary (file16);
|
||||
g_free(file16);
|
||||
if (!module->handle) {
|
||||
g_free (module);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
} else {
|
||||
module->main_module = TRUE;
|
||||
module->handle = GetModuleHandle (NULL);
|
||||
}
|
||||
|
||||
module->handle = LoadLibrary (file);
|
||||
return module;
|
||||
}
|
||||
|
||||
static gpointer
|
||||
w32_find_symbol (const gchar *symbol_name)
|
||||
{
|
||||
HMODULE *modules;
|
||||
DWORD buffer_size = sizeof (HMODULE) * 1024;
|
||||
DWORD needed, i;
|
||||
|
||||
modules = (HMODULE *) g_malloc (buffer_size);
|
||||
|
||||
if (modules == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!EnumProcessModules (GetCurrentProcess (), modules,
|
||||
buffer_size, &needed)) {
|
||||
g_free (modules);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* check whether the supplied buffer was too small, realloc, retry */
|
||||
if (needed > buffer_size) {
|
||||
g_free (modules);
|
||||
|
||||
buffer_size = needed;
|
||||
modules = (HMODULE *) g_malloc (buffer_size);
|
||||
|
||||
if (modules == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!EnumProcessModules (GetCurrentProcess (), modules,
|
||||
buffer_size, &needed)) {
|
||||
g_free (modules);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < needed / sizeof (HANDLE); i++) {
|
||||
gpointer proc = (gpointer)(intptr_t)GetProcAddress (modules [i], symbol_name);
|
||||
if (proc != NULL) {
|
||||
g_free (modules);
|
||||
return proc;
|
||||
}
|
||||
}
|
||||
|
||||
g_free (modules);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol)
|
||||
{
|
||||
if (module == NULL || symbol_name == NULL || symbol == NULL)
|
||||
if (symbol_name == NULL || symbol == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (module->main_module) {
|
||||
*symbol = (gpointer)(intptr_t)GetProcAddress (module->handle, symbol_name);
|
||||
if (*symbol != NULL)
|
||||
return TRUE;
|
||||
if (module == NULL || module->handle == NULL)
|
||||
return FALSE;
|
||||
|
||||
*symbol = w32_find_symbol (symbol_name);
|
||||
return *symbol != NULL;
|
||||
} else {
|
||||
*symbol = (gpointer)(intptr_t)GetProcAddress (module->handle, symbol_name);
|
||||
return *symbol != NULL;
|
||||
}
|
||||
*symbol = GetProcAddress (module->handle, symbol_name);
|
||||
return (*symbol != NULL);
|
||||
}
|
||||
|
||||
const gchar *
|
||||
@@ -212,7 +141,7 @@ g_module_error (void)
|
||||
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL,
|
||||
code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, 0, NULL);
|
||||
|
||||
ret = u16to8 (buf);
|
||||
ret = g_strdup (buf);
|
||||
LocalFree(buf);
|
||||
|
||||
return ret;
|
||||
@@ -222,48 +151,45 @@ gboolean
|
||||
g_module_close (GModule *module)
|
||||
{
|
||||
HMODULE handle;
|
||||
int main_module;
|
||||
|
||||
if (module == NULL || module->handle == NULL)
|
||||
return FALSE;
|
||||
|
||||
handle = module->handle;
|
||||
main_module = module->main_module;
|
||||
module->handle = NULL;
|
||||
g_free (module);
|
||||
return (main_module ? 1 : (0 == FreeLibrary (handle)));
|
||||
return (0 == FreeLibrary (handle));
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define LIBSUFFIX ""
|
||||
#define LIBPREFIX ""
|
||||
#define LIBSUFFIX
|
||||
#define LIBPREFIX
|
||||
|
||||
GModule *
|
||||
g_module_open (const gchar *file, GModuleFlags flags)
|
||||
{
|
||||
g_error ("%s", "g_module_open not implemented on this platform");
|
||||
g_error ("g_module_open not implemented on this platform");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol)
|
||||
{
|
||||
g_error ("%s", "g_module_open not implemented on this platform");
|
||||
g_error ("g_module_open not implemented on this platform");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
g_module_error (void)
|
||||
{
|
||||
g_error ("%s", "g_module_open not implemented on this platform");
|
||||
g_error ("g_module_open not implemented on this platform");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_module_close (GModule *module)
|
||||
{
|
||||
g_error ("%s", "g_module_open not implemented on this platform");
|
||||
g_error ("g_module_open not implemented on this platform");
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#define G_MODULE_IMPORT extern
|
||||
#ifdef G_OS_WIN32
|
||||
#define G_MODULE_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define G_MODULE_EXPORT
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Modules
|
||||
*/
|
||||
|
||||
+14
-75
@@ -25,36 +25,20 @@
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <direct.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
gchar *
|
||||
g_build_path (const gchar *separator, const gchar *first_element, ...)
|
||||
{
|
||||
GString *result;
|
||||
const char *s, *p, *next;
|
||||
size_t slen;
|
||||
int slen;
|
||||
va_list args;
|
||||
|
||||
g_return_val_if_fail (separator != NULL, NULL);
|
||||
@@ -93,7 +77,7 @@ gchar *
|
||||
g_path_get_dirname (const gchar *filename)
|
||||
{
|
||||
char *p, *r;
|
||||
size_t count;
|
||||
int count;
|
||||
g_return_val_if_fail (filename != NULL, NULL);
|
||||
|
||||
p = strrchr (filename, G_DIR_SEPARATOR);
|
||||
@@ -152,7 +136,7 @@ g_path_is_absolute (const char *filename)
|
||||
gchar *
|
||||
g_find_program_in_path (const gchar *program)
|
||||
{
|
||||
char *p = g_strdup (g_getenv ("PATH"));
|
||||
char *p = g_strdup (getenv ("PATH"));
|
||||
char *x = p, *l;
|
||||
gchar *curdir = NULL;
|
||||
char *save;
|
||||
@@ -169,7 +153,7 @@ g_find_program_in_path (const gchar *program)
|
||||
|
||||
x = NULL;
|
||||
probe_path = g_build_path (G_DIR_SEPARATOR_S, l, program, NULL);
|
||||
if (access (probe_path, X_OK) == 0){ /* FIXME: on windows this is just a read permissions test */
|
||||
if (access (probe_path, X_OK) == 0){
|
||||
g_free (curdir);
|
||||
g_free (p);
|
||||
return probe_path;
|
||||
@@ -190,7 +174,7 @@ g_get_current_dir (void)
|
||||
|
||||
do {
|
||||
buffer = g_realloc (buffer, s);
|
||||
r = getcwd (buffer, s);
|
||||
r = getcwd (buffer, s);
|
||||
fail = (r == NULL && errno == ERANGE);
|
||||
if (fail) {
|
||||
s <<= 1;
|
||||
@@ -200,10 +184,8 @@ g_get_current_dir (void)
|
||||
return r;
|
||||
}
|
||||
|
||||
#if defined (G_OS_UNIX)
|
||||
|
||||
static pthread_mutex_t home_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static const gchar *home_dir;
|
||||
static char *home_dir;
|
||||
|
||||
/* Give preference to /etc/passwd than HOME */
|
||||
const gchar *
|
||||
@@ -229,76 +211,33 @@ g_get_home_dir (void)
|
||||
}
|
||||
endpwent ();
|
||||
if (home_dir == NULL)
|
||||
home_dir = g_getenv ("HOME");
|
||||
home_dir = getenv ("HOME");
|
||||
pthread_mutex_unlock (&home_lock);
|
||||
}
|
||||
}
|
||||
return home_dir;
|
||||
}
|
||||
|
||||
#elif defined (G_OS_WIN32)
|
||||
#include <windows.h>
|
||||
|
||||
const gchar *
|
||||
g_get_home_dir (void)
|
||||
{
|
||||
/* FIXME */
|
||||
const gchar *drive = g_getenv ("HOMEDRIVE");
|
||||
const gchar *path = g_getenv ("HOMEPATH");
|
||||
gchar *home_dir = NULL;
|
||||
|
||||
if (drive && path) {
|
||||
home_dir = malloc(strlen(drive) + strlen(path) +1);
|
||||
if (home_dir) {
|
||||
sprintf(home_dir, "%s%s", drive, path);
|
||||
}
|
||||
}
|
||||
|
||||
return home_dir;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
const gchar *
|
||||
g_get_home_dir (void)
|
||||
{
|
||||
g_error ("%s", "g_get_home_dir not implemented on this platform");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static const char *tmp_dir;
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
static char *tmp_dir;
|
||||
static pthread_mutex_t tmp_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
#endif
|
||||
|
||||
const gchar *
|
||||
g_get_tmp_dir (void)
|
||||
{
|
||||
if (tmp_dir == NULL){
|
||||
#ifdef G_OS_UNIX
|
||||
pthread_mutex_lock (&tmp_lock);
|
||||
#endif
|
||||
if (tmp_dir == NULL){
|
||||
tmp_dir = g_getenv ("TMPDIR");
|
||||
tmp_dir = getenv ("TMPDIR");
|
||||
if (tmp_dir == NULL){
|
||||
tmp_dir = g_getenv ("TMP");
|
||||
tmp_dir = getenv ("TMP");
|
||||
if (tmp_dir == NULL){
|
||||
tmp_dir = g_getenv ("TEMP");
|
||||
tmp_dir = getenv ("TEMP");
|
||||
if (tmp_dir == NULL)
|
||||
#if defined (G_OS_WIN32)
|
||||
tmp_dir = "C:\\temp";
|
||||
#else
|
||||
tmp_dir = "/tmp";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef G_OS_UNIX
|
||||
pthread_mutex_unlock (&tmp_lock);
|
||||
#endif
|
||||
}
|
||||
return tmp_dir;
|
||||
}
|
||||
@@ -306,7 +245,7 @@ g_get_tmp_dir (void)
|
||||
const char *
|
||||
g_get_user_name (void)
|
||||
{
|
||||
return g_getenv ("USER");
|
||||
return getenv ("USER");
|
||||
}
|
||||
|
||||
static char *name;
|
||||
|
||||
@@ -28,10 +28,8 @@
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
typedef enum {
|
||||
MATCH_LITERAL,
|
||||
@@ -53,7 +51,7 @@ static GSList *
|
||||
compile_pattern (const gchar *pattern)
|
||||
{
|
||||
GSList *list;
|
||||
size_t i, len;
|
||||
gint i, len;
|
||||
PData *data;
|
||||
gchar c;
|
||||
MatchType last = -1;
|
||||
@@ -157,9 +155,9 @@ g_pattern_spec_free (GPatternSpec *pspec)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
match_string (GSList *list, const gchar *str, size_t idx, size_t max)
|
||||
match_string (GSList *list, const gchar *str, gint idx, gint max)
|
||||
{
|
||||
size_t len;
|
||||
gint len;
|
||||
|
||||
while (list && idx < max) {
|
||||
PData *data = (PData *) list->data;
|
||||
@@ -209,4 +207,3 @@ g_pattern_match_string (GPatternSpec *pspec, const gchar *string)
|
||||
return match_string (pspec->pattern, string, 0, strlen (string));
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ typedef struct _GPtrArrayPriv {
|
||||
static void
|
||||
g_ptr_array_grow(GPtrArrayPriv *array, guint length)
|
||||
{
|
||||
guint new_length = array->len + length;
|
||||
gint new_length = array->len + length;
|
||||
|
||||
g_return_if_fail(array != NULL);
|
||||
|
||||
@@ -101,7 +101,7 @@ g_ptr_array_set_size(GPtrArray *array, gint length)
|
||||
{
|
||||
g_return_if_fail(array != NULL);
|
||||
|
||||
if((size_t)length > array->len) {
|
||||
if(length > array->len) {
|
||||
g_ptr_array_grow((GPtrArrayPriv *)array, length);
|
||||
memset(array->pdata + array->len, 0, (length - array->len)
|
||||
* sizeof(gpointer));
|
||||
@@ -159,7 +159,7 @@ g_ptr_array_remove(GPtrArray *array, gpointer data)
|
||||
void
|
||||
g_ptr_array_foreach(GPtrArray *array, GFunc func, gpointer user_data)
|
||||
{
|
||||
guint i;
|
||||
gint i;
|
||||
|
||||
for(i = 0; i < array->len; i++) {
|
||||
func(g_ptr_array_index(array, i), user_data);
|
||||
@@ -180,4 +180,3 @@ g_ptr_array_sort_with_data(GPtrArray *array, GCompareDataFunc compare_func,
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -136,7 +136,7 @@ g_shell_parse_argv (const gchar *command_line, gint *argcp, gchar ***argvp, GErr
|
||||
gchar *
|
||||
g_shell_quote (const gchar *unquoted_string)
|
||||
{
|
||||
//g_error ("%s", "Not implemented");
|
||||
//g_error ("Not implemented");
|
||||
return g_strdup (unquoted_string);
|
||||
// return NULL;
|
||||
}
|
||||
@@ -144,7 +144,7 @@ g_shell_quote (const gchar *unquoted_string)
|
||||
gchar *
|
||||
g_shell_unquote (const gchar *quoted_string, GError **error)
|
||||
{
|
||||
// g_error ("%s", "Not implemented");
|
||||
// g_error ("Not implemented");
|
||||
return g_strdup (quoted_string);
|
||||
// return NULL;
|
||||
}
|
||||
+12
-47
@@ -25,41 +25,20 @@
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <io.h>
|
||||
#include <winsock2.h>
|
||||
#define open _open
|
||||
#define close _close
|
||||
#define read _read
|
||||
#define write _write
|
||||
/* windows pipe api details: http://msdn2.microsoft.com/en-us/library/edze9h7e(VS.80).aspx */
|
||||
#define pipe(x) _pipe(x, 256, 0)
|
||||
#endif
|
||||
|
||||
#define set_error(msg, ...) do { if (error != NULL) *error = g_error_new (G_LOG_DOMAIN, 1, msg, __VA_ARGS__); } while (0)
|
||||
#define set_error_cond(cond,msg, ...) do { if ((cond) && error != NULL) *error = g_error_new (G_LOG_DOMAIN, 1, msg, __VA_ARGS__); } while (0)
|
||||
#define set_error_status(status,msg, ...) do { if (error != NULL) *error = g_error_new (G_LOG_DOMAIN, status, msg, __VA_ARGS__); } while (0)
|
||||
#define set_error(msg...) do { if (error != NULL) *error = g_error_new (G_LOG_DOMAIN, 1, msg); } while (0)
|
||||
#define set_error_cond(cond,msg...) do { if ((cond) && error != NULL) *error = g_error_new (G_LOG_DOMAIN, 1, msg); } while (0)
|
||||
#define set_error_status(status,msg...) do { if (error != NULL) *error = g_error_new (G_LOG_DOMAIN, status, msg); } while (0)
|
||||
#define NO_INTR(var,cmd) do { (var) = (cmd); } while ((var) == -1 && errno == EINTR)
|
||||
#define CLOSE_PIPE(p) do { close (p [0]); close (p [1]); } while (0)
|
||||
|
||||
@@ -69,7 +48,7 @@ safe_read (int fd, gchar *buffer, gint count, GError **error)
|
||||
int res;
|
||||
|
||||
NO_INTR (res, read (fd, buffer, count));
|
||||
set_error_cond (res == -1, "%s", "Error reading from pipe.");
|
||||
set_error_cond (res == -1, "Error reading from pipe.");
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -101,21 +80,12 @@ read_pipes (int outfd, gchar **out_str, int errfd, gchar **err_str, GError **err
|
||||
if (out_closed && err_closed)
|
||||
break;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4389)
|
||||
#endif
|
||||
|
||||
FD_ZERO (&rfds);
|
||||
if (!out_closed && outfd >= 0)
|
||||
FD_SET (outfd, &rfds);
|
||||
if (!err_closed && errfd >= 0)
|
||||
FD_SET (errfd, &rfds);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
res = select (MAX (outfd, errfd) + 1, &rfds, NULL, NULL, NULL);
|
||||
if (res > 0) {
|
||||
if (buffer == NULL)
|
||||
@@ -164,7 +134,7 @@ static gboolean
|
||||
create_pipe (int *fds, GError **error)
|
||||
{
|
||||
if (pipe (fds) == -1) {
|
||||
set_error ("%s", "Error creating pipe.");
|
||||
set_error ("Error creating pipe.");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
@@ -177,8 +147,6 @@ g_spawn_command_line_sync (const gchar *command_line,
|
||||
gint *exit_status,
|
||||
GError **error)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
#else
|
||||
pid_t pid;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
@@ -252,7 +220,7 @@ g_spawn_command_line_sync (const gchar *command_line,
|
||||
if (WIFEXITED (status) && exit_status) {
|
||||
*exit_status = WEXITSTATUS (status);
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -273,8 +241,6 @@ g_spawn_async_with_pipes (const gchar *working_directory,
|
||||
gint *standard_error,
|
||||
GError **error)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
#else
|
||||
pid_t pid;
|
||||
int info_pipe [2];
|
||||
int in_pipe [2] = { -1, -1 };
|
||||
@@ -311,7 +277,7 @@ g_spawn_async_with_pipes (const gchar *working_directory,
|
||||
CLOSE_PIPE (out_pipe);
|
||||
CLOSE_PIPE (err_pipe);
|
||||
CLOSE_PIPE (in_pipe);
|
||||
set_error ("%s", "Error in fork ()");
|
||||
set_error ("Error in fork ()");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -442,8 +408,7 @@ g_spawn_async_with_pipes (const gchar *working_directory,
|
||||
*standard_output = out_pipe [0];
|
||||
if (standard_error)
|
||||
*standard_error = err_pipe [0];
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
+29
-46
@@ -26,7 +26,6 @@
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
@@ -36,18 +35,7 @@
|
||||
gchar *
|
||||
g_strndup (const gchar *str, gsize n)
|
||||
{
|
||||
#ifdef HAVE_STRNDUP
|
||||
return strndup (str, n);
|
||||
#else
|
||||
if (str) {
|
||||
char *retval = malloc(n+1);
|
||||
if (retval) {
|
||||
strncpy(retval, str, n)[n] = 0;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -75,8 +63,8 @@ g_strv_length(gchar **str_array)
|
||||
gboolean
|
||||
g_str_has_suffix(const gchar *str, const gchar *suffix)
|
||||
{
|
||||
size_t str_length;
|
||||
size_t suffix_length;
|
||||
gint str_length;
|
||||
gint suffix_length;
|
||||
|
||||
g_return_val_if_fail(str != NULL, FALSE);
|
||||
g_return_val_if_fail(suffix != NULL, FALSE);
|
||||
@@ -92,8 +80,8 @@ g_str_has_suffix(const gchar *str, const gchar *suffix)
|
||||
gboolean
|
||||
g_str_has_prefix(const gchar *str, const gchar *prefix)
|
||||
{
|
||||
size_t str_length;
|
||||
size_t prefix_length;
|
||||
gint str_length;
|
||||
gint prefix_length;
|
||||
|
||||
g_return_val_if_fail(str != NULL, FALSE);
|
||||
g_return_val_if_fail(prefix != NULL, FALSE);
|
||||
@@ -144,10 +132,10 @@ g_strerror (gint errnum)
|
||||
gchar *
|
||||
g_strconcat (const gchar *first, ...)
|
||||
{
|
||||
va_list args;
|
||||
size_t total = 0;
|
||||
char *s, *ret;
|
||||
g_return_val_if_fail (first != NULL, NULL);
|
||||
va_list args;
|
||||
int total = 0;
|
||||
char *s, *ret;
|
||||
|
||||
total += strlen (first);
|
||||
va_start (args, first);
|
||||
@@ -178,7 +166,7 @@ g_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens)
|
||||
gchar *strtok_save, **vector;
|
||||
gchar *token, *token_c;
|
||||
gint size = 1;
|
||||
size_t token_length;
|
||||
gint token_length;
|
||||
|
||||
g_return_val_if_fail(string != NULL, NULL);
|
||||
g_return_val_if_fail(delimiter != NULL, NULL);
|
||||
@@ -239,8 +227,8 @@ g_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens)
|
||||
gchar *
|
||||
g_strreverse (gchar *str)
|
||||
{
|
||||
size_t len, half;
|
||||
size_t i;
|
||||
guint len, half;
|
||||
gint i;
|
||||
gchar c;
|
||||
|
||||
if (str == NULL)
|
||||
@@ -262,7 +250,7 @@ g_strjoin (const gchar *separator, ...)
|
||||
{
|
||||
va_list args;
|
||||
char *res, *s;
|
||||
size_t len, slen;
|
||||
int len, slen;
|
||||
|
||||
if (separator != NULL)
|
||||
slen = strlen (separator);
|
||||
@@ -300,7 +288,7 @@ gchar *
|
||||
g_strjoinv (const gchar *separator, gchar **str_array)
|
||||
{
|
||||
char *res;
|
||||
size_t slen, len, i;
|
||||
int slen, len, i;
|
||||
|
||||
if (separator != NULL)
|
||||
slen = strlen (separator);
|
||||
@@ -330,7 +318,7 @@ g_strjoinv (const gchar *separator, gchar **str_array)
|
||||
gchar *
|
||||
g_strchug (gchar *str)
|
||||
{
|
||||
size_t len;
|
||||
gint len;
|
||||
gchar *tmp;
|
||||
|
||||
if (str == NULL)
|
||||
@@ -411,7 +399,7 @@ g_snprintf(gchar *string, gulong n, gchar const *format, ...)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const char hx [] = { '0', '1', '2', '3', '4', '5', '6', '7',
|
||||
static const char const hx [] = { '0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
|
||||
|
||||
static gboolean
|
||||
@@ -431,14 +419,14 @@ char_needs_encoding (char c)
|
||||
gchar *
|
||||
g_filename_to_uri (const gchar *filename, const gchar *hostname, GError **error)
|
||||
{
|
||||
size_t n;
|
||||
int n;
|
||||
char *ret, *rp;
|
||||
const char *p;
|
||||
|
||||
g_return_val_if_fail (filename != NULL, NULL);
|
||||
|
||||
if (hostname != NULL)
|
||||
g_warning ("%s", "eglib: g_filename_to_uri: hostname not handled");
|
||||
g_warning ("eglib: g_filename_to_uri: hostname not handled");
|
||||
|
||||
if (*filename != '/'){
|
||||
if (error != NULL)
|
||||
@@ -491,7 +479,7 @@ g_filename_from_uri (const gchar *uri, gchar **hostname, GError **error)
|
||||
g_return_val_if_fail (uri != NULL, NULL);
|
||||
|
||||
if (hostname != NULL)
|
||||
g_warning ("%s", "eglib: g_filename_from_uri: hostname not handled");
|
||||
g_warning ("eglib: g_filename_from_uri: hostname not handled");
|
||||
|
||||
if (strncmp (uri, "file:///", 8) != 0){
|
||||
if (error != NULL)
|
||||
@@ -519,7 +507,7 @@ g_filename_from_uri (const gchar *uri, gchar **hostname, GError **error)
|
||||
|
||||
for (p = uri + 8, r = result + 1; *p; p++){
|
||||
if (*p == '%'){
|
||||
*r++ = (char)((decode (p [1]) << 4) | decode (p [2]));
|
||||
*r++ = (decode (p [1]) << 4) | decode (p [2]);
|
||||
p += 2;
|
||||
} else
|
||||
*r++ = *p;
|
||||
@@ -534,17 +522,11 @@ g_strdown (gchar *string)
|
||||
g_return_if_fail (string != NULL);
|
||||
|
||||
while (*string){
|
||||
*string = (gchar)tolower (*string);
|
||||
*string = tolower (*string);
|
||||
string++;
|
||||
}
|
||||
}
|
||||
|
||||
gchar
|
||||
g_ascii_tolower (gchar c)
|
||||
{
|
||||
return c >= 'A' && c <= 'Z' ? c + ('a' - 'A') : c;
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_ascii_strdown (const gchar *str, gssize len)
|
||||
{
|
||||
@@ -557,8 +539,12 @@ g_ascii_strdown (const gchar *str, gssize len)
|
||||
len = strlen (str);
|
||||
|
||||
ret = g_malloc (len + 1);
|
||||
for (i = 0; i < len; i++)
|
||||
ret [i] = (guchar) g_ascii_tolower (str [i]);
|
||||
for (i = 0; i < len; i++){
|
||||
guchar c = (guchar) str [i];
|
||||
if (c >= 'A' && c <= 'Z')
|
||||
c += 'a' - 'A';
|
||||
ret [i] = c;
|
||||
}
|
||||
ret [i] = 0;
|
||||
|
||||
return ret;
|
||||
@@ -567,7 +553,7 @@ g_ascii_strdown (const gchar *str, gssize len)
|
||||
gint
|
||||
g_ascii_strncasecmp (const gchar *s1, const gchar *s2, gsize n)
|
||||
{
|
||||
gsize i;
|
||||
int i;
|
||||
|
||||
g_return_val_if_fail (s1 != NULL, 0);
|
||||
g_return_val_if_fail (s2 != NULL, 0);
|
||||
@@ -606,12 +592,10 @@ g_strdelimit (gchar *string, const gchar *delimiters, gchar new_delimiter)
|
||||
return string;
|
||||
}
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
gsize
|
||||
g_strlcpy (gchar *dest, const gchar *src, gsize dest_size)
|
||||
{
|
||||
#ifdef HAVE_STRLCPY
|
||||
return strlcpy (dest, src, dest_size);
|
||||
#else
|
||||
gchar *d;
|
||||
const gchar *s;
|
||||
gchar c;
|
||||
@@ -638,8 +622,8 @@ g_strlcpy (gchar *dest, const gchar *src, gsize dest_size)
|
||||
/* we need to return the length of src here */
|
||||
while (*s++) ; /* instead of a plain strlen, we use 's' */
|
||||
return s - src - 1;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static const gchar escaped_dflt [256] = {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 'b', 't', 'n', 1, 'f', 'r', 1, 1,
|
||||
@@ -666,7 +650,7 @@ g_strescape (const gchar *source, const gchar *exceptions)
|
||||
gchar escaped [256];
|
||||
const gchar *ptr;
|
||||
gchar c;
|
||||
gchar op;
|
||||
int op;
|
||||
gchar *result;
|
||||
gchar *res_ptr;
|
||||
|
||||
@@ -718,4 +702,3 @@ g_ascii_xdigit_value (gchar c)
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-41
@@ -26,20 +26,11 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <glib.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
struct _GTimer {
|
||||
#ifdef _MSC_VER
|
||||
guint64 start;
|
||||
guint64 stop;
|
||||
#else
|
||||
struct timeval start;
|
||||
struct timeval stop;
|
||||
#endif
|
||||
};
|
||||
|
||||
GTimer *g_timer_new (void)
|
||||
@@ -62,51 +53,23 @@ void
|
||||
g_timer_start (GTimer *timer)
|
||||
{
|
||||
g_return_if_fail (timer != NULL);
|
||||
#ifdef _MSC_VER
|
||||
QueryPerformanceCounter ((LARGE_INTEGER*)&timer->start);
|
||||
#else
|
||||
gettimeofday (&timer->start, NULL);
|
||||
memset (&timer->stop, 0, sizeof (struct timeval));
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
g_timer_stop (GTimer *timer)
|
||||
{
|
||||
g_return_if_fail (timer != NULL);
|
||||
#ifdef _MSC_VER
|
||||
QueryPerformanceCounter ((LARGE_INTEGER*)&timer->stop);
|
||||
#else
|
||||
gettimeofday (&timer->stop, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
gdouble
|
||||
g_timer_elapsed (GTimer *timer, gulong *microseconds)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
guint64 stop;
|
||||
guint64 freq;
|
||||
gdouble seconds;
|
||||
if (timer->stop == 0) {
|
||||
QueryPerformanceCounter ((LARGE_INTEGER*)&stop);
|
||||
}
|
||||
else {
|
||||
stop = timer->stop;
|
||||
}
|
||||
|
||||
QueryPerformanceFrequency ((LARGE_INTEGER*)&freq);
|
||||
seconds = 1.0 * (stop - timer->start) / freq;
|
||||
|
||||
if (microseconds) {
|
||||
*microseconds = (gulong)(1000000.0 * (stop - timer->start) / freq);
|
||||
}
|
||||
return seconds;
|
||||
#else
|
||||
struct timeval tv;
|
||||
gulong seconds;
|
||||
long usec;
|
||||
gulong usec;
|
||||
gdouble result;
|
||||
|
||||
g_return_val_if_fail (timer != NULL, 0.0);
|
||||
@@ -117,7 +80,7 @@ g_timer_elapsed (GTimer *timer, gulong *microseconds)
|
||||
tv = timer->stop;
|
||||
}
|
||||
|
||||
usec = (tv.tv_usec) - (timer->start.tv_usec);
|
||||
usec = tv.tv_usec - timer->start.tv_usec;
|
||||
seconds = tv.tv_sec - timer->start.tv_sec;
|
||||
if (microseconds) {
|
||||
if (usec < 0) {
|
||||
@@ -128,7 +91,5 @@ g_timer_elapsed (GTimer *timer, gulong *microseconds)
|
||||
}
|
||||
result = seconds * 1000000 + usec;
|
||||
return (result / 1000000);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+8
-40
@@ -35,15 +35,9 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <errno.h>
|
||||
#ifdef _MSC_VER
|
||||
/* FIXME */
|
||||
#define CODESET 1
|
||||
typedef int iconv_t;
|
||||
#else
|
||||
#include <langinfo.h>
|
||||
#include <iconv.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
static char *my_charset;
|
||||
static gboolean is_utf8;
|
||||
@@ -51,49 +45,27 @@ static gboolean is_utf8;
|
||||
GUnicodeType
|
||||
g_unichar_type (gunichar c)
|
||||
{
|
||||
g_error ("%s", "g_unichar_type is not implemented");
|
||||
g_error ("g_unichar_type is not implemented");
|
||||
return 0;
|
||||
}
|
||||
|
||||
gunichar
|
||||
g_unichar_tolower (gunichar c)
|
||||
{
|
||||
g_error ("%s", "g_unichar_type is not implemented");
|
||||
g_error ("g_unichar_type is not implemented");
|
||||
return 0;
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_unichar_isxdigit (gunichar c)
|
||||
{
|
||||
return (g_unichar_xdigit_value (c) != -1);
|
||||
|
||||
}
|
||||
|
||||
gint
|
||||
g_unichar_xdigit_value (gunichar c)
|
||||
{
|
||||
if (c >= 0x30 && c <= 0x39) /*0-9*/
|
||||
return (c - 0x30);
|
||||
if (c >= 0x41 && c <= 0x46) /*A-F*/
|
||||
return (c - 0x37);
|
||||
if (c >= 0x61 && c <= 0x66) /*a-f*/
|
||||
return (c - 0x57);
|
||||
return -1;
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_convert (const gchar *str, gssize len,
|
||||
const gchar *to_codeset, const gchar *from_codeset,
|
||||
gsize *bytes_read, gsize *bytes_written, GError **error)
|
||||
{
|
||||
char *result = NULL;
|
||||
#ifdef G_OS_WIN32
|
||||
#else
|
||||
iconv_t convertor;
|
||||
char *buffer, *output;
|
||||
char *buffer, *result, *output;
|
||||
const char *strptr = (const char *) str;
|
||||
size_t str_len = len == -1 ? strlen (str) : len;
|
||||
size_t buffer_size;
|
||||
int str_len = len == -1 ? strlen (str) : len;
|
||||
int buffer_size;
|
||||
size_t left, out_left;
|
||||
|
||||
convertor = iconv_open (to_codeset, from_codeset);
|
||||
@@ -113,8 +85,8 @@ g_convert (const gchar *str, gssize len,
|
||||
if (res == (size_t) -1){
|
||||
if (errno == E2BIG){
|
||||
char *n;
|
||||
size_t extra_space = 8 + left;
|
||||
size_t output_used = output - buffer;
|
||||
int extra_space = 8 + left;
|
||||
int output_used = output - buffer;
|
||||
|
||||
buffer_size += extra_space;
|
||||
|
||||
@@ -153,7 +125,6 @@ g_convert (const gchar *str, gssize len,
|
||||
result = buffer;
|
||||
leave:
|
||||
iconv_close (convertor);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -176,8 +147,6 @@ g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gs
|
||||
gboolean
|
||||
g_get_charset (G_CONST_RETURN char **charset)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
#else
|
||||
if (my_charset == NULL){
|
||||
my_charset = g_strdup (nl_langinfo (CODESET));
|
||||
is_utf8 = strcmp (my_charset, "UTF-8") == 0;
|
||||
@@ -186,7 +155,6 @@ g_get_charset (G_CONST_RETURN char **charset)
|
||||
if (charset != NULL)
|
||||
*charset = my_charset;
|
||||
|
||||
#endif
|
||||
return is_utf8;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -86,12 +86,12 @@ g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_wr
|
||||
if (--mb_remain == 0) {
|
||||
/* multi byte character is fully consumed now. */
|
||||
if (codepoint < 0x10000) {
|
||||
ret [out_pos++] = (gunichar2)(codepoint % 0x10000);
|
||||
ret [out_pos++] = codepoint % 0x10000;
|
||||
} else if (codepoint < 0x110000) {
|
||||
/* surrogate pair */
|
||||
codepoint -= 0x10000;
|
||||
ret [out_pos++] = (gunichar2)((codepoint >> 10) + 0xD800);
|
||||
ret [out_pos++] = (gunichar2)((codepoint & 0x3FF) + 0xDC00);
|
||||
ret [out_pos++] = (codepoint >> 10) + 0xD800;
|
||||
ret [out_pos++] = (codepoint & 0x3FF) + 0xDC00;
|
||||
} else {
|
||||
/* invalid utf-8 sequence (excess) */
|
||||
codepoint = 0;
|
||||
@@ -247,7 +247,7 @@ g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *item
|
||||
gchar *ret;
|
||||
glong in_pos, out_pos;
|
||||
gunichar2 ch;
|
||||
guint32 codepoint = 0;
|
||||
guint32 codepoint;
|
||||
gboolean surrogate;
|
||||
|
||||
in_pos = 0;
|
||||
@@ -279,7 +279,7 @@ g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *item
|
||||
if (ch < 0x80) {
|
||||
for (; len < 0 ? str [in_pos] : in_pos < len; in_pos++) {
|
||||
if (str [in_pos] < 0x80)
|
||||
ret [out_pos++] = (gchar)(str [in_pos]);
|
||||
ret [out_pos++] = str [in_pos];
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int vasprintf(char **ret, const char *fmt, va_list ap)
|
||||
{
|
||||
char *buf;
|
||||
int len;
|
||||
size_t buflen;
|
||||
va_list ap2;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
ap2 = ap;
|
||||
#else
|
||||
va_copy(ap2, ap);
|
||||
#endif
|
||||
|
||||
len = vsnprintf(NULL, 0, fmt, ap2);
|
||||
|
||||
if (len > 0 && (buf = malloc((buflen = (size_t) (len + 1)))) != NULL) {
|
||||
len = vsnprintf(buf, buflen, fmt, ap);
|
||||
*ret = buf;
|
||||
} else {
|
||||
*ret = NULL;
|
||||
len = -1;
|
||||
}
|
||||
|
||||
va_end(ap2);
|
||||
return len;
|
||||
}
|
||||
@@ -24,18 +24,16 @@ SOURCES = \
|
||||
dir.c \
|
||||
markup.c \
|
||||
utf8.c \
|
||||
endian.c \
|
||||
module.c
|
||||
endian.c
|
||||
|
||||
test_eglib_SOURCES = $(SOURCES)
|
||||
test_glib_SOURCES = $(SOURCES)
|
||||
|
||||
test_eglib_CFLAGS = -Wall -Werror -D_FORTIFY_SOURCE=2 -I$(srcdir)/../src -DDRIVER_NAME=\"EGlib\"
|
||||
test_eglib_LDADD = ../src/libeglib.la -ldl
|
||||
test_eglib_LDFLAGS = -Wl,--export-dynamic
|
||||
test_eglib_LDADD = ../src/libeglib.la
|
||||
|
||||
test_glib_CFLAGS = `pkg-config --cflags glib-2.0` -DDRIVER_NAME=\"GLib\"
|
||||
test_glib_LDFLAGS = `pkg-config --libs glib-2.0 gmodule-2.0`
|
||||
test_glib_LDFLAGS = `pkg-config --libs glib-2.0`
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef G_OS_UNIX
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#include "test.h"
|
||||
|
||||
/* This test is just to be used with valgrind */
|
||||
@@ -63,4 +58,3 @@ static Test dir_tests [] = {
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(dir_tests_init, dir_tests)
|
||||
|
||||
|
||||
+8
-21
@@ -25,21 +25,13 @@
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "test.h"
|
||||
#include "tests.h"
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef DRIVER_NAME
|
||||
#define DRIVER_NAME "EGlib"
|
||||
#endif
|
||||
#include "test.h"
|
||||
#include "tests.h"
|
||||
|
||||
typedef struct _StringArray {
|
||||
gchar **strings;
|
||||
@@ -65,8 +57,6 @@ string_array_append(StringArray *array, gchar *string)
|
||||
return array;
|
||||
}
|
||||
|
||||
gint global_passed = 0, global_tests = 0;
|
||||
|
||||
static void
|
||||
string_array_free(StringArray *array)
|
||||
{
|
||||
@@ -165,8 +155,8 @@ gint main(gint argc, gchar **argv)
|
||||
for(k = 0; k < tests_to_run->length; k++) {
|
||||
gchar *user = tests_to_run->strings[k];
|
||||
const gchar *table = test_groups[j].name;
|
||||
size_t user_len = strlen(user);
|
||||
size_t table_len = strlen(table);
|
||||
gint user_len = strlen(user);
|
||||
gint table_len = strlen(table);
|
||||
|
||||
if(strncmp(user, table, table_len) == 0) {
|
||||
if(user_len > table_len && user[table_len] != ':') {
|
||||
@@ -181,7 +171,6 @@ gint main(gint argc, gchar **argv)
|
||||
}
|
||||
|
||||
if(run) {
|
||||
gboolean passed;
|
||||
gchar **split = NULL;
|
||||
|
||||
if(debug && test_groups[j].handler != fake_tests_init) {
|
||||
@@ -206,7 +195,7 @@ gint main(gint argc, gchar **argv)
|
||||
}
|
||||
}
|
||||
|
||||
passed = run_group(&(test_groups[j]),
|
||||
gboolean passed = run_group(&(test_groups[j]),
|
||||
iterations, quiet, report_time, tests);
|
||||
|
||||
if(tests != NULL) {
|
||||
@@ -220,9 +209,8 @@ gint main(gint argc, gchar **argv)
|
||||
}
|
||||
|
||||
if(!quiet) {
|
||||
gdouble pass_percentage = ((gdouble)global_passed / (gdouble)global_tests) * 100.0;
|
||||
printf("=============================\n");
|
||||
printf("Overall result: %s : %d / %d (%g%%)\n", global_failure ? "FAILED" : "OK", global_passed, global_tests, pass_percentage);
|
||||
printf("Overall result: %s\n", global_failure ? "FAILED" : "OK");
|
||||
}
|
||||
|
||||
if(report_time) {
|
||||
@@ -241,4 +229,3 @@ gint main(gint argc, gchar **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+3
-23
@@ -1,18 +1,10 @@
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include "test.h"
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <io.h>
|
||||
#define close _close
|
||||
#endif
|
||||
|
||||
RESULT
|
||||
test_file_get_contents ()
|
||||
{
|
||||
@@ -20,11 +12,6 @@ test_file_get_contents ()
|
||||
gchar *content;
|
||||
gboolean ret;
|
||||
gsize length;
|
||||
#ifdef G_OS_WIN32
|
||||
const gchar *filename = "c:\\Windows\\system.ini";
|
||||
#else
|
||||
const gchar *filename = "/etc/hosts";
|
||||
#endif
|
||||
|
||||
/*
|
||||
filename != NULL
|
||||
@@ -46,7 +33,7 @@ test_file_get_contents ()
|
||||
|
||||
g_error_free (error);
|
||||
error = NULL;
|
||||
ret = g_file_get_contents (filename, &content, &length, &error);
|
||||
ret = g_file_get_contents ("/etc/hosts", &content, &length, &error);
|
||||
if (!ret)
|
||||
return FAILED ("The error is %d %s\n", error->code, error->message);
|
||||
if (error != NULL)
|
||||
@@ -111,12 +98,8 @@ test_file ()
|
||||
{
|
||||
gboolean res;
|
||||
const gchar *tmp;
|
||||
gchar *path;
|
||||
|
||||
#ifndef G_OS_WIN32 /* FIXME */
|
||||
gchar *sympath;
|
||||
gchar *path, *sympath;
|
||||
gint ignored;
|
||||
#endif
|
||||
|
||||
res = g_file_test (NULL, 0);
|
||||
if (res)
|
||||
@@ -173,7 +156,6 @@ test_file ()
|
||||
if (res)
|
||||
return FAILED ("3 %s should not be a symlink", path);
|
||||
|
||||
#ifndef G_OS_WIN32 /* FIXME */
|
||||
sympath = g_strconcat (path, "-link", NULL);
|
||||
ignored = symlink (path, sympath);
|
||||
res = g_file_test (sympath, G_FILE_TEST_EXISTS);
|
||||
@@ -210,9 +192,8 @@ test_file ()
|
||||
if (!res)
|
||||
return FAILED ("5 %s should be a symlink", sympath);
|
||||
unlink (sympath);
|
||||
g_free (sympath);
|
||||
#endif
|
||||
g_free (path);
|
||||
g_free (sympath);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -225,4 +206,3 @@ static Test file_tests [] = {
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(file_tests_init, file_tests)
|
||||
|
||||
|
||||
+1
-3
@@ -315,12 +315,10 @@ static int intcompare (gconstpointer p1, gconstpointer p2)
|
||||
|
||||
static gboolean verify_sort (GList *list, int len)
|
||||
{
|
||||
int prev;
|
||||
|
||||
if (list->prev)
|
||||
return FALSE;
|
||||
|
||||
prev = GPOINTER_TO_INT (list->data);
|
||||
int prev = GPOINTER_TO_INT (list->data);
|
||||
len--;
|
||||
for (list = list->next; list; list = list->next) {
|
||||
int curr = GPOINTER_TO_INT (list->data);
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "test.h"
|
||||
|
||||
#if defined (G_OS_WIN32)
|
||||
#define EXTERNAL_SYMBOL "GetProcAddress"
|
||||
#else
|
||||
#define EXTERNAL_SYMBOL "system"
|
||||
#endif
|
||||
|
||||
void G_MODULE_EXPORT
|
||||
dummy_test_export ()
|
||||
{
|
||||
}
|
||||
|
||||
/* test for g_module_open (NULL, ...) */
|
||||
RESULT
|
||||
test_module_symbol_null ()
|
||||
{
|
||||
gpointer proc = GINT_TO_POINTER (42);
|
||||
|
||||
GModule *m = g_module_open (NULL, G_MODULE_BIND_LAZY);
|
||||
|
||||
if (m == NULL)
|
||||
return FAILED ("bind to main module failed. #0");
|
||||
|
||||
if (g_module_symbol (m, "__unlikely_\nexistent__", &proc))
|
||||
return FAILED ("non-existent symbol lookup failed. #1");
|
||||
|
||||
if (proc)
|
||||
return FAILED ("non-existent symbol lookup failed. #2");
|
||||
|
||||
if (!g_module_symbol (m, EXTERNAL_SYMBOL, &proc))
|
||||
return FAILED ("external lookup failed. #3");
|
||||
|
||||
if (!proc)
|
||||
return FAILED ("external lookup failed. #4");
|
||||
|
||||
if (!g_module_symbol (m, "dummy_test_export", &proc))
|
||||
return FAILED ("in-proc lookup failed. #5");
|
||||
|
||||
if (!proc)
|
||||
return FAILED ("in-proc lookup failed. #6");
|
||||
|
||||
if (!g_module_close (m))
|
||||
return FAILED ("close failed. #7");
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
static Test module_tests [] = {
|
||||
{"g_module_symbol_null", test_module_symbol_null},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(module_tests_init, module_tests)
|
||||
|
||||
|
||||
+12
-76
@@ -1,20 +1,10 @@
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef G_OS_UNIX
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#include "test.h"
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <direct.h>
|
||||
#define chdir _chdir
|
||||
#endif
|
||||
|
||||
/* This test is just to be used with valgrind */
|
||||
RESULT
|
||||
test_buildpath ()
|
||||
@@ -92,6 +82,7 @@ test_buildpath ()
|
||||
if (strcmp (s, "/a/c/") != 0)
|
||||
return FAILED ("14 Got wrong result, got: %s", s);
|
||||
g_free (s);
|
||||
return OK;
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -102,11 +93,7 @@ test_buildfname ()
|
||||
char *s;
|
||||
|
||||
s = g_build_filename ("a", "b", "c", "d", NULL);
|
||||
#ifdef G_OS_WIN32
|
||||
if (strcmp (s, "a\\b\\c\\d") != 0)
|
||||
#else
|
||||
if (strcmp (s, "a/b/c/d") != 0)
|
||||
#endif
|
||||
return FAILED ("1 Got wrong result, got: %s", s);
|
||||
g_free (s);
|
||||
|
||||
@@ -118,26 +105,6 @@ test_dirname ()
|
||||
{
|
||||
char *s;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
s = g_path_get_dirname ("c:\\home\\miguel");
|
||||
if (strcmp (s, "c:\\home") != 0)
|
||||
return FAILED ("Expected c:\\home, got %s", s);
|
||||
g_free (s);
|
||||
|
||||
s = g_path_get_dirname ("c:\\home\\dingus\\");
|
||||
if (strcmp (s, "c:\\home\\dingus") != 0)
|
||||
return FAILED ("Expected c:\\home\\dingus, got %s", s);
|
||||
g_free (s);
|
||||
|
||||
s = g_path_get_dirname ("dir.c");
|
||||
if (strcmp (s, ".") != 0)
|
||||
return FAILED ("Expected `.', got %s", s);
|
||||
g_free (s);
|
||||
|
||||
s = g_path_get_dirname ("c:\\index.html");
|
||||
if (strcmp (s, "c:") != 0)
|
||||
return FAILED ("Expected [c:], got [%s]", s);
|
||||
#else
|
||||
s = g_path_get_dirname ("/home/miguel");
|
||||
if (strcmp (s, "/home") != 0)
|
||||
return FAILED ("Expected /home, got %s", s);
|
||||
@@ -156,7 +123,7 @@ test_dirname ()
|
||||
s = g_path_get_dirname ("/index.html");
|
||||
if (strcmp (s, "/") != 0)
|
||||
return FAILED ("Expected [/], got [%s]", s);
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -165,22 +132,6 @@ test_basename ()
|
||||
{
|
||||
char *s;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
s = g_path_get_basename ("");
|
||||
if (strcmp (s, ".") != 0)
|
||||
return FAILED ("Expected `.', got %s", s);
|
||||
g_free (s);
|
||||
|
||||
s = g_path_get_basename ("c:\\home\\dingus\\");
|
||||
if (strcmp (s, "dingus") != 0)
|
||||
return FAILED ("1 Expected dingus, got %s", s);
|
||||
g_free (s);
|
||||
|
||||
s = g_path_get_basename ("c:\\home\\dingus");
|
||||
if (strcmp (s, "dingus") != 0)
|
||||
return FAILED ("2 Expected dingus, got %s", s);
|
||||
g_free (s);
|
||||
#else
|
||||
s = g_path_get_basename ("");
|
||||
if (strcmp (s, ".") != 0)
|
||||
return FAILED ("Expected `.', got %s", s);
|
||||
@@ -195,7 +146,7 @@ test_basename ()
|
||||
if (strcmp (s, "dingus") != 0)
|
||||
return FAILED ("2 Expected dingus, got %s", s);
|
||||
g_free (s);
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -203,14 +154,10 @@ gchar *
|
||||
test_ppath ()
|
||||
{
|
||||
char *s;
|
||||
#ifdef G_OS_WIN32
|
||||
const gchar *searchfor = "explorer.exe";
|
||||
#else
|
||||
const gchar *searchfor = "ls";
|
||||
#endif
|
||||
s = g_find_program_in_path (searchfor);
|
||||
|
||||
s = g_find_program_in_path ("ls");
|
||||
if (s == NULL)
|
||||
return FAILED ("No %s on this system?", searchfor);
|
||||
return FAILED ("No shell on this system (This assumes Unix)?");
|
||||
g_free (s);
|
||||
return OK;
|
||||
}
|
||||
@@ -220,11 +167,6 @@ test_ppath2 ()
|
||||
{
|
||||
char *s;
|
||||
const char *path = g_getenv ("PATH");
|
||||
#ifdef G_OS_WIN32
|
||||
const gchar *searchfor = "test_eglib.exe";
|
||||
#else
|
||||
const gchar *searchfor = "test-glib";
|
||||
#endif
|
||||
|
||||
g_setenv ("PATH", "", TRUE);
|
||||
s = g_find_program_in_path ("ls");
|
||||
@@ -233,10 +175,10 @@ test_ppath2 ()
|
||||
return FAILED ("Found something interesting here: %s", s);
|
||||
}
|
||||
g_free (s);
|
||||
s = g_find_program_in_path (searchfor);
|
||||
s = g_find_program_in_path ("test-glib");
|
||||
if (s == NULL) {
|
||||
g_setenv ("PATH", path, TRUE);
|
||||
return FAILED ("It should find '%s' in the current directory.", searchfor);
|
||||
return FAILED ("It should find 'test-glib' in the current directory.");
|
||||
}
|
||||
g_free (s);
|
||||
g_setenv ("PATH", path, TRUE);
|
||||
@@ -247,22 +189,17 @@ gchar *
|
||||
test_cwd ()
|
||||
{
|
||||
char *dir = g_get_current_dir ();
|
||||
#ifdef G_OS_WIN32
|
||||
const gchar *newdir = "C:\\Windows";
|
||||
#else
|
||||
const gchar *newdir = "/bin";
|
||||
#endif
|
||||
|
||||
if (dir == NULL)
|
||||
return FAILED ("No current directory?");
|
||||
g_free (dir);
|
||||
|
||||
if (chdir (newdir) == -1)
|
||||
return FAILED ("No %s?", newdir);
|
||||
if (chdir ("/bin") == -1)
|
||||
return FAILED ("No /bin?");
|
||||
|
||||
dir = g_get_current_dir ();
|
||||
if (strcmp (dir, newdir) != 0)
|
||||
return FAILED("Did not go to %s?", newdir);
|
||||
if (strcmp (dir, "/bin") != 0)
|
||||
return FAILED("Did not go to /bin?");
|
||||
g_free (dir);
|
||||
|
||||
return OK;
|
||||
@@ -297,4 +234,3 @@ static Test path_tests [] = {
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(path_tests_init, path_tests)
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include "test.h"
|
||||
|
||||
@@ -58,4 +55,3 @@ static Test pattern_tests [] = {
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(pattern_tests_init, pattern_tests)
|
||||
|
||||
|
||||
+9
-10
@@ -17,7 +17,7 @@ static const char *items [] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static GPtrArray *ptrarray_alloc_and_fill(guint *item_count)
|
||||
static GPtrArray *ptrarray_alloc_and_fill(gint *item_count)
|
||||
{
|
||||
GPtrArray *array = g_ptr_array_new();
|
||||
gint i;
|
||||
@@ -33,9 +33,9 @@ static GPtrArray *ptrarray_alloc_and_fill(guint *item_count)
|
||||
return array;
|
||||
}
|
||||
|
||||
static guint guess_size(guint length)
|
||||
static gint guess_size(gint length)
|
||||
{
|
||||
guint size = 1;
|
||||
gint size = 1;
|
||||
|
||||
while(size < length) {
|
||||
size <<= 1;
|
||||
@@ -47,7 +47,7 @@ static guint guess_size(guint length)
|
||||
RESULT ptrarray_alloc()
|
||||
{
|
||||
GPtrArrayPriv *array;
|
||||
guint i;
|
||||
gint i;
|
||||
|
||||
array = (GPtrArrayPriv *)ptrarray_alloc_and_fill(&i);
|
||||
|
||||
@@ -68,7 +68,7 @@ RESULT ptrarray_alloc()
|
||||
RESULT ptrarray_for_iterate()
|
||||
{
|
||||
GPtrArray *array = ptrarray_alloc_and_fill(NULL);
|
||||
guint i;
|
||||
gint i;
|
||||
|
||||
for(i = 0; i < array->len; i++) {
|
||||
char *item = (char *)g_ptr_array_index(array, i);
|
||||
@@ -120,7 +120,7 @@ RESULT ptrarray_foreach_iterate()
|
||||
RESULT ptrarray_set_size()
|
||||
{
|
||||
GPtrArray *array = g_ptr_array_new();
|
||||
guint i, grow_length = 50;
|
||||
gint i, grow_length = 50;
|
||||
|
||||
g_ptr_array_add(array, (gpointer)items[0]);
|
||||
g_ptr_array_add(array, (gpointer)items[1]);
|
||||
@@ -148,7 +148,7 @@ RESULT ptrarray_set_size()
|
||||
RESULT ptrarray_remove_index()
|
||||
{
|
||||
GPtrArray *array;
|
||||
guint i;
|
||||
gint i;
|
||||
|
||||
array = ptrarray_alloc_and_fill(&i);
|
||||
|
||||
@@ -173,7 +173,7 @@ RESULT ptrarray_remove_index()
|
||||
RESULT ptrarray_remove()
|
||||
{
|
||||
GPtrArray *array;
|
||||
guint i;
|
||||
gint i;
|
||||
|
||||
array = ptrarray_alloc_and_fill(&i);
|
||||
|
||||
@@ -206,7 +206,7 @@ static gint ptrarray_sort_compare(gconstpointer a, gconstpointer b)
|
||||
RESULT ptrarray_sort()
|
||||
{
|
||||
GPtrArray *array = g_ptr_array_new();
|
||||
guint i;
|
||||
gint i;
|
||||
gchar *letters [] = { "A", "B", "C", "D", "E" };
|
||||
|
||||
g_ptr_array_add(array, letters[0]);
|
||||
@@ -242,4 +242,3 @@ static Test ptrarray_tests [] = {
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(ptrarray_tests_init, ptrarray_tests)
|
||||
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
* These depend on -Werror, -Wall being set to catch the build error.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
#include "test.h"
|
||||
|
||||
@@ -1,18 +1,9 @@
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "test.h"
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <io.h>
|
||||
#define read _read
|
||||
#define close _close
|
||||
#endif
|
||||
|
||||
RESULT
|
||||
test_spawn_sync ()
|
||||
{
|
||||
@@ -79,4 +70,3 @@ static Test spawn_tests [] = {
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(spawn_tests_init, spawn_tests)
|
||||
|
||||
|
||||
+18
-42
@@ -254,7 +254,6 @@ RESULT
|
||||
test_ascii_xdigit_value ()
|
||||
{
|
||||
int i;
|
||||
gchar j;
|
||||
|
||||
i = g_ascii_xdigit_value ('9' + 1);
|
||||
if (i != -1)
|
||||
@@ -275,20 +274,20 @@ test_ascii_xdigit_value ()
|
||||
if (i != -1)
|
||||
return FAILED ("'F' + 1");
|
||||
|
||||
for (j = '0'; j < '9'; j++) {
|
||||
int c = g_ascii_xdigit_value (j);
|
||||
if (c != (j - '0'))
|
||||
return FAILED ("Digits %c -> %d", j, c);
|
||||
for (i = '0'; i < '9'; i++) {
|
||||
int c = g_ascii_xdigit_value (i);
|
||||
if (c != (i - '0'))
|
||||
return FAILED ("Digits %c -> %d", i, c);
|
||||
}
|
||||
for (j = 'a'; j < 'f'; j++) {
|
||||
int c = g_ascii_xdigit_value (j);
|
||||
if (c != (j - 'a' + 10))
|
||||
return FAILED ("Lower %c -> %d", j, c);
|
||||
for (i = 'a'; i < 'f'; i++) {
|
||||
int c = g_ascii_xdigit_value (i);
|
||||
if (c != (i - 'a' + 10))
|
||||
return FAILED ("Lower %c -> %d", i, c);
|
||||
}
|
||||
for (j = 'A'; j < 'F'; j++) {
|
||||
int c = g_ascii_xdigit_value (j);
|
||||
if (c != (j - 'A' + 10))
|
||||
return FAILED ("Upper %c -> %d", j, c);
|
||||
for (i = 'A'; i < 'F'; i++) {
|
||||
int c = g_ascii_xdigit_value (i);
|
||||
if (c != (i - 'A' + 10))
|
||||
return FAILED ("Upper %c -> %d", i, c);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
@@ -311,18 +310,18 @@ test_strdelimit ()
|
||||
return OK;
|
||||
}
|
||||
|
||||
#define NUMBERS "0123456789"
|
||||
#define TEXT "0123456789"
|
||||
|
||||
RESULT
|
||||
test_strlcpy ()
|
||||
{
|
||||
const gchar *src = "onetwothree";
|
||||
gchar *dest;
|
||||
gsize i;
|
||||
int i;
|
||||
|
||||
dest = g_malloc (strlen (src) + 1);
|
||||
memset (dest, 0, strlen (src) + 1);
|
||||
i = g_strlcpy (dest, src, (gsize)-1);
|
||||
i = g_strlcpy (dest, src, -1);
|
||||
if (i != strlen (src))
|
||||
return FAILED ("Test1 got %d", i);
|
||||
|
||||
@@ -349,9 +348,9 @@ test_strlcpy ()
|
||||
g_free (dest);
|
||||
|
||||
/* This is a test for g_filename_from_utf8, even if it does not look like it */
|
||||
dest = g_filename_from_utf8 (NUMBERS, strlen (NUMBERS), NULL, NULL, NULL);
|
||||
if (0 != strcmp (dest, NUMBERS))
|
||||
return FAILED ("problem [%s] and [%s]", dest, NUMBERS);
|
||||
dest = g_filename_from_utf8 (TEXT, strlen (TEXT), NULL, NULL, NULL);
|
||||
if (0 != strcmp (dest, TEXT))
|
||||
return FAILED ("problem [%s] and [%s]", dest, TEXT);
|
||||
g_free (dest);
|
||||
|
||||
return OK;
|
||||
@@ -400,27 +399,6 @@ test_ascii_strncasecmp ()
|
||||
return OK;
|
||||
}
|
||||
|
||||
RESULT
|
||||
test_ascii_strdown ()
|
||||
{
|
||||
const gchar *a = "~09+AaBcDeFzZ$0909EmPAbCdEEEEEZZZZAAA";
|
||||
const gchar *b = "~09+aabcdefzz$0909empabcdeeeeezzzzaaa";
|
||||
gchar *c;
|
||||
gint n, l;
|
||||
|
||||
l = (gint)strlen (b);
|
||||
c = g_ascii_strdown (a, l);
|
||||
n = g_ascii_strncasecmp (b, c, l);
|
||||
|
||||
if (n != 0) {
|
||||
g_free (c);
|
||||
return FAILED ("Should have been 0, got %d", n);
|
||||
}
|
||||
|
||||
g_free (c);
|
||||
return OK;
|
||||
}
|
||||
|
||||
static Test strutil_tests [] = {
|
||||
{"g_strfreev", test_strfreev},
|
||||
{"g_strconcat", test_concat},
|
||||
@@ -437,10 +415,8 @@ static Test strutil_tests [] = {
|
||||
{"g_strlcpy", test_strlcpy},
|
||||
{"g_strescape", test_strescape},
|
||||
{"g_ascii_strncasecmp", test_ascii_strncasecmp },
|
||||
{"g_ascii_strdown", test_ascii_strdown },
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(strutil_tests_init, strutil_tests)
|
||||
|
||||
|
||||
+5
-5
@@ -95,8 +95,8 @@ test_gstring ()
|
||||
ret = g_string_free (s, FALSE);
|
||||
g_free (ret);
|
||||
|
||||
s = g_string_new_len ("H" "\000" "H", 3);
|
||||
g_string_append_len (s, "1" "\000" "2", 3);
|
||||
s = g_string_new_len ("H\000H", 3);
|
||||
g_string_append_len (s, "1\0002", 3);
|
||||
sfail ('H', 0);
|
||||
sfail ( 0, 1);
|
||||
sfail ('H', 2);
|
||||
@@ -137,7 +137,7 @@ test_truncate ()
|
||||
s = g_string_truncate (s, 10);
|
||||
if (strlen (s->str) != 1)
|
||||
return FAILED ("The size is not 1");
|
||||
g_string_truncate (s, (gsize)-1);
|
||||
g_string_truncate (s, -1);
|
||||
if (strlen (s->str) != 1)
|
||||
return FAILED ("The size is not 1");
|
||||
g_string_truncate (s, 0);
|
||||
@@ -205,7 +205,7 @@ RESULT
|
||||
test_macros ()
|
||||
{
|
||||
char *s = g_strdup (G_STRLOC);
|
||||
char *p = strchr (s + 2, ':');
|
||||
char *p = strchr (s, ':');
|
||||
int n;
|
||||
|
||||
if (p == NULL)
|
||||
@@ -215,7 +215,7 @@ test_macros ()
|
||||
return FAILED ("did not find a valid line number");
|
||||
|
||||
*p = 0;
|
||||
if (strcmp (s + strlen(s) - 8 , "string.c") != 0)
|
||||
if (strcmp (s, "string.c") != 0)
|
||||
return FAILED ("This did not store the filename on G_STRLOC");
|
||||
|
||||
g_free (s);
|
||||
|
||||
+3
-21
@@ -26,23 +26,15 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <glib.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef G_OS_WIN32
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
#include <glib.h>
|
||||
|
||||
#include "test.h"
|
||||
|
||||
extern gint global_passed, global_tests;
|
||||
|
||||
static gchar *last_result = NULL;
|
||||
|
||||
gboolean
|
||||
@@ -83,7 +75,7 @@ run_group(Group *group, gint iterations, gboolean quiet,
|
||||
start_time_group = get_timestamp();
|
||||
|
||||
for(i = 0; tests[i].name != NULL; i++) {
|
||||
gchar *result = "";
|
||||
gchar *result;
|
||||
gboolean iter_pass, run;
|
||||
|
||||
iter_pass = FALSE;
|
||||
@@ -140,9 +132,6 @@ run_group(Group *group, gint iterations, gboolean quiet,
|
||||
}
|
||||
}
|
||||
|
||||
global_passed += passed;
|
||||
global_tests += total;
|
||||
|
||||
if(!quiet) {
|
||||
gdouble pass_percentage = ((gdouble)passed / (gdouble)total) * 100.0;
|
||||
if(time) {
|
||||
@@ -183,15 +172,9 @@ FAILED(const gchar *format, ...)
|
||||
gdouble
|
||||
get_timestamp()
|
||||
{
|
||||
/* FIXME: We should use g_get_current_time here */
|
||||
#ifdef G_OS_WIN32
|
||||
long int l = GetTickCount();
|
||||
return (gdouble)(l / 1000) + (1.e-6) * ((l % 1000) * 1000);
|
||||
#else
|
||||
struct timeval tp;
|
||||
gettimeofday(&tp, NULL);
|
||||
return (gdouble)tp.tv_sec + (1.e-6) * tp.tv_usec;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -206,7 +189,7 @@ eg_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens)
|
||||
gchar *strtok_save, **vector;
|
||||
gchar *token, *token_c;
|
||||
gint size = 1;
|
||||
size_t token_length;
|
||||
gint token_length;
|
||||
|
||||
g_return_val_if_fail(string != NULL, NULL);
|
||||
g_return_val_if_fail(delimiter != NULL, NULL);
|
||||
@@ -268,4 +251,3 @@ eg_strfreev (gchar **str_array)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,18 +29,9 @@
|
||||
#ifndef _TEST_H
|
||||
#define _TEST_H
|
||||
|
||||
#include <config.h>
|
||||
#include <stdarg.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* disable the following warnings
|
||||
* C4100: The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored.
|
||||
* C4127: conditional expression is constant (test macros produce a lot of these)
|
||||
*/
|
||||
#pragma warning(disable:4100 4127)
|
||||
#endif
|
||||
|
||||
typedef gchar * RESULT;
|
||||
|
||||
typedef struct _Test Test;
|
||||
@@ -61,7 +52,6 @@ struct _Group {
|
||||
|
||||
gboolean run_group(Group *group, gint iterations, gboolean quiet,
|
||||
gboolean time, gchar *tests);
|
||||
#undef FAILED
|
||||
RESULT FAILED(const gchar *format, ...);
|
||||
gdouble get_timestamp();
|
||||
gchar ** eg_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens);
|
||||
@@ -77,4 +67,3 @@ void eg_strfreev (gchar **str_array);
|
||||
|
||||
#endif /* _TEST_H */
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ DEFINE_TEST_GROUP_INIT_H(dir_tests_init);
|
||||
DEFINE_TEST_GROUP_INIT_H(markup_tests_init);
|
||||
DEFINE_TEST_GROUP_INIT_H(utf8_tests_init);
|
||||
DEFINE_TEST_GROUP_INIT_H(endian_tests_init);
|
||||
DEFINE_TEST_GROUP_INIT_H(module_tests_init);
|
||||
|
||||
static Group test_groups [] = {
|
||||
{"string", string_tests_init},
|
||||
@@ -43,7 +42,6 @@ static Group test_groups [] = {
|
||||
{"dir", dir_tests_init},
|
||||
{"utf8", utf8_tests_init},
|
||||
{"endian", endian_tests_init},
|
||||
{"module", module_tests_init},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -1,18 +1,9 @@
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <windows.h>
|
||||
#define sleep(t) Sleep((t) * 1000)
|
||||
#endif
|
||||
|
||||
#include "test.h"
|
||||
|
||||
RESULT
|
||||
@@ -52,4 +43,3 @@ static Test timer_tests [] = {
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(timer_tests_init, timer_tests)
|
||||
|
||||
|
||||
+1
-30
@@ -183,7 +183,7 @@ test_utf8_seq ()
|
||||
gunichar2 *dst;
|
||||
|
||||
printf ("got: %s\n", src);
|
||||
dst = g_utf8_to_utf16 (src, (glong)strlen (src), &in_read, &out_read, &error);
|
||||
dst = g_utf8_to_utf16 (src, strlen (src), &in_read, &out_read, &error);
|
||||
if (error != NULL){
|
||||
return error->message;
|
||||
}
|
||||
@@ -229,9 +229,6 @@ test_convert ()
|
||||
char *s = g_convert ("\242\241\243\242\241\243\242\241\243\242\241\243", -1, "UTF-8", "ISO-8859-1", NULL, &n, NULL);
|
||||
guchar *u = (guchar *) s;
|
||||
|
||||
if (!s)
|
||||
return FAILED ("Expected 24 bytes, got: NULL");
|
||||
|
||||
if (strlen (s) != 24)
|
||||
return FAILED ("Expected 24 bytes, got: %d", strlen (s));
|
||||
|
||||
@@ -245,30 +242,6 @@ test_convert ()
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
RESULT
|
||||
test_xdigit ()
|
||||
{
|
||||
static char test_chars[] = {
|
||||
'0', '1', '2', '3', '4',
|
||||
'5', '6', '7', '8', '9',
|
||||
'a', 'b', 'c', 'd', 'e', 'f', 'g',
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G'};
|
||||
static gint32 test_values[] = {
|
||||
0, 1, 2, 3, 4,
|
||||
5, 6, 7, 8, 9,
|
||||
10, 11, 12, 13, 14, 15, -1,
|
||||
10, 11, 12, 13, 14, 15, -1};
|
||||
|
||||
int i =0;
|
||||
|
||||
for (i = 0; i < sizeof(test_chars); i++)
|
||||
if (g_unichar_xdigit_value ((gunichar)test_chars[i]) != test_values[i])
|
||||
return FAILED("Incorrect value %d at index %d", test_values[i], i);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* test initialization
|
||||
*/
|
||||
@@ -278,10 +251,8 @@ static Test utf8_tests [] = {
|
||||
{"g_utf8_to_utf16", test_utf8_to_utf16},
|
||||
{"g_utf8_seq", test_utf8_seq},
|
||||
{"g_convert", test_convert },
|
||||
{"g_unichar_xdigit_value", test_xdigit },
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(utf8_tests_init, utf8_tests)
|
||||
|
||||
|
||||
@@ -20,14 +20,8 @@ if [ "x$1" = "x--help" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IGNORE_FUNCTIONS="g_hash_table_lookup_node g_hash_table_foreach_remove_or_steal g_hash_table_resize"
|
||||
|
||||
if [ -z $MONO_CHECKOUT ]; then
|
||||
if [ -e ../../mono.pc.in ]; then
|
||||
MONO_CHECKOUT=../..
|
||||
else
|
||||
MONO_CHECKOUT=~/cvs/mono/mono
|
||||
fi
|
||||
MONO_CHECKOUT=~/cvs/mono/mono
|
||||
fi
|
||||
|
||||
if [ ! -d $MONO_CHECKOUT ]; then
|
||||
@@ -59,13 +53,6 @@ if [ ! "x$1" = "x--show-only-mono" ]; then
|
||||
fi
|
||||
done
|
||||
|
||||
for ignore_function in $IGNORE_FUNCTIONS; do
|
||||
if [ "x$ignore_function" = "x$mono_function" ]; then
|
||||
matched="yes"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "x$matched" = "xno" ]; then
|
||||
echo $mono_function >> $RESULTS_FILE.tmp
|
||||
fi
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
/* config.h. Generated by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
/* #undef HAVE_PWD_H 1 */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
/* #undef HAVE_STRLCPY */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "eglib"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT ""
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME ""
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING ""
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION ""
|
||||
|
||||
/* The size of a `int', as computed by sizeof. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The size of a `void *', as computed by sizeof. */
|
||||
#define SIZEOF_VOID_P 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.1"
|
||||
+315
@@ -0,0 +1,315 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="genmdesc"
|
||||
ProjectGUID="{B7098DFA-31E6-4006-8A15-1C9A4E925149}"
|
||||
RootNamespace="genmdesc"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="./VSDependancies/temp/genmdesc/Debug"
|
||||
IntermediateDirectory="./VSDependancies/temp/genmdesc/Debug"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\./VSDependancies/genmdesc___Win32_Debug/genmdesc.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\libgc\include;.\;".\VSDependancies\include\glib-2.0";".\VSDependancies\include\glib-2.0\glib";.\VSDependancies\include;".\VSDependancies\lib\glib-2.0\include";.\mono\;.\mono\jit;"C:\Program Files\Microsoft SDK\include""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;__WIN32__;HAVE_CONFIG_H;__i386__"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\./VSDependancies/temp/genmdesc___Win32_Debug/genmdesc.pch"
|
||||
AssemblerListingLocation=".\./VSDependancies/temp/genmdesc___Win32_Debug/"
|
||||
ObjectFile=".\./VSDependancies/temp/genmdesc___Win32_Debug/"
|
||||
ProgramDataBaseFileName=".\./VSDependancies/temp/genmdesc___Win32_Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib glib-2.0.lib gmodule-2.0.lib"
|
||||
OutputFile=".\./VSDependancies/genmdesc___Win32_Debug/genmdesc.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\VSDependancies\lib"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\./VSDependancies/genmdesc___Win32_Debug/genmdesc.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\./VSDependancies/temp/genmdesc___Win32_Debug/genmdesc.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\Release/genmdesc.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\libgc\include,.\,.\VSDependancies\include\glib-2.0\glib,.\VSDependancies\include,.\mono\,.\mono\jit"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;__WIN32__;HAVE_CONFIG_H;__i386__"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\Release/genmdesc.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib glib-2.0.lib"
|
||||
OutputFile=".\Release/genmdesc.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\VSDependancies\lib"
|
||||
ProgramDatabaseFile=".\Release/genmdesc.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Release/genmdesc.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="mono\mini\genmdesc.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="mono\mini\helpers.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="mono\utils\monobitset.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="mono\metadata\opcodes.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -1,54 +1,3 @@
|
||||
|
||||
Tue Sep 11 16:22:28 CEST 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* pthread_support.c: export GC_thread_tls.
|
||||
|
||||
2007-08-22 Martin Baulig <[email protected]>
|
||||
|
||||
* pthread_stop_world.c
|
||||
(GC_mono_debugger_add_all_threads): Removed.
|
||||
(GC_mono_debugger_get_stack_ptr): New public function.
|
||||
|
||||
Wed Jul 4 17:46:19 CEST 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* darwin_stop_world.c: use a larger array for GC_mach_threads
|
||||
(it'll need to be enlarged dynamically, but it's with the world
|
||||
stopped, bug #81974).
|
||||
|
||||
2007-05-09 Jonathan Chambers <[email protected]>
|
||||
|
||||
* win32_threads.c: If SuspendThread fails, don't abort. Instead
|
||||
remove thread from GC, as this only seems to happen when thread is
|
||||
terminating.
|
||||
|
||||
2007-03-29 Zoltan Varga <[email protected]>
|
||||
|
||||
* autogen.sh: Applied patch from Priit Laes <[email protected]>. Fix the running
|
||||
of libtoolize.
|
||||
|
||||
* ltmain.sh config.sub config.guess: Removed, libtoolize creates them now.
|
||||
|
||||
2007-03-13 Jonathan Chambers <[email protected]>
|
||||
|
||||
* include/gc.h: Fix _WIN64 typedefs.
|
||||
* libgc.vcproj: Fix Release target and begin Win64 port.
|
||||
|
||||
2007-02-01 Geoff Norton <[email protected]>
|
||||
|
||||
* include/private/gc_pthread_redirects.h:
|
||||
* include/private/gc_config_macros.h:
|
||||
* include/private/gc_priv.h:
|
||||
* configure.in:
|
||||
* pthread_support.c
|
||||
* specific.c: Support for NetBSD-CURRENT. Loosely based on NetBSD
|
||||
pkgsrc patch.
|
||||
|
||||
2006-12-22 Robert Jordan <[email protected]>
|
||||
|
||||
* include/private/gcconfig.h, os_dep.c:
|
||||
Add FreeBSD/amd64 support. Based on a FreeBSD Port Collection patch.
|
||||
r=Paolo.
|
||||
|
||||
2006-11-19 Allan Hsu <[email protected]>
|
||||
|
||||
* libgc/darwin_stop_world.c, libgc/include/private/gc_priv.h,
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ xlc )
|
||||
esac
|
||||
|
||||
|
||||
if grep "^AC_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
if test -z "$NO_LIBTOOLIZE" ; then
|
||||
echo "Running libtoolize..."
|
||||
${LIBTOOL}ize --force --copy
|
||||
|
||||
+1453
File diff suppressed because it is too large.
Load diff
+1566
File diff suppressed because it is too large.
Load diff
@@ -151,13 +151,6 @@ case "$THREADS" in
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
;;
|
||||
*-*-netbsd*)
|
||||
AC_DEFINE(GC_NETBSD_THREADS)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
;;
|
||||
*-*-osf*)
|
||||
AC_DEFINE(GC_OSF1_THREADS)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
|
||||
@@ -280,14 +280,13 @@ void GC_push_all_stacks() {
|
||||
static mach_port_t GC_mach_handler_thread;
|
||||
static int GC_use_mach_handler_thread = 0;
|
||||
|
||||
#define SUSPEND_THREADS_SIZE 2048
|
||||
static struct GC_mach_thread GC_mach_threads[SUSPEND_THREADS_SIZE];
|
||||
static struct GC_mach_thread GC_mach_threads[THREAD_TABLE_SZ];
|
||||
static int GC_mach_threads_count;
|
||||
|
||||
void GC_stop_init() {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SUSPEND_THREADS_SIZE; i++) {
|
||||
for (i = 0; i < THREAD_TABLE_SZ; i++) {
|
||||
GC_mach_threads[i].thread = 0;
|
||||
GC_mach_threads[i].already_suspended = 0;
|
||||
}
|
||||
|
||||
+2
-2
@@ -61,8 +61,8 @@
|
||||
/* Win64 isn't really supported yet, but this is the first step. And */
|
||||
/* it might cause error messages to show up in more plausible places. */
|
||||
/* This needs basetsd.h, which is included by windows.h. */
|
||||
typedef unsigned __int64 GC_word;
|
||||
typedef __int64 GC_signed_word;
|
||||
typedef ULONG_PTR GC_word;
|
||||
typedef LONG_PTR GC_word;
|
||||
#endif
|
||||
|
||||
/* Public read-only variables */
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
|
||||
defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
|
||||
defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
|
||||
defined(GC_AIX_THREADS) || defined(GC_NETBSD_THREADS) || \
|
||||
defined(GC_AIX_THREADS) || \
|
||||
(defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
|
||||
# define GC_PTHREADS
|
||||
# endif
|
||||
|
||||
@@ -74,10 +74,7 @@
|
||||
# define pthread_join GC_pthread_join
|
||||
# define pthread_detach GC_pthread_detach
|
||||
|
||||
#ifndef GC_DARWIN_THREADS
|
||||
# ifdef GC_NETBSD_THREADS
|
||||
# undef pthread_sigmask
|
||||
# endif
|
||||
#ifndef GC_DARWIN_THREADS
|
||||
# define pthread_sigmask GC_pthread_sigmask
|
||||
# define dlopen GC_dlopen
|
||||
#endif
|
||||
|
||||
@@ -16,8 +16,8 @@ typedef struct
|
||||
|
||||
extern GCThreadFunctions *gc_thread_vtable;
|
||||
|
||||
extern void *
|
||||
GC_mono_debugger_get_stack_ptr (void);
|
||||
extern void
|
||||
GC_mono_debugger_add_all_threads (void);
|
||||
|
||||
#else
|
||||
#error "This header is only intended to be used by the Mono Debugger"
|
||||
|
||||
@@ -1956,7 +1956,7 @@ void GC_err_puts GC_PROTO((GC_CONST char *s));
|
||||
/* in Linux glibc, but it's not exported.) Thus we continue to use */
|
||||
/* the same hard-coded signals we've always used. */
|
||||
# if !defined(SIG_SUSPEND)
|
||||
# if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS) || defined(GC_NETBSD_THREADS)
|
||||
# if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS)
|
||||
# if defined(SPARC) && !defined(SIGPWR)
|
||||
/* SPARC/Linux doesn't properly define SIGPWR in <signal.h>.
|
||||
* It is aliased to SIGLOST in asm/signal.h, though. */
|
||||
|
||||
@@ -347,10 +347,6 @@
|
||||
# define I386
|
||||
# define mach_type_known
|
||||
# endif
|
||||
# if defined(FREEBSD) && defined(__x86_64__)
|
||||
# define X86_64
|
||||
# define mach_type_known
|
||||
# endif
|
||||
# if defined(__NetBSD__) && (defined(i386) || defined(__i386__))
|
||||
# define I386
|
||||
# define mach_type_known
|
||||
@@ -1993,22 +1989,6 @@
|
||||
# define PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1)
|
||||
# endif
|
||||
# endif
|
||||
# ifdef FREEBSD
|
||||
# define OS_TYPE "FREEBSD"
|
||||
# ifndef GC_FREEBSD_THREADS
|
||||
# define MPROTECT_VDB
|
||||
# endif
|
||||
# define SIG_SUSPEND SIGTSTP
|
||||
# define SIG_THR_RESTART SIGCONT
|
||||
# define NEED_FIND_LIMIT
|
||||
# define FREEBSD_STACKBOTTOM
|
||||
# ifdef __ELF__
|
||||
# define DYNAMIC_LOADING
|
||||
# endif
|
||||
extern char etext[];
|
||||
extern char * GC_FreeBSDGetDataStart();
|
||||
# define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext)
|
||||
# endif
|
||||
# ifdef NETBSD
|
||||
# define OS_TYPE "NETBSD"
|
||||
# ifdef __ELF__
|
||||
|
||||
@@ -0,0 +1,281 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="libgc"
|
||||
ProjectGUID="{EB56000B-C80B-4E8B-908D-D84D31B517D3}"
|
||||
RootNamespace="libgc"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../VSDependancies/temp/libgc/Debug"
|
||||
IntermediateDirectory="../VSDependancies/temp/libgc/Debug"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include\"
|
||||
PreprocessorDefinitions="GC_THREADS;WIN32_THREADS;GC_WIN32_THREADS;GC_INSIDE_DLL;GC_GCJ_SUPPORT;WIN32;_DEBUG;_LIB;_WINDOWS;__WIN32__;__i386__;PLATFORM_WIN32;SILENT;ALL_INTERIOR_POINTERS;__STDC__"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
DisableSpecificWarnings="4311;4312;4996;4005"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\libgc.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\allchblk.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\alloc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\blacklst.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dbg_mlc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dyn_load.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\finalize.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gcj_mlc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\headers.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mach_dep.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\malloc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mallocx.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mark.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mark_rts.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\misc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\new_hblk.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\obj_map.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\os_dep.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ptr_chck.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\reclaim.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stubborn.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\typd_mlc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\win32_threads.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\include\gc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\private\gc_hdrs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\private\gc_locks.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\gc_mark.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\private\gc_pmark.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\private\gc_priv.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\private\gcconfig.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
+6426
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -477,7 +477,7 @@ void GC_init()
|
||||
#if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
|
||||
if (!GC_is_initialized) {
|
||||
BOOL (WINAPI *pfn) (LPCRITICAL_SECTION, DWORD) = NULL;
|
||||
HMODULE hK32 = GetModuleHandle(_T("kernel32.dll"));
|
||||
HMODULE hK32 = GetModuleHandle("kernel32.dll");
|
||||
if (hK32)
|
||||
(FARPROC) pfn = GetProcAddress(hK32,
|
||||
"InitializeCriticalSectionAndSpinCount");
|
||||
|
||||
+1
-1
@@ -1396,7 +1396,7 @@ int * etext_addr;
|
||||
}
|
||||
# endif
|
||||
|
||||
# if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__) || defined(__x86_64__)) && !defined(PCR)
|
||||
# if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__)) && !defined(PCR)
|
||||
/* Its unclear whether this should be identical to the above, or */
|
||||
/* whether it should apply to non-X86 architectures. */
|
||||
/* For now we don't assume that there is always an empty page after */
|
||||
|
||||
@@ -561,13 +561,19 @@ void GC_stop_init()
|
||||
|
||||
GCThreadFunctions *gc_thread_vtable = NULL;
|
||||
|
||||
void *
|
||||
GC_mono_debugger_get_stack_ptr (void)
|
||||
void
|
||||
GC_mono_debugger_add_all_threads (void)
|
||||
{
|
||||
GC_thread me;
|
||||
GC_thread p;
|
||||
int i;
|
||||
|
||||
me = GC_lookup_thread (pthread_self ());
|
||||
return &me->stop_info.stack_ptr;
|
||||
if (gc_thread_vtable && gc_thread_vtable->thread_created) {
|
||||
for (i = 0; i < THREAD_TABLE_SZ; i++) {
|
||||
for (p = GC_threads[i]; p != 0; p = p -> next) {
|
||||
gc_thread_vtable->thread_created (p->id, &p->stop_info.stack_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+4
-16
@@ -67,8 +67,8 @@
|
||||
# endif
|
||||
|
||||
# if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
|
||||
defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) || \
|
||||
defined(GC_NETBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC)
|
||||
defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) \
|
||||
&& !defined(USE_PTHREAD_SPECIFIC)
|
||||
# define USE_PTHREAD_SPECIFIC
|
||||
# endif
|
||||
|
||||
@@ -126,11 +126,6 @@
|
||||
# include <sys/sysctl.h>
|
||||
#endif /* GC_DARWIN_THREADS */
|
||||
|
||||
#if defined(GC_NETBSD_THREADS)
|
||||
# include <sys/param.h>
|
||||
# include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if defined(GC_DGUX386_THREADS)
|
||||
@@ -191,14 +186,7 @@ static
|
||||
GC_key_t GC_thread_key;
|
||||
|
||||
#ifdef USE_COMPILER_TLS
|
||||
/*
|
||||
* gcc errors out with /tmp/ccdPMFuq.s:2994: Error: symbol `.LTLS4' is already defined
|
||||
* if the static is removed on ppc.
|
||||
*/
|
||||
#if defined(__ppc__) || defined(__powerpc__)
|
||||
static
|
||||
#endif
|
||||
__thread MONO_TLS_FAST void* GC_thread_tls;
|
||||
static __thread MONO_TLS_FAST void* GC_thread_tls;
|
||||
#endif
|
||||
|
||||
static GC_bool keys_initialized;
|
||||
@@ -1025,7 +1013,7 @@ void GC_thr_init()
|
||||
GC_nprocs = sysconf(_SC_NPROC_ONLN);
|
||||
if (GC_nprocs <= 0) GC_nprocs = 1;
|
||||
# endif
|
||||
# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS) || defined(GC_NETBSD_THREADS)
|
||||
# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS)
|
||||
int ncpus = 1;
|
||||
size_t len = sizeof(ncpus);
|
||||
sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "private/gc_priv.h" /* For GC_compare_and_exchange, GC_memory_barrier */
|
||||
|
||||
#if defined(GC_LINUX_THREADS) || defined(GC_NETBSD_THREADS)
|
||||
#if defined(GC_LINUX_THREADS)
|
||||
|
||||
#include "private/specific.h"
|
||||
|
||||
|
||||
@@ -283,15 +283,8 @@ void GC_stop_world()
|
||||
# endif
|
||||
continue;
|
||||
}
|
||||
if (SuspendThread(thread_table[i].handle) == (DWORD)-1) {
|
||||
thread_table[i].stack_base = 0; /* prevent stack from being pushed */
|
||||
# ifndef CYGWIN32
|
||||
/* this breaks pthread_join on Cygwin, which is guaranteed to */
|
||||
/* only see user pthreads */
|
||||
thread_table[i].in_use = FALSE;
|
||||
CloseHandle(thread_table[i].handle);
|
||||
# endif
|
||||
}
|
||||
if (SuspendThread(thread_table[i].handle) == (DWORD)-1)
|
||||
ABORT("SuspendThread failed");
|
||||
# endif
|
||||
thread_table[i].suspended = TRUE;
|
||||
}
|
||||
|
||||
+2265
File diff suppressed because it is too large.
Load diff
@@ -1,58 +1,3 @@
|
||||
2007-08-31 Sebastien Pouliot <[email protected]>
|
||||
|
||||
* permview.1: add documentation for the -xml option now available
|
||||
with the Cecil-enabled version of permview.
|
||||
|
||||
2007-07-17 Jb Evain <[email protected]>
|
||||
|
||||
* monolinker.1: add monolinker man page.
|
||||
|
||||
2007-07-11 Jb Evain <[email protected]>
|
||||
|
||||
* mcs.1: add info about smcs.
|
||||
|
||||
2007-07-04 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* mcs.1 : we do not use fixed Latin1 by default.
|
||||
|
||||
2007-07-02 Jackson Harper <[email protected]>
|
||||
|
||||
* xamlg.1:
|
||||
* Makefile.am: Moved to more appropriate place.
|
||||
|
||||
2007-07-02 Jackson Harper <[email protected]>
|
||||
|
||||
* xamlg.1:
|
||||
* Makefile.am: Add man page for xamlg.
|
||||
|
||||
2007-04-26 Dick Porter <[email protected]>
|
||||
|
||||
* mono.1: Document MONO_DISABLE_SHM
|
||||
|
||||
2007-02-20 Rolf Bjarne Kvinge <[email protected]>
|
||||
|
||||
* vbnc.1: Added man entry for vbnc.
|
||||
* mbas.1: Deleted.
|
||||
* Makefile.am: Added vbnc.1
|
||||
|
||||
Mon Jan 22 11:15:26 CET 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* mono.1: typo fixes from [email protected] (Jesse Merriman).
|
||||
|
||||
2007-01-17 Alp Toker <[email protected]>
|
||||
|
||||
* gacutil.1: Spelling and grammar fixes.
|
||||
|
||||
2007-01-17 Alp Toker <[email protected]>
|
||||
|
||||
* sn.1: Spelling and grammar fixes.
|
||||
|
||||
2006-12-08 Sebastien Pouliot <[email protected]>
|
||||
|
||||
* mono.1: Document the MONO_TLS_SESSION_CACHE_TIMEOUT environment
|
||||
variable that can be used to control the validity period of the
|
||||
SSL/TLS negotiation cache.
|
||||
|
||||
2006-11-29 Joshua Tauberer <[email protected]>
|
||||
|
||||
* mkbundle.1: Corrected minor errors, added --nomain option.
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@ man_MANS = mcs.1 mono.1 monostyle.1 mono-config.5 sqlsharp.1 oldmono.1 ilasm.1 \
|
||||
cert2spc.1 cilc.1 genxs.1 wsdl.1 disco.1 soapsuds.1 makecert.1 \
|
||||
chktrust.1 setreg.1 sn.1 secutil.1 signcode.1 certmgr.1 monop.1 xsd.1 gacutil.1 \
|
||||
macpack.1 mkbundle.1 dtd2xsd.1 permview.1 prj2make.1 mono-service.1 mono-shlib-cop.1 \
|
||||
al.1 mozroots.1 mono-xmltool.1 sgen.1 httpcfg.1 vbnc.1 resgen.1 monolinker.1
|
||||
al.1 mozroots.1 mono-xmltool.1 sgen.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
@@ -1,20 +1,10 @@
|
||||
.TH "al" 1
|
||||
.SH NAME
|
||||
al, al2 \- Mono Assembly Linker
|
||||
ilasm \- Mono Assembly Linker
|
||||
.SH SYNOPSIS
|
||||
.B al [option] [source-files]
|
||||
.SH DESCRIPTION
|
||||
AL is the Mono assembly linkder.
|
||||
.PP
|
||||
This linker is used to put together assemblies from a collection of
|
||||
modules (.netmodule files), assembly manifest files and resources.
|
||||
.PP
|
||||
Do not confuse this with the
|
||||
.B monolinker,
|
||||
which is a tool to reduce the size of assemblies based on the code
|
||||
used.
|
||||
.PP
|
||||
Use al for processing 1.0 assemblies, use al2 to process 2.0 assemblies.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B @<filename>
|
||||
@@ -147,7 +137,7 @@ Specifies the Win32 resource file.
|
||||
Display information about AL
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
sn(1), monolinker(1)
|
||||
sn(1)
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2005 Novell, Inc (http://www.novell.com)
|
||||
.SH MAILING LISTS
|
||||
|
||||
+6
-6
@@ -10,7 +10,7 @@
|
||||
..
|
||||
.TH gacutil "Mono 1.0"
|
||||
.SH NAME
|
||||
gacutil \- Global Assembly Cache management utility.
|
||||
gacutil \- Global Asssembly Cache management utility.
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B gacutil [-user] [command] [options]
|
||||
@@ -19,9 +19,9 @@ gacutil \- Global Assembly Cache management utility.
|
||||
assemblies into the system Global Assembly Cache (GAC) to become part
|
||||
of the assemblies that are available for all applications at runtime.
|
||||
.PP
|
||||
Notice that they are not directly available to the compiler. The
|
||||
Notice that they are not directly available to the compiler, the
|
||||
convention is that assemblies must also be placed in a separate
|
||||
directory to be accessed by the compiler. This is done with the
|
||||
directory for being accessed to the compiler. This is done with the
|
||||
-package directive to gacutil.
|
||||
.PP
|
||||
The tool allows for installation, removal, and listing of the
|
||||
@@ -74,15 +74,15 @@ this takes as an argument the assembly name, which looks like this:
|
||||
MyLibrary.Something, version=1.0.0.0, publicKeyToken=xxxx,culture=neutral
|
||||
.fi
|
||||
.Sp
|
||||
Notice that you can have spaces in the command line. There is no need
|
||||
Notice that you can have spaces in the command line, there is no need
|
||||
to quote them.
|
||||
.Sp
|
||||
Performs a greedy removal. If you only specify one
|
||||
The removal performs a greedy removal, if you only specifiy one
|
||||
component like, "MyLibrary.Something", it will remove all versions of
|
||||
the library.
|
||||
.Sp
|
||||
.I "-us" <assembly_path> [-package NAME] [-root ROOTDIR] [-gacdir GACDIR]
|
||||
Uninstalls an assembly using the specified assembly's full name.
|
||||
Uninstalls an assembly using the specifed assemblies full name.
|
||||
<assembly path> is the path to an assembly. The full assembly name
|
||||
is retrieved from the specified assembly if there is an assembly in
|
||||
the GAC with a matching name, it is removed. Unlike the -u option this
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
.\"
|
||||
.\" httpcfg manual page.
|
||||
.\" Copyright 2006 Novell
|
||||
.\" Author:
|
||||
.\" Miguel de Icaza ([email protected])
|
||||
.\"
|
||||
.TH Mono "httpcfg"
|
||||
.SH NAME
|
||||
httpcfg \- Mono Certificate Management for HttpListener
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B httpcfg [options] certificate
|
||||
.SH DESCRIPTION
|
||||
This tool is used to manage the certificates used by the HttpListener
|
||||
embeddable server class when the HttpListener is configured as an
|
||||
HTTPS server instead of an HTTP server.
|
||||
.PP
|
||||
You must select one of the possible actions: add, delete or list.
|
||||
.PP
|
||||
When adding a certificate (-add), you must provide the following
|
||||
information: a certificate (with the -cert flag) a Private Key file
|
||||
(with the -pvk argument, the filename is typically "key") and a port
|
||||
number (with the -port flag).
|
||||
.PP
|
||||
When deleting a certificate (-del or -delete) you need to provide the
|
||||
port number.
|
||||
.SH PARAMETERS
|
||||
.TP
|
||||
.I "-add"
|
||||
Adds a new certificate/private key combination for being used at a
|
||||
given port by the HttpListener API.
|
||||
.TP
|
||||
.I "-del," "-delete"
|
||||
Deletes the certificates associated for the port specified (must be
|
||||
specified separatedly).
|
||||
.TP
|
||||
.I "-list"
|
||||
List all known certificates.
|
||||
.TP
|
||||
.I "-port PORT"
|
||||
Specifies the port to add certificates to, or remove certificates
|
||||
from.
|
||||
.TP
|
||||
.I "-pvk FILE"
|
||||
Specifies the Private Key file.
|
||||
.TP
|
||||
.I "-cert CERT"
|
||||
Specifies the certificate file to use.
|
||||
.SH EXAMPLES
|
||||
.nf
|
||||
httpcfg -add -port 8081 -pvk myfile.pvk -cert MyCert
|
||||
.fi
|
||||
.PP
|
||||
For more details on creating the certificate file and the private key,
|
||||
see the following web page:
|
||||
.PP
|
||||
http://www.mono-project.com/UsingClientCertificatesWithXSP
|
||||
.SH FILES
|
||||
The certificates are stored in the ~/.mono/httplistener directory
|
||||
.SH AUTHOR
|
||||
.B httpcfg
|
||||
was written by Gonzalo Paniagua.
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2006 Novell.
|
||||
.SH MAILING LISTS
|
||||
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
|
||||
.SH WEB SITE
|
||||
Visit http://www.mono-project.com for details
|
||||
.SH SEE ALSO
|
||||
.B makecert(1), signcode(1), cert2spc(1)
|
||||
.PP
|
||||
The private key format:
|
||||
.nf
|
||||
http://www.drh-consultancy.demon.co.uk/pvk.html
|
||||
.fi
|
||||
+4
-12
@@ -1,22 +1,16 @@
|
||||
.TH "ilasm" 1
|
||||
.SH NAME
|
||||
ilasm, ilasm2 \- Mono IL assembler
|
||||
ilasm \- Mono IL assembler
|
||||
.SH SYNOPSIS
|
||||
.B ilasm
|
||||
[option] [source-files]
|
||||
.PP
|
||||
.B ilasm2
|
||||
[option] [source-files]
|
||||
.SH DESCRIPTION
|
||||
ilasm is the Mono ILAsm assembler. You can pass one or more options to
|
||||
drive the compiler, and a set of source files.
|
||||
.PP
|
||||
Use \fIilasm\fR to generate 1.0 assemblies and use \fIilasm2\fR to
|
||||
assemble programs that use the 2.0 features (generics).
|
||||
.PP
|
||||
|
||||
The Mono ILAsm assembler accepts options starting with / or - for mosted
|
||||
options.
|
||||
.PP
|
||||
|
||||
The Mono ILAsm assembler generates images (.exe and .dll files) that contain
|
||||
CIL byte code that can be executed by any system that implemented a Common
|
||||
Language Infrastructure virtual machine.
|
||||
@@ -57,10 +51,8 @@ Display information about ilasm
|
||||
.TP
|
||||
.B \--version
|
||||
Display ilasm version
|
||||
.SH SEE ALSO
|
||||
.BR mono(1), mcs(1)
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2004, 2007 Novell, Inc (http://www.novell.com)
|
||||
Copyright (C) 2004 Novell, Inc (http://www.novell.com)
|
||||
.SH MAILING LISTS
|
||||
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
|
||||
.SH WEB SITE
|
||||
|
||||
+107
-29
@@ -1,27 +1,31 @@
|
||||
.TH vbnc 1 "21 February 2006"
|
||||
.TH mbas 1 "21 February 2006"
|
||||
.SH NAME
|
||||
vbnc \- Mono Visual Basic Compiler.
|
||||
mbas \- Mono Basic Compiler.
|
||||
.SH SYNOPSIS
|
||||
.B vbnc
|
||||
.B mbas
|
||||
[option] [source-files]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
.I (vbnc)
|
||||
is a CIL compiler for the VisualBasic.NET language.
|
||||
.I MonoBASIC (mbas)
|
||||
is a CIL compiler for the VisualBasic.NET language, an
|
||||
extended version of Visual Basic.
|
||||
.PP
|
||||
Applications developed on Windows with vbc can execute on Mono and applications
|
||||
compiled with 'vbnc' can be executed on .NET runtime.
|
||||
compiled with 'mbas' can be executed on .NET runtime.
|
||||
.PP
|
||||
The Mono Visual Basic compiler accepts the same options as
|
||||
The Mono Basic compiler accepts the same options as
|
||||
the Microsoft VB.NET compiler. Those options can start with a slash or a
|
||||
dash (/checked is the same as -checked).
|
||||
dash (/checked is the same as -checked). Additionally to this, the
|
||||
GNU-like options are supported, those begin with "--". All
|
||||
-specific flags which are not available in the Microsoft VB.NET
|
||||
compiler are available only with the GNU-style options.
|
||||
.PP
|
||||
Visual Basic.NET source files normally ends with a ".vb" extension.
|
||||
Compilation of VB.NET source code requires all the files that make
|
||||
up a library, module or executable to be provided on the command line.
|
||||
There is no support for partial compilation. To achieve the benefits
|
||||
of partial compilation, you should compile programs into their own
|
||||
assemblies, and later reference them with the "-r" flag.
|
||||
Visual Basic.NET source files must end with a ".vb" extension. Compilation of
|
||||
VB.NET source code requires all the files that make up a library, module or
|
||||
executable to be provided on the command line. There is no support
|
||||
for partial compilation. To achieve the benefits of partial
|
||||
compilation, you should compile programs into their own assemblies,
|
||||
and later reference them with the "-r" flag.
|
||||
.PP
|
||||
The Mono Basic compiler generates images (.exe files) that contain
|
||||
CIL byte code that can be executed by any system that implements a Common
|
||||
@@ -29,23 +33,32 @@ Language Infrastructure virtual machine such as the Microsoft .NET
|
||||
runtime engine on Windows or the Mono runtime engine on Unix systems.
|
||||
Executables are not bound to a specific CPU or operating system.
|
||||
.PP
|
||||
The Mono Basic compiler by default only references these assemblies:
|
||||
mscorlib.dll, Microsoft.VisualBasic.dll, System.dll and System.Xml.dll.
|
||||
If you want to reference extra libraries you must manually specify
|
||||
them using the the -r: command line option.
|
||||
The Mono Basic compiler by default only references three assemblies:
|
||||
mscorlib.dll, System.dll and System.Xml.dll. If you want to
|
||||
reference extra libraries you must manually specify them using the
|
||||
-pkg: command line option or the -r: command line option.
|
||||
Alternatively if you want to get all of the System libraries, you can
|
||||
use the -pkg:dotnet command line option.
|
||||
.PP
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.I \-addmodule:MODULE1[,MODULE2]
|
||||
.I \-\-about
|
||||
Displays information about the Mono Basic compiler
|
||||
.TP
|
||||
.I \-\-addmodule:MODULE1[,MODULE2]
|
||||
Includes the specified modules in the resulting assembly.
|
||||
.TP
|
||||
.I -codepage:ID
|
||||
Specifies the code page used to process the input files from the
|
||||
point it is specified on. By default files will be processed in the
|
||||
current code page. The compiler will also automatically detect
|
||||
Unicode/UTF8 files that have an embedded byte mark at the beginning.
|
||||
Latin-1 code page. The compiler will also automatically detect
|
||||
Unicode files that have an embedded byte mark at the beginning.
|
||||
.TP
|
||||
Other popular encodings are 28591 (Latin1), 1252 (iso-8859-1) and 65001 (UTF-8).
|
||||
.TP
|
||||
Mono Basic supports a couple of shorthands: "utf8" can be used to specify utf-8 instead
|
||||
of using the cryptic 65001 and "reset" restores the automatic handling of
|
||||
code pages. These shorthands are not available on the Microsoft compiler.
|
||||
.TP
|
||||
.I \-define:SYMLIST, -d:SYMLIST
|
||||
Defines the symbol listed by the semi-colon separeted list SYMLIST
|
||||
@@ -53,10 +66,20 @@ SYMBOL. This can be tested in the source code by the pre-processor,
|
||||
or can be used by methods that have been tagged with the Conditional
|
||||
attribute.
|
||||
.TP
|
||||
.I \-debug-args:arguments
|
||||
Debugger arguments.
|
||||
.TP
|
||||
.I \-debug:AMOUNT
|
||||
Specify the amount of debugging information to emit. Possible values for
|
||||
AMOUNT are "full" and "pdbonly".
|
||||
.TP
|
||||
.I \-~, \-debugoptions
|
||||
Show debugging info while processing options.
|
||||
.TP
|
||||
.I \-\-fatal
|
||||
This is used for debugging the compiler. This makes the error emission
|
||||
generate an exception that can be caught by a debugger.
|
||||
.TP
|
||||
.I \-imports:import-list
|
||||
Declare global Imports for listed namespaces.
|
||||
.TP
|
||||
@@ -67,6 +90,10 @@ Ignores warning number XXXX.
|
||||
Each path specified in the comma-separated list will direct the
|
||||
compiler to look for libraries in that specified path.
|
||||
.TP
|
||||
.I \-L PATH
|
||||
Directs the compiler to look for libraries in the specified path.
|
||||
Multiple paths can be provided by using the option multiple times.
|
||||
.TP
|
||||
.I \-main:CLASS
|
||||
Tells the compiler which CLASS or MODULE contains the entry point. Useful when
|
||||
you are compiling several classes with a Main method.
|
||||
@@ -98,6 +125,27 @@ Enforce strict language semantics
|
||||
.I \-out:FNAME, -o FNAME
|
||||
Names the output file to be generated.
|
||||
.TP
|
||||
.I \-\-parse
|
||||
Used for benchmarking. The compiler will only parse its input files.
|
||||
Currently ignored.
|
||||
.TP
|
||||
.I \-pkg:package1[,packageN]
|
||||
The compiler will invoke pkg-config --libs on the set of packages
|
||||
specified on the command line to obtain libraries and directories to
|
||||
compile the code.
|
||||
.PP
|
||||
This is typically used with third party components, like this:
|
||||
.nf
|
||||
$ mbas -pkg:gtk-sharp demo.vb
|
||||
.fi
|
||||
.TP
|
||||
.TP
|
||||
.I \-pkg:dotnet
|
||||
This will instruct the compiler to reference the System.* libraries
|
||||
available on a typical dotnet framework installation, notice that this
|
||||
does not include all of the Mono libraies, only the System.* ones. This
|
||||
is a convenient shortcut for those porting code.
|
||||
.TP
|
||||
.I -q -quiet
|
||||
Commands the compiler to show only error messages for syntax-related errors
|
||||
and warnings.
|
||||
@@ -126,37 +174,67 @@ Remove integer checks. Default off.
|
||||
.I \-rootnamespace:namespace
|
||||
Specifies the root namespace for all type declarations
|
||||
.TP
|
||||
.I \-\-stacktrace
|
||||
Generates a stack trace at the time the error is reported, useful for
|
||||
debugging the compiler.
|
||||
.TP
|
||||
.I \-target:KIND, \-t:KIND
|
||||
Used to specify the desired target. The possible values are: exe
|
||||
(plain executable), winexe (Windows.Forms executable), library
|
||||
(component libraries) and module (partial library).
|
||||
.TP
|
||||
.I \-\-timestamp
|
||||
Another debugging flag. Used to display the times at various points
|
||||
in the compilation process.
|
||||
.TP
|
||||
.I \-tokenize
|
||||
Only tokenizes source files. Currently ignored.
|
||||
.TP
|
||||
.I \-unsafe, -unsafe+
|
||||
Enables compilation of unsafe code.
|
||||
.TP
|
||||
.I \-utf8output[+|-]
|
||||
Emit compiler output in UTF8 character encoding. Currently ignored.
|
||||
.TP
|
||||
.I \-v
|
||||
Debugging. Turns on verbose yacc parsing.
|
||||
.TP
|
||||
.I -. -verbosegetoptions
|
||||
Show verbose parsing of options
|
||||
.TP
|
||||
.I \-\-version
|
||||
Shows the compiler version.
|
||||
.TP
|
||||
.I \-warnaserror, \-warnaserror+
|
||||
Treat warnings as errors.
|
||||
.TP
|
||||
.I \-wlevel:LEVEL
|
||||
Sets the warning level. 0 is the lowest warning level, and 4 is the
|
||||
highest. The default is 2.
|
||||
.TP
|
||||
.I \-\-
|
||||
Use this to stop option parsing, and allow option-looking parameters
|
||||
to be passed on the command line.
|
||||
.SH STABILITY
|
||||
As of early 2007, the Mono Visual Basic compiler is still considered preview
|
||||
software. The compiler is almost feature-complete (targeting the Microsoft
|
||||
Visual Basic 8 compiler), only lacking support for the 'My' namespace.
|
||||
Frequent crashes are still occuring, especially with incorrect code.
|
||||
As of early 2006, the Mono Basic compiler is still considered alpha software.
|
||||
Several language constructions that are accepted by the Microsoft Visual
|
||||
Basic.NET compiler are refused by the Mono Basic compiler. Occassional
|
||||
crashes also still occur.
|
||||
.PP
|
||||
.SH AUTHORS
|
||||
See the ChangeLog for authors
|
||||
.PP
|
||||
.SH LICENSE
|
||||
The Mono Visual Basic compiler is released under the terms of the GNU LGPL.
|
||||
Alternative licenses are available from Novell.
|
||||
The Mono Basic compiler is released under the terms of the GNU GPL.
|
||||
Please read the accompanying `COPYING' file for details. Alternative
|
||||
licenses are available from Ximian.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
mcs(1), mono(1), mint(1), sn(1)
|
||||
.PP
|
||||
.SH BUGS
|
||||
To report bugs in the compiler, you can file bug reports in our
|
||||
bug tracking system: http://bugzilla.ximian.com.
|
||||
To report bugs in the compiler, you can use `bug-buddy', or you can
|
||||
file bug reports in our bug tracking system:
|
||||
http://bugzilla.ximian.com.
|
||||
.SH MAILING LIST
|
||||
The Mono Basic Mailing List is available at: [email protected]
|
||||
@@ -1,6 +1,6 @@
|
||||
.TH mcs 1 "6 January 2001"
|
||||
.SH NAME
|
||||
mcs, gmcs, smcs \- Mono C# Compiler (1.0, 2.0, Moonlight)
|
||||
mcs, gmcs \- Mono C# Compiler (1.0 and 2.0)
|
||||
.SH SYNOPSIS
|
||||
.B mcs
|
||||
[option] [source-files]
|
||||
@@ -14,29 +14,17 @@ prepending the @ symbol to the response file name.
|
||||
The
|
||||
.I mcs
|
||||
compiler is used to compile against the 1.x profile and implements
|
||||
C# 1.0 and 2.0 with the exception of generics and nullable types.
|
||||
.PP
|
||||
The
|
||||
C# 1.0 and 2.0 with the exception of generics and nullable types. The
|
||||
.I gmcs
|
||||
compiler is used to compile against the 2.0 profile and implements
|
||||
compiler is used to compile against the 2.x profile and implements
|
||||
the complete C# 2.0 specification including generics.
|
||||
.PP
|
||||
The
|
||||
.I smcs
|
||||
compiler is used to compile against the Silverlight/Moonlight profile.
|
||||
This profile is designed to be used for creating Silverlight/Moonlight
|
||||
applications that will run on a web browser. The API exposed by this
|
||||
profile is a small subset of the 2.0 API (even if it is commonly
|
||||
referred as the 2.1 API, this API is a small subset of 2.0 with a few
|
||||
extensions), in addition this profile by default runs with
|
||||
-langversion:linq which turns on the C# 3.0 language by default.
|
||||
.PP
|
||||
The Mono C# compiler accepts the same command line options that the
|
||||
Microsoft C# compiler does. Those options can start with a slash or a
|
||||
dash (/checked is the same as -checked). Additionally some GNU-like
|
||||
options are supported, those begin with "--". All MCS-specific flags
|
||||
which are not available in the Microsoft C# compiler are available
|
||||
only with the GNU-style options.
|
||||
The Mono C# compiler accepts the same options than the Microsoft C#
|
||||
compiler does. Those options can start with a slash or a dash
|
||||
(/checked is the same as -checked). Additionally to this, the
|
||||
GNU-like options are supported, those begin with "--". All
|
||||
MCS-specific flags which are not available in the Microsoft C#
|
||||
compiler are available only with the GNU-style options.
|
||||
.PP
|
||||
C# source files must end with a ".cs" extension. Compilation of C#
|
||||
source code requires all the files that make up a library, module or
|
||||
@@ -77,17 +65,17 @@ the math operations unchecked (this is the default).
|
||||
.I -codepage:ID
|
||||
Specifies the code page used to process the input files from the
|
||||
point it is specified on. By default files will be processed in the
|
||||
environment-dependent native code page. The compiler will also automatically
|
||||
detect Unicode files that have an embedded byte mark at the beginning.
|
||||
.Sp
|
||||
Latin-1 code page. The compiler will also automatically detect
|
||||
Unicode files that have an embedded byte mark at the beginning.
|
||||
.TP
|
||||
Other popular encodings are 28591 (Latin1), 1252 (iso-8859-1) and 65001 (UTF-8).
|
||||
.Sp
|
||||
.TP
|
||||
MCS supports a couple of shorthands: "utf8" can be used to specify utf-8 instead
|
||||
of using the cryptic 65001 and "reset" restores the automatic handling of
|
||||
code pages. These shorthands are not available on the Microsoft compiler.
|
||||
.TP
|
||||
.I \-define:SYMLIST, -d:SYMLIST
|
||||
Defines the symbol listed by the semi-colon separated list SYMLIST
|
||||
Defines the symbol listed by the semi-colon separeted list SYMLIST
|
||||
SYMBOL. This can be tested in the source code by the pre-processor,
|
||||
or can be used by methods that have been tagged with the Conditional
|
||||
attribute.
|
||||
@@ -148,29 +136,19 @@ The option specifies the version of the language to use. The feature
|
||||
set is different in each C# version. This switch can be used to force
|
||||
the compiler to allow only a subset of the features.
|
||||
The possible values are:
|
||||
.RS
|
||||
.ne 8
|
||||
.TP
|
||||
.I "Default"
|
||||
Instruct compiler to use the latest version. Equivalent is to omit the
|
||||
switch (this currently defaults to the C# 2.0 language specification).
|
||||
.TP
|
||||
.I "ISO-1"
|
||||
Restrict compiler to use only ISO standardized features.
|
||||
.nf
|
||||
|
||||
Default - Instruct compiler to use the latest version. Equivalent
|
||||
is to omit the switch.
|
||||
|
||||
ISO-1 - Restrict compiler to use only ISO standardized features.
|
||||
The usage of features such as generics, static classes, anonymous
|
||||
methods will lead to error.
|
||||
.TP
|
||||
.I "linq"
|
||||
This enables the C# 3.0 support. Only a few features of C# 3.0 have
|
||||
been implemented in the Mono C# compiler, so not everything is
|
||||
available.
|
||||
.PP
|
||||
.Sp
|
||||
Notice that this flag only controls the language features available to
|
||||
the programmer, it does not control the kind of assemblies produced.
|
||||
Programs compiled with mcs will reference the 1.1 APIs, Programs
|
||||
compiled with gmcs reference the 2.0 APIs.
|
||||
.ne
|
||||
.RE
|
||||
.TP
|
||||
.I -lib:PATHLIST
|
||||
Each path specified in the comma-separated list will direct the
|
||||
@@ -193,7 +171,7 @@ Disables the default compiler configuration to be loaded. The
|
||||
compiler by default has references to the system assemblies.
|
||||
.TP
|
||||
.I \-nowarn:WARNLIST
|
||||
Makes the compiler ignore warnings specified in the comma-separated
|
||||
Makes the compiler ignore warnings specified in the comma-separeted
|
||||
list WARNLIST>
|
||||
.TP
|
||||
.I -optimize, -optimize+, -optimize-
|
||||
@@ -208,53 +186,22 @@ Names the output file to be generated.
|
||||
Used for benchmarking. The compiler will only parse its input files.
|
||||
.TP
|
||||
.I \-pkg:package1[,packageN]
|
||||
Reference assemblies for the given packages.
|
||||
.Sp
|
||||
The compiler will invoke pkg-config --libs on the set of packages
|
||||
specified on the command line to obtain libraries and directories to
|
||||
compile the code.
|
||||
.Sp
|
||||
.PP
|
||||
This is typically used with third party components, like this:
|
||||
.nf
|
||||
|
||||
$ mcs -pkg:gtk-sharp demo.cs
|
||||
.fi
|
||||
.RS
|
||||
.ne 8
|
||||
.TP
|
||||
.TP
|
||||
.I \-pkg:dotnet
|
||||
This will instruct the compiler to reference the System.* libraries
|
||||
available on a typical dotnet framework installation, notice that this
|
||||
does not include all of the Mono libraries, only the System.* ones. This
|
||||
does not include all of the Mono libraies, only the System.* ones. This
|
||||
is a convenient shortcut for those porting code.
|
||||
.TP
|
||||
.I \-pkg:olive
|
||||
Use this to reference the "Olive" libraries (the 3.0 and 3.5 extended
|
||||
libraries).
|
||||
.TP
|
||||
.I \-pkg:silver
|
||||
References the assemblies for creating Moonlight/Silverlight
|
||||
applications. This is automatically used when using the
|
||||
.I smcs
|
||||
compiler, but it is here when developers want to use it with the
|
||||
.I gmcs
|
||||
compiler.
|
||||
.TP
|
||||
.I \-pkg:silverdesktop
|
||||
Use this option to create Moonlight/Silverlight applications that
|
||||
target the desktop. This option allows developers to consume the
|
||||
Silverlight APIs with the full 2.0 profile API available to them,
|
||||
unlike
|
||||
.I smcs
|
||||
it gives full access to all the APIs that are part of Mono. The only
|
||||
downside is that applications created with silverdesktop will not run
|
||||
on the browser. Typically these applications will be launched
|
||||
with the
|
||||
.I mopen
|
||||
command line tool.
|
||||
.ne
|
||||
.RE
|
||||
.TP
|
||||
.I -resource:RESOURCE[,ID]
|
||||
Embeds to the given resource file. The optional ID can be used to
|
||||
give a different name to the resource. If not specified, the resource
|
||||
@@ -275,7 +222,7 @@ comma.
|
||||
.TP
|
||||
.I \-recurse:PATTERN, --recurse PATTERN
|
||||
Does recursive compilation using the specified pattern. In Unix the
|
||||
shell will perform globbing, so you might want to use it like this:
|
||||
shell will perform globbing, so you migth want to use it like this:
|
||||
.PP
|
||||
.nf
|
||||
$ mcs -recurse:'*.cs'
|
||||
@@ -350,38 +297,39 @@ Note that the effect of defining TRACE and DEBUG is a global setting,
|
||||
even if they are only defined in a single file.
|
||||
.PP
|
||||
.SH DEBUGGING SUPPORT
|
||||
When using the "-debug" flag, MCS will generate a file with the
|
||||
extension .mdb that contains the debugging information for the
|
||||
generated assembly. This file is consumed by the Mono debugger (mdb).
|
||||
When use the "--debug" or "-g" flag, MCS will create an assembler file
|
||||
FILE-debug.s containing debugging information where FILE is the name of
|
||||
the generated assembly. You need to run this file through the assembler
|
||||
to get a object file FILE-debug.o. See mono's "--dwarf-plus" argument
|
||||
for details on how to use this file.
|
||||
.SH NOTES
|
||||
During compilation the MCS compiler defines the __MonoCS__ symbol,
|
||||
this can be used by pre-processor instructions to compile Mono C#
|
||||
compiler specific code. Please note that this symbol is only to test
|
||||
for the compiler, and is not useful to distinguish compilation or
|
||||
deployment platforms.
|
||||
deployment platforms.
|
||||
.SH AUTHORS
|
||||
The Mono C# Compiler was written by Miguel de Icaza, Ravi Pratap,
|
||||
Martin Baulig, Marek Safar and Raja Harinath. The development was
|
||||
funded by Ximian, Novell and Marek Safar.
|
||||
The Mono C# Compiler was written by Miguel de Icaza, Ravi Pratap and
|
||||
Martin Baulig at Ximian.
|
||||
.PP
|
||||
.SH LICENSE
|
||||
The Mono Compiler Suite is released under the terms of the GNU GPL.
|
||||
Please read the accompanying `COPYING' file for details. Alternative
|
||||
licensing for the compiler is available from Novell.
|
||||
licenses are available from Ximian.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
mdb(1), mono(1), mopen(1), mint(1), sn(1)
|
||||
mono(1), mint(1), sn(1)
|
||||
.PP
|
||||
.SH BUGS
|
||||
To report bugs in the compiler, you must file them on our bug tracking
|
||||
system, at:
|
||||
http://www.mono-project.com/Bugs
|
||||
To report bugs in the compiler, you can use `bug-buddy', or you can
|
||||
file bug reports in our bug tracking system:
|
||||
http://bugzilla.ximian.com.
|
||||
.SH MAILING LIST
|
||||
The Mono Mailing lists are listed at http://www.mono-project.com/Mailing_Lists
|
||||
The Mono Mailing List is available at: [email protected]
|
||||
.SH MORE INFORMATION
|
||||
The Mono C# compiler was developed by Novell, Inc
|
||||
(http://www.novell.com, http) and is based on the
|
||||
The Mono C# compiler is developed by Ximian, Inc
|
||||
(http://www.ximian.com) (http://www.ximian.com) and is based on the
|
||||
ECMA C# language standard available here:
|
||||
http://www.ecma.ch/ecma1/STAND/ecma-334.htm
|
||||
.PP
|
||||
The home page for the Mono C# compiler is at http://www.mono-project.com/CSharp_Compiler
|
||||
|
||||
|
||||
Loaded 100 of 7401 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user