mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96c0883549 | ||
|
|
60b980b3bb | ||
|
|
3c84401ec8 | ||
|
|
44162b8a8b | ||
|
|
355944f0d6 | ||
|
|
9f4a644133 | ||
|
|
c83b0a3f98 | ||
|
|
b7422c2c22 | ||
|
|
c9e78b5322 | ||
|
|
7898a926f0 | ||
|
|
a3000fbb7f | ||
|
|
df4669b216 | ||
|
|
76db8b168c | ||
|
|
0f76c2acec | ||
|
|
1a431e6183 | ||
|
|
0e86b9e40b | ||
|
|
ce75ab6aed | ||
|
|
75367e0413 | ||
|
|
044b7d4ac8 | ||
|
|
707e9c6b03 | ||
|
|
ce9765ffe0 | ||
|
|
85d51db4f0 | ||
|
|
af502ec4df | ||
|
|
b72ef417bc | ||
|
|
bc699443c1 | ||
|
|
addce38b83 | ||
|
|
b2250d8ecf | ||
|
|
cfe2428963 | ||
|
|
e51d521ff9 | ||
|
|
d5885b1996 | ||
|
|
b429bfe794 | ||
|
|
48e94bd5f6 | ||
|
|
726b2befe9 | ||
|
|
bff4165b8d | ||
|
|
b4ec38c280 | ||
|
|
d5cfcd6b2a | ||
|
|
1ee454fce3 | ||
|
|
24775d13d4 | ||
|
|
934465474b | ||
|
|
8c1b959850 | ||
|
|
26c39f88fb | ||
|
|
92f7d7ac14 | ||
|
|
2636235a82 | ||
|
|
5267bcb2b7 | ||
|
|
d03c1a55e0 | ||
|
|
63798ae475 | ||
|
|
31c099d7ca | ||
|
|
ad9daeaf58 | ||
|
|
829534374f | ||
|
|
6ce90d742b | ||
|
|
28dcb2abb3 | ||
|
|
1438e3a015 | ||
|
|
b403e9b528 | ||
|
|
f02e94d25c | ||
|
|
c93b4d1722 | ||
|
|
5d37aa59b9 | ||
|
|
3c7e98aa62 | ||
|
|
0e2248ca22 | ||
|
|
ec43cc1dc4 | ||
|
|
3cd2ccce57 | ||
|
|
eaff739a03 | ||
|
|
742e703eb4 | ||
|
|
fe214b46bd | ||
|
|
c843b3f25f | ||
|
|
b5e1cb7236 | ||
|
|
47f6b08657 | ||
|
|
1d8c43241a | ||
|
|
90be24e928 | ||
|
|
34a97709ce | ||
|
|
632c5e8e1c | ||
|
|
b0527fafe3 | ||
|
|
e3a2754a33 | ||
|
|
0deb1fd312 | ||
|
|
3ffbfe94c9 | ||
|
|
51599d15b2 | ||
|
|
68fc0a509f | ||
|
|
6eaec1bb59 | ||
|
|
de06b9c866 | ||
|
|
ec16c55370 | ||
|
|
dcc1d41ffb | ||
|
|
d6af8351b4 | ||
|
|
c3c06baf61 | ||
|
|
c5a0d0e011 | ||
|
|
5e8d4de0f7 | ||
|
|
b4632e0789 | ||
|
|
141d8fafaa | ||
|
|
259864a1d3 | ||
|
|
3eb8d6d178 | ||
|
|
3deebbf487 | ||
|
|
0e486b814f | ||
|
|
04f45d88f9 | ||
|
|
fdd7beb707 | ||
|
|
0ec03cb37c | ||
|
|
03298038d7 | ||
|
|
310bba2a01 | ||
|
|
db62348438 | ||
|
|
f5040c4e67 | ||
|
|
1d366da8f0 | ||
|
|
ed0f1b4992 | ||
|
|
e9f63bbd97 | ||
|
|
640748df04 | ||
|
|
3f3e41781e | ||
|
|
74a8e56233 | ||
|
|
0e38c766cc | ||
|
|
73d4810c70 | ||
|
|
15bd67a390 | ||
|
|
6af040720f | ||
|
|
d7767d7f41 | ||
|
|
ba0a5b09ae | ||
|
|
94d9ccc8b7 | ||
|
|
759ae465ea | ||
|
|
c4c358fcb3 | ||
|
|
a88a2802d8 | ||
|
|
884e4bffa0 | ||
|
|
9417be0f11 | ||
|
|
c212bccc3d | ||
|
|
1dd426f94b | ||
|
|
fe021658d9 |
No files matched your search
@@ -1,45 +0,0 @@
|
||||
## Steps to Reproduce
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
<!--
|
||||
You may drag & drop the attachment (repro code/solution, screenshot, etc.) onto the issue.
|
||||
-->
|
||||
|
||||
## Current Behavior
|
||||
|
||||
<!--
|
||||
What is the current behaviour?
|
||||
-->
|
||||
|
||||
## Expected Behavior
|
||||
|
||||
<!--
|
||||
Please describe the behaviour you are expecting
|
||||
-->
|
||||
|
||||
### On which platforms did you notice this
|
||||
|
||||
[ ] macOS
|
||||
[ ] Linux
|
||||
[ ] Windows
|
||||
|
||||
**Version Used**:
|
||||
|
||||
<!--
|
||||
You can use `mono --version` or About dialog to obtain this information.
|
||||
-->
|
||||
|
||||
### Stacktrace
|
||||
|
||||
```
|
||||
Please paste the stacktrace here if available.
|
||||
```
|
||||
|
||||
<!--
|
||||
|
||||
You can join us at https://gitter.im/mono/mono to discuss your reported issue
|
||||
|
||||
-->
|
||||
@@ -1,9 +0,0 @@
|
||||
|
||||
|
||||
<!--
|
||||
Thank you for your Pull Request!
|
||||
|
||||
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
|
||||
|
||||
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
|
||||
-->
|
||||
@@ -44,7 +44,6 @@ Ankh.NoLoad
|
||||
# Tooling
|
||||
_ReSharper*/
|
||||
*.resharper
|
||||
.idea/*
|
||||
[Tt]est[Rr]esult*
|
||||
*.orig
|
||||
*.rej
|
||||
|
||||
+55
-126
@@ -1,133 +1,62 @@
|
||||
# Mono Code Owners File
|
||||
#
|
||||
# GitHub uses this file to determine who to assign for reviews
|
||||
# on pull requests. Please keep this file alphabetically sorted.
|
||||
# GitHub uses this file to determine who to ping for reviews on pull requests.
|
||||
# If you're the primary maintainer of an area of Mono and you don't mind
|
||||
# reviewing pull requests, please add yourself to this file. You may want to
|
||||
# avoid adding entries for commonly changed or automatically generated files
|
||||
# (e.g. stuff in external/, or various generated *.csproj files) so as not to
|
||||
# get spammed with emails.
|
||||
#
|
||||
# References:
|
||||
# Note that if two patterns match a file, the later pattern takes precedence.
|
||||
#
|
||||
# Please keep this file alphabetically sorted.
|
||||
#
|
||||
# Reference:
|
||||
#
|
||||
# https://github.com/blog/2392-introducing-code-owners
|
||||
# https://help.github.com/articles/about-codeowners
|
||||
|
||||
|
||||
# These owners will be the default owners for everything in the repo.
|
||||
* @luhenry @marek-safar
|
||||
|
||||
# Order is important. The last matching pattern has the most precedence.
|
||||
|
||||
/acceptance-tests @akoeplinger
|
||||
/acceptance-tests/profiler-stress* @alexrp
|
||||
|
||||
/data @marek-safar @akoeplinger
|
||||
/data/gdb @vargaz
|
||||
/data/lldb @lewurm @vargaz
|
||||
|
||||
/docs @luhenry @marek-safar
|
||||
/docs/sources/mono-api-profiler.html @alexrp
|
||||
|
||||
/external @marek-safar @luhenry
|
||||
/external/binary-reference-assemblies @marek-safar @akoeplinger
|
||||
/external/bockbuild @akoeplinger @alexischr
|
||||
/external/boringssl @baulig
|
||||
/external/nuget-buildtasks @radical @akoeplinger
|
||||
|
||||
/libgc @BrzVlad @vargaz
|
||||
|
||||
/llvm @vargaz
|
||||
|
||||
/man @marek-safar @miguel
|
||||
/man/*prof* @alexrp
|
||||
|
||||
/mcs @marek-safar
|
||||
|
||||
/mcs/build @marek-safar @akoeplinger
|
||||
|
||||
/mcs/class @marek-safar @akoeplinger
|
||||
/mcs/class/corlib/System.Reflection*/ @vargaz @lambdageek
|
||||
/mcs/class/Mono.Btls.Interface @baulig
|
||||
/mcs/class/Mono.Data.Tds @egorbo
|
||||
/mcs/class/Mono.Debugger.Soft @vargaz
|
||||
/mcs/class/Mono.Options @jonpryor
|
||||
/mcs/class/Mono.Profiler.Log @alexrp
|
||||
/mcs/class/Mono.Security/Mono.Security/Interface @baulig
|
||||
/mcs/class/System/Mono.AppleTls @baulig
|
||||
/mcs/class/System/Mono.Btls @baulig
|
||||
/mcs/class/System/Mono.Net.Security @baulig
|
||||
/mcs/class/System/Mono.Security.Interface @baulig
|
||||
/mcs/class/System.Data* @egorbo
|
||||
|
||||
/mcs/errors @marek-safar
|
||||
/mcs/ilasm @marek-safar
|
||||
/mcs/jay @marek-safar
|
||||
/mcs/mcs @marek-safar @lewurm
|
||||
/mcs/tests @marek-safar
|
||||
/mcs/tools @marek-safar @akoeplinger
|
||||
|
||||
/mono @luhenry
|
||||
|
||||
/mono/btls @baulig
|
||||
/mono/dis @lambdageek @vargaz
|
||||
/mono/eglib @kumpera @vargaz @luhenry
|
||||
|
||||
/mono/metadata @vargaz @kumpera
|
||||
/mono/metadata/*verify* @kumpera
|
||||
/mono/metadata/*profiler* @alexrp
|
||||
/mono/metadata/monitor* @brzvlad
|
||||
/mono/metadata/sgen* @brzvlad
|
||||
/mono/metadata/threads* @luhenry @kumpera
|
||||
/mono/metadata/threadpool* @luhenry
|
||||
/mono/metadata/w32* @luhenry
|
||||
/mono/metadata/*-win* @lateralusX @luhenry
|
||||
|
||||
/mono/mini @vargaz @kumpera
|
||||
/mono/mini/*cfgdump* @lewurm
|
||||
/mono/mini/*exceptions* @lewurm
|
||||
/mono/mini/*ppc* @lewurm
|
||||
/mono/mini/*type-check* @lewurm
|
||||
/mono/mini/interp/* @lewurm @BrzVlad
|
||||
/mono/mini/*profiler* @alexrp
|
||||
/mono/mini/debugger-agent.c @DavidKarlas
|
||||
|
||||
/mono/profiler @alexrp @kumpera
|
||||
|
||||
/mono/sdks @luhenry
|
||||
/mono/sdks/android @luhenry @jonpryor
|
||||
/mono/sdks/ios @vargaz @rolfbjarne
|
||||
/mono/sdks/wasm @kumpera @lrz
|
||||
|
||||
/mono/sgen @BrzVlad @kumpera
|
||||
|
||||
/mono/utils @kumpera @vargaz
|
||||
/mono/utils/atomic* @alexrp
|
||||
/mono/utils/mono-hwcap* @alexrp
|
||||
/mono/utils/mono-mem* @alexrp
|
||||
/mono/utils/mono-threads* @luhenry @kumpera
|
||||
/mono/utils/*-win* @lateralusX @kumpera
|
||||
|
||||
/msvc @lateralusX
|
||||
/msvc/*profiler* @alexrp
|
||||
/msvc/scripts @akoeplinger
|
||||
|
||||
/packaging/ @alexischr @akoeplinger
|
||||
/packaging/MacSDK/msbuild.py @radical @akoeplinger
|
||||
|
||||
/runtime @akoeplinger @marek-safar
|
||||
|
||||
/samples @luhenry
|
||||
/samples/profiler @alexrp
|
||||
/samples/size @alexrp
|
||||
|
||||
/scripts @akoeplinger
|
||||
/scripts/ci @akoeplinger
|
||||
/scripts/ci/run-test-profiler-stress-tests.sh @alexrp
|
||||
|
||||
/support @luhenry @vargaz
|
||||
|
||||
/tools @kumpera
|
||||
/tools/checker @tritao
|
||||
/tools/crash-bisector @kumpera
|
||||
/tools/locale-builder @marek-safar
|
||||
/tools/monograph @vargaz
|
||||
/tools/nuget-hash-extractor @marek-safar
|
||||
/tools/offsets-tool @lewurm @rolfbjarne
|
||||
/tools/pedump @kumpera @lambdageek
|
||||
/tools/sgen @brzvlad
|
||||
acceptance-tests/* @akoeplinger
|
||||
acceptance-tests/profiler-stress* @alexrp
|
||||
docs/sources/mono-api-profiler.html @alexrp
|
||||
man/mprof-report.1 @alexrp
|
||||
mcs/build @marek-safar
|
||||
mcs/class @marek-safar
|
||||
mcs/errors @marek-safar
|
||||
mcs/mcs @marek-safar
|
||||
mcs/tests @marek-safar
|
||||
mcs/class/corlib/System.Reflection*/ @vargaz @lambdageek
|
||||
mcs/class/Mono.Btls.Interface @baulig
|
||||
mcs/class/Mono.Data.Tds @egorbo
|
||||
mcs/class/Mono.Debugger.Soft @vargaz
|
||||
mcs/class/Mono.Options @jonpryor
|
||||
mcs/class/Mono.Profiler.Log @alexrp
|
||||
mcs/class/Mono.Security/Mono.Security/Interface @baulig
|
||||
mcs/class/System/Mono.AppleTls @baulig
|
||||
mcs/class/System/Mono.Btls @baulig
|
||||
mcs/class/System/Mono.Net.Security @baulig
|
||||
mcs/class/System/Mono.Security.Interface @baulig
|
||||
mcs/class/System.Data @egorbo
|
||||
mono/metadata/*profiler* @alexrp
|
||||
mono/metadata/monitor* @brzvlad
|
||||
mono/metadata/sgen* @brzvlad
|
||||
mono/metadata/threads* @luhenry @kumpera
|
||||
mono/metadata/threadpool* @luhenry
|
||||
mono/metadata/w32* @luhenry
|
||||
mono/mini/*profiler* @alexrp
|
||||
mono/profiler @alexrp
|
||||
mono/sgen @brzvlad
|
||||
mono/utils/atomic* @alexrp
|
||||
mono/utils/mono-hwcap* @alexrp
|
||||
mono/utils/mono-mem* @alexrp
|
||||
mono/utils/mono-threads* @luhenry @kumpera
|
||||
msvc/*profiler* @alexrp
|
||||
msvc/scripts @akoeplinger
|
||||
packaging/Windows @akoeplinger
|
||||
samples/profiler @alexrp
|
||||
samples/size @alexrp
|
||||
scripts/ci/run-jenkins.sh @akoeplinger
|
||||
scripts/ci/run-test-acceptance-tests.sh @akoeplinger
|
||||
scripts/ci/run-test-default.sh @akoeplinger
|
||||
scripts/ci/run-test-profiler-stress-tests.sh @alexrp
|
||||
scripts/ci/util.sh @akoeplinger
|
||||
@@ -32,12 +32,7 @@ file in this directory.
|
||||
CLA
|
||||
=======
|
||||
|
||||
Contributions are now taken under the [.NET Foundation CLA](https://cla.dotnetfoundation.org/).
|
||||
|
||||
Code Review
|
||||
=======
|
||||
We are requiring code reviews before merging a pull request.
|
||||
GitHub won't let you merge a PR until someone from the Mono team approves it.
|
||||
Contributions are now taken under the [.NET Foundation CLA](https://cla2.dotnetfoundation.org/).
|
||||
|
||||
Testing
|
||||
=======
|
||||
@@ -46,7 +46,7 @@ embeddable runtime:
|
||||
|
||||
* mono/utils/bsearch.c: BSD license.
|
||||
|
||||
* mono/metadata/w32file-unix-glob.c, w32file-unix-glob.h: BSD license
|
||||
* mono/io-layer/wapi_glob.h, wapi_glob.c: BSD license
|
||||
|
||||
Class Library code
|
||||
==================
|
||||
|
||||
+24
-11
@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
MONOTOUCH_SUBDIRS = $(libgc_dir) mono
|
||||
MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
|
||||
|
||||
# Some tools might not build when cross-compiling
|
||||
if CROSS_COMPILING
|
||||
@@ -11,9 +11,9 @@ else
|
||||
tools_dir = tools
|
||||
endif
|
||||
|
||||
SUBDIRS = po $(libgc_dir) mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
|
||||
# Keep in sync with SUBDIRS
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
|
||||
|
||||
all: update_submodules
|
||||
|
||||
@@ -44,7 +44,6 @@ dist-hook:
|
||||
rm -rf `find $(top_distdir)/external -path '*\.git'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
|
||||
rm -rf "$(top_distdir)/external/linker/linker/Tests"
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
noinst_DATA = mono-uninstalled.pc
|
||||
@@ -110,12 +109,29 @@ monotouch-do-clean:
|
||||
|
||||
endif
|
||||
|
||||
win32getdeps:
|
||||
wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
|
||||
wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip
|
||||
wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip
|
||||
wget http://www.go-mono.com/archive/libiconv-1.7.zip
|
||||
wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip
|
||||
wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
|
||||
unzip -n -d / pkgconfig-0.11-20020310.zip
|
||||
unzip -n -d / glib-2.0.4-20020703.zip
|
||||
unzip -n -d / glib-dev-2.0.4-20020703.zip
|
||||
unzip -n -d / libiconv-1.7.zip
|
||||
unzip -n -d / libiconv-dev-1.7.zip
|
||||
unzip -n -d / libintl-0.10.40-20020101.zip
|
||||
|
||||
win32setup:
|
||||
makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi
|
||||
|
||||
update-csproj:
|
||||
-rm msvc/scripts/order
|
||||
-rm msvc/scripts/order.xml
|
||||
-rm -rf msvc/scripts/inputs
|
||||
-mkdir msvc/scripts/inputs
|
||||
(cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
|
||||
(cd runtime; make V=1 extra_targets=csproj-local)
|
||||
|
||||
package-inputs:
|
||||
echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
|
||||
@@ -144,9 +160,6 @@ update-llvm-version:
|
||||
|
||||
|
||||
update-solution-files:
|
||||
$(MAKE) update-csproj
|
||||
$(MAKE) package-inputs
|
||||
(cd msvc/scripts; $(MAKE) genproj.exe; mono genproj.exe $(GENPROJ_ARGS))
|
||||
|
||||
update-solution-files-with-tests:
|
||||
$(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files
|
||||
make update-csproj
|
||||
make package-inputs
|
||||
(cd msvc/scripts; make genproj.exe; mono genproj.exe)
|
||||
@@ -19,30 +19,30 @@ The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.or
|
||||
|
||||
| OS | Architecture | Status |
|
||||
|--------------|--------------------|------------------------------|
|
||||
| Debian 9 | amd64 | [![debian-9-amd64][1]][2] |
|
||||
| Debian 9 | i386 | [![debian-9-i386][3]][4] |
|
||||
| Debian 9 | armel | [![debian-9-armel][5]][6] |
|
||||
| Debian 9 | armhf | [![debian-9-armhf][7]][8] |
|
||||
| Debian 9 | arm64 | [![debian-9-arm64][9]][10] |
|
||||
| Ubuntu 14.04 | amd64 | [![ubuntu-1404-amd64][1]][2] |
|
||||
| Ubuntu 14.04 | i386 | [![ubuntu-1404-i386][3]][4] |
|
||||
| Debian 8 | armel | [![debian-8-armel][5]][6] |
|
||||
| Debian 8 | armhf | [![debian-8-armhf][7]][8] |
|
||||
| Debian 8 | arm64 | [![debian-8-arm64][9]][10] |
|
||||
| OS X | amd64 | [![osx-amd64][11]][12] |
|
||||
| OS X | i386 | [![osx-i386][13]][14] |
|
||||
| Windows | amd64 | [![windows-amd64][15]][16] |
|
||||
| Windows | i386 | [![windows-i386][17]][18] |
|
||||
| Windows | i386 | [![windows-amd64][17]][18] |
|
||||
| CentOS | s390x (cs) | [![centos-s390x][19]][20] |
|
||||
| Debian 8 | ppc64el (cs) | [![debian-8-ppc64el][21]][22]|
|
||||
|
||||
_(cs) = community supported architecture_
|
||||
|
||||
[1]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-amd64/badge/icon
|
||||
[2]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-amd64
|
||||
[3]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-i386/badge/icon
|
||||
[4]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-i386/
|
||||
[5]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-armel/badge/icon
|
||||
[6]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-armel/
|
||||
[7]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-armhf/badge/icon
|
||||
[8]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-armhf/
|
||||
[9]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-arm64/badge/icon
|
||||
[10]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-9-arm64/
|
||||
[1]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64/badge/icon
|
||||
[2]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64
|
||||
[3]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-i386/badge/icon
|
||||
[4]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-i386/
|
||||
[5]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armel/badge/icon
|
||||
[6]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armel/
|
||||
[7]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armhf/badge/icon
|
||||
[8]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armhf/
|
||||
[9]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/badge/icon
|
||||
[10]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/
|
||||
[11]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/badge/icon
|
||||
[12]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/
|
||||
[13]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-i386/badge/icon
|
||||
@@ -174,7 +174,8 @@ section.
|
||||
Reporting bugs
|
||||
==============
|
||||
|
||||
To submit bug reports, please [open an issue on the mono GitHub repo](https://github.com/mono/mono/issues/new).
|
||||
To submit bug reports, please use [Xamarin's
|
||||
Bugzilla](https://bugzilla.xamarin.com/)
|
||||
|
||||
Please use the search facility to ensure the same bug hasn't already
|
||||
been submitted and follow our
|
||||
@@ -307,6 +308,16 @@ should be used.
|
||||
|
||||
* 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
|
||||
@@ -472,16 +483,6 @@ http://code.google.com/p/nativeclient/
|
||||
* Currently this is used with Mono's AOT engine as
|
||||
Native Client does not support JIT engines yet.
|
||||
|
||||
* `--enable-wasm`
|
||||
|
||||
* Use this option to configure mono to run on WebAssembly. It will
|
||||
set both host and target to the WebAssembly triplet. This overrides
|
||||
the values passed to `--host` or `--target` and ignored what config.sub guesses.
|
||||
|
||||
This is a workaround to enable usage of old automake versions that don't
|
||||
recognize the wasm triplet.
|
||||
|
||||
|
||||
Working With Submodules
|
||||
=======================
|
||||
|
||||
@@ -541,7 +542,7 @@ file for information about Microsoft's patent grant.
|
||||
Mono Trademark Use Policy
|
||||
=========================
|
||||
|
||||
The use of trademarks and logos for Mono can be found [here](http://www.dotnetfoundation.org/legal/mono-tm).
|
||||
The use of trademarks and logos for Mono can be found [here] (http://www.dotnetfoundation.org/legal/mono-tm).
|
||||
|
||||
Maintaining the Class Library Solution Files
|
||||
============================================
|
||||
|
||||
@@ -14,7 +14,6 @@ RUNTIME = MONO_PATH=$(CLASS) $(abs_top_builddir)/runtime/mono-wrapper --debug
|
||||
TOOLS_RUNTIME = MONO_PATH=$(TOOLS_CLASS) $(abs_top_builddir)/runtime/mono-wrapper --debug
|
||||
MCS = $(TOOLS_RUNTIME) $(CSC) -nologo -noconfig -lib:$(CLASS) -r:System.dll -r:System.Core.dll -r:System.Xml.dll -r:Microsoft.CSharp.dll
|
||||
ILASM = $(TOOLS_RUNTIME) $(TOOLS_CLASS)/ilasm.exe
|
||||
XUNIT = $(RUNTIME) $(abs_top_builddir)/external/xunit-binaries/xunit.console.exe
|
||||
|
||||
include versions.mk
|
||||
include profiler-stress.mk
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
[
|
||||
{
|
||||
"name": "roslyn",
|
||||
"url": "git://github.com/mono/roslyn.git",
|
||||
"rev": "1d9895045041925490038c5df0d8f947d8dcbd7f",
|
||||
"remote-branch": "origin/mono-testing",
|
||||
"branch": "mono-testing",
|
||||
"url": "git://github.com/dotnet/roslyn.git",
|
||||
"rev": "322bd5b2bbf07df6a67de35cbcb2365484412f70",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "roslyn"
|
||||
},
|
||||
{
|
||||
"name": "coreclr",
|
||||
"url": "git://github.com/mono/coreclr.git",
|
||||
"rev": "83d8279997d8ce4ad344ff9b937b2d13d074dcaa",
|
||||
"rev": "c7da48acf72c40c0c0ed1a80ebfacea21bb3a271",
|
||||
"remote-branch": "origin/mono",
|
||||
"branch": "mono",
|
||||
"directory": "coreclr"
|
||||
@@ -18,7 +18,7 @@
|
||||
{
|
||||
"name": "ms-test-suite",
|
||||
"url": "[email protected]:xamarin/ms-test-suite.git",
|
||||
"rev": "67f29dfc0741b5311dd746c75760963a2915e648",
|
||||
"rev": "73c155f76b55839f26ba707d6d40091060e4f5d8",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "ms-test-suite"
|
||||
@@ -31,4 +31,4 @@
|
||||
"branch": "master",
|
||||
"directory": "benchmarker"
|
||||
}
|
||||
]
|
||||
]
|
||||
@@ -32,7 +32,7 @@ coreclr-runtest-coremanglib: coreclr-validate test-runner.exe $(CORECLR_COREMANG
|
||||
check-coreclr: coreclr-compile-tests coreclr-runtest-basic coreclr-runtest-coremanglib
|
||||
|
||||
coreclr-gcstress: coreclr-validate GCStressTests.exe $(CORECLR_STRESSTESTSI_CS)
|
||||
BVT_ROOT=$(realpath $(CORECLR_PATH)/tests/src/GC/Stress/Tests) $(RUNTIME) GCStressTests.exe $(CORECLR_PATH)/tests/src/GC/Stress/$(if $(CI_PR),testmix_gc_pr.config,testmix_gc.config); if [ $$? -ne 100 ]; then exit 1; fi
|
||||
BVT_ROOT=$(realpath $(CORECLR_PATH)/tests/src/GC/Stress/Tests) $(RUNTIME) GCStressTests.exe $(CORECLR_PATH)/tests/src/GC/Stress/testmix_gc.config; if [ $$? -ne 100 ]; then exit 1; fi
|
||||
|
||||
# Output a variable in $(2) to the file $(1), separated by newline characters
|
||||
# we need to do it in groups of 100 entries to make sure we don't exceed shell char limits
|
||||
@@ -2217,6 +2217,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcgettotalmemory.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gckeepalive.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcmaxgeneration.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcsuppressfinalize.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcwaitforpendingfinalizers.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstday.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstfourdayweek.cs \
|
||||
@@ -3981,10 +3982,6 @@ CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/newarr/newarr.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs
|
||||
|
||||
# https://github.com/mono/mono/issues/7432
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcsuppressfinalize.cs
|
||||
|
||||
CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/BBT/Scenario4/Not-Int32.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/Convert/implicitConv.il \
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
check-ms-test-suite: $(CLASS)/nunitlite.dll
|
||||
@if $(MAKE) validate-ms-test-suite RESET_VERSIONS=1; then \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -debug:portable -t:library -warn:1 -r:$(CLASS)/nunitlite.dll" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug:portable -t:library -warn:1 -r:$(CLASS)/nunitlite.dll" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/System.Linq.Expressions build MCS="$(MCS) -debug:portable -t:library -warn:1 -r:$(CLASS)/nunitlite.dll" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/conformance run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-lite-console.exe -exclude=MonoBug,BadTest -format:nunit2" NUNIT_XML_RESULT="-result:$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-conformance.xml" || EXIT_CODE=1; \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-lite-console.exe -exclude=MonoBug,BadTest -format:nunit2" NUNIT_XML_RESULT="-result:$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-systemruntimebringup.xml" || EXIT_CODE=1; \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/System.Linq.Expressions run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-lite-console.exe -exclude=MonoBug,BadTest -format:nunit2" NUNIT_XML_RESULT="-result:$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-systemlinqexpressions.xml" || EXIT_CODE=1; \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug:portable -warn:1" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup run MONO="$(RUNTIME)" || EXIT_CODE=1; \
|
||||
exit $$EXIT_CODE; \
|
||||
else \
|
||||
echo "*** [ms-test-suite] Getting the repository failed, you probably don't have access to this Xamarin-internal resource. Skipping."; \
|
||||
|
||||
@@ -40,7 +40,6 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
public int? ExitCode { get; set; }
|
||||
public string StandardOutput { get; set; }
|
||||
public string StandardError { get; set; }
|
||||
public string CombinedOutput { get; set; }
|
||||
}
|
||||
|
||||
static class Program {
|
||||
@@ -58,21 +57,21 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
"jit",
|
||||
};
|
||||
|
||||
static readonly TimeSpan _timeout = TimeSpan.FromHours (6);
|
||||
|
||||
const RegexOptions _regexOptions = RegexOptions.Compiled | RegexOptions.Singleline;
|
||||
static readonly TimeSpan _timeout = TimeSpan.FromHours (8);
|
||||
|
||||
static readonly Dictionary<string, Predicate<Benchmark>> _filters = new Dictionary<string, Predicate<Benchmark>> {
|
||||
{ "ironjs-v8", FilterNotOnArm },
|
||||
{ "msbiology", FilterNever },
|
||||
{ "ironjs-v8", FilterArmArchitecture },
|
||||
};
|
||||
|
||||
static bool FilterNever (Benchmark benchmark)
|
||||
{
|
||||
return false;
|
||||
static readonly Dictionary<string, Action<TestResult>> _processors = new Dictionary<string, Action<TestResult>> {
|
||||
{ "msbiology", Process32BitOutOfMemory },
|
||||
};
|
||||
|
||||
static string FilterInvalidXmlChars (string text) {
|
||||
return Regex.Replace (text, @"[^\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u10000-\u10FFFF]", string.Empty);
|
||||
}
|
||||
|
||||
static bool FilterNotOnArm (Benchmark benchmark)
|
||||
static bool FilterArmArchitecture (Benchmark benchmark)
|
||||
{
|
||||
#if ARCH_arm || ARCH_arm64
|
||||
return false;
|
||||
@@ -81,61 +80,45 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
#endif
|
||||
}
|
||||
|
||||
static void Process32BitOutOfMemory (TestResult result)
|
||||
{
|
||||
if (Environment.Is64BitProcess)
|
||||
return;
|
||||
|
||||
if (result.ExitCode == null || result.ExitCode == 0)
|
||||
return;
|
||||
|
||||
if (result.StandardError.Contains ("OutOfMemoryException"))
|
||||
result.ExitCode = 0;
|
||||
}
|
||||
|
||||
static bool IsSupported (Benchmark benchmark)
|
||||
{
|
||||
return _filters.TryGetValue (benchmark.Name, out var filter) ? filter (benchmark) : true;
|
||||
}
|
||||
|
||||
static string ReplaceInvalidXmlChars (string text) {
|
||||
return Regex.Replace (text, @"[^\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u10000-\u10FFFF]", string.Empty);
|
||||
}
|
||||
|
||||
static int Main ()
|
||||
{
|
||||
var regex = new Regex (".*", _regexOptions);
|
||||
|
||||
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_REGEX") is string envRegex)
|
||||
regex = new Regex (envRegex, _regexOptions);
|
||||
|
||||
var depDir = Path.Combine ("..", "external", "benchmarker");
|
||||
var benchDir = Path.Combine (depDir, "benchmarks");
|
||||
var testDir = Path.Combine (depDir, "tests");
|
||||
|
||||
var benchmarks = Directory.EnumerateFiles (benchDir, "*.benchmark")
|
||||
.Select (Benchmark.Load)
|
||||
.Where (b => !b.OnlyExplicit && b.ClientCommandLine == null && IsSupported (b) && regex.IsMatch (b.Name))
|
||||
.Where (b => !b.OnlyExplicit && b.ClientCommandLine == null && IsSupported (b))
|
||||
.OrderBy (b => b.Name)
|
||||
.ToArray ();
|
||||
|
||||
var monoPath = Path.GetFullPath (Path.Combine ("..", "..", "runtime", "mono-wrapper"));
|
||||
var classDir = Path.GetFullPath (Path.Combine ("..", "..", "mcs", "class", "lib", "net_4_x"));
|
||||
|
||||
var seed = Environment.TickCount;
|
||||
|
||||
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_SEED") is string envSeed)
|
||||
seed = int.Parse (envSeed);
|
||||
|
||||
var timeout = (int) _timeout.TotalMilliseconds;
|
||||
|
||||
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_TIMEOUT") is string envTimeout)
|
||||
timeout = (int) TimeSpan.Parse (envTimeout).TotalMilliseconds;
|
||||
|
||||
string options = null;
|
||||
|
||||
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_OPTIONS") is string envOptions)
|
||||
options = envOptions;
|
||||
|
||||
var rand = new Random (seed);
|
||||
var rand = new Random ();
|
||||
var cpus = Environment.ProcessorCount;
|
||||
|
||||
var sw = Stopwatch.StartNew ();
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Magenta;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] Starting test session with seed: {seed}");
|
||||
Console.ResetColor ();
|
||||
|
||||
var results = new List<TestResult> (benchmarks.Length);
|
||||
|
||||
var sw = Stopwatch.StartNew ();
|
||||
|
||||
for (var i = 0; i < benchmarks.Length; i++) {
|
||||
var bench = benchmarks [i];
|
||||
|
||||
@@ -144,24 +127,17 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
var maxSamples = rand.Next (0, cpus * 2000 + 1);
|
||||
var heapShotFreq = rand.Next (-10, 11);
|
||||
var maxFrames = rand.Next (0, 33);
|
||||
var flags = _options.ToDictionary (x => x, _ => rand.Next (0, 2) == 1)
|
||||
.Select (x => (x.Value ? string.Empty : "no") + x.Key)
|
||||
.ToArray ();
|
||||
var options = _options.ToDictionary (x => x, _ => rand.Next (0, 2) == 1)
|
||||
.Select (x => (x.Value ? string.Empty : "no") + x.Key)
|
||||
.ToArray ();
|
||||
|
||||
var profOptions = "nodefaults,output=/dev/null,";
|
||||
var profOptions = $"maxframes={maxFrames},{string.Join (",", options)},output=/dev/null";
|
||||
|
||||
if (options == null) {
|
||||
profOptions += $"maxframes={maxFrames},";
|
||||
if (sampleFreq > 0)
|
||||
profOptions += $",sample{sampleMode}={sampleFreq},maxsamples={maxSamples}";
|
||||
|
||||
if (sampleFreq > 0)
|
||||
profOptions += $"sample{sampleMode}={sampleFreq},maxsamples={maxSamples},";
|
||||
|
||||
if (heapShotFreq > 0)
|
||||
profOptions += $"heapshot={heapShotFreq}gc,";
|
||||
|
||||
profOptions += string.Join (",", flags);
|
||||
} else
|
||||
profOptions += options;
|
||||
if (heapShotFreq > 0)
|
||||
profOptions += $",heapshot={heapShotFreq}gc";
|
||||
|
||||
var info = new ProcessStartInfo {
|
||||
UseShellExecute = false,
|
||||
@@ -191,22 +167,17 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
var stdout = new StringBuilder ();
|
||||
var stderr = new StringBuilder ();
|
||||
var combined = new StringBuilder ();
|
||||
|
||||
proc.OutputDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
lock (result) {
|
||||
lock (result)
|
||||
stdout.AppendLine (args.Data);
|
||||
combined.AppendLine (args.Data);
|
||||
}
|
||||
};
|
||||
|
||||
proc.ErrorDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
lock (result) {
|
||||
lock (result)
|
||||
stderr.AppendLine (args.Data);
|
||||
combined.AppendLine (args.Data);
|
||||
}
|
||||
};
|
||||
|
||||
result.Stopwatch.Start ();
|
||||
@@ -216,7 +187,7 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
proc.BeginOutputReadLine ();
|
||||
proc.BeginErrorReadLine ();
|
||||
|
||||
if (!proc.WaitForExit (timeout)) {
|
||||
if (!proc.WaitForExit ((int) _timeout.TotalMilliseconds)) {
|
||||
// Force a thread dump.
|
||||
Syscall.kill (proc.Id, Signum.SIGQUIT);
|
||||
Thread.Sleep (1000);
|
||||
@@ -233,7 +204,6 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
lock (result) {
|
||||
result.StandardOutput = stdout.ToString ();
|
||||
result.StandardError = stderr.ToString ();
|
||||
result.CombinedOutput = combined.ToString ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,12 +215,21 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
if (result.ExitCode != 0) {
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stdout + stderr =====");
|
||||
Console.WriteLine ("===== stdout =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.CombinedOutput);
|
||||
Console.WriteLine (result.StandardOutput);
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stderr =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.StandardError);
|
||||
}
|
||||
|
||||
if (_processors.TryGetValue (bench.Name, out var processor))
|
||||
processor (result);
|
||||
|
||||
results.Add (result);
|
||||
}
|
||||
|
||||
@@ -267,7 +246,7 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
using (var writer = XmlWriter.Create ("TestResult-profiler-stress.xml", settings)) {
|
||||
writer.WriteStartDocument ();
|
||||
writer.WriteComment ($"This file represents the results of running a test suite (seed: {seed})");
|
||||
writer.WriteComment ("This file represents the results of running a test suite");
|
||||
|
||||
writer.WriteStartElement ("test-results");
|
||||
writer.WriteAttributeString ("name", "profiler-stress-tests.dummy");
|
||||
@@ -328,11 +307,11 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
writer.WriteStartElement ("failure");
|
||||
|
||||
writer.WriteStartElement ("message");
|
||||
writer.WriteCData (ReplaceInvalidXmlChars (result.StandardOutput));
|
||||
writer.WriteCData (FilterInvalidXmlChars (result.StandardOutput));
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteStartElement ("stack-trace");
|
||||
writer.WriteCData (ReplaceInvalidXmlChars (result.StandardError));
|
||||
writer.WriteCData (FilterInvalidXmlChars (result.StandardError));
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
check-roslyn:
|
||||
@$(MAKE) validate-roslyn RESET_VERSIONS=1
|
||||
@if [ -z $$PREFIX ]; then echo "You need to set PREFIX to the prefix of the Mono installation that should be used for testing Roslyn." && exit 1; fi
|
||||
sed -i -e 's/\\4.5-api"/\\4.5"/g' $$PREFIX/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml; \
|
||||
export MSBuildExtensionsPath=$$PREFIX/lib/mono/xbuild; \
|
||||
MONO_DOTNET_PORTABLE_DIR=$$PREFIX/lib/mono/xbuild-frameworks/.NETPortable/; \
|
||||
if [ ! -d "$$MONO_DOTNET_PORTABLE_DIR/v4.6" ]; then \
|
||||
mkdir -p $$MONO_DOTNET_PORTABLE_DIR; \
|
||||
curl -SL "http://download.mono-project.com/third-party/RoslynBuildDependencies.zip" > /tmp/RoslynBuildDependencies.zip; \
|
||||
unzip -o /tmp/RoslynBuildDependencies.zip -d /tmp/RoslynBuildDependencies; \
|
||||
cp -r /tmp/RoslynBuildDependencies/PortableReferenceAssemblies/* $$MONO_DOTNET_PORTABLE_DIR; \
|
||||
fi; \
|
||||
cd $(ROSLYN_PATH); \
|
||||
./mono-testing.sh "$(XUNIT)" || exit; \
|
||||
echo "done"
|
||||
sed -i -e 'N; s/bootstrapArg=".*\n.*"/bootstrapArg=""/g' cibuild.sh; \
|
||||
sed -i -e 's#-xml Binaries/\$$BUILD_CONFIGURATION/xUnitResults/#-nunit $(abs_top_builddir)/acceptance-tests/TestResult-#g' cibuild.sh; \
|
||||
./cibuild.sh --mono-path $$PREFIX/bin || EXIT_CODE=1; \
|
||||
sed -i -e 's/\\4.5"/\\4.5-api"/g' $$PREFIX/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml; \
|
||||
exit $$EXIT_CODE
|
||||
+73
-382
@@ -1,8 +1,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT(mono, [5.12.0],
|
||||
[https://github.com/mono/mono/issues/new])
|
||||
AC_INIT(mono, [5.6.0],
|
||||
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
@@ -40,7 +40,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
|
||||
# This can be reset to 0 when Mono's version number is bumped
|
||||
# since it's part of the corlib version (the prefix '1' in the full
|
||||
# version number is to ensure the number isn't treated as octal in C)
|
||||
MONO_CORLIB_COUNTER=5
|
||||
MONO_CORLIB_COUNTER=0
|
||||
MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR 0 $MONO_CORLIB_COUNTER`
|
||||
|
||||
AC_DEFINE_UNQUOTED(MONO_CORLIB_VERSION,$MONO_CORLIB_VERSION,[Version of the corlib-runtime interface])
|
||||
@@ -96,15 +96,8 @@ need_link_unlink=no
|
||||
#Set to extra linker flags to be passed to the runtime binaries (mono /mono-sgen)
|
||||
extra_runtime_ldflags=""
|
||||
|
||||
|
||||
# Hack for WASM
|
||||
# Current autotools (v1.15) doesn't have a triplet we can use for wasm so the kludge we do is to
|
||||
# work around it by using a feature flag instead
|
||||
AC_ARG_ENABLE(wasm,[ --enable-wasm Hack to set the current runtime to target wasm], enable_wasm=$enableval)
|
||||
|
||||
# Thread configuration inspired by sleepycat's db
|
||||
AC_MSG_CHECKING([host platform characteristics])
|
||||
|
||||
libgc_threads=no
|
||||
has_dtrace=no
|
||||
parallel_mark=yes
|
||||
@@ -113,24 +106,11 @@ ikvm_native=yes
|
||||
host_win32=no
|
||||
target_win32=no
|
||||
platform_android=no
|
||||
platform_tizen=no
|
||||
platform_ios=no
|
||||
host_darwin=no
|
||||
|
||||
|
||||
if test "x$enable_wasm" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -D_REENTRANT -D_GNU_SOURCE -DNO_UNALIGNED_ACCESS -s WASM=1"
|
||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT -DUSE_MMAP -D_GNU_SOURCE -DNO_UNALIGNED_ACCESS -s WASM=1"
|
||||
libdl="-ldl"
|
||||
libgc_threads=pthreads
|
||||
platform_wasm=yes
|
||||
|
||||
else
|
||||
|
||||
case "$host" in
|
||||
*-mingw*|*-*-cygwin*)
|
||||
AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer])
|
||||
AC_DEFINE(HOST_NO_SYMLINKS,1,[This platform does not support symlinks])
|
||||
AC_DEFINE(PLATFORM_NO_SYMLINKS,1,[This platform does not support symlinks])
|
||||
host_win32=yes
|
||||
mono_cv_clang=no
|
||||
if test "x$cross_compiling" = "xno"; then
|
||||
@@ -161,7 +141,7 @@ case "$host" in
|
||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT -DGC_NETBSD_THREADS -D_GNU_SOURCE"
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
CPPFLAGS="$CPPFLAGS -DHOST_BSD"
|
||||
CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
|
||||
libmono_ldflags="-pthread"
|
||||
need_link_unlink=yes
|
||||
libdl="-ldl"
|
||||
@@ -196,7 +176,7 @@ case "$host" in
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS -L/usr/local/lib"
|
||||
libmono_ldflags="$PTHREAD_LIBS"
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS -DHOST_BSD"
|
||||
CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
|
||||
need_link_unlink=yes
|
||||
AC_DEFINE(PTHREAD_POINTER_ID, 1, [pthread is a pointer])
|
||||
libdl=
|
||||
@@ -206,8 +186,7 @@ case "$host" in
|
||||
with_sgen_default_concurrent=yes
|
||||
;;
|
||||
*-*-*openbsd*)
|
||||
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_OPENBSD_THREADS -DHOST_BSD -D_REENTRANT -DUSE_MMAP"
|
||||
LDFLAGS="${LDFLAGS} -Wl,-zwxneeded"
|
||||
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_OPENBSD_THREADS -DPLATFORM_BSD -D_REENTRANT -DUSE_MMAP"
|
||||
if test "x$disable_munmap" != "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
|
||||
fi
|
||||
@@ -217,14 +196,13 @@ case "$host" in
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
libgc_threads=pthreads
|
||||
with_tls=pthread
|
||||
with_sigaltstack=no
|
||||
use_sigposix=yes
|
||||
with_sgen_default_concurrent=yes
|
||||
;;
|
||||
*-*-linux-android*)
|
||||
platform_android=yes
|
||||
AC_DEFINE(HOST_ANDROID,1,[Targeting the Android platform])
|
||||
AC_DEFINE(PLATFORM_ANDROID,1,[Targeting the Android platform])
|
||||
AC_DEFINE(TARGET_ANDROID,1,[Targeting the Android platform])
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
|
||||
@@ -272,11 +250,6 @@ case "$host" in
|
||||
mono_cv_uscore=no
|
||||
fi
|
||||
case "$host" in
|
||||
*-tizen-linux-*)
|
||||
platform_tizen=yes
|
||||
;;
|
||||
esac
|
||||
case "$host" in
|
||||
aarch64-*)
|
||||
support_boehm=no
|
||||
with_gc=sgen
|
||||
@@ -311,7 +284,7 @@ case "$host" in
|
||||
use_sigposix=yes
|
||||
;;
|
||||
*-*-solaris*)
|
||||
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DHOST_SOLARIS"
|
||||
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DPLATFORM_SOLARIS"
|
||||
need_link_unlink=yes
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
libgc_threads=pthreads
|
||||
@@ -323,7 +296,7 @@ case "$host" in
|
||||
parallel_mark="Disabled_Currently_Hangs_On_MacOSX"
|
||||
host_darwin=yes
|
||||
target_mach=yes
|
||||
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_MACOSX_THREADS -DUSE_MMAP -DUSE_MUNMAP"
|
||||
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP"
|
||||
libmono_cflags="-D_THREAD_SAFE"
|
||||
need_link_unlink=yes
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
@@ -354,12 +327,8 @@ case "$host" in
|
||||
with_sgen_default_concurrent=yes
|
||||
;;
|
||||
arm*-darwin*)
|
||||
platform_ios=yes
|
||||
has_dtrace=no
|
||||
;;
|
||||
aarch64*-darwin*)
|
||||
platform_ios=yes
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*-*-haiku*)
|
||||
@@ -371,41 +340,16 @@ case "$host" in
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
dnl Haiku does not support static TLS with __thread
|
||||
with_tls=pthread
|
||||
dnl Boehm is too much work to backport Haiku support for
|
||||
support_boehm=no
|
||||
libgc_threads=pthreads
|
||||
use_sigposix=yes
|
||||
;;
|
||||
*-*-aix*|*-*-os400*)
|
||||
dnl Set up a 64-bit build
|
||||
CPPFLAGS="$CPPFLAGS -maix64 -DGC_AIX_THREADS -D_ALL_SOURCE -D_LARGE_FILES -D_REENTRANT"
|
||||
LDFLAGS="-maix64"
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
dnl Would you believe GNU nm doesn't know how to process AIX libraries?
|
||||
dnl Hardcode IBM binutils in case GNU ones end up on our path. Also
|
||||
dnl specifiy 64-bit mode for tools.
|
||||
AR="/usr/bin/ar -X64"
|
||||
NM="/usr/bin/nm -X64"
|
||||
dnl SGen is the future (changes to Boehm support code would be
|
||||
dnl required if you wish to re-enable Boehm)
|
||||
support_boehm=no
|
||||
with_gc=sgen
|
||||
need_link_unlink=yes
|
||||
use_sigposix=yes
|
||||
dnl the valloc call to alloc the guard page bombs out, even with extending the data area
|
||||
with_sigaltstack=no
|
||||
dnl use pthread TLS, __thread has issues with the compiler flags we use
|
||||
with_tls=pthread
|
||||
dnl ppc Linux is the same? test further
|
||||
disable_munmap=yes
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([*** Please add $host to configure.ac checks!])
|
||||
libdl="-ldl"
|
||||
;;
|
||||
esac
|
||||
|
||||
# WASM hack
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT(ok)
|
||||
|
||||
if test x$need_link_unlink = xyes; then
|
||||
@@ -420,10 +364,6 @@ if test x$target_win32 = xyes; then
|
||||
AC_DEFINE(TARGET_WIN32, 1, [Target Platform is Win32])
|
||||
fi
|
||||
|
||||
if test x$host_darwin = xyes; then
|
||||
AC_DEFINE(HOST_DARWIN, 1, [Host Platform is Darwin])
|
||||
fi
|
||||
|
||||
# Defined for all targets/platforms using classic Windows API support.
|
||||
AC_DEFINE(HAVE_CLASSIC_WINAPI_SUPPORT, 1, [Use classic Windows API support])
|
||||
AC_DEFINE(HAVE_UWP_WINAPI_SUPPORT, 0, [Don't use UWP Windows API support])
|
||||
@@ -431,19 +371,16 @@ AC_DEFINE(HAVE_UWP_WINAPI_SUPPORT, 0, [Don't use UWP Windows API support])
|
||||
AC_SUBST(extra_runtime_ldflags)
|
||||
AM_CONDITIONAL(HOST_WIN32, test x$host_win32 = xyes)
|
||||
AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes)
|
||||
AM_CONDITIONAL(HOST_LINUX, echo x$target_os | grep -q linux)
|
||||
AM_CONDITIONAL(HOST_DARWIN, test x$host_darwin = xyes)
|
||||
AM_CONDITIONAL(HOST_SIGPOSIX, test x$use_sigposix = xyes)
|
||||
AM_CONDITIONAL(HOST_ANDROID, test x$platform_android = xyes)
|
||||
AM_CONDITIONAL(HOST_TIZEN, test x$platform_tizen = xyes)
|
||||
AM_CONDITIONAL(HOST_IOS, test x$platform_ios = xyes)
|
||||
AM_CONDITIONAL(HOST_WASM, test x$platform_wasm = xyes)
|
||||
AM_CONDITIONAL(PLATFORM_LINUX, echo x$target_os | grep -q linux)
|
||||
AM_CONDITIONAL(PLATFORM_DARWIN, test x$host_darwin = xyes)
|
||||
AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
|
||||
AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
|
||||
|
||||
if test -z "$HOST_DARWIN_TRUE"; then :
|
||||
if test -z "$PLATFORM_DARWIN_TRUE"; then :
|
||||
PLATFORM_AOT_SUFFIX=.dylib
|
||||
fi
|
||||
|
||||
if test -z "$HOST_LINUX_TRUE"; then :
|
||||
if test -z "$PLATFORM_LINUX_TRUE"; then :
|
||||
PLATFORM_AOT_SUFFIX=.so
|
||||
fi
|
||||
|
||||
@@ -541,6 +478,7 @@ AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
|
||||
if test x$have_zlib = xyes; then
|
||||
AC_TRY_COMPILE([#include <zlib.h>], [
|
||||
#if defined(ZLIB_VERNUM) && (ZLIB_VERNUM >= 0x1230)
|
||||
return 0;
|
||||
#else
|
||||
#error No good zlib found
|
||||
#endif
|
||||
@@ -567,7 +505,6 @@ AC_CHECK_HEADERS(sys/poll.h)
|
||||
AC_CHECK_HEADERS(sys/wait.h)
|
||||
AC_CHECK_HEADERS(grp.h)
|
||||
AC_CHECK_HEADERS(syslog.h)
|
||||
AC_CHECK_FUNCS(vsyslog)
|
||||
|
||||
# for mono/dis
|
||||
AC_CHECK_HEADERS(wchar.h)
|
||||
@@ -639,6 +576,7 @@ if test x$platform_android = xyes; then
|
||||
#include <android/versioning.h>
|
||||
],[
|
||||
#if __ANDROID_API_O__ == 26 && defined(__INTRODUCED_IN)
|
||||
return 0
|
||||
#else
|
||||
#error __ANDROID_API_O__ != 26 or the __INTRODUCED_IN macro not defined
|
||||
#endif
|
||||
@@ -659,18 +597,7 @@ if test x$platform_android = xyes; then
|
||||
fi # Android
|
||||
|
||||
# not 64 bit clean in cross-compile
|
||||
if test "x$enable_wasm" = "xyes"; then
|
||||
AC_DEFINE(SIZEOF_VOID_P,4)
|
||||
AC_DEFINE(SIZEOF_LONG,4)
|
||||
ac_cv_sizeof_void_p="4"
|
||||
ac_cv_sizeof_long="4"
|
||||
else
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
fi
|
||||
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_SIZEOF(void *, 4)
|
||||
|
||||
AC_CACHE_CHECK([for clang],
|
||||
mono_cv_clang,[
|
||||
@@ -679,6 +606,7 @@ AC_CACHE_CHECK([for clang],
|
||||
#else
|
||||
#error "FAILED"
|
||||
#endif
|
||||
return 0;
|
||||
],
|
||||
[mono_cv_clang=yes],
|
||||
[mono_cv_clang=no],
|
||||
@@ -714,6 +642,7 @@ if test x"$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -Wunused-but-set-variable -Werror"
|
||||
AC_MSG_CHECKING(for -Wno-unused-but-set-variable option to gcc)
|
||||
AC_TRY_COMPILE([],[
|
||||
return 0;
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
CFLAGS="$ORIG_CFLAGS -Wno-unused-but-set-variable"
|
||||
@@ -824,9 +753,6 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Chan
|
||||
fi
|
||||
)
|
||||
|
||||
AC_CHECK_PROG(ninja, ninja, yes, no)
|
||||
AM_CONDITIONAL(NINJA, test x$ninja != xno)
|
||||
|
||||
AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no)
|
||||
if test x$werror_flag = xyes; then
|
||||
WERROR_CFLAGS="-Werror"
|
||||
@@ -834,8 +760,8 @@ fi
|
||||
AC_SUBST([WERROR_CFLAGS])
|
||||
AC_SUBST([SHARED_CFLAGS])
|
||||
|
||||
GLIB_CFLAGS='-I$(top_srcdir)/mono/eglib -I$(top_builddir)/mono/eglib'
|
||||
GLIB_LIBS='$(top_builddir)/mono/eglib/libeglib.la -lm'
|
||||
GLIB_CFLAGS='-I$(top_srcdir)/eglib/src -I$(top_builddir)/eglib/src'
|
||||
GLIB_LIBS='-L$(top_builddir)/eglib/src -leglib -lm'
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
@@ -875,7 +801,6 @@ fi
|
||||
AM_CONDITIONAL(STATIC_MONO, test x$with_static_mono != xno)
|
||||
AM_CONDITIONAL(SHARED_MONO, test x$with_shared_mono != xno)
|
||||
AC_ARG_ENABLE(mcs-build, [ --disable-mcs-build disable the build of the mcs directory], try_mcs_build=$enableval, enable_mcs_build=yes)
|
||||
AC_ARG_ENABLE(support-build, [ --disable-support-build disable the build of the support directory], try_support_build=$enableval, enable_support_build=yes)
|
||||
|
||||
AC_ARG_WITH(xen_opt, [ --with-xen_opt=yes,no Enable Xen-specific behaviour (defaults to yes)],[],[with_xen_opt=yes])
|
||||
if test "x$with_xen_opt" = "xyes" -a "x$mono_cv_clang" = "xno"; then
|
||||
@@ -884,6 +809,7 @@ if test "x$with_xen_opt" = "xyes" -a "x$mono_cv_clang" = "xno"; then
|
||||
CFLAGS="$CFLAGS -mno-tls-direct-seg-refs"
|
||||
AC_MSG_CHECKING(for -mno-tls-direct-seg-refs option to gcc)
|
||||
AC_TRY_COMPILE([], [
|
||||
return 0;
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
# Pass it to libgc as well
|
||||
@@ -934,75 +860,6 @@ if test $csc_compiler = default; then
|
||||
fi
|
||||
AC_MSG_RESULT($csc_compiler)
|
||||
|
||||
AC_ARG_WITH(jemalloc, [ --with-jemalloc=yes,no If jemalloc is enabled (defaults to no)], [], [with_jemalloc=no])
|
||||
AC_ARG_WITH(jemalloc-always, [ --with-jemalloc_always=yes,no If jemalloc is enabled and always used (defaults to yes)], [], [with_jemalloc_always=no])
|
||||
AC_ARG_WITH(jemalloc-assert, [ --with-jemalloc_assert=yes,no If jemalloc performs runtime checks for memory correctness (defaults to no)], [], [with_jemalloc_assert=no])
|
||||
|
||||
|
||||
if test x$target_win32 = xyes; then
|
||||
with_jemalloc=no
|
||||
with_jemalloc_assert=no
|
||||
with_jemalloc_always=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(MONO_JEMALLOC_ASSERT, [test "x$with_jemalloc_assert" = "xyes"])
|
||||
if test "x$with_jemalloc_assert" = "xyes"; then
|
||||
JEMALLOC_CFLAGS+=" -DMONO_JEMALLOC_ASSERT"
|
||||
AC_DEFINE(MONO_JEMALLOC_ASSERT, 1, [Make jemalloc assert for mono])
|
||||
AC_SUBST(MONO_JEMALLOC_ASSERT, 1)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(MONO_JEMALLOC_DEFAULT, [test "x$with_jemalloc_always" = "xyes"])
|
||||
if test "x$with_jemalloc_always" = "xyes"; then
|
||||
with_jemalloc=yes
|
||||
JEMALLOC_CFLAGS+=" -DMONO_JEMALLOC_DEFAULT"
|
||||
AC_DEFINE(MONO_JEMALLOC_DEFAULT, 1, [Make jemalloc default for mono])
|
||||
AC_SUBST(MONO_JEMALLOC_DEFAULT, 1)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(MONO_JEMALLOC_ENABLED, [test "x$with_jemalloc" = "xyes"])
|
||||
if test "x$with_jemalloc" = "xyes"; then
|
||||
JEMALLOC_LDFLAGS="-L`pwd`/mono/utils/jemalloc/jemalloc/lib -ljemalloc_pic"
|
||||
JEMALLOC_CFLAGS+=" -DMONO_JEMALLOC_ENABLED -I `pwd`/mono/utils/jemalloc/jemalloc/include"
|
||||
JEMALLOC_AUTOCONF_FLAGS=" --build=$target --host=$host"
|
||||
|
||||
if test "x$target_mach" = "xyes"; then
|
||||
JEMALLOC_CPPFLAGS=" -stdlib=libc++ "
|
||||
fi
|
||||
|
||||
AC_DEFINE(MONO_JEMALLOC_ENABLED, 1, [Enable jemalloc usage for mono])
|
||||
AC_SUBST(MONO_JEMALLOC_ENABLED, 1)
|
||||
|
||||
AC_SUBST(JEMALLOC_CFLAGS)
|
||||
AC_SUBST(JEMALLOC_CPPFLAGS)
|
||||
AC_SUBST(JEMALLOC_LDFLAGS)
|
||||
AC_SUBST(JEMALLOC_AUTOCONF_FLAGS)
|
||||
fi
|
||||
|
||||
|
||||
# Terminology:
|
||||
# Crash privacy - Attempts to not send identifying information in the crash dump / to protect the obscurity of the program control flow
|
||||
# MERP - The MS telemetry profile. Not for general use.
|
||||
# Structured crashes - crashes at runtime that trigger a stack walk by mono that happens cooperatively
|
||||
|
||||
# Structured crashes are not merp crashes. Structured crashes are json dumps made by mono during crashes. Merp upload is going to use the dumping code is a very specific way, and is enabled at runtime with an icall.
|
||||
|
||||
#--with-crash_privacy=yes --with-structured_crashes=no means we don't wanna dump in non-merp-enabled builds, and we want to not send symbol strings. This is going to be the default pair of settings for VS4Mac.
|
||||
#--with-crash_privacy=yes --with-structured_crashes=yes means you want to see crashes on your console, and you want to not see unmanaged symbol names. This is an option for proprietary apps that have manual bugs filed.
|
||||
#--with-crash_privacy=no --with-structured_crashes=no means you want to see no crash dumps on failure and you don't care about privacy. This is how you'd set a "don't want it, don't care" configuration.
|
||||
#--with-crash_privacy=no --with-structured_crashes=yes means you want full crashes and you want to see them in the terminal, not on telemetry. This is going to be how we build for CI.
|
||||
|
||||
AC_ARG_WITH(crash-privacy, [ --with-crash_privacy=yes,no If you want your crashes to not include names of symbols present in the binary. ], [], [with_crash_privacy=no])
|
||||
AC_ARG_WITH(structured-crashes, [ --with-structured_crashes=yes,no If you want your unmanaged crashes to result in a small crash dump file. ], [], [with_structured_crashes=yes])
|
||||
|
||||
if test "x$with_crash_privacy" = "xno"; then
|
||||
AC_DEFINE(MONO_PRIVATE_CRASHES,1,[Do not include names of unmanaged functions in the crash dump])
|
||||
fi
|
||||
|
||||
if test "x$with_structured_crashes" = "xno"; then
|
||||
AC_DEFINE(DISABLE_STRUCTURED_CRASH,1,[Do not create structured crash files during unmanaged crashes])
|
||||
fi
|
||||
|
||||
#
|
||||
# Set the build profiles and options before things which use them
|
||||
#
|
||||
@@ -1019,56 +876,9 @@ AC_ARG_WITH(testing_aot_full, [ --with-testing_aot_full=yes,no If you w
|
||||
AC_ARG_WITH(winaot, [ --with-winaot=yes,no If you want to build the Windows friendly AOT assemblies (defaults to no)], [], [with_winaot=default])
|
||||
AC_ARG_WITH(orbis, [ --with-orbis=yes,no If you want to build the Orbis assemblies (defaults to no)], [], [with_orbis=default])
|
||||
AC_ARG_WITH(unreal, [ --with-unreal=yes,no If you want to build the Unreal assemblies (defaults to no)], [], [with_unreal=default])
|
||||
AC_ARG_WITH(wasm, [ --with-wasm=yes,no If you want to build the WebAssembly (defaults to no)], [], [with_wasm=default])
|
||||
|
||||
|
||||
AC_ARG_WITH(runtime_preset, [ --with-runtime_preset=net_4_x,all,aot,hybridaot,fullaot,bitcode,unreal Which default profile to build (defaults to net_4_x)], [], [with_runtime_preset=net_4_x])
|
||||
AC_ARG_WITH(spectre-mitigation, [ --with-spectre-mitigation=yes,no If you want to build the runtime with compiler flags that enable Spectre mitigation (defaults to no)], [], [with_spectre_mitigation=default])
|
||||
AC_ARG_WITH(spectre-indirect-branch-choice, [ --with-spectre-indirect-branch-choice=keep,thunk,inline,extern Convert indirect branches to the specified kind of thunk (defaults to inline)], [], [with_spectre_indirect_branch_choice=inline])
|
||||
AC_ARG_WITH(spectre-function-return-choice, [ --with-spectre-function-return-choice=keep,thunk,inline,extern Convert function return instructions to the specified kind of thunk (defaults to inline)], [], [with_spectre_function_return_choice=inline])
|
||||
|
||||
dnl
|
||||
dnl Spectre compiler mitigation flag checks
|
||||
dnl
|
||||
if test "x$with_spectre_mitigation" = "xyes"; then
|
||||
AC_MSG_NOTICE([Compiler Spectre mitigation support checks])
|
||||
SPECTRE_CFLAGS=
|
||||
SPECTRE_INDIRECT_BRANCH_KIND=
|
||||
case "x$with_spectre_indirect_branch_choice" in
|
||||
xkeep) SPECTRE_INDIRECT_BRANCH_KIND=keep ;;
|
||||
xthunk) SPECTRE_INDIRECT_BRANCH_KIND=thunk ;;
|
||||
xinline) SPECTRE_INDIRECT_BRANCH_KIND=thunk-inline ;;
|
||||
xextern) SPECTRE_INDIRECT_BRANCH_KIND=thunk-extern ;;
|
||||
*) AC_MSG_ERROR([Invalid indirect jump thunk kind ($with_spectre_indirect_branch_choice)]) ;;
|
||||
esac
|
||||
|
||||
SPECTRE_FUNCTION_RETURN_KIND=""
|
||||
case "x$with_spectre_function_return_choice" in
|
||||
xkeep) SPECTRE_FUNCTION_RETURN_KIND=keep ;;
|
||||
xthunk) SPECTRE_FUNCTION_RETURN_KIND=thunk ;;
|
||||
xinline) SPECTRE_FUNCTION_RETURN_KIND=thunk-inline ;;
|
||||
xextern) SPECTRE_FUNCTION_RETURN_KIND=thunk-extern ;;
|
||||
*) AC_MSG_ERROR([Invalid function return thunk kind ($with_spectre_function_return_choice)]) ;;
|
||||
esac
|
||||
|
||||
AX_CHECK_COMPILE_FLAG(
|
||||
[ -mindirect-branch=$SPECTRE_INDIRECT_BRANCH_KIND ],
|
||||
[ SPECTRE_CFLAGS="$SPECTRE_CFLAGS -mindirect-branch=$SPECTRE_INDIRECT_BRANCH_KIND" ]
|
||||
)
|
||||
|
||||
AX_CHECK_COMPILE_FLAG(
|
||||
[ -mfunction-return=$SPECTRE_FUNCTION_RETURN_KIND ],
|
||||
[ SPECTRE_CFLAGS="$SPECTRE_CFLAGS -mfunction-return=$SPECTRE_FUNCTION_RETURN_KIND" ]
|
||||
)
|
||||
|
||||
if test "x$SPECTRE_CFLAGS" != "x" ; then
|
||||
CFLAGS="$CFLAGS $SPECTRE_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $SPECTRE_CFLAGS"
|
||||
spectre_mitigation_status="mitigation enabled"
|
||||
fi
|
||||
else
|
||||
spectre_mitigation_status="no mitigation"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Profile defaults
|
||||
@@ -1087,14 +897,11 @@ with_testing_aot_full_default=no
|
||||
with_winaot_default=no
|
||||
with_orbis_default=no
|
||||
with_unreal_default=no
|
||||
with_wasm_default=no
|
||||
|
||||
with_bitcode_default=no
|
||||
with_cooperative_gc_default=no
|
||||
|
||||
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=9000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4000
|
||||
|
||||
AOT_BUILD_ATTRS=$INVARIANT_AOT_OPTIONS
|
||||
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=8000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4000
|
||||
|
||||
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
@@ -1110,7 +917,6 @@ elif test x$with_runtime_preset = xall; then
|
||||
with_winaot_default=yes
|
||||
with_orbis_default=yes
|
||||
with_unreal_default=yes
|
||||
with_wasm_default=yes
|
||||
elif test x$with_runtime_preset = xfullaot; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_testing_aot_full_default=yes
|
||||
@@ -1123,8 +929,8 @@ elif test x$with_runtime_preset = xfullaot; then
|
||||
mono_feature_disable_appdomains='yes'
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile -O=gsharedvt --aot=full,$INVARIANT_AOT_OPTIONS"
|
||||
|
||||
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
|
||||
AOT_MODE="full"
|
||||
elif test x$with_runtime_preset = xbitcode; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_testing_aot_full_default=yes
|
||||
@@ -1141,7 +947,6 @@ elif test x$with_runtime_preset = xbitcode; then
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=llvmonly,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --llvmonly"
|
||||
AOT_MODE="llvmonly"
|
||||
elif test x$with_runtime_preset = xhybridaot; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_testing_aot_hybrid_default=yes
|
||||
@@ -1169,7 +974,6 @@ elif test x$with_runtime_preset = xwinaot; then
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
|
||||
AOT_MODE="llvmonly"
|
||||
elif test x$with_runtime_preset = xorbis; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_orbis_default=yes
|
||||
@@ -1183,7 +987,6 @@ elif test x$with_runtime_preset = xorbis; then
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
|
||||
AOT_MODE="full"
|
||||
elif test x$with_runtime_preset = xunreal; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_unreal_default=yes
|
||||
@@ -1195,19 +998,6 @@ elif test x$with_runtime_preset = xunreal; then
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=hybrid,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot"
|
||||
elif test x$with_runtime_preset = xwasm; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_wasm_default=yes
|
||||
TEST_PROFILE=wasm
|
||||
|
||||
mono_feature_disable_com='yes'
|
||||
mono_feature_disable_remoting='yes'
|
||||
mono_feature_disable_reflection_emit_save='yes'
|
||||
mono_feature_disable_reflection_emit='yes'
|
||||
mono_feature_disable_appdomains='yes'
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
|
||||
else
|
||||
with_profile4_x_default=yes
|
||||
fi
|
||||
@@ -1257,9 +1047,6 @@ fi
|
||||
if test "x$with_unreal" = "xdefault"; then
|
||||
with_unreal=$with_unreal_default
|
||||
fi
|
||||
if test "x$with_wasm" = "xdefault"; then
|
||||
with_wasm=$with_wasm_default
|
||||
fi
|
||||
|
||||
|
||||
AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = "xyes"])
|
||||
@@ -1274,8 +1061,7 @@ AM_CONDITIONAL(INSTALL_TESTING_AOT_FULL, [test "x$with_testing_aot_full" != "xno
|
||||
AM_CONDITIONAL(INSTALL_WINAOT, [test "x$with_winaot" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_ORBIS, [test "x$with_orbis" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_UNREAL, [test "x$with_unreal" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_WASM, [test "x$with_wasm" != "xno"])
|
||||
AM_CONDITIONAL(FULL_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full"] || [test "x$TEST_PROFILE" = "xwinaot"] || [test "x$TEST_PROFILE" = "xorbis"] || [test "x$TEST_PROFILE" = "xwasm"])
|
||||
AM_CONDITIONAL(FULL_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full"] || [test "x$TEST_PROFILE" = "xwinaot"] || [test "x$TEST_PROFILE" = "xorbis"])
|
||||
AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"] || [test "x$TEST_PROFILE" = "xunreal"])
|
||||
|
||||
default_profile=net_4_x
|
||||
@@ -1303,9 +1089,6 @@ fi
|
||||
if test -z "$INSTALL_UNREAL_TRUE"; then :
|
||||
default_profile=unreal
|
||||
fi
|
||||
if test -z "$INSTALL_WASM_TRUE"; then :
|
||||
default_profile=wasm
|
||||
fi
|
||||
if test -z "$INSTALL_4_x_TRUE"; then :
|
||||
default_profile=net_4_x
|
||||
fi
|
||||
@@ -1336,7 +1119,7 @@ fi
|
||||
|
||||
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
|
||||
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier,
|
||||
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, interpreter, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting,
|
||||
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting,
|
||||
security, lldb, mdb, sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying.],
|
||||
[
|
||||
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
|
||||
@@ -1432,25 +1215,12 @@ if test "x$mono_feature_disable_verifier" = "xyes"; then
|
||||
fi
|
||||
|
||||
if test "x$mono_feature_disable_jit" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_JIT, 1, [Disable the JIT, only full-aot mode or interpreter will be supported by the runtime.])
|
||||
AC_MSG_NOTICE([Disabled the JIT engine, only full AOT or interpreter will be supported])
|
||||
AC_DEFINE(DISABLE_JIT, 1, [Disable the JIT, only full-aot mode will be supported by the runtime.])
|
||||
AC_MSG_NOTICE([Disabled the JIT engine, only full AOT will be supported])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(DISABLE_JIT, test x$mono_feature_disable_jit = xyes)
|
||||
|
||||
if test "x$mono_feature_disable_interpreter" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_INTERPRETER, 1, [Disable the interpreter.])
|
||||
AC_MSG_NOTICE([Disabled the interpreter])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(DISABLE_INTERPRETER, test x$mono_feature_disable_interpreter = xyes)
|
||||
|
||||
if test "x$mono_feature_disable_interpreter" != "xyes" -o "x$mono_feature_disable_jit" != "xyes"; then
|
||||
AC_DEFINE(ENABLE_ILGEN, 1, [Some VES is available at runtime])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_ILGEN, test x$mono_feature_disable_interpreter != xyes -o x$mono_feature_disable_jit != xyes)
|
||||
|
||||
if test "x$mono_feature_disable_simd" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_SIMD, 1, [Disable SIMD intrinsics related optimizations.])
|
||||
AC_MSG_NOTICE([Disabled SIMD support])
|
||||
@@ -1687,33 +1457,6 @@ if test x$platform_android = xyes; then
|
||||
fi
|
||||
|
||||
if test x$host_win32 = xno; then
|
||||
dnl *************************************
|
||||
dnl *** Checks for time capabilities ***
|
||||
dnl *************************************
|
||||
|
||||
AC_MSG_CHECKING(for CLOCK_MONOTONIC)
|
||||
AC_TRY_COMPILE([#include <time.h>], [
|
||||
const int foo = CLOCK_MONOTONIC;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_CLOCK_MONOTONIC, 1, [CLOCK_MONOTONIC])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(for CLOCK_MONOTONIC_COARSE)
|
||||
AC_TRY_COMPILE([#include <time.h>], [
|
||||
const int foo = CLOCK_MONOTONIC_COARSE;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_CLOCK_MONOTONIC_COARSE, 1, [CLOCK_MONOTONIC_COARSE])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_CHECK_FUNC(mach_absolute_time, [AC_DEFINE(HAVE_MACH_ABSOLUTE_TIME, 1, [mach_absolute_time])])
|
||||
AC_CHECK_FUNC(gethrtime, [AC_DEFINE(HAVE_GETHRTIME, 1, [gethrtime])])
|
||||
AC_CHECK_FUNC(read_real_time, [AC_DEFINE(HAVE_READ_REAL_TIME, 1, [read_real_time])])
|
||||
|
||||
dnl hires monotonic clock support
|
||||
AC_SEARCH_LIBS(clock_gettime, rt)
|
||||
@@ -1798,8 +1541,6 @@ if test x$host_win32 = xno; then
|
||||
AC_CHECK_FUNCS(getpwuid_r)
|
||||
fi
|
||||
|
||||
AC_FUNC_STRERROR_R()
|
||||
|
||||
dnl ****************************************************************
|
||||
dnl *** Check for sched_setaffinity from glibc versions before ***
|
||||
dnl *** 2.3.4. The older versions of the function only take 2 ***
|
||||
@@ -1813,6 +1554,7 @@ if test x$host_win32 = xno; then
|
||||
AC_TRY_COMPILE([#include <sched.h>], [
|
||||
int mask = 1;
|
||||
sched_setaffinity(0, &mask);
|
||||
return 0;
|
||||
], [
|
||||
# Yes, we have it...
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -2396,7 +2138,11 @@ if test x$host_win32 = xno; then
|
||||
child ()
|
||||
{
|
||||
struct sigaction sa;
|
||||
#ifdef __APPLE__
|
||||
stack_t sas;
|
||||
#else
|
||||
struct sigaltstack sas;
|
||||
#endif
|
||||
pthread_t id;
|
||||
pthread_attr_t attr;
|
||||
|
||||
@@ -2791,7 +2537,7 @@ if test x$host_win32 = xno; then
|
||||
[#include <sys/types.h>
|
||||
#include <sys/vfs.h>])
|
||||
AC_CHECK_MEMBERS(
|
||||
[struct stat.st_atim, struct stat.st_mtim, struct stat.st_atimespec, struct stat.st_ctim],,,
|
||||
[struct stat.st_atim, struct stat.st_mtim, struct stat.st_ctim],,,
|
||||
[#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>])
|
||||
@@ -2833,14 +2579,6 @@ if test x$host_win32 = xno; then
|
||||
#endif
|
||||
])
|
||||
AC_CHECK_HEADERS([termios.h])
|
||||
|
||||
dnl *********************************
|
||||
dnl *** Checks for random ***
|
||||
dnl *********************************
|
||||
if test x$host_darwin = xno; then
|
||||
AC_CHECK_HEADERS(sys/random.h)
|
||||
AC_CHECK_FUNCS(getrandom getentropy)
|
||||
fi
|
||||
else
|
||||
dnl *********************************
|
||||
dnl *** Checks for Windows compilation ***
|
||||
@@ -3064,12 +2802,6 @@ case "{$build}" in
|
||||
NAME_DEV_RANDOM="/dev/srandom"
|
||||
;;
|
||||
|
||||
dnl IBM i does not have /dev/random, use unblocking only
|
||||
|
||||
*-*-os400*)
|
||||
NAME_DEV_RANDOM="/dev/urandom"
|
||||
;;
|
||||
|
||||
dnl Win32 does not have /dev/random, they have their own method...
|
||||
|
||||
*-mingw*|*-*-cygwin*)
|
||||
@@ -3366,19 +3098,6 @@ jit_wanted=true
|
||||
boehm_supported=true
|
||||
BTLS_SUPPORTED=no
|
||||
BTLS_PLATFORM=
|
||||
|
||||
if test "x$enable_wasm" = "xyes"; then
|
||||
TARGET=WASM
|
||||
HOST=WASM
|
||||
arch_target=wasm
|
||||
AC_DEFINE(TARGET_WASM, 1, [Target wasm])
|
||||
AC_DEFINE(HOST_WASM, 1, [Host wasm])
|
||||
BTLS_SUPPORTED=no
|
||||
with_tls=pthread
|
||||
target_mach=no
|
||||
|
||||
else
|
||||
|
||||
case "$host" in
|
||||
mips*)
|
||||
TARGET=MIPS;
|
||||
@@ -3391,6 +3110,7 @@ case "$host" in
|
||||
#if _MIPS_SIM != _ABIN32
|
||||
#error Not mips n32
|
||||
#endif
|
||||
return 0;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
sizeof_register=8
|
||||
@@ -3440,9 +3160,6 @@ case "$host" in
|
||||
BTLS_PLATFORM=i386
|
||||
;;
|
||||
openbsd*|freebsd*|kfreebsd-gnu*)
|
||||
AOT_SUPPORTED="yes"
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=i386
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -3467,9 +3184,6 @@ case "$host" in
|
||||
boehm_supported=false
|
||||
;;
|
||||
openbsd*|freebsd*|kfreebsd-gnu*)
|
||||
AOT_SUPPORTED="yes"
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=x86_64
|
||||
;;
|
||||
mingw*)
|
||||
;;
|
||||
@@ -3503,8 +3217,7 @@ case "$host" in
|
||||
INTL="intl"
|
||||
;;
|
||||
macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
|
||||
powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | \
|
||||
powerpc-*-freebsd* | powerpc-*-aix* | powerpc-*-os400* )
|
||||
powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | powerpc-*-freebsd* )
|
||||
if test "x$ac_cv_sizeof_void_p" = "x8"; then
|
||||
TARGET=POWERPC64;
|
||||
CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
|
||||
@@ -3515,13 +3228,6 @@ case "$host" in
|
||||
fi
|
||||
arch_target=ppc;
|
||||
case $host_os in
|
||||
aix*|os400*)
|
||||
dnl on AIX/PASE, shared libraries can be inside archives
|
||||
dnl if they are, we specify them by lib.a(lib.so)
|
||||
dnl we may hardcode 64-bit names at times, but we don't do 32-bit AIX, so
|
||||
LIBC="libc.a(shr_64.o)"
|
||||
INTL="libintl.a(libintl.so.9)"
|
||||
;;
|
||||
linux*|darwin*)
|
||||
;;
|
||||
esac
|
||||
@@ -3585,7 +3291,6 @@ HOST=$TARGET
|
||||
if test "x$host" != "x$target"; then
|
||||
AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
|
||||
enable_mcs_build=no
|
||||
enable_support_build=no
|
||||
BTLS_SUPPORTED=no
|
||||
case "$target" in
|
||||
arm*-darwin*)
|
||||
@@ -3795,8 +3500,6 @@ SPARC64)
|
||||
;;
|
||||
esac
|
||||
|
||||
#WASM hack
|
||||
fi
|
||||
|
||||
|
||||
dnl *************
|
||||
@@ -3865,6 +3568,7 @@ if test "x$target_mach" = "xyes"; then
|
||||
#if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
|
||||
#error fail this for ios
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
AC_DEFINE(TARGET_OSX,1,[The JIT/AOT targets OSX])
|
||||
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_OSX"
|
||||
@@ -3909,6 +3613,14 @@ if test "x$have_deprecated" = "xyes"; then
|
||||
AC_DEFINE(HAVE_DEPRECATED, 1, [Support for the deprecated attribute])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(interpreter, [ --enable-interpreter Enable Interpreter], enable_interpreter=$enableval, enable_interpreter=no)
|
||||
|
||||
if test "x$enable_interpreter" = "xyes"; then
|
||||
AC_DEFINE(ENABLE_INTERPRETER, 1, [Enable Interpreter])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_INTERPRETER, [test x$enable_interpreter = xyes])
|
||||
|
||||
dnl
|
||||
dnl Simple Generational checks (sgen)
|
||||
dnl
|
||||
@@ -4063,6 +3775,10 @@ AC_SUBST(PIDTYPE)
|
||||
AC_DEFINE(HAVE_CLASSIC_WINAPI_SUPPORT, 1, [Use classic Windows API support])
|
||||
AC_DEFINE(HAVE_UWP_WINAPI_SUPPORT, 0, [Don't use UWP Windows API support])
|
||||
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf strerror_r)
|
||||
AC_CHECK_FUNCS(getrlimit)
|
||||
AC_CHECK_FUNCS(fork execv execve)
|
||||
@@ -4098,19 +3814,7 @@ AC_SEARCH_LIBS(nanosleep, rt)
|
||||
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
old_ldflags="${LDFLAGS}"
|
||||
# GNU specific option, this confuses IBM ld, but do offer alternatives when possible
|
||||
if test $lt_cv_prog_gnu_ld = yes; then
|
||||
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
|
||||
else
|
||||
case $host in
|
||||
*-*-aix*|*-*-os400*)
|
||||
;;
|
||||
*)
|
||||
dnl Try to use export-dynamic anyways
|
||||
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
|
||||
AC_TRY_LINK(, [int i;], found_export_dynamic=yes, found_export_dynamic=no)
|
||||
if test $found_export_dynamic = no; then
|
||||
LDFLAGS="${old_ldflags}"
|
||||
@@ -4132,7 +3836,7 @@ fi
|
||||
AC_SUBST(G_HAVE_ISO_VARARGS)
|
||||
|
||||
AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h iconv.h localcharset.h sys/types.h sys/resource.h)
|
||||
AC_CHECK_LIB([iconv], [locale_charset],[],[AC_CHECK_LIB([charset], [locale_charset],[LIBS+=" -liconv -lcharset"])])
|
||||
AC_CHECK_LIB([iconv], [locale_charset],[],[AC_CHECK_LIB([charset], [locale_charset],[LIBS+="-liconv -lcharset"])])
|
||||
AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
|
||||
AC_SUBST(HAVE_ALLOCA_H)
|
||||
|
||||
@@ -4224,8 +3928,6 @@ if test "x$icall_tables" = "xno"; then
|
||||
AC_DEFINE(DISABLE_ICALL_TABLES, 1, [Icall tables disabled])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(DISABLE_ICALL_TABLES, test x$icall_tables = xno)
|
||||
|
||||
if test "x$with_tls" = "x__thread"; then
|
||||
AC_DEFINE(HAVE_KW_THREAD, 1, [Have __thread keyword])
|
||||
# Pass the information to libgc
|
||||
@@ -4276,6 +3978,7 @@ if test ${TARGET} = ARM; then
|
||||
#ifndef __ARM_PCS_VFP
|
||||
#error "Float ABI is not 'hard'"
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
fpu=VFP_HARD
|
||||
], [
|
||||
@@ -4289,6 +3992,7 @@ if test ${TARGET} = ARM; then
|
||||
#ifdef __SOFTFP__
|
||||
#error "Float ABI is not 'softfp'"
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
fpu=VFP
|
||||
], [
|
||||
@@ -4313,6 +4017,7 @@ if test ${TARGET} = ARM; then
|
||||
#if !defined(__ARM_ARCH_5T__) && !defined(__ARM_ARCH_5TE__) && !defined(__ARM_ARCH_5TEJ__)
|
||||
#error Not on ARM v5.
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
arm_v5=yes
|
||||
|
||||
@@ -4323,6 +4028,7 @@ if test ${TARGET} = ARM; then
|
||||
#if !defined(__ARM_ARCH_6J__) && !defined(__ARM_ARCH_6ZK__) && !defined(__ARM_ARCH_6K__) && !defined(__ARM_ARCH_6T2__) && !defined(__ARM_ARCH_6M__)
|
||||
#error Not on ARM v6.
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
arm_v5=yes
|
||||
arm_v6=yes
|
||||
@@ -4334,6 +4040,7 @@ if test ${TARGET} = ARM; then
|
||||
#if !defined(__ARM_ARCH_7A__) && !defined(__ARM_ARCH_7R__) && !defined(__ARM_ARCH_7EM__) && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7S__)
|
||||
#error Not on ARM v7.
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
arm_v5=yes
|
||||
arm_v6=yes
|
||||
@@ -4545,14 +4252,9 @@ dnl *** Btls ***
|
||||
dnl **************
|
||||
|
||||
AC_ARG_ENABLE(btls, [ --disable-btls Disable the BoringTls provider], enable_btls=$enableval, enable_btls=$BTLS_SUPPORTED)
|
||||
AC_ARG_ENABLE(btls-lib, [ --disable-btls-lib Disable building the BTLS native library], enable_btls_lib=$enableval, enable_btls_lib=$BTLS_SUPPORTED)
|
||||
AC_ARG_WITH(btls_android_ndk, [ --with-btls-android-ndk Android NDK for BoringTls])
|
||||
|
||||
if test "x$enable_btls" = "xno"; then
|
||||
enable_btls_lib=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(BTLS, test x$enable_btls_lib = xyes)
|
||||
AM_CONDITIONAL(BTLS, test x$enable_btls = xyes)
|
||||
|
||||
btls_android=no
|
||||
if test "x$enable_btls" = "xyes"; then
|
||||
@@ -4591,22 +4293,22 @@ if test "x$enable_btls" = "xyes"; then
|
||||
btls_arch=aarch64
|
||||
;;
|
||||
android-armv5)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-armv6)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-armv7)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi-v7a\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi-v7a\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-v8a)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"arm64-v8a\" -DANDROID_NATIVE_API_LEVEL=21"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"arm64-v8a\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-x86)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-x64)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86_64\" -DANDROID_NATIVE_API_LEVEL=21"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86_64\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(Invalid BTLS platform)
|
||||
@@ -4648,7 +4350,6 @@ AC_SUBST(docs_dir)
|
||||
|
||||
## Maybe should also disable if mcsdir is invalid. Let's punt the issue for now.
|
||||
AM_CONDITIONAL(BUILD_MCS, [test x$cross_compiling = xno && test x$enable_mcs_build != xno])
|
||||
AM_CONDITIONAL(BUILD_SUPPORT, [test x$enable_support_build != xno])
|
||||
|
||||
libmono_ldflags="$libmono_ldflags $LIBS"
|
||||
|
||||
@@ -4664,13 +4365,10 @@ AM_CONDITIONAL(POWERPC64, test x$TARGET = xPOWERPC64)
|
||||
AM_CONDITIONAL(ARM, test x$TARGET = xARM)
|
||||
AM_CONDITIONAL(ARM64, test x$TARGET = xARM64)
|
||||
AM_CONDITIONAL(S390X, test x$TARGET = xS390X)
|
||||
AM_CONDITIONAL(WASM, test x$TARGET = xWASM)
|
||||
AM_CONDITIONAL(HOST_X86, test x$HOST = xX86)
|
||||
AM_CONDITIONAL(HOST_AMD64, test x$HOST = xAMD64)
|
||||
AM_CONDITIONAL(HOST_ARM, test x$HOST = xARM)
|
||||
AM_CONDITIONAL(HOST_ARM64, test x$HOST = xARM64)
|
||||
AM_CONDITIONAL(HOST_WASM, test x$HOST = xWASM)
|
||||
|
||||
AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target")
|
||||
|
||||
AC_SUBST(LIBC)
|
||||
@@ -4696,7 +4394,7 @@ AC_SUBST(mono_build_root)
|
||||
mono_runtime=mono/mini/mono
|
||||
AC_SUBST(mono_runtime)
|
||||
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.2.6.0/tools/csc.exe
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.2.3.2/tools/csc.exe
|
||||
|
||||
if test $csc_compiler = mcs; then
|
||||
CSC=$mcs_topdir/class/lib/build/mcs.exe
|
||||
@@ -4892,7 +4590,6 @@ scripts/mono-find-requires
|
||||
mono/Makefile
|
||||
mono/btls/Makefile
|
||||
mono/utils/Makefile
|
||||
mono/utils/jemalloc/Makefile
|
||||
mono/metadata/Makefile
|
||||
mono/dis/Makefile
|
||||
mono/cil/Makefile
|
||||
@@ -4914,8 +4611,9 @@ mono/unit-tests/Makefile
|
||||
mono/benchmark/Makefile
|
||||
mono/mini/Makefile
|
||||
mono/profiler/Makefile
|
||||
mono/eglib/Makefile
|
||||
mono/eglib/eglib-config.h
|
||||
eglib/Makefile
|
||||
eglib/src/Makefile
|
||||
eglib/src/eglib-config.h
|
||||
m4/Makefile
|
||||
ikvm-native/Makefile
|
||||
scripts/Makefile
|
||||
@@ -5075,11 +4773,6 @@ fi
|
||||
if test "x$AOT_BUILD_FLAGS" != "x" ; then
|
||||
echo "AOT_RUN_FLAGS=$AOT_RUN_FLAGS" >> $srcdir/$mcsdir/build/config.make
|
||||
echo "AOT_BUILD_FLAGS=$AOT_BUILD_FLAGS" >> $srcdir/$mcsdir/build/config.make
|
||||
echo "AOT_BUILD_ATTRS=$AOT_BUILD_ATTRS" >> $srcdir/$mcsdir/build/config.make
|
||||
fi
|
||||
|
||||
if test "x$AOT_MODE" != "x" ; then
|
||||
echo "AOT_MODE=$AOT_MODE" >> $srcdir/$mcsdir/build/config.make
|
||||
fi
|
||||
|
||||
if test "x$enable_btls" = "xyes"; then
|
||||
@@ -5115,7 +4808,7 @@ echo "
|
||||
BigArrays: $enable_big_arrays
|
||||
DTrace: $enable_dtrace
|
||||
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
|
||||
Spectre: $spectre_mitigation_status
|
||||
Interpreter: $enable_interpreter
|
||||
|
||||
Libraries:
|
||||
.NET 4.x: $with_profile4_x
|
||||
@@ -5127,13 +4820,11 @@ echo "
|
||||
Windows AOT: $with_winaot
|
||||
Orbis: $with_orbis
|
||||
Unreal: $with_unreal
|
||||
WebAssembly: $with_wasm
|
||||
Test profiles: AOT Full ($with_testing_aot_full), AOT Hybrid ($with_testing_aot_hybrid)
|
||||
JNI support: $jdk_headers_found
|
||||
libgdiplus: $libgdiplus_msg
|
||||
zlib: $zlib_msg
|
||||
BTLS: $enable_btls$btls_platform_string
|
||||
jemalloc: $with_jemalloc (always use: $with_jemalloc_always)
|
||||
$disabled
|
||||
"
|
||||
if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then
|
||||
|
||||
+2
-2
@@ -11,9 +11,9 @@ def print_frames(thread, num_frames, current_thread):
|
||||
pc = str(frame.addr)
|
||||
var = frame
|
||||
function_name = frame.GetFunctionName()
|
||||
if function_name == "interp_exec_method_full":
|
||||
if function_name == "ves_exec_method_with_context":
|
||||
try:
|
||||
s = 'frame->imethod->method'
|
||||
s = 'frame->runtime_method->method'
|
||||
klassname = frame.EvaluateExpression('(char*) ' + s + '->klass->name').summary[1:-1]
|
||||
methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
<section name="assemblyBinding" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<section name="satelliteassemblies" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
|
||||
<section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.data" type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.diagnostics" type="System.Diagnostics.SystemDiagnosticsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<section name="system.windows.forms" type="System.Windows.Forms.WindowsFormsSection, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<section name="windows" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
|
||||
<section name="strongNames" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
|
||||
<sectionGroup name="system.runtime.serialization" type="System.Runtime.Serialization.Configuration.SerializationSectionGroup, System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
|
||||
@@ -43,16 +43,6 @@
|
||||
line-height: 0px;
|
||||
}
|
||||
|
||||
.mapi-codeblock {
|
||||
display: block;
|
||||
padding: 5pt 5pt;
|
||||
margin: 10pt;
|
||||
white-space: pre;
|
||||
font-family: monospace;
|
||||
border: 1px solid rgba(233,233,233,1);
|
||||
background-color: rgba(249,249,249,1);
|
||||
}
|
||||
|
||||
.mapi-entry code {
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
|
||||
+1
-1
@@ -69,5 +69,5 @@ object for filters is passed in a local variable (cfg->exvar).
|
||||
throw: we first save all regs into a sigcontext struct and then call the stack
|
||||
unwinding code.
|
||||
|
||||
catch handler: catch handlers are always called from the stack unwinding
|
||||
catch handler: catch hanlders are always called from the stack unwinding
|
||||
code. The exception object is passed in a local variable (cfg->exvar).
|
||||
+4
-20
@@ -124,7 +124,6 @@ sub process_function {
|
||||
my $body = '';
|
||||
my $returns = '';
|
||||
my $prototype = '';
|
||||
my $codeblock = 'false';
|
||||
|
||||
while (<$file>) {
|
||||
|
||||
@@ -157,6 +156,7 @@ sub process_function {
|
||||
if (defined($deprecated)) {
|
||||
process_formatting(\$deprecated, $file_path, $.);
|
||||
}
|
||||
$body =~ s/\n/ /g;
|
||||
|
||||
if (exists($docs->{body}->{$name})) {
|
||||
my $origin = $docs->{origin}->{$name};
|
||||
@@ -180,16 +180,8 @@ sub process_function {
|
||||
chomp;
|
||||
s/^ +\*//;
|
||||
|
||||
if (/\s*\\code$/) {
|
||||
$codeblock = 'true';
|
||||
} elsif (/\s*\\endcode$/) {
|
||||
$codeblock = 'false';
|
||||
}
|
||||
|
||||
# Replace blank lines with paragraph breaks if we're not in a code block.
|
||||
if (/^\s*$/) {
|
||||
$_ = '<p>' if $codeblock eq 'false';
|
||||
}
|
||||
# Replace blank lines with paragraph breaks.
|
||||
$_ = '<p>' if /^\s*$/;
|
||||
|
||||
if ($section == $PARAMETER_SECTION) {
|
||||
if (/\s*\\param +(\w+)(.*)/) {
|
||||
@@ -218,7 +210,7 @@ sub process_function {
|
||||
$returns = "\t$_\n";
|
||||
$section = $RETURN_SECTION;
|
||||
} else {
|
||||
$body .= "\n$_";
|
||||
$body .= "\n\t$_";
|
||||
}
|
||||
} elsif ($section == $RETURN_SECTION) {
|
||||
$returns .= "\n\t$_";
|
||||
@@ -235,12 +227,6 @@ sub process_formatting {
|
||||
my ($content, $file_path, $current_line) = @_;
|
||||
$_ = $$content;
|
||||
|
||||
# General formatting
|
||||
s{\\b +(\w+)}{<strong>$1</strong>}g;
|
||||
s{\\a +(\w+)}{<i>$1</i>}g;
|
||||
s{\\e +(\w+)}{<i>$1</i>}g;
|
||||
s{\\em +(\w+)}{<i>$1</i>}g;
|
||||
|
||||
# Constants
|
||||
s{NULL}{<code>NULL</code>}g;
|
||||
s{TRUE}{<code>TRUE</code>}g;
|
||||
@@ -257,8 +243,6 @@ sub process_formatting {
|
||||
warn "$file_path:$current_line: Old-style monodoc notation '`code`' used\n"
|
||||
if s{\`((?!api:)[:.\w\*]+)\`}{<code>$1</code>}g && $WARNINGS;
|
||||
s{\\c +(\S+(?<![.,:;]))}{<code>$1</code>}g;
|
||||
s{\\code}{<pre><code class="mapi-codeblock">}g;
|
||||
s{\\endcode}{</code></pre>}g;
|
||||
|
||||
$$content = $_;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<manpage name="mono-xmltool(1)" page="../man/mono-xmltool.1" />
|
||||
<manpage name="mozroots(1)" page="../man/mozroots.1" />
|
||||
<manpage name="permview(1)" page="../man/permview.1" />
|
||||
<manpage name="prj2make(1)" page="../man/prj2make.1" />
|
||||
<manpage name="resgen(1)" page="../man/resgen.1" />
|
||||
<manpage name="secutil(1)" page="../man/secutil.1" />
|
||||
<manpage name="setreg(1)" page="../man/setreg.1" />
|
||||
|
||||
@@ -1,193 +1,73 @@
|
||||
<h1>Runtime Profiler API</h1>
|
||||
<h1>Profiling Interface</h1>
|
||||
|
||||
<p>The profiler API can be used by dynamically loaded profiler
|
||||
modules to monitor different aspects of a running program. The
|
||||
API is also usable by embedders without having to compile a
|
||||
profiler module.
|
||||
<h3>Profiler Operation</h3>
|
||||
|
||||
<h2>Profiler Modules</h2>
|
||||
<p>The following methods can be used by dynamic profiler
|
||||
methods to monitor different aspects of the program.
|
||||
|
||||
<p>A profiler module is simply a shared library with a single
|
||||
exported function which is the entry point that Mono calls at
|
||||
startup. It must have the following signature:
|
||||
<p>A custom profiler will have one public method defined in
|
||||
the shared library which is the entry point that Mono calls at
|
||||
startup, it has the following signature:
|
||||
|
||||
<pre><code class="mapi-codeblock">
|
||||
void mono_profiler_startup_example (const char *desc)
|
||||
</code></pre>
|
||||
<pre>
|
||||
void mono_profiler_startup (const char *desc)
|
||||
</pre>
|
||||
|
||||
<p>Here, the <code>example</code> portion of the function name is
|
||||
the name of the profiler module. It must match the shared library
|
||||
name (i.e. <code>libmono-profiler-example.so</code>). <i>desc</i>
|
||||
is the set of arguments that were passed from the command line.
|
||||
<p>Where "desc" is the set of arguments that were passed from
|
||||
the command line. This routine will call
|
||||
<tt>mono_profiler_install</tt> to activate the profiler and
|
||||
will install one or more filters (one of the various
|
||||
<tt>mono_profiler_install_</tt> functions).
|
||||
|
||||
<p>For example, a bare bones profiler module might look like this
|
||||
(<code>example.c</code>):
|
||||
<p>In addition, a profiler developer will typically call
|
||||
<tt>mono_profiler_set_events</tt> to register which kinds of
|
||||
traces should be enabled, these can be an OR-ed combination of
|
||||
the following:
|
||||
|
||||
<pre><code class="mapi-codeblock">
|
||||
#include <mono/metadata/profiler.h>
|
||||
#include <stdio.h>
|
||||
<pre>
|
||||
MONO_PROFILE_NONE
|
||||
MONO_PROFILE_APPDOMAIN_EVENTS
|
||||
MONO_PROFILE_ASSEMBLY_EVENTS
|
||||
MONO_PROFILE_MODULE_EVENTS
|
||||
MONO_PROFILE_CLASS_EVENTS
|
||||
MONO_PROFILE_JIT_COMPILATION
|
||||
MONO_PROFILE_INLINING
|
||||
MONO_PROFILE_EXCEPTIONS
|
||||
MONO_PROFILE_ALLOCATIONS
|
||||
MONO_PROFILE_GC
|
||||
MONO_PROFILE_THREADS
|
||||
MONO_PROFILE_REMOTING
|
||||
MONO_PROFILE_TRANSITIONS
|
||||
MONO_PROFILE_ENTER_LEAVE
|
||||
MONO_PROFILE_COVERAGE
|
||||
MONO_PROFILE_INS_COVERAGE
|
||||
MONO_PROFILE_STATISTICAL
|
||||
</pre>
|
||||
|
||||
struct _MonoProfiler {
|
||||
int dummy;
|
||||
}
|
||||
<p>Developers can change the set of monitored events at
|
||||
runtime by calling <tt>mono_profiler_set_events</tt>.
|
||||
|
||||
<h4><a name="api:mono_profiler_install">mono_profiler_install</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_allocation">mono_profiler_install_allocation</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_appdomain">mono_profiler_install_appdomain</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_assembly">mono_profiler_install_assembly</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_class">mono_profiler_install_class</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_coverage_filter">mono_profiler_install_coverage_filter</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_enter_leave">mono_profiler_install_enter_leave</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_jit_compile">mono_profiler_install_jit_compile</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_module">mono_profiler_install_module</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_thread">mono_profiler_install_thread</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_transition">mono_profiler_install_transition</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_gc">mono_profiler_install_gc</a></h4>
|
||||
<h4><a name="api:mono_profiler_install_statistical">mono_profiler_install_statistical</a></h4>
|
||||
<h4><a name="api:mono_profiler_set_events">mono_profiler_set_events</a></h4>
|
||||
<h4><a name="api:mono_profiler_get_events">mono_profiler_get_events</a></h4>
|
||||
|
||||
static MonoProfiler profiler;
|
||||
<h3>Coverage</h3>
|
||||
|
||||
static void
|
||||
runtime_inited (MonoProfiler *prof)
|
||||
{
|
||||
printf ("Hello World");
|
||||
}
|
||||
<p>To support profiling modules that need to do code coverage
|
||||
analysis, the following routines is provided:
|
||||
|
||||
<h4><a name="api:mono_profiler_coverage_get">mono_profiler_coverage_get</a></h4>
|
||||
|
||||
void
|
||||
mono_profiler_init_example (const char *desc)
|
||||
{
|
||||
MonoProfilerHandle handle = mono_profiler_create (&profiler);
|
||||
mono_profiler_set_runtime_initialized_callback (handle, runtime_inited);
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>To compile this module, a C compiler must be invoked in a
|
||||
similar fashion to this, on Linux:
|
||||
|
||||
<pre><code class="mapi-codeblock">
|
||||
gcc -fPIC -shared -o libmono-profiler-example.so example.c `pkg-config --cflags mono-2`
|
||||
</code></pre>
|
||||
|
||||
<p>Or on OS X:
|
||||
|
||||
<pre><code class="mapi-codeblock">
|
||||
gcc -undefined suppress -flat_namespace -o libmono-profiler-example.so example.c `pkg-config --cflags mono-2`
|
||||
</code></pre>
|
||||
|
||||
<p>You can then load the module using:
|
||||
|
||||
<pre><code class="mapi-codeblock">
|
||||
mono --profile=example hello.exe
|
||||
</code></pre>
|
||||
|
||||
<p>(Note that adjusting <code>LD_LIBRARY_PATH</code> may be
|
||||
necessary in order for the dynamic linker to find the module.)
|
||||
|
||||
<h2>Profiler Functions</h2>
|
||||
|
||||
<p>These are the functions usable for profiling programs.
|
||||
|
||||
<p>Each function has a note indicating whether they're async
|
||||
safe. An async safe function can be invoked in a signal handler
|
||||
or when the world is stopped by the GC. Conversely, a function
|
||||
that is not async safe must not be invoked in such a context or
|
||||
undefined behavior can occur (crashes, deadlocks, etc).
|
||||
|
||||
<p>Some functions may only be invoked from a profiler module's
|
||||
init function (or prior to running managed code in the case of
|
||||
embedding). This is noted explicitly only if applicable to a
|
||||
function.
|
||||
|
||||
<h3>Basic Functions</h3>
|
||||
|
||||
<p>These functions are used to load and install profilers.
|
||||
|
||||
<h4><a name="api:mono_profiler_load">mono_profiler_load</a></h4>
|
||||
<h4><a name="api:mono_profiler_create">mono_profiler_create</a></h4>
|
||||
<h4><a name="api:mono_profiler_set_cleanup_callback">mono_profiler_set_cleanup_callback</a></h4>
|
||||
|
||||
<h3>Code Coverage</h3>
|
||||
|
||||
<p>These functions provide access to the JIT compiler's code
|
||||
coverage support. This functionality can be used to collect
|
||||
information about how many times certain code paths have been
|
||||
executed.
|
||||
|
||||
<h4><a name="api:mono_profiler_enable_coverage">mono_profiler_enable_coverage</a></h4>
|
||||
<h4><a name="api:mono_profiler_set_coverage_filter_callback">mono_profiler_set_coverage_filter_callback</a></h4>
|
||||
<h4><a name="api:mono_profiler_get_coverage_data">mono_profiler_get_coverage_data</a></h4>
|
||||
|
||||
<h3>Statistical Sampling</h3>
|
||||
|
||||
<p>Statistical sampling can be used to interrupt managed threads
|
||||
based on a certain mode and frequency for the purpose of
|
||||
collecting data about their current work.
|
||||
|
||||
<p>One common use case for this functionality, usually referred
|
||||
to as call sampling, is to collect a backtrace from every thread
|
||||
when a sampling hit event arrives. This data can then be compiled
|
||||
into a report indicating where a program spends most of its time.
|
||||
|
||||
<h4><a name="api:mono_profiler_enable_sampling">mono_profiler_enable_sampling</a></h4>
|
||||
<h4><a name="api:mono_profiler_set_sample_mode">mono_profiler_set_sample_mode</a></h4>
|
||||
<h4><a name="api:mono_profiler_get_sample_mode">mono_profiler_get_sample_mode</a></h4>
|
||||
|
||||
<p>A callback must be registered to receive sample hit events.
|
||||
Please see the <i>Callback Registration</i> section below.
|
||||
|
||||
<h3>GC Allocations</h3>
|
||||
|
||||
<p>Profilers can be notified about all GC allocations performed
|
||||
by a program or the Mono runtime.
|
||||
|
||||
<h4><a name="api:mono_profiler_enable_allocations">mono_profiler_enable_allocations</a></h4>
|
||||
|
||||
<p>A callback must be registered to receive allocation events.
|
||||
Please see the <i>Callback Registration</i> section below.
|
||||
|
||||
<h3>Call Instrumentation</h3>
|
||||
|
||||
<p>The JIT compiler supports instrumenting managed method entry
|
||||
and exit points so that a profiler callback will be invoked.
|
||||
|
||||
<p>While such callbacks by themselves have traditionally only
|
||||
been useful for call count profiling and the like, Mono gives
|
||||
these callbacks access to the arguments, locals, and return
|
||||
value of instrumented methods (together referred to as the 'call
|
||||
context'). This enables many profiling scenarios that would
|
||||
otherwise have required explicit hooks in the base class
|
||||
libraries.
|
||||
|
||||
<h4><a name="api:mono_profiler_set_call_instrumentation_filter_callback">mono_profiler_set_call_instrumentation_filter_callback</a></h4>
|
||||
<h4><a name="api:mono_profiler_enable_call_context_introspection">mono_profiler_enable_call_context_introspection</a></h4>
|
||||
<h4><a name="api:mono_profiler_call_context_get_this">mono_profiler_call_context_get_this</a></h4>
|
||||
<h4><a name="api:mono_profiler_call_context_get_argument">mono_profiler_call_context_get_argument</a></h4>
|
||||
<h4><a name="api:mono_profiler_call_context_get_local">mono_profiler_call_context_get_local</a></h4>
|
||||
<h4><a name="api:mono_profiler_call_context_get_result">mono_profiler_call_context_get_result</a></h4>
|
||||
<h4><a name="api:mono_profiler_call_context_free_buffer">mono_profiler_call_context_free_buffer</a></h4>
|
||||
|
||||
<p>Callbacks must be registered to receive method entry and exit
|
||||
events. Please see the <i>Callback Registration</i> section
|
||||
below.
|
||||
|
||||
<h3>Callback Registration</h3>
|
||||
|
||||
<p>In addition to the above functions, there's a large set of
|
||||
functions for installing generic profiler event callbacks. These
|
||||
are generated from C macros and so are not documented here.
|
||||
Please refer to the <code>mono/metadata/profiler.h</code> and
|
||||
<code>mono/metadata/profiler-events.h</code> headers for a full
|
||||
listing of these.
|
||||
|
||||
<p>Callback registration functions are all async safe and can be
|
||||
safely invoked from multiple threads at the same time, with the
|
||||
caveat that altering a registered callback from one thread will
|
||||
not immediately affect another thread that is already invoking
|
||||
the current callback.
|
||||
|
||||
<h2>API Stability</h2>
|
||||
|
||||
<p>The profiler API does not have the same API stability
|
||||
garantees that the rest of the Mono embedding API does. While
|
||||
a breaking change to the profiler API is extremely rare, it has
|
||||
happened in the past when changing the API in a backwards
|
||||
compatible way was deemed to be too much work for too little
|
||||
gain.
|
||||
|
||||
<p>Therefore, developers of profiler modules may rarely need to
|
||||
update their code to work with new versions of the profiler API.
|
||||
|
||||
<p>Developers who wish to support older versions of the API can
|
||||
perform a compile time check of the
|
||||
<code>MONO_PROFILER_API_VERSION</code> macro and maintain code
|
||||
for both old and new versions.
|
||||
|
||||
<p>To aid with transitioning to a new version of the profiler
|
||||
API, the Mono runtime will detect and reject loading profiler
|
||||
modules which were compiled against older profiler API versions.
|
||||
@@ -0,0 +1,22 @@
|
||||
/
|
||||
/depcomp
|
||||
/config.guess
|
||||
/config.sub
|
||||
/ltmain.sh
|
||||
/eglib-*.tar.gz
|
||||
/missing
|
||||
/install-sh
|
||||
/compile
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/stamp-h1
|
||||
/config.h.in
|
||||
/libtool
|
||||
/autom4te.cache
|
||||
/aclocal.m4
|
||||
/config.log
|
||||
/configure
|
||||
/config.h
|
||||
/config.status
|
||||
/INSTALL
|
||||
dolt*
|
||||
File renamed without changes.
@@ -0,0 +1,17 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
@@ -0,0 +1,5 @@
|
||||
AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
SUBDIRS = src
|
||||
|
||||
EXTRA_DIST = README NEWS AUTHORS winconfig.h
|
||||
@@ -0,0 +1,3 @@
|
||||
Release notes for Mono are hosted on the web, please see:
|
||||
|
||||
http://www.mono-project.com/docs/about-mono/releases/
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
The purpose of eglib is to be an X11-licensed subset of glib that can
|
||||
be used with Mono when the Mono runtime is explicitly relicensed under
|
||||
a different license by Novell.
|
||||
|
||||
The implementation is done from the public documentation available here:
|
||||
|
||||
http://developer.gnome.org/doc/API/2.0/glib/
|
||||
|
||||
Currently this is only being built standalone, use:
|
||||
|
||||
./autogen.sh --prefix=/tmp/test
|
||||
|
||||
Currently all the definitions go into a single file: glib.h, there are
|
||||
no separate files, please try to follow the convetions in the source code
|
||||
|
||||
* Tests
|
||||
|
||||
Please read the README in tests/
|
||||
|
||||
* Features
|
||||
|
||||
The source code is designed to allow for different operating
|
||||
system builds of the eglib code.
|
||||
|
||||
Files in src that:
|
||||
|
||||
* Have a plain name: are cross platform, and should work on
|
||||
every operating system.
|
||||
|
||||
* That end in -unix.c: These files contain Unix specific code.
|
||||
|
||||
* That end in -win32.c: These files contain Win32 specific code.
|
||||
|
||||
* That end in -posix.c: Will work on both Windows and Unix,
|
||||
but should not be included for other operating systems.
|
||||
|
||||
* Plans: short and long term.
|
||||
|
||||
The short term plans for eglib is to allow Mono to optionally
|
||||
build with it instead of using glib, gmodule and gthread, but
|
||||
the default build will continue to be done against glib 2.0.
|
||||
|
||||
In the long-term we are considering dropping glib as a
|
||||
dependency, considering that Mono requires a modern Unix
|
||||
system to run anyways (for its thread support) it would allow
|
||||
us to fix some of the glib API limitations we have to live
|
||||
with (explicit thread support for example), rework the API to
|
||||
use types from stdint.h and we would be able to drop three
|
||||
external shared libraries.
|
||||
|
||||
This would reduce memory usage for the handful of routines
|
||||
that we use from glib, dynamic linker overhead for those and
|
||||
would allow us to tune the implementation to Mono's needs.
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
* Missing code
|
||||
|
||||
* Process launching
|
||||
3 g_shell_quote
|
||||
1 g_shell_unquote
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
* Should implement, for better performance:
|
||||
|
||||
Macros:
|
||||
6 G_UNLIKELY
|
||||
4 G_LIKELY
|
||||
|
||||
* Unimplemented, not supported currently:
|
||||
|
||||
(none as yet.)
|
||||
|
||||
* Dead Code
|
||||
|
||||
The GMainLoop code was no longer in use in Mono.
|
||||
|
||||
* Windows implementations needed
|
||||
|
||||
Directory, File manipulation:
|
||||
|
||||
g_dir_open, g_dir_close, g_dir_read_name
|
||||
|
||||
We're missing a native windows implementation. The unix one is in place.
|
||||
|
||||
* Information retrieval
|
||||
1 g_win32_getlocale
|
||||
|
||||
File renamed without changes.
@@ -55,7 +55,7 @@ AM_CPPFLAGS = -I$(srcdir)
|
||||
if HOST_WIN32
|
||||
libeglib_la_LIBADD = -lm $(LIBICONV) -lpsapi
|
||||
else
|
||||
if HOST_ANDROID
|
||||
if PLATFORM_ANDROID
|
||||
libeglib_la_LIBADD = -llog
|
||||
endif
|
||||
endif
|
||||
@@ -37,11 +37,6 @@ typedef signed @GSIZE@ gssize;
|
||||
#define G_BREAKPOINT()
|
||||
#endif
|
||||
|
||||
#if defined (HOST_WASM)
|
||||
#undef G_BREAKPOINT
|
||||
#define G_BREAKPOINT() do { printf ("MONO: BREAKPOINT\n"); abort (); } while (0)
|
||||
#endif
|
||||
|
||||
typedef @PIDTYPE@ GPid;
|
||||
|
||||
#endif
|
||||
File renamed without changes.
@@ -129,7 +129,6 @@
|
||||
#define g_printerr monoeg_g_printerr
|
||||
#define g_propagate_error monoeg_g_propagate_error
|
||||
#define g_ptr_array_add monoeg_g_ptr_array_add
|
||||
#define g_ptr_array_capacity monoeg_g_ptr_array_capacity
|
||||
#define g_ptr_array_foreach monoeg_g_ptr_array_foreach
|
||||
#define g_ptr_array_free monoeg_g_ptr_array_free
|
||||
#define g_ptr_array_new monoeg_g_ptr_array_new
|
||||
@@ -261,7 +260,6 @@
|
||||
#define g_vasprintf monoeg_g_vasprintf
|
||||
#define g_win32_getlocale monoeg_g_win32_getlocale
|
||||
#define g_assertion_message monoeg_assertion_message
|
||||
#define g_get_assertion_message monoeg_get_assertion_message
|
||||
#define g_malloc monoeg_malloc
|
||||
#define g_malloc0 monoeg_malloc0
|
||||
#define g_ptr_array_grow monoeg_ptr_array_grow
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -42,20 +42,20 @@ struct _GDir {
|
||||
};
|
||||
|
||||
GDir *
|
||||
g_dir_open (const gchar *path, guint flags, GError **gerror)
|
||||
g_dir_open (const gchar *path, guint flags, GError **error)
|
||||
{
|
||||
GDir *dir;
|
||||
|
||||
g_return_val_if_fail (path != NULL, NULL);
|
||||
g_return_val_if_fail (gerror == NULL || *gerror == NULL, NULL);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
|
||||
|
||||
(void) flags; /* this is not used */
|
||||
dir = g_new (GDir, 1);
|
||||
dir->dir = opendir (path);
|
||||
if (dir->dir == NULL) {
|
||||
if (gerror) {
|
||||
if (error) {
|
||||
gint err = errno;
|
||||
*gerror = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
|
||||
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
|
||||
}
|
||||
g_free (dir);
|
||||
return NULL;
|
||||
@@ -42,7 +42,7 @@ struct _GDir {
|
||||
};
|
||||
|
||||
GDir *
|
||||
g_dir_open (const gchar *path, guint flags, GError **gerror)
|
||||
g_dir_open (const gchar *path, guint flags, GError **error)
|
||||
{
|
||||
GDir *dir;
|
||||
gunichar2* path_utf16;
|
||||
@@ -50,7 +50,7 @@ g_dir_open (const gchar *path, guint flags, GError **gerror)
|
||||
WIN32_FIND_DATAW find_data;
|
||||
|
||||
g_return_val_if_fail (path != NULL, NULL);
|
||||
g_return_val_if_fail (gerror == NULL || *gerror == NULL, NULL);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
|
||||
|
||||
dir = g_new0 (GDir, 1);
|
||||
path_utf16 = u8to16 (path);
|
||||
@@ -60,9 +60,9 @@ g_dir_open (const gchar *path, guint flags, GError **gerror)
|
||||
|
||||
dir->handle = FindFirstFileW (path_utf16_search, &find_data);
|
||||
if (dir->handle == INVALID_HANDLE_VALUE) {
|
||||
if (gerror) {
|
||||
if (error) {
|
||||
gint err = errno;
|
||||
*gerror = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
|
||||
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
|
||||
}
|
||||
g_free (path_utf16_search);
|
||||
g_free (path_utf16);
|
||||
@@ -74,9 +74,9 @@ g_dir_open (const gchar *path, guint flags, GError **gerror)
|
||||
|
||||
while ((wcscmp ((wchar_t *) find_data.cFileName, L".") == 0) || (wcscmp ((wchar_t *) find_data.cFileName, L"..") == 0)) {
|
||||
if (!FindNextFileW (dir->handle, &find_data)) {
|
||||
if (gerror) {
|
||||
if (error) {
|
||||
gint err = errno;
|
||||
*gerror = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
|
||||
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
|
||||
}
|
||||
g_free (dir);
|
||||
return NULL;
|
||||
@@ -62,21 +62,21 @@ g_error_vnew (gpointer domain, gint code, const char *format, va_list ap)
|
||||
}
|
||||
|
||||
void
|
||||
g_clear_error (GError **gerror)
|
||||
g_clear_error (GError **error)
|
||||
{
|
||||
if (gerror && *gerror) {
|
||||
g_error_free (*gerror);
|
||||
*gerror = NULL;
|
||||
if (error && *error) {
|
||||
g_error_free (*error);
|
||||
*error = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
g_error_free (GError *gerror)
|
||||
g_error_free (GError *error)
|
||||
{
|
||||
g_return_if_fail (gerror != NULL);
|
||||
g_return_if_fail (error != NULL);
|
||||
|
||||
g_free (gerror->message);
|
||||
g_free (gerror);
|
||||
g_free (error->message);
|
||||
g_free (error);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -50,7 +50,7 @@ int mkstemp (char *tmp_template);
|
||||
#define OPEN_FLAGS (O_RDONLY | O_LARGEFILE)
|
||||
#endif
|
||||
gboolean
|
||||
g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GError **gerror)
|
||||
g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GError **error)
|
||||
{
|
||||
gchar *str;
|
||||
int fd;
|
||||
@@ -60,7 +60,7 @@ g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GEr
|
||||
|
||||
g_return_val_if_fail (filename != NULL, FALSE);
|
||||
g_return_val_if_fail (contents != NULL, FALSE);
|
||||
g_return_val_if_fail (gerror == NULL || *gerror == NULL, FALSE);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
*contents = NULL;
|
||||
if (length)
|
||||
@@ -68,17 +68,17 @@ g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GEr
|
||||
|
||||
fd = open (filename, OPEN_FLAGS);
|
||||
if (fd == -1) {
|
||||
if (gerror != NULL) {
|
||||
if (error != NULL) {
|
||||
int err = errno;
|
||||
*gerror = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), "Error opening file");
|
||||
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), "Error opening file");
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (fstat (fd, &st) != 0) {
|
||||
if (gerror != NULL) {
|
||||
if (error != NULL) {
|
||||
int err = errno;
|
||||
*gerror = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), "Error in fstat()");
|
||||
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), "Error in fstat()");
|
||||
}
|
||||
close (fd);
|
||||
return FALSE;
|
||||
@@ -103,29 +103,29 @@ g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GEr
|
||||
}
|
||||
|
||||
gint
|
||||
g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **gerror)
|
||||
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;
|
||||
|
||||
g_return_val_if_fail (gerror == NULL || *gerror == NULL, -1);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, -1);
|
||||
|
||||
if (tmpl == NULL)
|
||||
tmpl = default_tmpl;
|
||||
|
||||
if (strchr (tmpl, G_DIR_SEPARATOR) != NULL) {
|
||||
if (gerror) {
|
||||
*gerror = g_error_new (G_LOG_DOMAIN, 24, "Template should not have any " G_DIR_SEPARATOR_S);
|
||||
if (error) {
|
||||
*error = g_error_new (G_LOG_DOMAIN, 24, "Template should not have any " G_DIR_SEPARATOR_S);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
len = strlen (tmpl);
|
||||
if (len < 6 || strcmp (tmpl + len - 6, "XXXXXX")) {
|
||||
if (gerror) {
|
||||
*gerror = g_error_new (G_LOG_DOMAIN, 24, "Template should end with XXXXXX");
|
||||
if (error) {
|
||||
*error = g_error_new (G_LOG_DOMAIN, 24, "Template should end with XXXXXX");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -135,9 +135,9 @@ g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **gerror)
|
||||
fd = mkstemp (t);
|
||||
|
||||
if (fd == -1) {
|
||||
if (gerror) {
|
||||
if (error) {
|
||||
int err = errno;
|
||||
*gerror = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), "Error in mkstemp()");
|
||||
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), "Error in mkstemp()");
|
||||
}
|
||||
g_free (t);
|
||||
return -1;
|
||||
@@ -79,19 +79,6 @@ g_file_test (const gchar *filename, GFileTest test)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef _AIX
|
||||
/* HACK: the preprocessor will not give us mkdtemp no matter
|
||||
what and Mono (for good reason) does
|
||||
"-Werror-implicit-function-declaration" so we error out;
|
||||
instead declare mkdtemp here; the linker will find mkdtemp
|
||||
anwyays. libuv has had similar issues, but they just ignore
|
||||
the compiler warning instead of failing on it.
|
||||
|
||||
See: github.com/libuv/libuv/pull/740 */
|
||||
|
||||
extern char *mkdtemp(char *);
|
||||
#endif
|
||||
|
||||
gchar *
|
||||
g_mkdtemp (char *tmp_template)
|
||||
{
|
||||
@@ -100,6 +87,6 @@ g_mkdtemp (char *tmp_template)
|
||||
|
||||
return mkdtemp (template_copy);
|
||||
#else
|
||||
g_error("Function mkdtemp not supported");
|
||||
g_error("Function not supported");
|
||||
#endif
|
||||
}
|
||||
File renamed without changes.
@@ -36,7 +36,7 @@
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
static gpointer error_quark = (gpointer)"FileError";
|
||||
static gpointer error_quark = "FileError";
|
||||
|
||||
gpointer
|
||||
g_file_error_quark (void)
|
||||
File renamed without changes.
@@ -254,16 +254,8 @@ g_iconv (GIConv cd, gchar **inbytes, gsize *inbytesleft,
|
||||
* Unicode encoders and decoders
|
||||
*/
|
||||
|
||||
static FORCE_INLINE (uint32_t)
|
||||
read_uint32_endian (unsigned char *inptr, unsigned endian)
|
||||
{
|
||||
if (endian == G_LITTLE_ENDIAN)
|
||||
return (inptr[3] << 24) | (inptr[2] << 16) | (inptr[1] << 8) | inptr[0];
|
||||
return (inptr[0] << 24) | (inptr[1] << 16) | (inptr[2] << 8) | inptr[3];
|
||||
}
|
||||
|
||||
static int
|
||||
decode_utf32_endian (char *inbuf, size_t inleft, gunichar *outchar, unsigned endian)
|
||||
decode_utf32be (char *inbuf, size_t inleft, gunichar *outchar)
|
||||
{
|
||||
unsigned char *inptr = (unsigned char *) inbuf;
|
||||
gunichar c;
|
||||
@@ -273,7 +265,7 @@ decode_utf32_endian (char *inbuf, size_t inleft, gunichar *outchar, unsigned end
|
||||
return -1;
|
||||
}
|
||||
|
||||
c = read_uint32_endian (inptr, endian);
|
||||
c = (inptr[0] << 24) | (inptr[1] << 16) | (inptr[2] << 8) | inptr[3];
|
||||
|
||||
if (c >= 0xd800 && c < 0xe000) {
|
||||
errno = EILSEQ;
|
||||
@@ -288,16 +280,30 @@ decode_utf32_endian (char *inbuf, size_t inleft, gunichar *outchar, unsigned end
|
||||
return 4;
|
||||
}
|
||||
|
||||
static int
|
||||
decode_utf32be (char *inbuf, size_t inleft, gunichar *outchar)
|
||||
{
|
||||
return decode_utf32_endian (inbuf, inleft, outchar, G_BIG_ENDIAN);
|
||||
}
|
||||
|
||||
static int
|
||||
decode_utf32le (char *inbuf, size_t inleft, gunichar *outchar)
|
||||
{
|
||||
return decode_utf32_endian (inbuf, inleft, outchar, G_LITTLE_ENDIAN);
|
||||
unsigned char *inptr = (unsigned char *) inbuf;
|
||||
gunichar c;
|
||||
|
||||
if (inleft < 4) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
c = (inptr[3] << 24) | (inptr[2] << 16) | (inptr[1] << 8) | inptr[0];
|
||||
|
||||
if (c >= 0xd800 && c < 0xe000) {
|
||||
errno = EILSEQ;
|
||||
return -1;
|
||||
} else if (c >= 0x110000) {
|
||||
errno = EILSEQ;
|
||||
return -1;
|
||||
}
|
||||
|
||||
*outchar = c;
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -336,16 +342,8 @@ encode_utf32le (gunichar c, char *outbuf, size_t outleft)
|
||||
return 4;
|
||||
}
|
||||
|
||||
static FORCE_INLINE (uint16_t)
|
||||
read_uint16_endian (unsigned char *inptr, unsigned endian)
|
||||
{
|
||||
if (endian == G_LITTLE_ENDIAN)
|
||||
return (inptr[1] << 8) | inptr[0];
|
||||
return (inptr[0] << 8) | inptr[1];
|
||||
}
|
||||
|
||||
static FORCE_INLINE (int)
|
||||
decode_utf16_endian (char *inbuf, size_t inleft, gunichar *outchar, unsigned endian)
|
||||
static int
|
||||
decode_utf16be (char *inbuf, size_t inleft, gunichar *outchar)
|
||||
{
|
||||
unsigned char *inptr = (unsigned char *) inbuf;
|
||||
gunichar2 c;
|
||||
@@ -356,7 +354,7 @@ decode_utf16_endian (char *inbuf, size_t inleft, gunichar *outchar, unsigned end
|
||||
return -1;
|
||||
}
|
||||
|
||||
u = read_uint16_endian (inptr, endian);
|
||||
u = (inptr[0] << 8) | inptr[1];
|
||||
|
||||
if (u < 0xd800) {
|
||||
/* 0x0000 -> 0xd7ff */
|
||||
@@ -369,7 +367,7 @@ decode_utf16_endian (char *inbuf, size_t inleft, gunichar *outchar, unsigned end
|
||||
return -2;
|
||||
}
|
||||
|
||||
c = read_uint16_endian (inptr + 2, endian);
|
||||
c = (inptr[2] << 8) | inptr[3];
|
||||
|
||||
if (c < 0xdc00 || c > 0xdfff) {
|
||||
errno = EILSEQ;
|
||||
@@ -392,31 +390,54 @@ decode_utf16_endian (char *inbuf, size_t inleft, gunichar *outchar, unsigned end
|
||||
}
|
||||
|
||||
static int
|
||||
decode_utf16be (char *inbuf, size_t inleft, gunichar *outchar)
|
||||
decode_utf16le (char *inbuf, size_t inleft, gunichar *outchar)
|
||||
{
|
||||
return decode_utf16_endian (inbuf, inleft, outchar, G_BIG_ENDIAN);
|
||||
unsigned char *inptr = (unsigned char *) inbuf;
|
||||
gunichar2 c;
|
||||
gunichar u;
|
||||
|
||||
if (inleft < 2) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
u = (inptr[1] << 8) | inptr[0];
|
||||
|
||||
if (u < 0xd800) {
|
||||
/* 0x0000 -> 0xd7ff */
|
||||
*outchar = u;
|
||||
return 2;
|
||||
} else if (u < 0xdc00) {
|
||||
/* 0xd800 -> 0xdbff */
|
||||
if (inleft < 4) {
|
||||
errno = EINVAL;
|
||||
return -2;
|
||||
}
|
||||
|
||||
c = (inptr[3] << 8) | inptr[2];
|
||||
|
||||
if (c < 0xdc00 || c > 0xdfff) {
|
||||
errno = EILSEQ;
|
||||
return -2;
|
||||
}
|
||||
|
||||
u = ((u - 0xd800) << 10) + (c - 0xdc00) + 0x0010000UL;
|
||||
*outchar = u;
|
||||
|
||||
return 4;
|
||||
} else if (u < 0xe000) {
|
||||
/* 0xdc00 -> 0xdfff */
|
||||
errno = EILSEQ;
|
||||
return -1;
|
||||
} else {
|
||||
/* 0xe000 -> 0xffff */
|
||||
*outchar = u;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
decode_utf16le (char *inbuf, size_t inleft, gunichar *outchar)
|
||||
{
|
||||
return decode_utf16_endian (inbuf, inleft, outchar, G_LITTLE_ENDIAN);
|
||||
}
|
||||
|
||||
static FORCE_INLINE (void)
|
||||
write_uint16_endian (unsigned char *outptr, uint16_t c, unsigned endian)
|
||||
{
|
||||
if (endian == G_LITTLE_ENDIAN) {
|
||||
outptr[0] = c & 0xff;
|
||||
outptr[1] = (c >> 8) & 0xff;
|
||||
return;
|
||||
}
|
||||
outptr[0] = (c >> 8) & 0xff;
|
||||
outptr[1] = c & 0xff;
|
||||
}
|
||||
|
||||
static FORCE_INLINE (int)
|
||||
encode_utf16_endian (gunichar c, char *outbuf, size_t outleft, unsigned endian)
|
||||
encode_utf16be (gunichar c, char *outbuf, size_t outleft)
|
||||
{
|
||||
unsigned char *outptr = (unsigned char *) outbuf;
|
||||
gunichar2 ch;
|
||||
@@ -428,7 +449,9 @@ encode_utf16_endian (gunichar c, char *outbuf, size_t outleft, unsigned endian)
|
||||
return -1;
|
||||
}
|
||||
|
||||
write_uint16_endian (outptr, c, endian);
|
||||
outptr[0] = (c >> 8) & 0xff;
|
||||
outptr[1] = c & 0xff;
|
||||
|
||||
return 2;
|
||||
} else {
|
||||
if (outleft < 4) {
|
||||
@@ -439,24 +462,52 @@ encode_utf16_endian (gunichar c, char *outbuf, size_t outleft, unsigned endian)
|
||||
c2 = c - 0x10000;
|
||||
|
||||
ch = (gunichar2) ((c2 >> 10) + 0xd800);
|
||||
write_uint16_endian (outptr, ch, endian);
|
||||
|
||||
outptr[0] = (ch >> 8) & 0xff;
|
||||
outptr[1] = ch & 0xff;
|
||||
|
||||
ch = (gunichar2) ((c2 & 0x3ff) + 0xdc00);
|
||||
write_uint16_endian (outptr + 2, ch, endian);
|
||||
outptr[2] = (ch >> 8) & 0xff;
|
||||
outptr[3] = ch & 0xff;
|
||||
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
encode_utf16be (gunichar c, char *outbuf, size_t outleft)
|
||||
{
|
||||
return encode_utf16_endian (c, outbuf, outleft, G_BIG_ENDIAN);
|
||||
}
|
||||
|
||||
static int
|
||||
encode_utf16le (gunichar c, char *outbuf, size_t outleft)
|
||||
{
|
||||
return encode_utf16_endian (c, outbuf, outleft, G_LITTLE_ENDIAN);
|
||||
unsigned char *outptr = (unsigned char *) outbuf;
|
||||
gunichar2 ch;
|
||||
gunichar c2;
|
||||
|
||||
if (c < 0x10000) {
|
||||
if (outleft < 2) {
|
||||
errno = E2BIG;
|
||||
return -1;
|
||||
}
|
||||
|
||||
outptr[0] = c & 0xff;
|
||||
outptr[1] = (c >> 8) & 0xff;
|
||||
|
||||
return 2;
|
||||
} else {
|
||||
if (outleft < 4) {
|
||||
errno = E2BIG;
|
||||
return -1;
|
||||
}
|
||||
|
||||
c2 = c - 0x10000;
|
||||
|
||||
ch = (gunichar2) ((c2 >> 10) + 0xd800);
|
||||
outptr[0] = ch & 0xff;
|
||||
outptr[1] = (ch >> 8) & 0xff;
|
||||
|
||||
ch = (gunichar2) ((c2 & 0x3ff) + 0xdc00);
|
||||
outptr[2] = ch & 0xff;
|
||||
outptr[3] = (ch >> 8) & 0xff;
|
||||
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
static FORCE_INLINE (int)
|
||||
@@ -600,7 +651,7 @@ encode_latin1 (gunichar c, char *outbuf, size_t outleft)
|
||||
* Simple conversion API
|
||||
*/
|
||||
|
||||
static gpointer error_quark = (gpointer)"ConvertError";
|
||||
static gpointer error_quark = "ConvertError";
|
||||
|
||||
gpointer
|
||||
g_convert_error_quark (void)
|
||||
@@ -833,7 +884,7 @@ g_utf8_to_ucs4_fast (const gchar *str, glong len, glong *items_written)
|
||||
}
|
||||
|
||||
static gunichar2 *
|
||||
eg_utf8_to_utf16_general (const gchar *str, glong len, glong *items_read, glong *items_written, gboolean include_nuls, gboolean replace_invalid_codepoints, GError **err)
|
||||
eg_utf8_to_utf16_general (const gchar *str, glong len, glong *items_read, glong *items_written, gboolean include_nuls, GError **err)
|
||||
{
|
||||
gunichar2 *outbuf, *outptr;
|
||||
size_t outlen = 0;
|
||||
@@ -864,12 +915,8 @@ eg_utf8_to_utf16_general (const gchar *str, glong len, glong *items_read, glong
|
||||
break;
|
||||
|
||||
if ((u = g_unichar_to_utf16 (c, NULL)) < 0) {
|
||||
if (replace_invalid_codepoints) {
|
||||
u = 2;
|
||||
} else {
|
||||
errno = EILSEQ;
|
||||
goto error;
|
||||
}
|
||||
errno = EILSEQ;
|
||||
goto error;
|
||||
}
|
||||
|
||||
outlen += u;
|
||||
@@ -894,14 +941,7 @@ eg_utf8_to_utf16_general (const gchar *str, glong len, glong *items_read, glong
|
||||
if (c == 0 && !include_nuls)
|
||||
break;
|
||||
|
||||
u = g_unichar_to_utf16 (c, outptr);
|
||||
if ((u < 0) && replace_invalid_codepoints) {
|
||||
outptr[0] = 0xFFFD;
|
||||
outptr[1] = 0xFFFD;
|
||||
u = 2;
|
||||
}
|
||||
|
||||
outptr += u;
|
||||
outptr += g_unichar_to_utf16 (c, outptr);
|
||||
inleft -= n;
|
||||
inptr += n;
|
||||
}
|
||||
@@ -933,19 +973,13 @@ eg_utf8_to_utf16_general (const gchar *str, glong len, glong *items_read, glong
|
||||
gunichar2 *
|
||||
g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err)
|
||||
{
|
||||
return eg_utf8_to_utf16_general (str, len, items_read, items_written, FALSE, FALSE, err);
|
||||
return eg_utf8_to_utf16_general (str, len, items_read, items_written, FALSE, err);
|
||||
}
|
||||
|
||||
gunichar2 *
|
||||
eg_utf8_to_utf16_with_nuls (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err)
|
||||
{
|
||||
return eg_utf8_to_utf16_general (str, len, items_read, items_written, TRUE, FALSE, err);
|
||||
}
|
||||
|
||||
gunichar2 *
|
||||
eg_wtf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err)
|
||||
{
|
||||
return eg_utf8_to_utf16_general (str, len, items_read, items_written, TRUE, TRUE, err);
|
||||
return eg_utf8_to_utf16_general (str, len, items_read, items_written, TRUE, err);
|
||||
}
|
||||
|
||||
gunichar *
|
||||
@@ -185,8 +185,8 @@ typedef struct {
|
||||
gchar *message;
|
||||
} GError;
|
||||
|
||||
void g_clear_error (GError **gerror);
|
||||
void g_error_free (GError *gerror);
|
||||
void g_clear_error (GError **error);
|
||||
void g_error_free (GError *error);
|
||||
GError *g_error_new (gpointer domain, gint code, const char *format, ...);
|
||||
void g_set_error (GError **err, gpointer domain, gint code, const gchar *format, ...);
|
||||
void g_propagate_error (GError **dest, GError *src);
|
||||
@@ -217,8 +217,8 @@ gchar *g_strnfill (gsize length, gchar fill_char);
|
||||
gchar *g_strdelimit (gchar *string, const gchar *delimiters, gchar new_delimiter);
|
||||
gchar *g_strescape (const gchar *source, const gchar *exceptions);
|
||||
|
||||
gchar *g_filename_to_uri (const gchar *filename, const gchar *hostname, GError **gerror);
|
||||
gchar *g_filename_from_uri (const gchar *uri, gchar **hostname, GError **gerror);
|
||||
gchar *g_filename_to_uri (const gchar *filename, const gchar *hostname, GError **error);
|
||||
gchar *g_filename_from_uri (const gchar *uri, gchar **hostname, GError **error);
|
||||
|
||||
gint g_printf (gchar const *format, ...);
|
||||
gint g_fprintf (FILE *file, gchar const *format, ...);
|
||||
@@ -245,8 +245,6 @@ gint g_ascii_xdigit_value (gchar c);
|
||||
#define g_ascii_isalpha(c) (isalpha (c) != 0)
|
||||
#define g_ascii_isprint(c) (isprint (c) != 0)
|
||||
#define g_ascii_isxdigit(c) (isxdigit (c) != 0)
|
||||
gboolean g_utf16_ascii_equal (const gunichar2 *utf16, size_t ulen, const char *ascii, size_t alen);
|
||||
gboolean g_utf16_asciiz_equal (const gunichar2 *utf16, const char *ascii);
|
||||
|
||||
/* FIXME: g_strcasecmp supports utf8 unicode stuff */
|
||||
#ifdef _MSC_VER
|
||||
@@ -526,7 +524,6 @@ void g_ptr_array_sort_with_data (GPtrArray *array, GCompareDataFunc co
|
||||
void g_ptr_array_set_size (GPtrArray *array, gint length);
|
||||
gpointer *g_ptr_array_free (GPtrArray *array, gboolean free_seg);
|
||||
void g_ptr_array_foreach (GPtrArray *array, GFunc func, gpointer user_data);
|
||||
guint g_ptr_array_capacity (GPtrArray *array);
|
||||
#define g_ptr_array_index(array,index) (array)->pdata[(index)]
|
||||
|
||||
/*
|
||||
@@ -576,7 +573,6 @@ 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, ...);
|
||||
void g_assertion_message (const gchar *format, ...) G_GNUC_NORETURN;
|
||||
const char * g_get_assertion_message (void);
|
||||
|
||||
#ifdef HAVE_C99_SUPPORT
|
||||
/* The for (;;) tells gc thats g_error () doesn't return, avoiding warnings */
|
||||
@@ -722,37 +718,9 @@ GUnicodeBreakType g_unichar_break_type (gunichar c);
|
||||
#define eg_unreachable()
|
||||
#endif
|
||||
|
||||
/* Old version. Preserved for testing and history. */
|
||||
|
||||
/* g_assert is a boolean expression; the precise value is not preserved, just true or false. */
|
||||
#define g_assert(x) \
|
||||
(G_LIKELY(x) ? 1 : (g_assertion_message ( \
|
||||
"* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, #x), 0))
|
||||
|
||||
#define g_assert(x) G_STMT_START { if (G_UNLIKELY (!(x))) g_assertion_message ("* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, #x); } G_STMT_END
|
||||
#define g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); eg_unreachable(); } G_STMT_END
|
||||
|
||||
/* f is format -- like printf and scanf
|
||||
* Where you might have said:
|
||||
* if (!(expr))
|
||||
* g_error("%s invalid bar:%d", __func__, bar)
|
||||
*
|
||||
* You can say:
|
||||
* g_assertf(expr, "bar:%d", bar);
|
||||
*
|
||||
* The usual assertion text of file/line/expr/newline are builtin, and __func__.
|
||||
*
|
||||
* g_assertf is a boolean expression -- the precise value is not preserved, just true or false.
|
||||
*
|
||||
* Other than expr, the parameters are not evaluated unless expr is false.
|
||||
*
|
||||
* format must be a string literal, in order to be concatenated.
|
||||
* If this is too restrictive, g_error remains.
|
||||
*/
|
||||
#define g_assertf(x, format, ...) \
|
||||
(G_LIKELY(x) ? 1 : (g_assertion_message ( \
|
||||
"* Assertion at %s:%d, condition `%s' not met, function:%s, " format "\n", \
|
||||
__FILE__, __LINE__, #x, __func__, __VA_ARGS__), 0))
|
||||
|
||||
/*
|
||||
* Unicode conversion
|
||||
*/
|
||||
@@ -775,7 +743,6 @@ gunichar *g_utf8_to_ucs4_fast (const gchar *str, glong len, glong *items_writte
|
||||
gunichar *g_utf8_to_ucs4 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err);
|
||||
gunichar2 *g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err);
|
||||
gunichar2 *eg_utf8_to_utf16_with_nuls (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err);
|
||||
gunichar2 *eg_wtf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err);
|
||||
gchar *g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **err);
|
||||
gunichar *g_utf16_to_ucs4 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **err);
|
||||
gchar *g_ucs4_to_utf8 (const gunichar *str, glong len, glong *items_read, glong *items_written, GError **err);
|
||||
@@ -812,8 +779,8 @@ gboolean g_ensure_directory_exists (const gchar *filename);
|
||||
* Shell
|
||||
*/
|
||||
|
||||
gboolean g_shell_parse_argv (const gchar *command_line, gint *argcp, gchar ***argvp, GError **gerror);
|
||||
gchar *g_shell_unquote (const gchar *quoted_string, GError **gerror);
|
||||
gboolean g_shell_parse_argv (const gchar *command_line, gint *argcp, gchar ***argvp, GError **error);
|
||||
gchar *g_shell_unquote (const gchar *quoted_string, GError **error);
|
||||
gchar *g_shell_quote (const gchar *unquoted_string);
|
||||
|
||||
/*
|
||||
@@ -831,9 +798,9 @@ typedef enum {
|
||||
|
||||
typedef void (*GSpawnChildSetupFunc) (gpointer user_data);
|
||||
|
||||
gboolean g_spawn_command_line_sync (const gchar *command_line, gchar **standard_output, gchar **standard_error, gint *exit_status, GError **gerror);
|
||||
gboolean g_spawn_command_line_sync (const gchar *command_line, gchar **standard_output, gchar **standard_error, gint *exit_status, GError **error);
|
||||
gboolean g_spawn_async_with_pipes (const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup,
|
||||
gpointer user_data, GPid *child_pid, gint *standard_input, gint *standard_output, gint *standard_error, GError **gerror);
|
||||
gpointer user_data, GPid *child_pid, gint *standard_input, gint *standard_output, gint *standard_error, GError **error);
|
||||
|
||||
int eg_getdtablesize (void);
|
||||
|
||||
@@ -904,10 +871,10 @@ typedef enum {
|
||||
} GFileTest;
|
||||
|
||||
|
||||
gboolean g_file_set_contents (const gchar *filename, const gchar *contents, gssize length, GError **gerror);
|
||||
gboolean g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GError **gerror);
|
||||
gboolean g_file_set_contents (const gchar *filename, const gchar *contents, gssize length, GError **error);
|
||||
gboolean g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GError **error);
|
||||
GFileError g_file_error_from_errno (gint err_no);
|
||||
gint g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **gerror);
|
||||
gint g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **error);
|
||||
gboolean g_file_test (const gchar *filename, GFileTest test);
|
||||
|
||||
#define g_open open
|
||||
@@ -936,7 +903,7 @@ gboolean g_pattern_match_string (GPatternSpec *pspec, const gchar *string)
|
||||
* Directory
|
||||
*/
|
||||
typedef struct _GDir GDir;
|
||||
GDir *g_dir_open (const gchar *path, guint flags, GError **gerror);
|
||||
GDir *g_dir_open (const gchar *path, guint flags, GError **error);
|
||||
const gchar *g_dir_read_name (GDir *dir);
|
||||
void g_dir_rewind (GDir *dir);
|
||||
void g_dir_close (GDir *dir);
|
||||
@@ -961,26 +928,26 @@ typedef struct {
|
||||
const gchar **attribute_names,
|
||||
const gchar **attribute_values,
|
||||
gpointer user_data,
|
||||
GError **gerror);
|
||||
GError **error);
|
||||
|
||||
void (*end_element) (GMarkupParseContext *context,
|
||||
const gchar *element_name,
|
||||
gpointer user_data,
|
||||
GError **gerror);
|
||||
GError **error);
|
||||
|
||||
void (*text) (GMarkupParseContext *context,
|
||||
const gchar *text,
|
||||
gsize text_len,
|
||||
gpointer user_data,
|
||||
GError **gerror);
|
||||
GError **error);
|
||||
|
||||
void (*passthrough) (GMarkupParseContext *context,
|
||||
const gchar *passthrough_text,
|
||||
gsize text_len,
|
||||
gpointer user_data,
|
||||
GError **gerror);
|
||||
GError **error);
|
||||
void (*error) (GMarkupParseContext *context,
|
||||
GError *gerror,
|
||||
GError *error,
|
||||
gpointer user_data);
|
||||
} GMarkupParser;
|
||||
|
||||
@@ -991,9 +958,9 @@ GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser,
|
||||
void g_markup_parse_context_free (GMarkupParseContext *context);
|
||||
gboolean g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
const gchar *text, gssize text_len,
|
||||
GError **gerror);
|
||||
GError **error);
|
||||
gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context,
|
||||
GError **gerror);
|
||||
GError **error);
|
||||
|
||||
/*
|
||||
* Character set conversion
|
||||
@@ -1007,14 +974,14 @@ int g_iconv_close (GIConv cd);
|
||||
gboolean g_get_charset (G_CONST_RETURN char **charset);
|
||||
gchar *g_locale_to_utf8 (const gchar *opsysstring, gssize len,
|
||||
gsize *bytes_read, gsize *bytes_written,
|
||||
GError **gerror);
|
||||
GError **error);
|
||||
gchar *g_locale_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read,
|
||||
gsize *bytes_written, GError **gerror);
|
||||
gsize *bytes_written, GError **error);
|
||||
gchar *g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read,
|
||||
gsize *bytes_written, GError **gerror);
|
||||
gsize *bytes_written, GError **error);
|
||||
gchar *g_convert (const gchar *str, gssize len,
|
||||
const gchar *to_codeset, const gchar *from_codeset,
|
||||
gsize *bytes_read, gsize *bytes_written, GError **gerror);
|
||||
gsize *bytes_read, gsize *bytes_written, GError **error);
|
||||
|
||||
/*
|
||||
* Unicode manipulation
|
||||
File renamed without changes.
@@ -43,7 +43,7 @@
|
||||
#include <ctype.h>
|
||||
#include <glib.h>
|
||||
|
||||
#define set_error(msg, ...) do { if (gerror != NULL) *gerror = 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, __VA_ARGS__); } while (0);
|
||||
|
||||
typedef enum {
|
||||
START,
|
||||
@@ -127,24 +127,6 @@ my_isalpha (char c)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
my_isnamestartchar (char c)
|
||||
{
|
||||
/* NameStartChar from https://www.w3.org/TR/xml/#sec-common-syn excluding non-ASCII and ':' */
|
||||
if (my_isalpha (c) || c == '_')
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
my_isnamechar (char c)
|
||||
{
|
||||
/* NameChar from https://www.w3.org/TR/xml/#sec-common-syn excluding non-ASCII and ':' */
|
||||
if (my_isalnum (c) || c == '_' || c == '-' || c == '.')
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static const char *
|
||||
skip_space (const char *p, const char *end)
|
||||
{
|
||||
@@ -154,7 +136,7 @@ skip_space (const char *p, const char *end)
|
||||
}
|
||||
|
||||
static const char *
|
||||
parse_value (const char *p, const char *end, char **value, GError **gerror)
|
||||
parse_value (const char *p, const char *end, char **value, GError **error)
|
||||
{
|
||||
const char *start;
|
||||
int l;
|
||||
@@ -184,9 +166,8 @@ parse_name (const char *p, const char *end, char **value)
|
||||
const char *start = p;
|
||||
int l;
|
||||
|
||||
if (p < end && my_isnamestartchar (*p))
|
||||
for (; p < end && my_isnamechar (*p); p++)
|
||||
;
|
||||
for (; p < end && my_isalnum (*p); p++)
|
||||
;
|
||||
if (p == end)
|
||||
return end;
|
||||
|
||||
@@ -200,7 +181,7 @@ parse_name (const char *p, const char *end, char **value)
|
||||
}
|
||||
|
||||
static const char *
|
||||
parse_attributes (const char *p, const char *end, char ***names, char ***values, GError **gerror, int *full_stop, int state)
|
||||
parse_attributes (const char *p, const char *end, char ***names, char ***values, GError **error, int *full_stop, int state)
|
||||
{
|
||||
int nnames = 0;
|
||||
|
||||
@@ -245,7 +226,7 @@ parse_attributes (const char *p, const char *end, char ***names, char ***values,
|
||||
return end;
|
||||
}
|
||||
|
||||
p = parse_value (p, end, &value, gerror);
|
||||
p = parse_value (p, end, &value, error);
|
||||
if (p == end){
|
||||
g_free (name);
|
||||
return p;
|
||||
@@ -280,7 +261,7 @@ destroy_parse_state (GMarkupParseContext *context)
|
||||
gboolean
|
||||
g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
const gchar *text, gssize text_len,
|
||||
GError **gerror)
|
||||
GError **error)
|
||||
{
|
||||
const char *p, *end;
|
||||
|
||||
@@ -328,12 +309,12 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
break;
|
||||
}
|
||||
|
||||
if (!my_isnamestartchar (*p)){
|
||||
if (!my_isalpha (*p)){
|
||||
set_error ("%s", "Expected an element name");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
for (++p; p < end && my_isnamechar (*p); p++)
|
||||
for (++p; p < end && (my_isalnum (*p) || (*p == '.')); p++)
|
||||
;
|
||||
if (p == end){
|
||||
set_error ("%s", "Expected an element");
|
||||
@@ -347,14 +328,14 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
set_error ("%s", "Unfinished element");
|
||||
goto fail;
|
||||
}
|
||||
p = parse_attributes (p, end, &names, &values, gerror, &full_stop, context->state);
|
||||
p = parse_attributes (p, end, &names, &values, error, &full_stop, context->state);
|
||||
if (p == end){
|
||||
if (names != NULL) {
|
||||
g_strfreev (names);
|
||||
g_strfreev (values);
|
||||
}
|
||||
/* Only set the error if parse_attributes did not */
|
||||
if (gerror != NULL && *gerror == NULL)
|
||||
if (error != NULL && *error == NULL)
|
||||
set_error ("%s", "Unfinished sequence");
|
||||
goto fail;
|
||||
}
|
||||
@@ -370,22 +351,22 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
context->parser.start_element (context, ename,
|
||||
(const gchar **) names,
|
||||
(const gchar **) values,
|
||||
context->user_data, gerror);
|
||||
context->user_data, error);
|
||||
|
||||
if (names != NULL){
|
||||
g_strfreev (names);
|
||||
g_strfreev (values);
|
||||
}
|
||||
|
||||
if (gerror != NULL && *gerror != NULL){
|
||||
if (error != NULL && *error != NULL){
|
||||
g_free (ename);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (full_stop){
|
||||
if (context->parser.end_element != NULL && context->state == START_ELEMENT){
|
||||
context->parser.end_element (context, ename, context->user_data, gerror);
|
||||
if (gerror != NULL && *gerror != NULL){
|
||||
context->parser.end_element (context, ename, context->user_data, error);
|
||||
if (error != NULL && *error != NULL){
|
||||
g_free (ename);
|
||||
goto fail;
|
||||
}
|
||||
@@ -425,8 +406,8 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
case FLUSH_TEXT:
|
||||
if (context->parser.text != NULL && context->text != NULL){
|
||||
context->parser.text (context, context->text->str, context->text->len,
|
||||
context->user_data, gerror);
|
||||
if (gerror != NULL && *gerror != NULL)
|
||||
context->user_data, error);
|
||||
if (error != NULL && *error != NULL)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -449,8 +430,8 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
|
||||
text = current->data;
|
||||
if (context->parser.end_element != NULL){
|
||||
context->parser.end_element (context, text, context->user_data, gerror);
|
||||
if (gerror != NULL && *gerror != NULL){
|
||||
context->parser.end_element (context, text, context->user_data, error);
|
||||
if (error != NULL && *error != NULL){
|
||||
g_free (text);
|
||||
goto fail;
|
||||
}
|
||||
@@ -472,15 +453,15 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
|
||||
return TRUE;
|
||||
fail:
|
||||
if (context->parser.error && gerror != NULL && *gerror)
|
||||
context->parser.error (context, *gerror, context->user_data);
|
||||
if (context->parser.error && error != NULL && *error)
|
||||
context->parser.error (context, *error, context->user_data);
|
||||
|
||||
destroy_parse_state (context);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_markup_parse_context_end_parse (GMarkupParseContext *context, GError **gerror)
|
||||
g_markup_parse_context_end_parse (GMarkupParseContext *context, GError **error)
|
||||
{
|
||||
g_return_val_if_fail (context != NULL, FALSE);
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -273,7 +273,7 @@ g_module_close (GModule *module)
|
||||
gchar *
|
||||
g_module_build_path (const gchar *directory, const gchar *module_name)
|
||||
{
|
||||
const char *lib_prefix = "";
|
||||
char *lib_prefix = "";
|
||||
|
||||
if (module_name == NULL)
|
||||
return NULL;
|
||||
@@ -281,8 +281,10 @@ g_module_build_path (const gchar *directory, const gchar *module_name)
|
||||
if (strncmp (module_name, "lib", 3) != 0)
|
||||
lib_prefix = LIBPREFIX;
|
||||
|
||||
if (directory && *directory)
|
||||
if (directory && *directory){
|
||||
|
||||
return g_strdup_printf ("%s/%s%s" LIBSUFFIX, directory, lib_prefix, module_name);
|
||||
}
|
||||
return g_strdup_printf ("%s%s" LIBSUFFIX, lib_prefix, module_name);
|
||||
}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -126,29 +126,18 @@ g_log (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, .
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
static char *failure_assertion = NULL;
|
||||
|
||||
const char *
|
||||
g_get_assertion_message (void)
|
||||
{
|
||||
return failure_assertion;
|
||||
}
|
||||
|
||||
void
|
||||
g_assertion_message (const gchar *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
g_vasprintf (&failure_assertion, format, args);
|
||||
|
||||
va_start (args, format);
|
||||
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
|
||||
va_end (args);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
#if HOST_ANDROID
|
||||
#if PLATFORM_ANDROID
|
||||
#include <android/log.h>
|
||||
|
||||
static android_LogPriority
|
||||
@@ -166,57 +155,10 @@ to_android_priority (GLogLevelFlags log_level)
|
||||
return ANDROID_LOG_UNKNOWN;
|
||||
}
|
||||
|
||||
#define LOG_MESSAGE_MAX_LEN 4096
|
||||
|
||||
static void
|
||||
android_log_line (gint log_priority, const gchar *log_domain, gchar *log_message, gint log_len)
|
||||
{
|
||||
gchar log_buf [LOG_MESSAGE_MAX_LEN];
|
||||
|
||||
g_assert (log_len <= LOG_MESSAGE_MAX_LEN - 1);
|
||||
|
||||
/* If line is longer than LOG_MESSAGE_MAX_LEN - 1, then we simply cut it out. This is consistent with the previous behavior. */
|
||||
strncpy (log_buf, log_message, log_len);
|
||||
log_buf [log_len] = '\0';
|
||||
|
||||
__android_log_write (log_priority, log_domain, log_buf);
|
||||
}
|
||||
|
||||
static void
|
||||
android_log (gint log_priority, const gchar *log_domain, const gchar *log_message)
|
||||
{
|
||||
gint log_message_len, log_message_p_len;
|
||||
gchar *log_message_p;
|
||||
|
||||
log_message_len = strlen (log_message);
|
||||
if (log_message_len <= LOG_MESSAGE_MAX_LEN) {
|
||||
__android_log_write (log_priority, log_domain, log_message);
|
||||
return;
|
||||
}
|
||||
|
||||
for (log_message_p = log_message; log_message_p < log_message + log_message_len;) {
|
||||
gchar *p = strstr (log_message_p, "\n");
|
||||
if (p == NULL) {
|
||||
/* There is no more "\n". */
|
||||
android_log_line (log_priority, log_domain, log_message_p, LOG_MESSAGE_MAX_LEN - 1);
|
||||
break;
|
||||
}
|
||||
|
||||
log_message_p_len = p - log_message_p;
|
||||
if (log_message_p_len > LOG_MESSAGE_MAX_LEN - 1)
|
||||
log_message_p_len = LOG_MESSAGE_MAX_LEN - 1;
|
||||
|
||||
android_log_line (log_priority, log_domain, log_message_p, log_message_p_len);
|
||||
|
||||
/* Set `log_message_p` to the character right after "\n" */
|
||||
log_message_p = p + 1;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data)
|
||||
{
|
||||
android_log (to_android_priority (log_level), log_domain, message);
|
||||
__android_log_write (to_android_priority (log_level), log_domain, message);
|
||||
if (log_level & fatal)
|
||||
abort ();
|
||||
}
|
||||
@@ -225,14 +167,14 @@ static void
|
||||
default_stdout_handler (const gchar *message)
|
||||
{
|
||||
/* TODO: provide a proper app name */
|
||||
android_log (ANDROID_LOG_ERROR, "mono", message);
|
||||
__android_log_write (ANDROID_LOG_ERROR, "mono", message);
|
||||
}
|
||||
|
||||
static void
|
||||
default_stderr_handler (const gchar *message)
|
||||
{
|
||||
/* TODO: provide a proper app name */
|
||||
android_log (ANDROID_LOG_ERROR, "mono", message);
|
||||
__android_log_write (ANDROID_LOG_ERROR, "mono", message);
|
||||
}
|
||||
|
||||
|
||||
@@ -160,8 +160,7 @@ g_path_get_basename (const char *filename)
|
||||
return g_strdup (&r[1]);
|
||||
}
|
||||
|
||||
//wasm does have strtok_r even though autoconf fails to find
|
||||
#if !defined (HAVE_STRTOK_R) && !defined (HOST_WASM)
|
||||
#ifndef HAVE_STRTOK_R
|
||||
// This is from BSD's strtok_r
|
||||
|
||||
char *
|
||||
File renamed without changes.
@@ -225,8 +225,3 @@ g_ptr_array_sort_with_data (GPtrArray *array, GCompareDataFunc compare, gpointer
|
||||
g_qsort_with_data (array->pdata, array->len, sizeof (gpointer), compare, user_data);
|
||||
}
|
||||
|
||||
guint
|
||||
g_ptr_array_capacity (GPtrArray *array)
|
||||
{
|
||||
return ((GPtrArrayPriv *)array)->size;
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
@@ -29,7 +29,7 @@
|
||||
#include <glib.h>
|
||||
|
||||
static int
|
||||
split_cmdline (const gchar *cmdline, GPtrArray *array, GError **gerror)
|
||||
split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
|
||||
{
|
||||
gchar *ptr;
|
||||
gchar c;
|
||||
@@ -81,15 +81,15 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **gerror)
|
||||
}
|
||||
|
||||
if (escaped) {
|
||||
if (gerror)
|
||||
*gerror = g_error_new (G_LOG_DOMAIN, 0, "Unfinished escape.");
|
||||
if (error)
|
||||
*error = g_error_new (G_LOG_DOMAIN, 0, "Unfinished escape.");
|
||||
g_string_free (str, TRUE);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (quote_char) {
|
||||
if (gerror)
|
||||
*gerror = g_error_new (G_LOG_DOMAIN, 0, "Unfinished quote.");
|
||||
if (error)
|
||||
*error = g_error_new (G_LOG_DOMAIN, 0, "Unfinished quote.");
|
||||
g_string_free (str, TRUE);
|
||||
return -1;
|
||||
}
|
||||
@@ -104,17 +104,17 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **gerror)
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_shell_parse_argv (const gchar *command_line, gint *argcp, gchar ***argvp, GError **gerror)
|
||||
g_shell_parse_argv (const gchar *command_line, gint *argcp, gchar ***argvp, GError **error)
|
||||
{
|
||||
GPtrArray *array;
|
||||
gint argc;
|
||||
gchar **argv;
|
||||
|
||||
g_return_val_if_fail (command_line, FALSE);
|
||||
g_return_val_if_fail (gerror == NULL || *gerror == NULL, FALSE);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
array = g_ptr_array_new();
|
||||
if (split_cmdline (command_line, array, gerror)) {
|
||||
if (split_cmdline (command_line, array, error)) {
|
||||
g_ptr_array_add (array, NULL);
|
||||
g_strfreev ((gchar **) array->pdata);
|
||||
g_ptr_array_free (array, FALSE);
|
||||
@@ -160,7 +160,7 @@ g_shell_quote (const gchar *unquoted_string)
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_shell_unquote (const gchar *quoted_string, GError **gerror)
|
||||
g_shell_unquote (const gchar *quoted_string, GError **error)
|
||||
{
|
||||
GString *result;
|
||||
const char *p;
|
||||
@@ -192,7 +192,7 @@ g_shell_unquote (const gchar *quoted_string, GError **gerror)
|
||||
g_string_append_c (result, *p);
|
||||
}
|
||||
if (!*p){
|
||||
g_set_error (gerror, 0, 0, "Open quote");
|
||||
g_set_error (error, 0, 0, "Open quote");
|
||||
return NULL;
|
||||
}
|
||||
} else if (*p == '"'){
|
||||
@@ -203,7 +203,7 @@ g_shell_unquote (const gchar *quoted_string, GError **gerror)
|
||||
if (*p == '\\'){
|
||||
p++;
|
||||
if (*p == 0){
|
||||
g_set_error (gerror, 0, 0, "Open quote");
|
||||
g_set_error (error, 0, 0, "Open quote");
|
||||
return NULL;
|
||||
}
|
||||
switch (*p){
|
||||
@@ -220,7 +220,7 @@ g_shell_unquote (const gchar *quoted_string, GError **gerror)
|
||||
g_string_append_c (result, *p);
|
||||
}
|
||||
if (!*p){
|
||||
g_set_error (gerror, 0, 0, "Open quote");
|
||||
g_set_error (error, 0, 0, "Open quote");
|
||||
return NULL;
|
||||
}
|
||||
} else if (*p == '\\'){
|
||||
File renamed without changes.
@@ -68,9 +68,9 @@
|
||||
#define pipe(x) _pipe(x, 256, 0)
|
||||
#endif
|
||||
|
||||
#define set_error(msg, ...) do { if (gerror != NULL) *gerror = g_error_new (G_LOG_DOMAIN, 1, msg, __VA_ARGS__); } while (0)
|
||||
#define set_error_cond(cond,msg, ...) do { if ((cond) && gerror != NULL) *gerror = g_error_new (G_LOG_DOMAIN, 1, msg, __VA_ARGS__); } while (0)
|
||||
#define set_error_status(status,msg, ...) do { if (gerror != NULL) *gerror = 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, __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 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)
|
||||
|
||||
@@ -94,7 +94,7 @@ extern char **environ;
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
static int
|
||||
safe_read (int fd, gchar *buffer, gint count, GError **gerror)
|
||||
safe_read (int fd, gchar *buffer, gint count, GError **error)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -104,7 +104,7 @@ safe_read (int fd, gchar *buffer, gint count, GError **gerror)
|
||||
}
|
||||
|
||||
static int
|
||||
read_pipes (int outfd, gchar **out_str, int errfd, gchar **err_str, GError **gerror)
|
||||
read_pipes (int outfd, gchar **out_str, int errfd, gchar **err_str, GError **error)
|
||||
{
|
||||
fd_set rfds;
|
||||
int res;
|
||||
@@ -151,7 +151,7 @@ read_pipes (int outfd, gchar **out_str, int errfd, gchar **err_str, GError **ger
|
||||
if (buffer == NULL)
|
||||
buffer = g_malloc (1024);
|
||||
if (!out_closed && FD_ISSET (outfd, &rfds)) {
|
||||
nread = safe_read (outfd, buffer, 1024, gerror);
|
||||
nread = safe_read (outfd, buffer, 1024, error);
|
||||
if (nread < 0) {
|
||||
close (errfd);
|
||||
close (outfd);
|
||||
@@ -165,7 +165,7 @@ read_pipes (int outfd, gchar **out_str, int errfd, gchar **err_str, GError **ger
|
||||
}
|
||||
|
||||
if (!err_closed && FD_ISSET (errfd, &rfds)) {
|
||||
nread = safe_read (errfd, buffer, 1024, gerror);
|
||||
nread = safe_read (errfd, buffer, 1024, error);
|
||||
if (nread < 0) {
|
||||
close (errfd);
|
||||
close (outfd);
|
||||
@@ -191,7 +191,7 @@ read_pipes (int outfd, gchar **out_str, int errfd, gchar **err_str, GError **ger
|
||||
}
|
||||
|
||||
static gboolean
|
||||
create_pipe (int *fds, GError **gerror)
|
||||
create_pipe (int *fds, GError **error)
|
||||
{
|
||||
if (pipe (fds) == -1) {
|
||||
set_error ("%s", "Error creating pipe.");
|
||||
@@ -250,7 +250,7 @@ g_spawn_command_line_sync (const gchar *command_line,
|
||||
gchar **standard_output,
|
||||
gchar **standard_error,
|
||||
gint *exit_status,
|
||||
GError **gerror)
|
||||
GError **error)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
#elif !defined (HAVE_FORK) || !defined (HAVE_EXECV)
|
||||
@@ -265,13 +265,13 @@ g_spawn_command_line_sync (const gchar *command_line,
|
||||
int status;
|
||||
int res;
|
||||
|
||||
if (!g_shell_parse_argv (command_line, &argc, &argv, gerror))
|
||||
if (!g_shell_parse_argv (command_line, &argc, &argv, error))
|
||||
return FALSE;
|
||||
|
||||
if (standard_output && !create_pipe (stdout_pipe, gerror))
|
||||
if (standard_output && !create_pipe (stdout_pipe, error))
|
||||
return FALSE;
|
||||
|
||||
if (standard_error && !create_pipe (stderr_pipe, gerror)) {
|
||||
if (standard_error && !create_pipe (stderr_pipe, error)) {
|
||||
if (standard_output) {
|
||||
CLOSE_PIPE (stdout_pipe);
|
||||
}
|
||||
@@ -317,7 +317,7 @@ g_spawn_command_line_sync (const gchar *command_line,
|
||||
close (stderr_pipe [1]);
|
||||
|
||||
if (standard_output || standard_error) {
|
||||
res = read_pipes (stdout_pipe [0], standard_output, stderr_pipe [0], standard_error, gerror);
|
||||
res = read_pipes (stdout_pipe [0], standard_output, stderr_pipe [0], standard_error, error);
|
||||
if (res) {
|
||||
waitpid (pid, &status, WNOHANG); /* avoid zombie */
|
||||
return FALSE;
|
||||
@@ -349,7 +349,7 @@ g_spawn_async_with_pipes (const gchar *working_directory,
|
||||
gint *standard_input,
|
||||
gint *standard_output,
|
||||
gint *standard_error,
|
||||
GError **gerror)
|
||||
GError **error)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
#elif !defined (HAVE_FORK) || !defined (HAVE_EXECVE)
|
||||
@@ -365,21 +365,21 @@ g_spawn_async_with_pipes (const gchar *working_directory,
|
||||
|
||||
g_return_val_if_fail (argv != NULL, FALSE); /* Only mandatory arg */
|
||||
|
||||
if (!create_pipe (info_pipe, gerror))
|
||||
if (!create_pipe (info_pipe, error))
|
||||
return FALSE;
|
||||
|
||||
if (standard_output && !create_pipe (out_pipe, gerror)) {
|
||||
if (standard_output && !create_pipe (out_pipe, error)) {
|
||||
CLOSE_PIPE (info_pipe);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (standard_error && !create_pipe (err_pipe, gerror)) {
|
||||
if (standard_error && !create_pipe (err_pipe, error)) {
|
||||
CLOSE_PIPE (info_pipe);
|
||||
CLOSE_PIPE (out_pipe);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (standard_input && !create_pipe (in_pipe, gerror)) {
|
||||
if (standard_input && !create_pipe (in_pipe, error)) {
|
||||
CLOSE_PIPE (info_pipe);
|
||||
CLOSE_PIPE (out_pipe);
|
||||
CLOSE_PIPE (err_pipe);
|
||||
@@ -231,11 +231,10 @@ g_strerror (gint errnum)
|
||||
#ifdef HAVE_STRERROR_R
|
||||
char tmp_buff [128]; //Quite arbitrary, should be large enough
|
||||
char *buff = tmp_buff;
|
||||
size_t buff_len = sizeof (tmp_buff);
|
||||
int buff_len = sizeof (tmp_buff);
|
||||
int r;
|
||||
buff [0] = 0;
|
||||
|
||||
#ifndef STRERROR_R_CHAR_P
|
||||
int r;
|
||||
while ((r = strerror_r (errnum, buff, buff_len - 1))) {
|
||||
if (r != ERANGE) {
|
||||
buff = g_strdup_printf ("Invalid Error code '%d'", errnum);
|
||||
@@ -252,16 +251,10 @@ g_strerror (gint errnum)
|
||||
error_messages [errnum] = g_strdup (buff);
|
||||
if (buff != tmp_buff)
|
||||
g_free (buff);
|
||||
#else /* STRERROR_R_CHAR_P */
|
||||
buff = strerror_r (errnum, buff, buff_len);
|
||||
if (!error_messages [errnum])
|
||||
error_messages [errnum] = g_strdup (buff);
|
||||
#endif /* STRERROR_R_CHAR_P */
|
||||
|
||||
#else /* HAVE_STRERROR_R */
|
||||
#else
|
||||
if (!error_messages [errnum])
|
||||
error_messages [errnum] = g_strdup_printf ("Error code '%d'", errnum);
|
||||
#endif /* HAVE_STRERROR_R */
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
@@ -662,7 +655,7 @@ char_needs_encoding (char c)
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_filename_to_uri (const gchar *filename, const gchar *hostname, GError **gerror)
|
||||
g_filename_to_uri (const gchar *filename, const gchar *hostname, GError **error)
|
||||
{
|
||||
size_t n;
|
||||
char *ret, *rp;
|
||||
@@ -679,8 +672,8 @@ g_filename_to_uri (const gchar *filename, const gchar *hostname, GError **gerror
|
||||
g_warning ("%s", "eglib: g_filename_to_uri: hostname not handled");
|
||||
|
||||
if (!g_path_is_absolute (filename)){
|
||||
if (gerror != NULL)
|
||||
*gerror = g_error_new (NULL, 2, "Not an absolute filename");
|
||||
if (error != NULL)
|
||||
*error = g_error_new (NULL, 2, "Not an absolute filename");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -732,7 +725,7 @@ decode (char p)
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_filename_from_uri (const gchar *uri, gchar **hostname, GError **gerror)
|
||||
g_filename_from_uri (const gchar *uri, gchar **hostname, GError **error)
|
||||
{
|
||||
const char *p;
|
||||
char *r, *result;
|
||||
@@ -744,8 +737,8 @@ g_filename_from_uri (const gchar *uri, gchar **hostname, GError **gerror)
|
||||
g_warning ("%s", "eglib: g_filename_from_uri: hostname not handled");
|
||||
|
||||
if (strncmp (uri, "file:///", 8) != 0){
|
||||
if (gerror != NULL)
|
||||
*gerror = g_error_new (NULL, 2, "URI does not start with the file: scheme");
|
||||
if (error != NULL)
|
||||
*error = g_error_new (NULL, 2, "URI does not start with the file: scheme");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -754,8 +747,8 @@ g_filename_from_uri (const gchar *uri, gchar **hostname, GError **gerror)
|
||||
if (p [1] && p [2] && isxdigit (p [1]) && isxdigit (p [2])){
|
||||
p += 2;
|
||||
} else {
|
||||
if (gerror != NULL)
|
||||
*gerror = g_error_new (NULL, 2, "URI contains an invalid escape sequence");
|
||||
if (error != NULL)
|
||||
*error = g_error_new (NULL, 2, "URI contains an invalid escape sequence");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -886,34 +879,6 @@ g_ascii_strcasecmp (const gchar *s1, const gchar *s2)
|
||||
return (*sp1) - (*sp2);
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_utf16_ascii_equal (const gunichar2 *utf16, size_t ulen, const char *ascii, size_t alen)
|
||||
{
|
||||
size_t i;
|
||||
if (ulen != alen)
|
||||
return FALSE;
|
||||
for (i = 0; i < ulen; ++i) {
|
||||
if (utf16[i] != ascii[i])
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_utf16_asciiz_equal (const gunichar2 *utf16, const char *ascii)
|
||||
// z for zero means null terminated
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
char a = *ascii++;
|
||||
gunichar2 u = *utf16++;
|
||||
if (a != u)
|
||||
return FALSE;
|
||||
if (a == 0)
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_strdelimit (gchar *string, const gchar *delimiters, gchar new_delimiter)
|
||||
{
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -98,7 +98,7 @@ g_unichar_break_type (gunichar c)
|
||||
return G_UNICODE_BREAK_UNKNOWN;
|
||||
}
|
||||
|
||||
static gunichar
|
||||
gunichar
|
||||
g_unichar_case (gunichar c, gboolean upper)
|
||||
{
|
||||
gint8 i, i2;
|
||||
@@ -188,7 +188,7 @@ g_unichar_isspace (gunichar c)
|
||||
* This is broken, and assumes an UTF8 system, but will do for eglib's first user
|
||||
*/
|
||||
gchar *
|
||||
g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsize *bytes_written, GError **gerror)
|
||||
g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error)
|
||||
{
|
||||
char *res;
|
||||
|
||||
@@ -224,17 +224,17 @@ g_get_charset (G_CONST_RETURN char **charset)
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
gchar *
|
||||
g_locale_to_utf8 (const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, GError **gerror)
|
||||
g_locale_to_utf8 (const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error)
|
||||
{
|
||||
g_get_charset (NULL);
|
||||
|
||||
return g_convert (opsysstring, len, "UTF-8", my_charset, bytes_read, bytes_written, gerror);
|
||||
return g_convert (opsysstring, len, "UTF-8", my_charset, bytes_read, bytes_written, error);
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_locale_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsize *bytes_written, GError **gerror)
|
||||
g_locale_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error)
|
||||
{
|
||||
g_get_charset (NULL);
|
||||
|
||||
return g_convert (utf8string, len, my_charset, "UTF-8", bytes_read, bytes_written, gerror);
|
||||
return g_convert (utf8string, len, my_charset, "UTF-8", bytes_read, bytes_written, error);
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -27,13 +27,12 @@ SOURCES = \
|
||||
utf8.c \
|
||||
endian.c \
|
||||
module.c \
|
||||
memory.c \
|
||||
assertf.c
|
||||
memory.c
|
||||
|
||||
test_eglib_SOURCES = $(SOURCES)
|
||||
|
||||
test_eglib_CFLAGS = -Wall -DEGLIB_TESTS=1 -D_FORTIFY_SOURCE=2 -I$(srcdir)/.. -I.. -DDRIVER_NAME=\"EGlib\"
|
||||
test_eglib_LDADD = ../libeglib.la $(LIBICONV)
|
||||
test_eglib_CFLAGS = -Wall -DEGLIB_TESTS=1 -D_FORTIFY_SOURCE=2 -I$(srcdir)/../src -I../src -DDRIVER_NAME=\"EGlib\"
|
||||
test_eglib_LDADD = ../src/libeglib.la $(LIBICONV)
|
||||
|
||||
run-eglib: all
|
||||
srcdir=`readlink -f $(srcdir)` ./test-eglib
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -15,7 +15,7 @@ RESULT
|
||||
test_dir ()
|
||||
{
|
||||
GDir *dir;
|
||||
GError *gerror;
|
||||
GError *error;
|
||||
const gchar *name;
|
||||
|
||||
/*
|
||||
@@ -29,18 +29,18 @@ test_dir ()
|
||||
if (dir != NULL)
|
||||
return FAILED ("2 Should be an error");
|
||||
|
||||
gerror = NULL;
|
||||
dir = g_dir_open (".ljasdslakjd", 9, &gerror);
|
||||
error = NULL;
|
||||
dir = g_dir_open (".ljasdslakjd", 9, &error);
|
||||
if (dir != NULL)
|
||||
return FAILED ("3 opendir should fail");
|
||||
if (gerror == NULL)
|
||||
if (error == NULL)
|
||||
return FAILED ("4 got no error");
|
||||
g_error_free (gerror);
|
||||
gerror = NULL;
|
||||
dir = g_dir_open (g_get_tmp_dir (), 9, &gerror);
|
||||
g_error_free (error);
|
||||
error = NULL;
|
||||
dir = g_dir_open (g_get_tmp_dir (), 9, &error);
|
||||
if (dir == NULL)
|
||||
return FAILED ("5 opendir should succeed");
|
||||
if (gerror != NULL)
|
||||
if (error != NULL)
|
||||
return FAILED ("6 got an error");
|
||||
name = NULL;
|
||||
name = g_dir_read_name (dir);
|
||||
@@ -62,3 +62,5 @@ static Test dir_tests [] = {
|
||||
};
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(dir_tests_init, dir_tests)
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -16,7 +16,7 @@
|
||||
RESULT
|
||||
test_file_get_contents ()
|
||||
{
|
||||
GError *gerror;
|
||||
GError *error;
|
||||
gchar *content;
|
||||
gboolean ret;
|
||||
gsize length;
|
||||
@@ -32,24 +32,24 @@ test_file_get_contents ()
|
||||
contents != NULL
|
||||
ret = g_file_get_contents ("", NULL, NULL, NULL);
|
||||
error no such file and fails for 'error' not being null too
|
||||
ret = g_file_get_contents ("", &content, NULL, &gerror);
|
||||
ret = g_file_get_contents ("", &content, NULL, &error);
|
||||
*/
|
||||
|
||||
gerror = NULL;
|
||||
ret = g_file_get_contents ("", &content, NULL, &gerror);
|
||||
error = NULL;
|
||||
ret = g_file_get_contents ("", &content, NULL, &error);
|
||||
if (ret)
|
||||
return FAILED ("HAH!");
|
||||
if (gerror == NULL)
|
||||
if (error == NULL)
|
||||
return FAILED ("Got nothing as error.");
|
||||
if (content != NULL)
|
||||
return FAILED ("Content is uninitialized");
|
||||
|
||||
g_error_free (gerror);
|
||||
gerror = NULL;
|
||||
ret = g_file_get_contents (filename, &content, &length, &gerror);
|
||||
g_error_free (error);
|
||||
error = NULL;
|
||||
ret = g_file_get_contents (filename, &content, &length, &error);
|
||||
if (!ret)
|
||||
return FAILED ("The error is %d %s\n", gerror->code, gerror->message);
|
||||
if (gerror != NULL)
|
||||
return FAILED ("The error is %d %s\n", error->code, error->message);
|
||||
if (error != NULL)
|
||||
return FAILED ("Got an error returning TRUE");
|
||||
if (content == NULL)
|
||||
return FAILED ("Content is NULL");
|
||||
@@ -63,7 +63,7 @@ test_file_get_contents ()
|
||||
RESULT
|
||||
test_open_tmp ()
|
||||
{
|
||||
GError *gerror;
|
||||
GError *error;
|
||||
gint fd;
|
||||
gchar *name = GINT_TO_POINTER (-1);
|
||||
|
||||
@@ -74,29 +74,29 @@ test_open_tmp ()
|
||||
* return FAILED ("Default failed.");
|
||||
* close (fd);
|
||||
*/
|
||||
gerror = NULL;
|
||||
fd = g_file_open_tmp ("invalidtemplate", NULL, &gerror);
|
||||
error = NULL;
|
||||
fd = g_file_open_tmp ("invalidtemplate", NULL, &error);
|
||||
if (fd != -1)
|
||||
return FAILED ("The template was invalid and accepted");
|
||||
if (gerror == NULL)
|
||||
if (error == NULL)
|
||||
return FAILED ("No error returned.");
|
||||
g_error_free (gerror);
|
||||
g_error_free (error);
|
||||
|
||||
gerror = NULL;
|
||||
fd = g_file_open_tmp ("i/nvalidtemplate", &name, &gerror);
|
||||
error = NULL;
|
||||
fd = g_file_open_tmp ("i/nvalidtemplate", &name, &error);
|
||||
if (fd != -1)
|
||||
return FAILED ("The template was invalid and accepted");
|
||||
if (gerror == NULL)
|
||||
if (error == NULL)
|
||||
return FAILED ("No error returned.");
|
||||
if (name == NULL)
|
||||
return FAILED ("'name' is not reset");
|
||||
g_error_free (gerror);
|
||||
g_error_free (error);
|
||||
|
||||
gerror = NULL;
|
||||
fd = g_file_open_tmp ("valid-XXXXXX", &name, &gerror);
|
||||
error = NULL;
|
||||
fd = g_file_open_tmp ("valid-XXXXXX", &name, &error);
|
||||
if (fd == -1)
|
||||
return FAILED ("This should be valid");
|
||||
if (gerror != NULL)
|
||||
if (error != NULL)
|
||||
return FAILED ("No error returned.");
|
||||
if (name == NULL)
|
||||
return FAILED ("No name returned.");
|
||||
File renamed without changes.
File renamed without changes.
@@ -11,16 +11,16 @@ markup_test (const char *s)
|
||||
{
|
||||
GMarkupParser *parser = g_new0 (GMarkupParser, 1);
|
||||
GMarkupParseContext *context;
|
||||
GError *gerror = NULL;
|
||||
GError *error = NULL;
|
||||
|
||||
context = g_markup_parse_context_new (parser, 0, 0, 0);
|
||||
|
||||
g_markup_parse_context_parse (context, s, strlen (s), &gerror);
|
||||
g_markup_parse_context_parse (context, s, strlen (s), &error);
|
||||
g_markup_parse_context_free (context);
|
||||
|
||||
if (gerror != NULL){
|
||||
char *msg = g_strdup (gerror->message);
|
||||
g_error_free (gerror);
|
||||
if (error != NULL){
|
||||
char *msg = g_strdup (error->message);
|
||||
g_error_free (error);
|
||||
|
||||
g_free (parser);
|
||||
return msg;
|
||||
@@ -83,7 +83,7 @@ start_element (GMarkupParseContext *context,
|
||||
const gchar **attribute_names,
|
||||
const gchar **attribute_values,
|
||||
gpointer user_data,
|
||||
GError **gerror)
|
||||
GError **error)
|
||||
{
|
||||
AppConfigInfo* app_config = (AppConfigInfo*) user_data;
|
||||
|
||||
@@ -111,7 +111,7 @@ static void
|
||||
end_element (GMarkupParseContext *context,
|
||||
const gchar *element_name,
|
||||
gpointer user_data,
|
||||
GError **gerror)
|
||||
GError **error)
|
||||
{
|
||||
AppConfigInfo* app_config = (AppConfigInfo*) user_data;
|
||||
|
||||
@@ -231,3 +231,4 @@ static Test markup_tests [] = {
|
||||
};
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(markup_tests_init, markup_tests)
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -272,7 +272,7 @@ test_ppath2 ()
|
||||
#ifdef G_OS_WIN32
|
||||
const gchar *searchfor = "test_eglib.exe";
|
||||
#else
|
||||
const gchar *searchfor = "test-eglib";
|
||||
const gchar *searchfor = "test-glib";
|
||||
#endif
|
||||
|
||||
g_setenv ("PATH", "", TRUE);
|
||||
File renamed without changes.
File renamed without changes.
Loaded 100 of 3027 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user