mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 01:41:17 -10:00
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cd89eeb84 | ||
|
|
9e9897b9d6 | ||
|
|
8aa227c28e | ||
|
|
38fa35562f | ||
|
|
b990032df2 | ||
|
|
71e9335b8f | ||
|
|
20ee5d06e9 | ||
|
|
e67542745f | ||
|
|
a4d906fa47 | ||
|
|
28d2644a8f | ||
|
|
98a94ddca9 |
No files matched your search
+6
-8
@@ -1,19 +1,17 @@
|
||||
# ensure LF endings on all checkouts
|
||||
configure.ac crlf=input
|
||||
config.rpath crlf=input
|
||||
configure.host crlf=input
|
||||
mkinstalldirs crlf=input
|
||||
*.sh crlf=input
|
||||
*.sources crlf=input
|
||||
.gitattributes crlf=input
|
||||
*akefile* crlf=input
|
||||
configure.ac crlf=input
|
||||
|
||||
# ensure native line endings on checkout
|
||||
*.c crlf
|
||||
*.h crlf
|
||||
*.cs crlf
|
||||
*.sh crlf
|
||||
*.il crlf
|
||||
|
||||
.gitattributes crlf
|
||||
*akefile* crlf
|
||||
*.sources crlf
|
||||
|
||||
# don't do anything to line-endings. Let CRLFs go into the repo, and CRLF on checkout
|
||||
*.bat -crlf
|
||||
*.sln -crlf
|
||||
|
||||
@@ -38,8 +38,6 @@ obj/
|
||||
[Rr]elease*/
|
||||
Ankh.NoLoad
|
||||
*.gpState
|
||||
.vscode/
|
||||
*.exp
|
||||
|
||||
# Tooling
|
||||
_ReSharper*/
|
||||
|
||||
+10
-38
@@ -7,6 +7,9 @@
|
||||
[submodule "external/cecil"]
|
||||
path = external/cecil
|
||||
url = git://github.com/mono/cecil.git
|
||||
[submodule "external/debian-snapshot"]
|
||||
path = external/debian-snapshot
|
||||
url = git://github.com/directhex/mono-snapshot.git
|
||||
[submodule "external/rx"]
|
||||
path = external/rx
|
||||
url = git://github.com/mono/rx.git
|
||||
@@ -17,47 +20,16 @@
|
||||
[submodule "external/ikdasm"]
|
||||
path = external/ikdasm
|
||||
url = git://github.com/mono/ikdasm.git
|
||||
[submodule "external/referencesource"]
|
||||
path = external/referencesource
|
||||
url = git://github.com/mono/referencesource
|
||||
branch = mono
|
||||
[submodule "external/reference-assemblies"]
|
||||
path = external/binary-reference-assemblies
|
||||
url = git://github.com/mono/reference-assemblies.git
|
||||
[submodule "external/Lucene.Net.Light"]
|
||||
path = external/Lucene.Net.Light
|
||||
url = git://github.com/mono/Lucene.Net.Light.git
|
||||
[submodule "external/nunit-lite"]
|
||||
path = external/nunit-lite
|
||||
url = git://github.com/mono/NUnitLite.git
|
||||
[submodule "external/nuget-buildtasks"]
|
||||
path = external/nuget-buildtasks
|
||||
url = git://github.com/mono/NuGet.BuildTasks
|
||||
[submodule "external/buildtools"]
|
||||
path = external/buildtools
|
||||
url = git://github.com/mono/buildtools.git
|
||||
[submodule "external/cecil-legacy"]
|
||||
path = external/cecil-legacy
|
||||
url = git://github.com/mono/cecil.git
|
||||
branch = mono-legacy-0.9.5
|
||||
[submodule "external/boringssl"]
|
||||
path = external/boringssl
|
||||
url = git://github.com/mono/boringssl.git
|
||||
branch = mono
|
||||
[submodule "external/corefx"]
|
||||
path = external/corefx
|
||||
url = git://github.com/mono/corefx.git
|
||||
[submodule "external/bockbuild"]
|
||||
path = external/bockbuild
|
||||
url = git://github.com/mono/bockbuild.git
|
||||
[submodule "external/linker"]
|
||||
path = external/linker
|
||||
url = git://github.com/mono/linker.git
|
||||
[submodule "external/roslyn-binaries"]
|
||||
path = external/roslyn-binaries
|
||||
url = git://github.com/mono/roslyn-binaries.git
|
||||
[submodule "external/corert"]
|
||||
path = external/corert
|
||||
url = git://github.com/mono/corert.git
|
||||
[submodule "external/xunit-binaries"]
|
||||
path = external/xunit-binaries
|
||||
url = git://github.com/mono/xunit-binaries.git
|
||||
[submodule "external/api-doc-tools"]
|
||||
path = external/api-doc-tools
|
||||
url = git://github.com/mono/api-doc-tools.git
|
||||
[submodule "external/api-snapshot"]
|
||||
path = external/api-snapshot
|
||||
url = git://github.com/mono/api-snapshot.git
|
||||
+17
-6
@@ -21,18 +21,29 @@ investigate bugs, regressions and problems.
|
||||
License
|
||||
=======
|
||||
|
||||
The Mono runtime, compilers, and tools and most of the class libraries
|
||||
are licensed under the MIT license. But include some bits of code
|
||||
licensed under different licenses. The exact list is [available here] (https://github.com/mono/mono/blob/master/LICENSE).
|
||||
The Mono project uses the MIT X11, GNU LGPL version 2 and the Apache
|
||||
License 2.0. We also imported some Microsoft code licensed under the
|
||||
open source Microsoft Public License.
|
||||
|
||||
Different parts of Mono use different licenses. The actual details of
|
||||
which licenses are used for which parts are detailed on the LICENSE
|
||||
file in this directory.
|
||||
|
||||
CLA
|
||||
=======
|
||||
When contributing code, make sure that your contribution falls under
|
||||
the appropriate license. For example, contributions to code licensed
|
||||
under MIT/X11 code, should be MIT/X11 code.
|
||||
|
||||
Contributions are now taken under the [.NET Foundation CLA] (https://cla2.dotnetfoundation.org/).
|
||||
The runtime (`mono/...`) is a special case. The code is dual-licensed
|
||||
by Xamarin under both the GNU LGPL v2 license and is also available
|
||||
under commercial terms. For the runtime, you should either sign an
|
||||
agreement that grants Xamarin the rights to relicense your code under
|
||||
other licenses other than the LGPL v2 or your contribution must be
|
||||
made as an MIT/X11 license which grants us the same rights, but
|
||||
involves no paperwork. For the latter case, please specify on your
|
||||
commit(s) that you are licensing the changes under MIT/X11.
|
||||
|
||||
For other parts of the project that are dual-licensed, please state
|
||||
on your commit(s) what license you are contributing the changes under.
|
||||
|
||||
Testing
|
||||
=======
|
||||
|
||||
+501
-1
@@ -1 +1,501 @@
|
||||
See LICENSE file in the project root for full license information.
|
||||
|
||||
The Mono runtime is licensed under the terms of the GNU
|
||||
Library General Public License, version 2.
|
||||
|
||||
The eglib directory is licensed under the terms of the MIT
|
||||
X11 license and is a drop-in replacement for Mono's use of
|
||||
glib 2.0 (which was LGPL).
|
||||
|
||||
The Boehm licensing information is in the libgc directory
|
||||
|
||||
The SGen Garbage Collector is under the terms of the MIT X11
|
||||
license
|
||||
|
||||
The class libraries under mono/mcs are unless otherwise stated
|
||||
under the MIT X11 license.
|
||||
|
||||
Open source Microsoft code is licensed under the original terms
|
||||
which is either MS-PL for older components, or dual licensed
|
||||
MS-PL/Apache2 licensed.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
+26
-31
@@ -4,22 +4,23 @@ AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
|
||||
|
||||
# Some tools might not build when cross-compiling
|
||||
if CROSS_COMPILING
|
||||
tools_dir =
|
||||
else
|
||||
tools_dir = tools
|
||||
endif
|
||||
|
||||
SUBDIRS = po $(libgc_dir) eglib 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 msvc $(docs_dir) acceptance-tests
|
||||
# Keep in sync with SUBDIRS
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
|
||||
else
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests
|
||||
# Keep in sync with SUBDIRS
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
|
||||
endif
|
||||
|
||||
all: update_submodules
|
||||
|
||||
SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
|
||||
update_submodules:
|
||||
@$(srcdir)/scripts/update_submodules.sh
|
||||
@$(srcdir)/scripts/update_submodules
|
||||
|
||||
.PHONY: update_submodules
|
||||
|
||||
@@ -31,8 +32,7 @@ EXTRA_DIST= \
|
||||
mono-uninstalled.pc.in \
|
||||
winconfig.h \
|
||||
code_of_conduct.md \
|
||||
external \
|
||||
mcs/class/referencesource
|
||||
external
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
|
||||
|
||||
@@ -42,8 +42,12 @@ dist-hook:
|
||||
test -d $(distdir)/mcs || mkdir $(distdir)/mcs
|
||||
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
|
||||
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 -f `find $(top_distdir)/external -path '*\.exe'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*'`
|
||||
cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
|
||||
cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
|
||||
# Disable this for now because it is very slow and causes wrench to timeout:
|
||||
# test ! -d $(GIT_DIR) || ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
noinst_DATA = mono-uninstalled.pc
|
||||
@@ -51,21 +55,17 @@ DISTCLEANFILES= mono-uninstalled.pc
|
||||
|
||||
# building with monolite
|
||||
mcslib = $(mcs_topdir)/class/lib
|
||||
monolite_url = https://download.mono-project.com/monolite/monolite-$(MONO_CORLIB_VERSION)-latest.tar.gz
|
||||
monolite = $(mcslib)/monolite
|
||||
mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
|
||||
monolite_url = http://download.mono-project.com/monolite/monolite-$(mono_corlib_version)-latest.tar.gz
|
||||
.PHONY: get-monolite-latest
|
||||
get-monolite-latest:
|
||||
-rm -fr $(mcslib)/monolite/$(MONO_CORLIB_VERSION)
|
||||
-mkdir -p $(mcslib)/monolite
|
||||
cd $(mcslib) && { (wget -O- $(monolite_url) || curl -L $(monolite_url)) | gzip -d | tar xf - ; }
|
||||
cd $(mcslib) && mv -f monolite-* monolite/$(MONO_CORLIB_VERSION)
|
||||
|
||||
if BITCODE
|
||||
BITCODE_CHECK=yes
|
||||
endif
|
||||
|
||||
.PHONY: check-ci
|
||||
check-ci:
|
||||
MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
|
||||
-rm -fr $(mcslib)/monolite-*
|
||||
-mkdir -p $(mcslib)
|
||||
test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
|
||||
test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
|
||||
cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
|
||||
cd $(mcslib) && mv -f monolite-* monolite
|
||||
|
||||
.PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
|
||||
validate: do-build-mono-mcs
|
||||
@@ -152,7 +152,6 @@ package-inputs:
|
||||
read libou; echo " <library_output>$$libou</library_output>"; \
|
||||
read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
|
||||
read profile; echo " <profile>$$profile</profile>"; \
|
||||
read resxt; echo " <resources>$$resxt</resources>"; \
|
||||
read resp; echo " <response>$$resp</response>"; \
|
||||
echo " </project>") >> msvc/scripts/order.xml; \
|
||||
done
|
||||
@@ -164,7 +163,3 @@ update-llvm-version:
|
||||
REV=`$(LLVM_DIR)/bin/llvm-config --version` && sed -e "s,expected_llvm_version=.*,expected_llvm_version=\"$$REV\"," < configure.ac > tmp && mv tmp configure.ac && echo "Version set to $$REV."
|
||||
|
||||
|
||||
update-solution-files:
|
||||
make update-csproj
|
||||
make package-inputs
|
||||
(cd msvc/scripts; make genproj.exe; mono genproj.exe)
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
Microsoft Patent Promise for Mono
|
||||
|
||||
Microsoft Corporation and its affiliates (“Microsoft”) promise not to
|
||||
assert any Applicable Patents against you for making, using, selling,
|
||||
offering for sale, importing, or distributing Mono.
|
||||
|
||||
If you file, maintain, or voluntarily participate in any claim in a
|
||||
lawsuit alleging direct or contributory patent infringement by Mono,
|
||||
or inducement of patent infringement by Mono, then your rights under
|
||||
this promise will automatically terminate.
|
||||
|
||||
This promise is not an assurance that (i) any Applicable Patents are
|
||||
valid or enforceable or (ii) Mono does not infringe patents or other
|
||||
intellectual property rights of any third party. No rights except
|
||||
those expressly stated in this promise are granted, waived or received
|
||||
by Microsoft, whether by implication, exhaustion, estoppel or
|
||||
otherwise. This is a personal promise directly from Microsoft to you,
|
||||
and you agree as a condition of benefitting from it that no Microsoft
|
||||
rights are received from suppliers, distributors, or otherwise in
|
||||
connection with this promise.
|
||||
|
||||
Definitions:
|
||||
|
||||
“Mono” means those portions of the software development technology, as
|
||||
originally distributed by Xamarin, Inc. or the .NET Foundation under
|
||||
the name “Mono,” that implement .NET Framework Functionality, provided
|
||||
that such portions at a minimum implement all of the required parts of
|
||||
the mandatory provisions of Standard ECMA-335 – Common Language
|
||||
Infrastructure (CLI).
|
||||
|
||||
“.NET Framework Functionality” means any functionality in Microsoft’s
|
||||
.NET Framework as described in Microsoft’s API documentation on
|
||||
Microsoft’s MSDN website, including the functionality in
|
||||
Windowsbase.dll, but excluding all other functionality in the Windows
|
||||
Presentation Foundation component of .NET Framework.
|
||||
|
||||
“Applicable Patents” are those patent claims, currently owned by
|
||||
Microsoft and acquired in the future, that are necessarily infringed
|
||||
by Mono. For clarity, Applicable Patents do not include any patent
|
||||
claims that are infringed (x) by any underlying or enabling technology
|
||||
that may be used, combined, or distributed in connection with Mono
|
||||
(such as hardware, operating systems, or applications that run on
|
||||
Mono), (y) only as a consequence of modification of Mono, or (z) only
|
||||
by the combination of Mono with third party code.
|
||||
@@ -3,8 +3,6 @@ create cross platform applications. It is an open source
|
||||
implementation of Microsoft's .NET Framework based on the ECMA
|
||||
standards for C# and the Common Language Runtime.
|
||||
|
||||
The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.org/)
|
||||
|
||||
[](https://gitter.im/mono/mono?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
1. [Compilation and Installation](#compilation-and-installation)
|
||||
@@ -15,46 +13,32 @@ The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.or
|
||||
6. [Configuration Options](#configuration-options)
|
||||
7. [Working with Submodules](#working-with-submodules)
|
||||
|
||||
### Build Status
|
||||
**Build Status**
|
||||
|
||||
| OS | Architecture | Status |
|
||||
|--------------|--------------------|------------------------------|
|
||||
| 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-amd64][17]][18] |
|
||||
| CentOS | s390x (cs) | [![centos-s390x][19]][20] |
|
||||
| Debian 8 | ppc64el (cs) | [![debian-8-ppc64el][21]][22]|
|
||||
Officially supported architectures:
|
||||
|
||||
_(cs) = community supported architecture_
|
||||
| debian-amd64 | debian-i386 | debian-armel | debian-armhf | windows-amd64 |
|
||||
|-------------------------|------------------------|-------------------------|-------------------------|---------------------------|
|
||||
| [![debian-amd64][1]][2] | [![debian-i386][3]][4] | [![debian-armel][5]][6] | [![debian-armhf][7]][8] | [![windows-amd64][9]][10] |
|
||||
|
||||
[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
|
||||
[14]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-i386/
|
||||
[15]: https://jenkins.mono-project.com/job/z/label=w64/badge/icon
|
||||
[16]: https://jenkins.mono-project.com/job/z/label=w64/
|
||||
[17]: https://jenkins.mono-project.com/job/z/label=w32/badge/icon
|
||||
[18]: https://jenkins.mono-project.com/job/z/label=w32/
|
||||
[19]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x/badge/icon
|
||||
[20]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x
|
||||
[21]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el/badge/icon
|
||||
[22]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el
|
||||
Community supported architectures:
|
||||
|
||||
| centos-s390x |
|
||||
|---------------------------|
|
||||
| [![centos-s390x][11]][12] |
|
||||
|
||||
[1]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/badge/icon
|
||||
[2]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/
|
||||
[3]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/badge/icon
|
||||
[4]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/
|
||||
[5]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armel/badge/icon
|
||||
[6]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armel/
|
||||
[7]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armhf/badge/icon
|
||||
[8]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armhf/
|
||||
[9]: https://ci.appveyor.com/api/projects/status/1e61ebdfpbiei58v/branch/master?svg=true
|
||||
[10]: https://ci.appveyor.com/project/ajlennon/mono-817/branch/master
|
||||
[11]: https://jenkins.mono-project.com/job/z/label=centos-s390x/badge/icon
|
||||
[12]: https://jenkins.mono-project.com/job/z/label=centos-s390x
|
||||
|
||||
Compilation and Installation
|
||||
============================
|
||||
@@ -120,8 +104,6 @@ See the man pages for mono(1), mcs(1) and monodis(1) for further details.
|
||||
Directory Roadmap
|
||||
=================
|
||||
|
||||
* `acceptance-tests/` - Optional third party test suites used to validate Mono against a wider range of test cases.
|
||||
|
||||
* `data/` - Configuration files installed as part of the Mono runtime.
|
||||
|
||||
* `docs/` - Technical documents about the Mono runtime.
|
||||
@@ -193,18 +175,22 @@ disable the compilation of a Mono runtime with the SGen garbage
|
||||
collector.
|
||||
|
||||
* On platforms that support it, after building Mono, you will have
|
||||
both a `mono-boehm` binary and a `mono-sgen` binary. `mono-boehm` uses Boehm,
|
||||
both a `mono` binary and a `mono-sgen` binary. `mono` uses Boehm,
|
||||
while `mono-sgen` uses the Simple Generational GC.
|
||||
|
||||
* `--with-libgc=[included, none]` - Selects the default Boehm
|
||||
* `--with-gc=[included, boehm, none]` - Selects the default Boehm
|
||||
garbage collector engine to use.
|
||||
|
||||
* *included*: (*slightly modified Boehm GC*) This is the default
|
||||
* *included*: (*slighty modified Boehm GC*) This is the default
|
||||
value for the Boehm GC, and it's the most feature complete, it will
|
||||
allow Mono to use typed allocations and support the debugger.
|
||||
|
||||
* *boehm*: This is used to use a system-install Boehm GC, it is
|
||||
useful to test new features available in Boehm GC, but we do not
|
||||
recommend that people use this, as it disables a few features.
|
||||
|
||||
* *none*:
|
||||
Disables the inclusion of a Boehm garbage collector.
|
||||
Disables the inclusion of a garbage collector.
|
||||
|
||||
* This defaults to `included`.
|
||||
|
||||
@@ -461,19 +447,6 @@ disable it.
|
||||
* There are a number of runtime options to control this
|
||||
also, see the man page.
|
||||
|
||||
* `--with-csc=roslyn,mcs,default`
|
||||
|
||||
* Use this option to configure which C# compiler to use. By default
|
||||
the configure script will pick Roslyn, except on platforms where
|
||||
Roslyn does not work (Big Endian systems) where it will pick mcs.
|
||||
|
||||
If you specify "mcs", then Mono's C# compiler will be used. This
|
||||
also allows for a complete bootstrap of Mono's core compiler and
|
||||
core libraries from source.
|
||||
|
||||
If you specify "roslyn", then Roslyn's C# compiler will be used.
|
||||
This currently uses Roslyn binaries.
|
||||
|
||||
* `--enable-nacl`
|
||||
|
||||
* This configures the Mono compiler to generate code
|
||||
@@ -532,32 +505,3 @@ to do at all), first edit `.gitmodules` to point to the new location, then:
|
||||
The desired output diff is a change in `.gitmodules` to reflect the
|
||||
change in the remote URL, and a change in /<submodule> where you see
|
||||
the desired change in the commit hash.
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
See the LICENSE file for licensing information, and the PATENTS.TXT
|
||||
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).
|
||||
|
||||
Maintaining the Class Library Solution Files
|
||||
============================================
|
||||
|
||||
Mono now ships with a solution file that can be used to build the
|
||||
assemblies from an IDE. Either by opening the topmost `net_4_x.sln`
|
||||
file, or to by loading one of the individual `csproj` files located in
|
||||
each directory.
|
||||
|
||||
These are maintained by extracting the configuration information from
|
||||
our Makefiles, which as of May 2016 remain the canonical location for
|
||||
configuration information.
|
||||
|
||||
When changes are made to the Makefiles, a user would need to run the
|
||||
following command to re-generate the solution files at the top level:
|
||||
|
||||
$ make update-solution-files
|
||||
|
||||
+5204
-22
File diff suppressed because it is too large.
Load diff
+10
-31
@@ -1,35 +1,14 @@
|
||||
Acceptance tests
|
||||
================
|
||||
This directory contains acceptance tests, handled by optional non git submodule based submodules. Run the tests via "make check-full" (there are also targets for individual test suites).
|
||||
|
||||
This directory contains acceptance tests, which are third party test suites and frameworks that are used to validate Mono against a wider range of test cases that go beyond the Mono unit tests that run as part of CI.
|
||||
The SUBMODULES.json file stores information about the submodules, and make targets are used to check out submodules, check their versions, and update the submodule information.
|
||||
|
||||
In order to make checking out those test suites optional we don't use traditional git submodules, but instead clone them on demand when needed. The custom submodule repositories are checked out into the acceptance-tests/external/ directory.
|
||||
By convention, submodules repositories are at the same level as the mono repository.
|
||||
|
||||
## Usage
|
||||
Make targets available:
|
||||
|
||||
Running all test suites is possible via "make check-full". There are also targets for running individual test suites, see below.
|
||||
|
||||
Some of the test suites require an installed Mono (i.e. they don't work with the in-tree build), those will ask you to pass in the PREFIX variable pointing to the installation directory when invoking make. Note that this directory needs to be writable as we overwrite some files there as part of testing.
|
||||
|
||||
## Individual test suites and targets
|
||||
|
||||
* `make check-ms-test-suite` - Runs tests that were shared with Xamarin, those are not available publically and will be skipped when the repository is not accessible.
|
||||
* `make check-roslyn` - Runs the Roslyn test suite.
|
||||
* `make check-coreclr` - Runs the CoreCLR test suite.
|
||||
* `make coreclr-runtest-coremanglib` - Runs only the CoreMangLib portion of the CoreCLR tests, those tests mostly target the BCL behavior.
|
||||
* `make coreclr-runtest-basic` - Runs only the CoreCLR tests that target runtime behavior and stability.
|
||||
* `make coreclr-compile-tests` - Convenience target that precompiles all the test cases in parallel.
|
||||
* `make coreclr-gcstress` - Runs the CoreCLR GC stress tests.
|
||||
|
||||
## Updating submodules
|
||||
|
||||
The SUBMODULES.json file stores information about the submodules, and make targets are used to check out submodules, check their versions, and update the submodule information:
|
||||
|
||||
* `make validate-<module>` - Checks whenever `<module>` is checked out and matches the version in the info file.
|
||||
* `make reset-<module>` - Clones `<module>` if neccesary and checks out the revision specified in the info file.
|
||||
* `make bump-<module>` - Updates the revision stored in the info file for `<module>`.
|
||||
* `make bump-current-<module>` - Updates the revision stored in the info file for `<module>` to the current revision.
|
||||
* `make commit-bump-<module>` - Same as `make bump-<module>`, but commits the change.
|
||||
* `make commit-bump-current-<module>` - Same as `make bump-current-<module>`, but commits the change.
|
||||
|
||||
Example: when making a change in the CoreCLR submodule (like disabling something on Mono), you'd commit the change there and then run `make bump-current-coreclr` or `make commit-bump-current-coreclr` to update the version in SUBMODULES.json.
|
||||
make check-<module> - Checks whenever <module> is checked out and matches the version in the info file.
|
||||
make reset-<module> - Clones <module>if neccesary and checks out the revision specified in the info file.
|
||||
make bump-<module> - Updates the revision stored in the info file for <module>.
|
||||
make bump-current-<module> - Updates the revision stored in the info file for <module> to the current revision.
|
||||
make commit-bump-<module> - Same as make bump-<module>, but commits the change.
|
||||
make commit-bump-current-<module> - Same as make bump-current-<module>, but commits the change.
|
||||
@@ -10,7 +10,7 @@
|
||||
{
|
||||
"name": "coreclr",
|
||||
"url": "git://github.com/mono/coreclr.git",
|
||||
"rev": "c7da48acf72c40c0c0ed1a80ebfacea21bb3a271",
|
||||
"rev": "96cf61f96b42cf9d013e641609cb7787f6e3a71f",
|
||||
"remote-branch": "origin/mono",
|
||||
"branch": "mono",
|
||||
"directory": "coreclr"
|
||||
@@ -18,17 +18,9 @@
|
||||
{
|
||||
"name": "ms-test-suite",
|
||||
"url": "[email protected]:xamarin/ms-test-suite.git",
|
||||
"rev": "73c155f76b55839f26ba707d6d40091060e4f5d8",
|
||||
"rev": "8eb26bd72a38e2c78675db45b13e89237dbdf4f2",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "ms-test-suite"
|
||||
},
|
||||
{
|
||||
"name": "benchmarker",
|
||||
"url": "git://github.com/xamarin/benchmarker.git",
|
||||
"rev": "97f618cd585af549dd861b7c142656c496f6a89b",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "benchmarker"
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
@@ -1,13 +0,0 @@
|
||||
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)/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 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."; \
|
||||
fi
|
||||
|
||||
$(CLASS)/nunitlite.dll:
|
||||
$(MAKE) -C $(mcs_topdir)/tools/nunit-lite
|
||||
@@ -1,13 +0,0 @@
|
||||
SYS_REFS = \
|
||||
System.dll \
|
||||
System.Core.dll \
|
||||
System.Data.dll \
|
||||
System.Runtime.Serialization.dll \
|
||||
System.Xml.dll \
|
||||
System.Xml.Linq.dll \
|
||||
Mono.Posix.dll
|
||||
|
||||
check-profiler-stress:
|
||||
@$(MAKE) validate-benchmarker RESET_VERSIONS=1
|
||||
cd profiler-stress && $(MCS) -target:exe $(addprefix -r:, $(SYS_REFS)) -out:runner.exe @runner.exe.sources
|
||||
cd profiler-stress && $(RUNTIME) runner.exe
|
||||
@@ -1,278 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
using Mono.Unix.Native;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
// Shut up CLS compliance warnings from Json.NET.
|
||||
[assembly: CLSCompliant (true)]
|
||||
|
||||
namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
// https://github.com/xamarin/benchmarker/blob/master/tools/libdbmodel/Benchmark.cs
|
||||
sealed class Benchmark {
|
||||
|
||||
public string Name { get; set; }
|
||||
public string TestDirectory { get; set; }
|
||||
public bool OnlyExplicit { get; set; }
|
||||
public string[] CommandLine { get; set; }
|
||||
public string[] ClientCommandLine { get; set; }
|
||||
public string[] AOTAssemblies { get; set; }
|
||||
|
||||
public static Benchmark Load (string file)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<Benchmark> (File.ReadAllText (file));
|
||||
}
|
||||
}
|
||||
|
||||
sealed class TestResult {
|
||||
|
||||
public Benchmark Benchmark { get; set; }
|
||||
public ProcessStartInfo StartInfo { get; set; }
|
||||
public Stopwatch Stopwatch { get; set; } = new Stopwatch ();
|
||||
public int? ExitCode { get; set; }
|
||||
public StringBuilder StandardOutput { get; set; } = new StringBuilder ();
|
||||
public StringBuilder StandardError { get; set; } = new StringBuilder ();
|
||||
}
|
||||
|
||||
static class Program {
|
||||
|
||||
static readonly TimeSpan _timeout = TimeSpan.FromHours (6);
|
||||
|
||||
static string FilterInvalidXmlChars (string text) {
|
||||
return Regex.Replace (text, @"[^\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u10000-\u10FFFF]", string.Empty);
|
||||
}
|
||||
|
||||
static int Main ()
|
||||
{
|
||||
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)
|
||||
.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 rand = new Random ();
|
||||
var cpus = Environment.ProcessorCount;
|
||||
|
||||
var results = new List<TestResult> (benchmarks.Length);
|
||||
|
||||
var sw = Stopwatch.StartNew ();
|
||||
|
||||
for (var i = 0; i < benchmarks.Length; i++) {
|
||||
var bench = benchmarks [i];
|
||||
|
||||
var sampleFreq = rand.Next (0, 1001);
|
||||
var sampleMode = rand.Next (0, 2) == 1 ? "real" : "process";
|
||||
var maxSamples = rand.Next (0, cpus * 2000 + 1);
|
||||
var heapShotFreq = rand.Next (0, 11);
|
||||
var maxFrames = rand.Next (0, 33);
|
||||
var allocMode = rand.Next (0, 2) == 1 ? "alloc" : "noalloc";
|
||||
|
||||
var profOptions = $"sample=cycles/{sampleFreq},sampling-{sampleMode},maxsamples={maxSamples},heapshot={heapShotFreq}gc,maxframes={maxFrames},{allocMode},output=/dev/null";
|
||||
|
||||
var info = new ProcessStartInfo {
|
||||
UseShellExecute = false,
|
||||
WorkingDirectory = Path.Combine (testDir, bench.TestDirectory),
|
||||
FileName = monoPath,
|
||||
Arguments = $"--debug --profile=log:{profOptions} " + string.Join (" ", bench.CommandLine),
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
};
|
||||
|
||||
info.EnvironmentVariables.Clear ();
|
||||
info.EnvironmentVariables.Add ("MONO_PATH", classDir);
|
||||
|
||||
var progress = $"({i + 1}/{benchmarks.Length})";
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Blue;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] {progress} Running {bench.Name} with profiler options: {profOptions}");
|
||||
Console.ResetColor ();
|
||||
|
||||
var result = new TestResult {
|
||||
Benchmark = bench,
|
||||
StartInfo = info,
|
||||
};
|
||||
|
||||
using (var proc = new Process ()) {
|
||||
proc.StartInfo = info;
|
||||
|
||||
proc.OutputDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
result.StandardOutput.AppendLine (args.Data);
|
||||
};
|
||||
|
||||
proc.ErrorDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
result.StandardError.AppendLine (args.Data);
|
||||
};
|
||||
|
||||
result.Stopwatch.Start ();
|
||||
|
||||
proc.Start ();
|
||||
|
||||
proc.BeginOutputReadLine ();
|
||||
proc.BeginErrorReadLine ();
|
||||
|
||||
if (!proc.WaitForExit ((int) _timeout.TotalMilliseconds)) {
|
||||
// Force a thread dump.
|
||||
Syscall.kill (proc.Id, Signum.SIGQUIT);
|
||||
Thread.Sleep (1000);
|
||||
|
||||
try {
|
||||
proc.Kill ();
|
||||
} catch (Exception) {
|
||||
}
|
||||
} else
|
||||
result.ExitCode = proc.ExitCode;
|
||||
|
||||
result.Stopwatch.Stop ();
|
||||
}
|
||||
|
||||
var resultStr = result.ExitCode == null ? "timed out" : $"exited with code: {result.ExitCode}";
|
||||
|
||||
Console.ForegroundColor = result.ExitCode != 0 ? ConsoleColor.Red : ConsoleColor.Green;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] {progress} {bench.Name} took {result.Stopwatch.Elapsed.ToString ("G")} and {resultStr}");
|
||||
Console.ResetColor ();
|
||||
|
||||
if (result.ExitCode != 0) {
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stdout =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.StandardOutput.ToString ());
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stderr =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.StandardError.ToString ());
|
||||
}
|
||||
|
||||
results.Add (result);
|
||||
}
|
||||
|
||||
sw.Stop ();
|
||||
|
||||
var successes = results.Count (r => r.ExitCode == 0);
|
||||
var failures = results.Count (r => r.ExitCode != null && r.ExitCode != 0);
|
||||
var timeouts = results.Count (r => r.ExitCode == null);
|
||||
|
||||
var settings = new XmlWriterSettings {
|
||||
NewLineOnAttributes = true,
|
||||
Indent = true,
|
||||
};
|
||||
|
||||
using (var writer = XmlWriter.Create ("TestResult-profiler-stress.xml", settings)) {
|
||||
writer.WriteStartDocument ();
|
||||
writer.WriteComment ("This file represents the results of running a test suite");
|
||||
|
||||
writer.WriteStartElement ("test-results");
|
||||
writer.WriteAttributeString ("name", "profiler-stress-tests.dummy");
|
||||
writer.WriteAttributeString ("total", results.Count.ToString ());
|
||||
writer.WriteAttributeString ("failures", failures.ToString ());
|
||||
writer.WriteAttributeString ("not-run", "0");
|
||||
writer.WriteAttributeString ("date", DateTime.Now.ToString ("yyyy-MM-dd"));
|
||||
writer.WriteAttributeString ("time", DateTime.Now.ToString ("HH:mm:ss"));
|
||||
|
||||
writer.WriteStartElement ("environment");
|
||||
writer.WriteAttributeString ("nunit-version", "2.4.8.0");
|
||||
writer.WriteAttributeString ("clr-version", Environment.Version.ToString ());
|
||||
writer.WriteAttributeString ("os-version", Environment.OSVersion.ToString ());
|
||||
writer.WriteAttributeString ("platform", Environment.OSVersion.Platform.ToString ());
|
||||
writer.WriteAttributeString ("cwd", Environment.CurrentDirectory);
|
||||
writer.WriteAttributeString ("machine-name", Environment.MachineName);
|
||||
writer.WriteAttributeString ("user", Environment.UserName);
|
||||
writer.WriteAttributeString ("user-domain", Environment.UserDomainName);
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteStartElement ("culture-info");
|
||||
writer.WriteAttributeString ("current-culture", CultureInfo.CurrentCulture.Name);
|
||||
writer.WriteAttributeString ("current-uiculture", CultureInfo.CurrentUICulture.Name);
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteStartElement ("test-suite");
|
||||
writer.WriteAttributeString ("name", "profiler-stress-tests.dummy");
|
||||
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
|
||||
writer.WriteStartElement ("results");
|
||||
|
||||
writer.WriteStartElement ("test-suite");
|
||||
writer.WriteAttributeString ("name", "MonoTests");
|
||||
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
|
||||
writer.WriteStartElement ("results");
|
||||
|
||||
writer.WriteStartElement ("test-suite");
|
||||
writer.WriteAttributeString ("name", "profiler-stress");
|
||||
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
|
||||
writer.WriteStartElement ("results");
|
||||
|
||||
foreach (var result in results) {
|
||||
var timeoutStr = result.ExitCode == null ? "_timeout" : string.Empty;
|
||||
|
||||
writer.WriteStartElement ("test-case");
|
||||
writer.WriteAttributeString ("name", $"MonoTests.profiler-stress.{result.Benchmark.Name}{timeoutStr}");
|
||||
writer.WriteAttributeString ("executed", "True");
|
||||
writer.WriteAttributeString ("success", (result.ExitCode == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) result.Stopwatch.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", result.ExitCode == 0 ? "0" : "1");
|
||||
|
||||
if (result.ExitCode != 0) {
|
||||
writer.WriteStartElement ("failure");
|
||||
|
||||
writer.WriteStartElement ("message");
|
||||
writer.WriteCData (FilterInvalidXmlChars (result.StandardOutput.ToString ()));
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteStartElement ("stack-trace");
|
||||
writer.WriteCData (FilterInvalidXmlChars (result.StandardError.ToString ()));
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
}
|
||||
|
||||
writer.WriteEndElement ();
|
||||
}
|
||||
|
||||
writer.WriteEndElement ();
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndDocument ();
|
||||
}
|
||||
|
||||
var failureStr = failures + timeouts != 0 ? $" ({failures} failures, {timeouts} timeouts)" : string.Empty;
|
||||
|
||||
Console.ForegroundColor = failures + timeouts != 0 ? ConsoleColor.Red : ConsoleColor.Green;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] Finished with {successes}/{results.Count} passing tests{failureStr}");
|
||||
Console.ResetColor ();
|
||||
|
||||
return failures + timeouts;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonBinaryType.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonBinaryWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonToken.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonType.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonObjectId.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/BinaryConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DataSetConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DataTableConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/CustomCreationConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DateTimeConverterBase.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/EntityKeyMemberConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/ExpandoObjectConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/KeyValuePairConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/BsonObjectIdConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/RegexConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/StringEnumConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ConstructorHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/VersionConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DateFormatHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DateTimeZoneHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Formatting.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConstructorAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonPosition.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPropertyKeyedCollection.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicProxy.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPath.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JRaw.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Required.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonDynamicContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonFormatterConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonISerializableContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonLinqContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonPrimitiveContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DynamicValueProvider.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ErrorEventArgs.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPropertyDescriptor.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultReferenceResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/PreserveReferencesHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/IJsonLineInfo.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonArrayAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonContainerAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DefaultValueHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverterAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonObjectAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializerSettings.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonValidatingReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/IJEnumerable.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenEqualityComparer.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/MemberSerialization.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ObjectCreationHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/IsoDateTimeConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/JavaScriptDateTimeConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonTextReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonPropertyAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonIgnoreAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonTextWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonWriterException.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonReaderException.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverterCollection.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConvert.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializationException.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializer.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/Extensions.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JConstructor.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JContainer.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JEnumerable.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JObject.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JArray.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JToken.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JProperty.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenType.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JValue.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/Extensions.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaModel.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaModelBuilder.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaNodeCollection.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaNode.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/UndefinedSchemaIdHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/ValidationEventArgs.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/ValidationEventHandler.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/CamelCasePropertyNamesContractResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultSerializationBinder.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ErrorContext.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IContractResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IValueProvider.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonDictionaryContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonProperty.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonPropertyCollection.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/MissingMemberHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/NullValueHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ReferenceLoopHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchema.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaConstants.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IReferenceResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaType.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonObjectContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalBase.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerProxy.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonStringContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonTypeReflector.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/CachedAttributeGetter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/LateBoundMetadataTypeAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ReflectionValueProvider.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/OnErrorAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/Base64Encoder.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicProxyMetaObject.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicWrapper.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicReflectionDelegateFactory.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ObjectConstructor.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ILGeneratorExtensions.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ReflectionDelegateFactory.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/LateBoundReflectionDelegateFactory.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MethodCall.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringReference.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ThreadSafeStore.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/TypeNameHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/BidirectionalDictionary.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/CollectionWrapper.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DateTimeUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DictionaryWrapper.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumValue.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumValues.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/JavaScriptUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonToken.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringBuffer.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/CollectionUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ListWrapper.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MathUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MiscellaneousUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ValidationUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/WriteState.cs
|
||||
runner.cs
|
||||
@@ -1,18 +0,0 @@
|
||||
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); \
|
||||
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
|
||||
+117
-12
@@ -1,37 +1,145 @@
|
||||
.PHONY: validate-versions reset-versions
|
||||
|
||||
SUBMODULES_CONFIG_FILE = $(top_srcdir)/acceptance-tests/SUBMODULES.json
|
||||
include $(top_srcdir)/scripts/submodules/versions.mk
|
||||
CONFIG=SUBMODULES.json
|
||||
|
||||
# usage $(call ValidateVersionTemplate (name,MAKEFILE VAR,repo name))
|
||||
# usage $(call ValidateVersionTemplate (mono,MONO,mono))
|
||||
|
||||
define ValidateVersionTemplate
|
||||
#$(eval REPOSITORY_$(2):=$(shell test -z $(3) && echo $(1) || echo "$(3)"))
|
||||
#$(eval DIRECTORY_$(2):=$(shell python versions.py get-dir $(1)))
|
||||
#$(eval DIRECTORY_$(2):=$(shell test -z $(DIRECTORY_$(2)) && echo $(1) || echo $(DIRECTORY_$(2))))
|
||||
#$(eval MODULE_$(2):=$(shell python versions.py get-url $(1)))
|
||||
#$(eval NEEDED_$(2)_VERSION:=$(shell python versions.py get-rev $(1)))
|
||||
#$(eval $(2)_BRANCH_AND_REMOTE:=$(shell python versions.py get-remote-branch $(1)))
|
||||
|
||||
#$(eval $(2)_VERSION:=$$$$(shell cd $($(2)_PATH) 2>/dev/null && git rev-parse HEAD ))
|
||||
|
||||
#$(eval NEEDED_$(2)_BRANCH:=$(word 2, $(subst /, ,$($(2)_BRANCH_AND_REMOTE))))
|
||||
#$(eval NEEDED_$(2)_REMOTE:=$(word 1, $(subst /, ,$($(2)_BRANCH_AND_REMOTE))))
|
||||
#$(eval $(2)_BRANCH:=$$$$(shell cd $($(2)_PATH) 2>/dev/null && git symbolic-ref --short HEAD 2>/dev/null))
|
||||
|
||||
validate-$(1)::
|
||||
@if test x$$(IGNORE_$(2)_VERSION) = "x"; then \
|
||||
if test ! -d $($(2)_PATH); then \
|
||||
if test x$$(RESET_VERSIONS) != "x"; then \
|
||||
$(MAKE) reset-$(1) || exit 1; \
|
||||
else \
|
||||
echo "Your $(1) checkout is missing, please run 'make reset-$(1)'"; \
|
||||
touch .validate-versions-failure; \
|
||||
fi; \
|
||||
else \
|
||||
if test "x$($(2)_VERSION)" != "x$(NEEDED_$(2)_VERSION)" ; then \
|
||||
if test x$$(RESET_VERSIONS) != "x"; then \
|
||||
$(MAKE) reset-$(1) || exit 1; \
|
||||
else \
|
||||
echo "Your $(1) version is out of date, please run 'make reset-$(1)' (found $($(2)_VERSION), expected $(NEEDED_$(2)_VERSION))"; \
|
||||
test -z "$(BUILD_REVISION)" || $(MAKE) test-$(1); \
|
||||
touch .validate-versions-failure; \
|
||||
fi; \
|
||||
elif test "x$($(2)_BRANCH)" != "x$(NEEDED_$(2)_BRANCH)" ; then \
|
||||
if test x$$(RESET_VERSIONS) != "x"; then \
|
||||
test -z "$(BUILD_REVISION)" || $(MAKE) test-$(1); \
|
||||
$(MAKE) reset-$(1) || exit 1; \
|
||||
else \
|
||||
echo "Your $(1) branch is out of date, please run 'make reset-$(1)' (found $($(2)_BRANCH), expected $(NEEDED_$(2)_BRANCH))"; \
|
||||
touch .validate-versions-failure; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
test-$(1)::
|
||||
@echo $(1)
|
||||
@echo " REPOSITORY_$(2)=$(REPOSITORY_$(2))"
|
||||
@echo " DIRECTORY_$(2)=$(DIRECTORY_$(2))"
|
||||
@echo " MODULE_$(2)=$(MODULE_$(2))"
|
||||
@echo " NEEDED_$(2)_VERSION=$(NEEDED_$(2)_VERSION)"
|
||||
@echo " $(2)_VERSION=$($(2)_VERSION)"
|
||||
@echo " $(2)_BRANCH_AND_REMOTE=$($(2)_BRANCH_AND_REMOTE)"
|
||||
@echo " NEEDED_$(2)_BRANCH=$(NEEDED_$(2)_BRANCH)"
|
||||
@echo " NEEDED_$(2)_REMOTE=$(NEEDED_$(2)_REMOTE)"
|
||||
@echo " $(2)_BRANCH=$($(2)_BRANCH)"
|
||||
@echo " $(2)_PATH=$($(2)_PATH) => $(abspath $($(2)_PATH))"
|
||||
|
||||
reset-$(1)::
|
||||
@if test -d $($(2)_PATH); then \
|
||||
if ! (cd $($(2)_PATH) && git show $(NEEDED_$(2)_VERSION) >/dev/null 2>&1 && git log -1 $(NEEDED_$(2)_REMOTE) >/dev/null 2>&1) ; then \
|
||||
echo "*** git fetch `basename $$($(2)_PATH)`" && (cd $($(2)_PATH) && git fetch); \
|
||||
fi; \
|
||||
else \
|
||||
echo "*** git clone $(MODULE_$(2)) --recursive $(DIRECTORY_$(2))" && (cd `dirname $($(2)_PATH)` && git clone $(MODULE_$(2)) --recursive $(DIRECTORY_$(2)) || exit 1 ); \
|
||||
fi
|
||||
@if test x$$(IGNORE_$(2)_VERSION) = "x"; then \
|
||||
echo "*** [$(1)] git checkout -f" $(NEEDED_$(2)_BRANCH) && (cd $($(2)_PATH) ; git checkout -f $(NEEDED_$(2)_BRANCH) || git checkout -f -b $($(2)_BRANCH_AND_REMOTE)); \
|
||||
echo "*** [$(1)] git reset --hard $(NEEDED_$(2)_VERSION)" && (cd $($(2)_PATH) && git reset --hard $(NEEDED_$(2)_VERSION)); \
|
||||
fi
|
||||
@echo "*** [$(1)] git submodule update --init --recursive" && (cd $($(2)_PATH) && git submodule update --init --recursive)
|
||||
|
||||
print-$(1)::
|
||||
@printf "*** %-16s %-45s %s (%s)\n" "$(DIRECTORY_$(2))" "$(MODULE_$(2))" "$(NEEDED_$(2)_VERSION)" "$(NEEDED_$(2)_BRANCH)"
|
||||
|
||||
.PHONY: validate-$(1) reset-$(1) print-$(1)
|
||||
|
||||
reset-versions:: reset-$(1)
|
||||
validate-versions:: Validate-$(1)
|
||||
print-versions:: print-$(1)
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(call ValidateVersionTemplate,benchmarker,BENCHMARKER))
|
||||
$(eval $(call ValidateVersionTemplate,roslyn,ROSLYN))
|
||||
$(eval $(call ValidateVersionTemplate,coreclr,CORECLR))
|
||||
$(eval $(call ValidateVersionTemplate,ms-test-suite,MSTESTSUITE))
|
||||
|
||||
reset-versions::
|
||||
|
||||
validate-versions::
|
||||
@if test -e .validate-versions-failure; then \
|
||||
rm .validate-versions-failure; \
|
||||
echo One or more modules needs update; \
|
||||
exit 1; \
|
||||
else \
|
||||
echo All dependent modules up to date; \
|
||||
fi
|
||||
|
||||
reset:
|
||||
@$(MAKE) validate-versions RESET_VERSIONS=1
|
||||
|
||||
__bump-version-%:
|
||||
@if [ "$(REV)" = "" ]; then echo "Usage: make bump-version-$* REV=<ref>"; exit 1; fi
|
||||
python versions.py set-rev $* $(REV)
|
||||
@if [ "$(COMMIT)" = "1" ]; then echo "[acceptance-tests] Bump $* to pick up $(REV)." | git commit -F - $(CONFIG); fi
|
||||
|
||||
__bump-branch-%:
|
||||
@if [ "$(BRANCH)" = "" ]; then echo "Usage: make bump-branch-$* BRANCH=<branch> REMOTE_BRANCH=<remote branch>"; exit 1; fi
|
||||
@if [ "$(REMOTE_BRANCH)" == "" ]; then echo "Usage: make bump-branch-$* BRANCH=<branch> REMOTE_BRANCH=<remote branch>"; exit 1; fi
|
||||
python versions.py set-branch $* $(BRANCH)
|
||||
python versions.py set-remote-branch $* $(REMOTE_BRANCH)
|
||||
@if [ "$(COMMIT)" = "1" ]; then echo "[acceptance-tests] Bump $* to switch to $(BRANCH) $(REMOTE BRANCH)." | git commit -F - $(CONFIG); fi
|
||||
|
||||
__bump-current-version-%:
|
||||
REV=$(shell cd $(TOP)/../$* && git log -1 --pretty=format:%H); \
|
||||
python versions.py set-rev $* $$REV; \
|
||||
if [ "$(COMMIT)" = "1" ]; then echo "[acceptance-tests] Bump $* to pick up $$REV:" | git commit -F - $(CONFIG); fi
|
||||
|
||||
# Bump the given submodule to the revision given by the REV make variable
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-benchmarker: __bump-benchmarker
|
||||
bump-roslyn: __bump-version-roslyn
|
||||
bump-coreclr: __bump-version-coreclr
|
||||
bump-ms-test-suite: __bump-version-ms-test-suite
|
||||
|
||||
# Bump the given submodule to the branch given by the BRANCH/REMOTE_BRANCH make variables
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-branch-benchmarker: __bump-branch-benchmarker
|
||||
bump-branch-roslyn: __bump-branch-roslyn
|
||||
bump-branch-coreclr: __bump-branch-coreclr
|
||||
bump-branch-ms-test-suite: __bump-branch-ms-test-suite
|
||||
|
||||
# Bump the given submodule to its current GIT version
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-current-benchmarker: __bump-current-benchmarker
|
||||
bump-current-roslyn: __bump-current-version-roslyn
|
||||
bump-current-coreclr: __bump-current-version-coreclr
|
||||
bump-current-ms-test-suite: __bump-current-version-ms-test-suite
|
||||
|
||||
commit-bump-benchmarker:
|
||||
$(MAKE) bump-benchmarker COMMIT=1
|
||||
|
||||
commit-bump-roslyn:
|
||||
$(MAKE) bump-roslyn COMMIT=1
|
||||
|
||||
@@ -41,9 +149,6 @@ commit-bump-coreclr:
|
||||
commit-bump-ms-test-suite:
|
||||
$(MAKE) bump-ms-test-suite COMMIT=1
|
||||
|
||||
commit-bump-current-benchmarker:
|
||||
$(MAKE) bump-current-benchmarker COMMIT=1
|
||||
|
||||
commit-bump-current-roslyn:
|
||||
$(MAKE) bump-current-roslyn COMMIT=1
|
||||
|
||||
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import json
|
||||
|
||||
def find_module(submodules, name):
|
||||
for item in submodules:
|
||||
if item["name"] == name:
|
||||
return item
|
||||
|
||||
print "Not found"
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print "Usage: versions.py <command>"
|
||||
sys.exit(1)
|
||||
|
||||
CONFIG_FILE = "SUBMODULES.json"
|
||||
command = sys.argv[1]
|
||||
|
||||
submodules = json.load(open(CONFIG_FILE))
|
||||
|
||||
if command == "get-rev":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
print mod["rev"]
|
||||
elif command == "get-url":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
print mod["url"]
|
||||
elif command == "get-dir":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
print mod["directory"]
|
||||
elif command == "get-remote-branch":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
print mod["remote-branch"]
|
||||
elif command == "set-rev":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
mod["rev"] = sys.argv[3]
|
||||
json.dump(submodules, open(CONFIG_FILE, "w"), indent = 2)
|
||||
elif command == "set-branch":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
mod["branch"] = sys.argv[3]
|
||||
json.dump(submodules, open(CONFIG_FILE, "w"), indent = 2)
|
||||
elif command == "set-remote-branch":
|
||||
mod = find_module(submodules, sys.argv[2])
|
||||
mod["remote-branch"] = sys.argv[3]
|
||||
json.dump(submodules, open(CONFIG_FILE, "w"), indent = 2)
|
||||
elif command == "cat":
|
||||
print json.dumps(submodules, indent = 2)
|
||||
else:
|
||||
print "Unknown command "" + command + ""."
|
||||
sys.exit(1)
|
||||
@@ -0,0 +1,79 @@
|
||||
#
|
||||
# Appveyor configuration file for CI build of Mono on Windows (under Cygwin)
|
||||
#
|
||||
# For further details see http://www.appveyor.com
|
||||
#
|
||||
|
||||
#
|
||||
# Custom environment variables
|
||||
#
|
||||
environment:
|
||||
global:
|
||||
CYG_ROOT: C:\cygwin
|
||||
CYG_MIRROR: http://cygwin.mirror.constant.com
|
||||
CYG_CACHE: C:\cygwin\var\cache\setup
|
||||
CYG_BASH: C:\cygwin\bin\bash
|
||||
|
||||
#
|
||||
# Cache Cygwin files to speed up build
|
||||
#
|
||||
cache:
|
||||
- '%CYG_CACHE%'
|
||||
|
||||
#
|
||||
# Do a shallow clone of the repo to speed up build
|
||||
#
|
||||
clone_depth: 1
|
||||
|
||||
#
|
||||
# Initialisation prior to pulling the Mono repository
|
||||
# Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
|
||||
#
|
||||
init:
|
||||
- git config --global core.autocrlf input
|
||||
|
||||
#
|
||||
# Install needed build dependencies
|
||||
#
|
||||
install:
|
||||
- ps: 'Start-FileDownload "http://cygwin.com/setup-x86.exe" -FileName "setup-x86.exe"'
|
||||
- 'setup-x86.exe --quiet-mode --no-shortcuts --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages autoconf,automake,bison,gcc-core,gcc-g++,mingw-runtime,mingw-binutils,mingw-gcc-core,mingw-gcc-g++,mingw-pthreads,mingw-w32api,libtool,make,python,gettext-devel,gettext,intltool,libiconv,pkg-config,git,curl,libxslt > NUL 2>&1'
|
||||
- '%CYG_BASH% -lc "cygcheck -dc cygwin"'
|
||||
|
||||
# Cygwin build script
|
||||
#
|
||||
# NOTES:
|
||||
#
|
||||
# The stdin/stdout file descriptor appears not to be valid for the Appveyor
|
||||
# build which causes failures as certain functions attempt to redirect
|
||||
# default file handles. Ensure a dummy file descriptor is opened with 'exec'.
|
||||
#
|
||||
build_script:
|
||||
- 'echo Building...'
|
||||
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; ./autogen.sh --prefix=/usr/local --host=i686-pc-mingw32"'
|
||||
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make get-monolite-latest"'
|
||||
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make -j2"'
|
||||
- 'echo Installing...'
|
||||
- 'mkdir %APPVEYOR_BUILD_FOLDER%\install'
|
||||
- '%CYG_BASH% -lc "export CYGWIN=winsymlinks:native; mount \"$APPVEYOR_BUILD_FOLDER\install\" /usr/local; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make install; umount /usr/local"'
|
||||
|
||||
#
|
||||
# Disable tests for now
|
||||
#
|
||||
test: off
|
||||
|
||||
#
|
||||
# Only build the master branch
|
||||
#
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
#
|
||||
# NOTE: Currently this is the Mono installation tree. In future we will create an installation package artifact.
|
||||
# It has to be relative to the project path. Thus we have installed to within the build tree.
|
||||
#
|
||||
artifacts:
|
||||
- path: install
|
||||
name: mono-binaries
|
||||
type: zip
|
||||
+1
-4
@@ -160,11 +160,8 @@ if test -d $srcdir/eglib; then
|
||||
echo Done running eglib/autogen.sh ...
|
||||
fi
|
||||
|
||||
if test x$MONO_EXTRA_CONFIGURE_FLAGS != x; then
|
||||
echo "MONO_EXTRA_CONFIGURE_FLAGS is $MONO_EXTRA_CONFIGURE_FLAGS"
|
||||
fi
|
||||
|
||||
conf_flags="$MONO_EXTRA_CONFIGURE_FLAGS --enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
@echo off
|
||||
cd mcs\jay
|
||||
vcbuild jay.vcxproj
|
||||
cd msvc\scripts
|
||||
csc prepare.cs
|
||||
prepare.exe ..\..\mcs core
|
||||
msbuild net_4_x.sln
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
(cd mcs/jay; make)
|
||||
(cd msvc/scripts/; make prepare.exe; mono prepare.exe ../../mcs core)
|
||||
msbuild net_4_x.sln
|
||||
+277
-958
File diff suppressed because it is too large.
Load diff
@@ -11,22 +11,14 @@
|
||||
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="MonoPosixHelper" target="$mono_libdir/libMonoPosixHelper@libsuffix@" os="!windows" />
|
||||
<dllmap dll="libmono-btls-shared" target="$mono_libdir/libmono-btls-shared@libsuffix@" os="!windows" />
|
||||
<dllmap dll="System.Native" target="$mono_libdir/System.Native@libsuffix@" os="!windows" />
|
||||
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
|
||||
<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
|
||||
<dllmap dll="libX11" target="@X11@" os="!windows" />
|
||||
<dllmap dll="libgdk-x11-2.0" target="@GDKX11@" os="!windows"/>
|
||||
<dllmap dll="libgdk_pixbuf-2.0" target="libgdk_pixbuf-2.0.so.0" os="!windows"/>
|
||||
<dllmap dll="libgtk-x11-2.0" target="@GTKX11@" os="!windows"/>
|
||||
<dllmap dll="libglib-2.0" target="libglib-2.0.so.0" os="!windows"/>
|
||||
<dllmap dll="libgobject-2.0" target="libgobject-2.0.so.0" os="!windows"/>
|
||||
<dllmap dll="libgnomeui-2" target="libgnomeui-2.so.0" os="!windows"/>
|
||||
<dllmap dll="librsvg-2" target="librsvg-2.so.2" os="!windows"/>
|
||||
<dllmap dll="libXinerama" target="@XINERAMA@" os="!windows" />
|
||||
<dllmap dll="libasound" target="libasound.so.2" os="!windows" />
|
||||
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
|
||||
<dllmap dll="libcairo-2.dll" target="libcairo.2.dylib" os="osx"/>
|
||||
<dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
|
||||
|
||||
@@ -167,6 +167,8 @@ class MonoClassPrinter:
|
||||
return "0x0"
|
||||
klass = self.val.dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
if klass ["generic_class"].cast (gdb.lookup_type ("guint64")) != 0:
|
||||
class_name = "{}<{}>".format (class_name, str (klass ["generic_class"]["context"]["class_inst"]))
|
||||
if add_quotes:
|
||||
return "\"{}\"".format (class_name)
|
||||
else:
|
||||
@@ -196,7 +198,7 @@ class MonoGenericInstPrinter:
|
||||
inst_args = inst ["type_argv"]
|
||||
inst_str = ""
|
||||
for i in range(0, inst_len):
|
||||
# print (inst_args)
|
||||
print (inst_args)
|
||||
type_printer = MonoTypePrinter (inst_args [i])
|
||||
if i > 0:
|
||||
inst_str = inst_str + ", "
|
||||
@@ -238,7 +240,7 @@ class MonoTypePrinter:
|
||||
|
||||
def to_string_inner(self, csharp):
|
||||
try:
|
||||
t = self.val.referenced_value ()
|
||||
t = self.val.dereference ()
|
||||
|
||||
kind = str (t ["type"]).replace ("MONO_TYPE_", "").lower ()
|
||||
info = ""
|
||||
@@ -250,9 +252,9 @@ class MonoTypePrinter:
|
||||
info = str(t ["data"]["generic_class"])
|
||||
|
||||
if info != "":
|
||||
return "{{{}, {}}}".format (kind, info)
|
||||
return "{{}, {}}".format (kind, info)
|
||||
else:
|
||||
return "{{{}}}".format (kind)
|
||||
return "{{}}".format (kind)
|
||||
except:
|
||||
#print (sys.exc_info ()[0])
|
||||
#print (sys.exc_info ()[1])
|
||||
@@ -276,7 +278,7 @@ class MonoMethodRgctxPrinter:
|
||||
inst_args = inst ["type_argv"]
|
||||
inst_str = ""
|
||||
for i in range(0, inst_len):
|
||||
# print (inst_args)
|
||||
print (inst_args)
|
||||
type_printer = MonoTypePrinter (inst_args [i])
|
||||
if i > 0:
|
||||
inst_str = inst_str + ", "
|
||||
|
||||
+4
-27
@@ -9,38 +9,16 @@ def print_frames(thread, num_frames, current_thread):
|
||||
|
||||
for frame in thread.frames[:+num_frames]:
|
||||
pc = str(frame.addr)
|
||||
fmt = ' %c %s'
|
||||
var = frame
|
||||
function_name = frame.GetFunctionName()
|
||||
if function_name == "ves_exec_method_with_context":
|
||||
try:
|
||||
s = 'frame->runtime_method->method'
|
||||
klassname = frame.EvaluateExpression('(char*) ' + s + '->klass->name').summary[1:-1]
|
||||
methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
|
||||
|
||||
ipoffset = frame.EvaluateExpression('ip').GetValueAsUnsigned()
|
||||
insn = ''
|
||||
if ipoffset != 0:
|
||||
ipoffset -= frame.EvaluateExpression('rtm->code').GetValueAsUnsigned()
|
||||
insn = "\"" + frame.EvaluateExpression('mono_interp_opname [*ip]').summary[1:-1] + "\""
|
||||
var = '%s::%s @ %d %s || %s' % (klassname, methodname, ipoffset, insn, frame)
|
||||
except Exception as e:
|
||||
print "DBG: execfail:" + str(e)
|
||||
elif function_name == "mono_interp_transform_method":
|
||||
try:
|
||||
s = 'runtime_method->method'
|
||||
klassname = frame.EvaluateExpression('(char*) ' + s + '->klass->name').summary[1:-1]
|
||||
methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
|
||||
var = 'transforming %s::%s || %s' % (klassname, methodname, frame)
|
||||
except Exception as e:
|
||||
print "DBG: transformfail:" + str(e)
|
||||
elif pc[0] == '0':
|
||||
if pc[0] == '0':
|
||||
try:
|
||||
framestr = frame.EvaluateExpression('(char*)mono_pmip((void*)%s)' % pc).summary[1:-1]
|
||||
var = 'frame #%i: %s%s' % (frame.idx, pc, framestr)
|
||||
except:
|
||||
pass
|
||||
|
||||
print ' %c %s' % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var)
|
||||
print fmt % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var)
|
||||
|
||||
def monobt(debugger, command, result, dict):
|
||||
opts = {'all_bt': False, 'num_frames': None}
|
||||
@@ -75,5 +53,4 @@ def __lldb_init_module (debugger, dict):
|
||||
# This initializer is being run from LLDB in the embedded command interpreter
|
||||
# Add any commands contained in this module to LLDB
|
||||
debugger.HandleCommand('command script add -f monobt.monobt monobt')
|
||||
debugger.HandleCommand('command alias mbt monobt')
|
||||
print '"monobt" command installed'
|
||||
print '"monobt" command installed'
|
||||
@@ -86,7 +86,7 @@ LOCK RULES
|
||||
Simple locks:
|
||||
Can be acquired at any point regardless of which locks are taken or not.
|
||||
No other locks can be acquired or released while holding a simple lock.
|
||||
Reentrancy is not recommended. (warning)
|
||||
Reentrancy is not recomended. (warning)
|
||||
Simple locks are leaf locks on the lock lattice.
|
||||
|
||||
Complex locks:
|
||||
@@ -129,7 +129,7 @@ ERROR: tried to acquire lock DomainLock at mono_domain_code_reserve_align while
|
||||
WARNING: tried to acquire lock ImageDataLock at mono_image_init_name_cache while holding ImageDataLock at mono_class_from_name
|
||||
WARNING: tried to acquire lock ImageDataLock at mono_image_init_name_cache while holding ImageDataLock at mono_image_add_to_name_cache
|
||||
Both of those happen when filling up the name_cache, as it needs to alloc image memory.
|
||||
This one is fixable by splitting mono_image_init_name_cache into a locked and an unlocked variants and calling them appropriately.
|
||||
This one is fixable by spliting mono_image_init_name_cache into a locked and an unlocked variants and calling them appropriatedly.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -74,6 +74,9 @@
|
||||
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
|
||||
@@ -118,6 +118,9 @@
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
|
||||
<system.runtime.remoting>
|
||||
|
||||
@@ -135,6 +135,9 @@
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
|
||||
<system.runtime.remoting>
|
||||
|
||||
@@ -138,6 +138,9 @@
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
|
||||
<system.runtime.remoting>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
check-coverage crlf=input
|
||||
check-exports crlf=input
|
||||
produce-lists crlf=input
|
||||
@@ -9,4 +9,3 @@
|
||||
/mono-tools.tree
|
||||
/mono-tools.zip
|
||||
/AgilityPack.dll*
|
||||
/doxygen-output
|
||||
+1
-6
@@ -64,7 +64,6 @@ dist-hook:
|
||||
|
||||
clean-local:
|
||||
-rm -Rf html
|
||||
-rm -Rf doxygen-output
|
||||
-rm -f deploy/* convert.exe* AgilityPack.dll*
|
||||
-rm -f $(ASSEMBLED_DOCS)
|
||||
|
||||
@@ -87,7 +86,7 @@ mono-file-formats.zip: mono-file-formats.tree
|
||||
mono-file-formats.tree: $(srcdir)/docs.make $(srcdir)/Makefile.am $(srcdir)/deploy/.stamp
|
||||
$(TOOL_MAKE) $@
|
||||
|
||||
deploy/.stamp: convert.exe Makefile.am exdoc
|
||||
deploy/.stamp: convert.exe Makefile.am
|
||||
$(mkdir_p) html
|
||||
runtimedir=`cd ../runtime && pwd`; export runtimedir; \
|
||||
MONO_PATH=$(CLASS) perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c
|
||||
@@ -101,7 +100,3 @@ convert.exe: convert.cs AgilityPack.dll
|
||||
AgilityPack.dll:
|
||||
$(TOOL_MAKE) AgilityPack.dll
|
||||
|
||||
doxygen:
|
||||
doxygen doxyfile
|
||||
|
||||
.PHONY: doxygen
|
||||
@@ -26,7 +26,7 @@ some combination of the two.
|
||||
|
||||
To be clearer, and give an idea of what the algorithm can and
|
||||
cannot do without describing it in detail... keep in mind that
|
||||
only "redundant" checks cannot be removed. By "redundant", I
|
||||
only "redunant" checks cannot be removed. By "redundant", I
|
||||
mean "already explicitly checked" in the method code.
|
||||
|
||||
Unfortunately, analyzing complex expressions is not so easy
|
||||
@@ -136,7 +136,7 @@ some combination of the two.
|
||||
In the first case, the BB has exactly two exit BBs, and their
|
||||
execution conditions are easy to get from the condition of the
|
||||
branch (see the "get_relation_from_branch_instruction"
|
||||
function, and especially the end of "analyze_block" in
|
||||
function, and expecially the end of "analyze_block" in
|
||||
abcremoval.c.
|
||||
|
||||
If there is a switch, the jump condition of every exit BB is
|
||||
@@ -303,7 +303,7 @@ some combination of the two.
|
||||
each BB tried to examine all possible conditions between all
|
||||
variables, filling a sort of "evaluation matrix". The problem
|
||||
was that the complexity of this evaluation was quadratic (or
|
||||
worse) on the number of variables, and that many variables
|
||||
worse) on the number of variables, and that many wariables
|
||||
were examined even if they were not involved in any array
|
||||
access.
|
||||
|
||||
@@ -332,7 +332,7 @@ some combination of the two.
|
||||
|
||||
[1b] Prepare the evaluation graph (empty)
|
||||
|
||||
[1b] Summarize each variable definition, and put
|
||||
[1b] Summarize each varible definition, and put
|
||||
the resulting relations in the evaluation
|
||||
graph
|
||||
|
||||
|
||||
+2
-2
@@ -13,10 +13,10 @@ ASSEMBLED_DOCS = \
|
||||
monoapi.tree monoapi.zip
|
||||
|
||||
convert.exe: $(srcdir)/convert.cs AgilityPack.dll
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -out:$@ $< -r:AgilityPack.dll
|
||||
$(CSCOMPILE) -out:$@ $< -r:AgilityPack.dll
|
||||
|
||||
AgilityPack.dll:
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs
|
||||
$(CSCOMPILE) -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs
|
||||
|
||||
monoapi.zip: monoapi.tree
|
||||
@test -f $@ || { rm -f $< && $(MAKE) $<; }
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
ALPHABETICAL_INDEX = YES
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
AUTOLINK_SUPPORT = YES
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
CALLER_GRAPH = YES
|
||||
CALL_GRAPH = YES
|
||||
CASE_SENSE_NAMES = NO
|
||||
CLASS_DIAGRAMS = YES
|
||||
COLS_IN_ALPHA_INDEX = 1
|
||||
CREATE_SUBDIRS = NO
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_CLEANUP = YES
|
||||
DOT_IMAGE_FORMAT = svg
|
||||
DOT_MULTI_TARGETS = YES
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
ENABLE_PREPROCESSING = YES
|
||||
ENUM_VALUES_PER_LINE = 1
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
EXTENSION_MAPPING = c=C h=C
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_STATIC = YES
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
FILE_PATTERNS = *.c *.h
|
||||
FULL_PATH_NAMES = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST = YES
|
||||
GENERATE_HTML = YES
|
||||
GENERATE_LEGEND = YES
|
||||
GENERATE_PERLMOD = NO
|
||||
GENERATE_TESTLIST = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TREEVIEW = YES
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
HAVE_DOT = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HTML_COLORSTYLE_GAMMA = 80
|
||||
HTML_COLORSTYLE_HUE = 220
|
||||
HTML_COLORSTYLE_SAT = 100
|
||||
HTML_DYNAMIC_SECTIONS = YES
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_INDEX_NUM_ENTRIES = 100
|
||||
HTML_OUTPUT = doxygen
|
||||
HTML_TIMESTAMP = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INHERIT_DOCS = YES
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
INLINE_SOURCES = YES
|
||||
INPUT = ../mono
|
||||
INPUT_ENCODING = UTF-8
|
||||
INTERACTIVE_SVG = YES
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
MACRO_EXPANSION = NO
|
||||
MARKDOWN_SUPPORT = YES
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OUTPUT_DIRECTORY = doxygen-output
|
||||
OUTPUT_LANGUAGE = English
|
||||
PREDEFINED = "HAVE_SGEN_GC="
|
||||
PROJECT_NAME = "Mono"
|
||||
QT_AUTOBRIEF = NO
|
||||
QUIET = NO
|
||||
RECURSIVE = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_LINK_SOURCE = YES
|
||||
REFERENCES_RELATION = YES
|
||||
REPEAT_BRIEF = YES
|
||||
SEARCHENGINE = YES
|
||||
SEARCH_INCLUDES = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
SHORT_NAMES = NO
|
||||
SHOW_FILES = YES
|
||||
SHOW_USED_FILES = YES
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
SORT_BRIEF_DOCS = YES
|
||||
SORT_GROUP_NAMES = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SOURCE_BROWSER = YES
|
||||
SOURCE_TOOLTIPS = YES
|
||||
STRIP_CODE_COMMENTS = NO
|
||||
TAB_SIZE = 4
|
||||
TREEVIEW_WIDTH = 250
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
USE_HTAGS = NO
|
||||
USE_MDFILE_AS_MAINPAGE = ../README.md
|
||||
VERBATIM_HEADERS = YES
|
||||
WARNINGS = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_NO_PARAMDOC = YES
|
||||
+259
-436
@@ -1,295 +1,91 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
|
||||
# Options
|
||||
my $HELP = 0;
|
||||
my $SOURCE_DIR = '';
|
||||
my $TARGET_DIR = '';
|
||||
my $WARNINGS = 0;
|
||||
|
||||
GetOptions(
|
||||
"help" => \$HELP,
|
||||
"html|h=s" => \$SOURCE_DIR,
|
||||
"target|t=s" => \$TARGET_DIR,
|
||||
"warnings|W" => \$WARNINGS,
|
||||
) or pod2usage(1);
|
||||
|
||||
pod2usage(0) if $HELP;
|
||||
|
||||
exdoc();
|
||||
|
||||
#
|
||||
# Main entry point.
|
||||
#
|
||||
sub exdoc {
|
||||
my %templates = ();
|
||||
my %docs = ();
|
||||
my $stylesheet = load_stylesheet($SOURCE_DIR);
|
||||
load_templates($SOURCE_DIR, \%templates);
|
||||
process_source_files(\%docs);
|
||||
merge(\%docs, \%templates, \$stylesheet);
|
||||
if ($ARGV[0] eq "-h"){
|
||||
$sourcedir = $ARGV[1];
|
||||
$dir = $sourcedir;
|
||||
$html = 1;
|
||||
shift @ARGV;
|
||||
shift @ARGV;
|
||||
}
|
||||
open (FILE, "$dir/api-style.css" || die "Did not find $dir/api-style.css");
|
||||
while (<FILE>){
|
||||
$css = $css . $_;
|
||||
}
|
||||
|
||||
#
|
||||
# Load CSS stylesheet.
|
||||
#
|
||||
sub load_stylesheet {
|
||||
my ($dir_path) = @_;
|
||||
my $file_path = "$dir_path/api-style.css";
|
||||
open (my $file, '<', $file_path) or die "Could not open $file_path";
|
||||
local $/;
|
||||
my $contents = <$file>;
|
||||
close $file;
|
||||
return $contents;
|
||||
if ($ARGV[0] eq "-t"){
|
||||
$dir = $ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
|
||||
#
|
||||
# Load HTML templates.
|
||||
#
|
||||
sub load_templates {
|
||||
my ($dir_path, $templates) = @_;
|
||||
opendir (my $dir, "$dir_path/sources/") or die "Could not open $dir_path";
|
||||
while (my $file_name = readdir ($dir)) {
|
||||
next if $file_name !~ /mono-api-.*\.html$/;
|
||||
open (my $file, "$dir_path/sources/$file_name") or die "Could not open $file_name";
|
||||
my $contents = '';
|
||||
my @api = ();
|
||||
while (<$file>) {
|
||||
$contents .= $_;
|
||||
if (/name="api:(.*?)"/) {
|
||||
s/.*name="api:(\w+?)".*/$1/;
|
||||
push @api, $_;
|
||||
}
|
||||
}
|
||||
close $file;
|
||||
$templates->{$file_name}->{contents} = $contents;
|
||||
$templates->{$file_name}->{api} = \@api;
|
||||
}
|
||||
closedir $dir;
|
||||
}
|
||||
|
||||
#
|
||||
# Extract documentation from all source files.
|
||||
#
|
||||
sub process_source_files {
|
||||
my ($docs) = @_;
|
||||
for my $file_path (@ARGV) {
|
||||
process_source_file($file_path, $docs);
|
||||
if ($html){
|
||||
opendir (D, "$sourcedir/sources/") || die "Can not open $dir";
|
||||
while ($n = readdir (D)){
|
||||
if ($n =~ /mono-api-.*\.html$/){
|
||||
open (IN, "$sourcedir/sources/$n") || die "Can not open $n";
|
||||
$files[$filecount] = $n;
|
||||
while (<IN>){
|
||||
@files_content[$filecount] .= $_;
|
||||
if (/name="api:(.*?)"/){
|
||||
$_ =~ s/.*name="api:(\w+?)".*/\1/;
|
||||
$apis[$filecount] .= "$_";
|
||||
}
|
||||
}
|
||||
$filecount++;
|
||||
close IN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Extract documentation from a single source file.
|
||||
#
|
||||
sub process_source_file {
|
||||
my ($file_path, $docs) = @_;
|
||||
open (my $file, '<', $file_path) or die "Could not open $file_path";
|
||||
while (<$file>) {
|
||||
next if (!/\/\*\* *\n/);
|
||||
process_function($file, $file_path, $docs);
|
||||
}
|
||||
close $file;
|
||||
while (<ARGV>){
|
||||
if (/\/\*\* *\n/){
|
||||
&process_doc;
|
||||
} else {
|
||||
#print "IGNORING: $_";
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Extract documentation from a single function.
|
||||
#
|
||||
sub process_function {
|
||||
|
||||
my ($file, $file_path, $docs) = @_;
|
||||
|
||||
my $PARAMETER_SECTION = 0;
|
||||
my $BODY_SECTION = 1;
|
||||
my $RETURN_SECTION = 2;
|
||||
my $section = $PARAMETER_SECTION;
|
||||
|
||||
my $name = do {
|
||||
$_ = <$file>;
|
||||
chomp;
|
||||
s/^ \* //;
|
||||
s/:$//;
|
||||
$_
|
||||
};
|
||||
|
||||
# Ignore irrelevant functions, and those with the wrong doc format.
|
||||
return if $name !~ /^mono_\w+$/;
|
||||
|
||||
my $deprecated;
|
||||
my @parameters = ();
|
||||
my $body = '';
|
||||
my $returns = '';
|
||||
my $prototype = '';
|
||||
|
||||
while (<$file>) {
|
||||
|
||||
# We've reached the last line in the documentation block.
|
||||
if (/^ \*\*?\//) {
|
||||
|
||||
# Grab function prototype.
|
||||
while (<$file>) {
|
||||
$prototype .= $_;
|
||||
last if /\{/;
|
||||
}
|
||||
|
||||
# Clean up prototype.
|
||||
$prototype = do {
|
||||
$_ = $prototype;
|
||||
# Strip braces and trailing whitespace.
|
||||
s/{//;
|
||||
s/ +$//;
|
||||
# Turn "Type * xxx" into "Type* xxx"
|
||||
s/^(\w+)\W+\*/$1*/;
|
||||
$_;
|
||||
};
|
||||
|
||||
# Process formatting within sections.
|
||||
for my $parameter (@parameters) {
|
||||
process_formatting(\$parameter->{description}, $file_path, $.);
|
||||
}
|
||||
process_formatting(\$returns, $file_path, $.);
|
||||
process_formatting(\$body, $file_path, $.);
|
||||
if (defined($deprecated)) {
|
||||
process_formatting(\$deprecated, $file_path, $.);
|
||||
}
|
||||
$body =~ s/\n/ /g;
|
||||
|
||||
if (exists($docs->{body}->{$name})) {
|
||||
my $origin = $docs->{origin}->{$name};
|
||||
if ($WARNINGS) {
|
||||
warn
|
||||
"$file_path:$.: Redundant documentation for $name\n",
|
||||
"$origin->{file}:$origin->{line}: Previously defined here\n";
|
||||
}
|
||||
}
|
||||
$docs->{origin}->{$name} = { file => $file_path, line => $. };
|
||||
$docs->{body}->{$name} = $body;
|
||||
$docs->{parameters}->{$name} = \@parameters;
|
||||
$docs->{deprecated}->{$name} = $deprecated if defined $deprecated;
|
||||
$docs->{return}->{$name} = $returns;
|
||||
$docs->{prototype}->{$name} = $prototype;
|
||||
last;
|
||||
|
||||
}
|
||||
|
||||
# Strip newlines and asterisk prefix.
|
||||
chomp;
|
||||
s/^ +\*//;
|
||||
|
||||
# Replace blank lines with paragraph breaks.
|
||||
$_ = '<p>' if /^\s*$/;
|
||||
|
||||
if ($section == $PARAMETER_SECTION) {
|
||||
if (/\s*\\param +(\w+)(.*)/) {
|
||||
# print "$file_path:$.: warning: Got parameter $1\n";
|
||||
push @parameters, { name => $1, description => $2 };
|
||||
} elsif (/\s*\\deprecated(.*)/) {
|
||||
# print "$file_path:$.: warning: Got deprecated annotation\n";
|
||||
$deprecated = $1;
|
||||
} elsif (/\s*(\w+):(.*)/) {
|
||||
if ($1 eq 'deprecated') {
|
||||
warn "$file_path:$.: Old-style monodoc notation 'deprecated:' used\n"
|
||||
if $WARNINGS;
|
||||
$deprecated = $2;
|
||||
} else {
|
||||
warn "$file_path:$.: Old-style monodoc notation 'param:' used\n"
|
||||
if $WARNINGS;
|
||||
push @parameters, { name => $1, description => $2 };
|
||||
}
|
||||
} else {
|
||||
# $body = "\t$_\n";
|
||||
$section = $BODY_SECTION;
|
||||
redo;
|
||||
}
|
||||
} elsif ($section == $BODY_SECTION) {
|
||||
if (s/(Returns?:\s*|\\returns?\s*)//) {
|
||||
$returns = "\t$_\n";
|
||||
$section = $RETURN_SECTION;
|
||||
} else {
|
||||
$body .= "\n\t$_";
|
||||
}
|
||||
} elsif ($section == $RETURN_SECTION) {
|
||||
$returns .= "\n\t$_";
|
||||
} else {
|
||||
die "Invalid section $section\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Substitute formatting within documentation text.
|
||||
#
|
||||
sub process_formatting {
|
||||
my ($content, $file_path, $current_line) = @_;
|
||||
$_ = $$content;
|
||||
|
||||
# Constants
|
||||
s{NULL}{<code>NULL</code>}g;
|
||||
s{TRUE}{<code>TRUE</code>}g;
|
||||
s{FALSE}{<code>FALSE</code>}g;
|
||||
|
||||
# Parameters
|
||||
warn "$file_path:$current_line: Old-style monodoc notation '\@param' used\n"
|
||||
if s{@(\w+)}{<i>$1</i>}g && $WARNINGS;
|
||||
s{\\p +(\w+)}{<i>$1</i>}g;
|
||||
|
||||
# Code
|
||||
warn "$file_path:$current_line: Old-style monodoc notation '#code' used\n"
|
||||
if s{#(\w+)}{<code>$1</code>}g && $WARNINGS;
|
||||
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;
|
||||
|
||||
$$content = $_;
|
||||
}
|
||||
|
||||
#
|
||||
# Merge templates with stylesheet and documentation extracted from sources.
|
||||
#
|
||||
sub merge {
|
||||
my ($docs, $templates, $stylesheet) = @_;
|
||||
my $last = '';
|
||||
for my $name (keys %$templates) {
|
||||
open (my $output_file, '>', "$TARGET_DIR/html/$name")
|
||||
or die "Could not create $TARGET_DIR/html/$name";
|
||||
print "Merging: $name\n";
|
||||
print $output_file <<EOF;
|
||||
if ($html){
|
||||
for ($f = 0; $f < $filecount; $f++){
|
||||
$name = $files[$f];
|
||||
open (OUT, "> $dir/html/$name") || die "Can not create $dir/html/$name";
|
||||
print "Merging: $name\n";
|
||||
print OUT<<EOF;
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>$name</title>
|
||||
<style type="text/css">
|
||||
$stylesheet
|
||||
$css
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="mapi-docs">
|
||||
EOF
|
||||
my @a = split (/\n/, $templates->{$name}->{contents});
|
||||
my $strike = '';
|
||||
my $strikeextra = '';
|
||||
my $api_shown = 0;
|
||||
for (my $ai = 0; $ai < $#a; $ai++) {
|
||||
my $line = $a[$ai];
|
||||
if (my ($api, $caption) = ($line =~ /<h4><a name=\"api:(\w+)\">(\w+)<\/a><\/h4>/)) {
|
||||
if ($api_shown == 1) {
|
||||
print $output_file "</div> <!-- class=mapi -->\n\n";
|
||||
if ($docs->{deprecated}->{$api}) {
|
||||
$strike = "mapi-strike";
|
||||
$strikeextra = "</div><br><div class='mapi-deprecated'><b>Deprecated:</b> " . $docs->{deprecated}->{$api};
|
||||
} else {
|
||||
$strike = "";
|
||||
$strikeextra = "";
|
||||
}
|
||||
}
|
||||
$api_shown = 1;
|
||||
my $proto = $docs->{prototype}->{$api} // $api;
|
||||
@a = split (/\n/, $files_content[$f]);
|
||||
$strikeextra = "";
|
||||
$api_shown = 0;
|
||||
for ($ai = 0; $ai < $#a; $ai++){
|
||||
$line = $a[$ai];
|
||||
|
||||
($api,$caption) = $line =~ /<h4><a name=\"api:(\w+)\">(\w+)<\/a><\/h4>/;
|
||||
if ($api ne ""){
|
||||
if ($api_shown == 1){
|
||||
print OUT "</div> <!-- class=mapi -->\n\n";
|
||||
if ($deprecated{$api}){
|
||||
$strike = "mapi-strike";
|
||||
$strikeextra = "</div><br><div class='mapi-deprecated'><b>Deprecated:</b> " . $deprecated{$api};
|
||||
} else {
|
||||
$strike = "";
|
||||
$strikeextra = "";
|
||||
}
|
||||
}
|
||||
$api_shown = 1;
|
||||
$proto = $prototype{$api};
|
||||
if ($proto eq ""){
|
||||
$proto = "$api";
|
||||
}
|
||||
|
||||
print $output_file <<EOF;
|
||||
print OUT<<EOF;
|
||||
<a name="api:$api"></a>
|
||||
<div class="mapi">
|
||||
<div class="mapi-entry $strike"><code>$api$strikeextra</code></div>
|
||||
@@ -302,201 +98,228 @@ EOF
|
||||
<div class="mapi-prototype">$proto</div>
|
||||
<p>
|
||||
EOF
|
||||
if (exists ($docs->{parameters}->{$api})) {
|
||||
my $ppars = $docs->{parameters}->{$api};
|
||||
if (@$ppars) {
|
||||
print $output_file
|
||||
" <div class=\"mapi-section\">Parameters</div>\n",
|
||||
" <table class=\"mapi-parameters\"><tbody>",
|
||||
render_parameters($ppars),
|
||||
"</tbody></table>";
|
||||
}
|
||||
}
|
||||
$ppars = $arguments{$api};
|
||||
if ($ppars ne "" && (!($ppars =~ /^[ \t]+$/))){
|
||||
print OUT " <div class=\"mapi-section\">Parameters</div>\n";
|
||||
print OUT " <table class=\"mapi-parameters\"><tbody>".${arguments{$api}}."</tbody></table>";
|
||||
}
|
||||
|
||||
&opt_print ("Return value", $returns{$api}, 0);
|
||||
&opt_print ("Description", $bodies{$api}, 0);
|
||||
print OUT " </div><!--mapi-description-->\n </div><!--height container-->\n";
|
||||
} else {
|
||||
if ($line =~ /@API_IDX@/){
|
||||
$apis_toc = &create_toc ($apis[$f]);
|
||||
$line =~ s/\@API_IDX\@/$apis_toc/;
|
||||
}
|
||||
if ($line =~ /^<h4/){
|
||||
print OUT "</div>\n";
|
||||
$api_shown = 0;
|
||||
}
|
||||
if ($line =~ /`/){
|
||||
}
|
||||
print OUT "$line\n";
|
||||
}
|
||||
}
|
||||
print OUT<<EOF;
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
close OUT;
|
||||
system ("$ENV{runtimedir}/mono-wrapper convert.exe $dir/html/$name $dir/html/x-$name");
|
||||
|
||||
opt_print ($output_file, "Return value", $docs->{return}->{$api});
|
||||
opt_print ($output_file, "Description", $docs->{body}->{$api});
|
||||
print $output_file " </div><!--mapi-description-->\n </div><!--height container-->\n";
|
||||
} else {
|
||||
if ($line =~ /\@API_IDX\@/) {
|
||||
my $apis_toc = create_toc ($docs, $templates->{$name}->{api});
|
||||
$line =~ s/\@API_IDX\@/$apis_toc/;
|
||||
}
|
||||
if ($line =~ /^<h4/) {
|
||||
print $output_file "</div>\n";
|
||||
$api_shown = 0;
|
||||
}
|
||||
if ($line =~ /`/) {
|
||||
}
|
||||
print $output_file "$line\n";
|
||||
}
|
||||
}
|
||||
print $output_file
|
||||
" </div>",
|
||||
"</body>",
|
||||
"</html>";
|
||||
close $output_file;
|
||||
system ("$ENV{runtimedir}/mono-wrapper convert.exe $TARGET_DIR/html/$name $TARGET_DIR/html/x-$name");
|
||||
|
||||
# Clean up the mess that AgilityPack makes (it CDATAs our CSS).
|
||||
open (my $hack_input, '<', "$TARGET_DIR/html/x-$name")
|
||||
or die "Could not open $TARGET_DIR/html/x-$name";
|
||||
open (my $hack_output, '>', "$TARGET_DIR/deploy/$name")
|
||||
or die "Could not open output";
|
||||
# clean up the mess that AgilityPack does, it CDATAs our CSS
|
||||
open HACK, "$dir/html/x-$name" || die "Could not open $dir/html/x-$name";
|
||||
open HACKOUT, ">$dir/deploy/$name" || die "Could not open output";
|
||||
|
||||
my $line = 0;
|
||||
my $doprint = 0;
|
||||
while (<$hack_input>) {
|
||||
print $hack_output $last if ($doprint);
|
||||
$line++;
|
||||
s/^\/\/<!\[CDATA\[//;
|
||||
s/^\/\/\]\]>\/\///;
|
||||
$line = 0;
|
||||
$doprint = 0;
|
||||
while (<HACK>){
|
||||
print HACKOUT $last if ($doprint);
|
||||
$line++;
|
||||
s/^\/\/<!\[CDATA\[//;
|
||||
s/^\/\/\]\]>\/\///;
|
||||
|
||||
# Remove the junk <span> wrapper generated by AgilityPack.
|
||||
if ($line==1) {
|
||||
s/<span>//;
|
||||
}
|
||||
if (/<style type/) {
|
||||
# Replace the CSS in the XHTML output with the original CSS.
|
||||
print $hack_output $_;
|
||||
print $hack_output $$stylesheet;
|
||||
while (<$hack_input>) {
|
||||
last if (/<\/style>/);
|
||||
}
|
||||
}
|
||||
$last = $_;
|
||||
$doprint = 1;
|
||||
}
|
||||
if (!($last =~ /span/)) {
|
||||
print $hack_output $last;
|
||||
}
|
||||
# system ("cp.exe $TARGET_DIR/html/$name $TARGET_DIR/deploy/$name");
|
||||
# Remove the junk <span> wrapper generated by AgilityPack
|
||||
if ($line==1){
|
||||
s/<span>//;
|
||||
}
|
||||
if (/<style type/){
|
||||
# Replace the CSS in the XHTML output with the original CSS
|
||||
print HACKOUT $_;
|
||||
print HACKOUT $css;
|
||||
while (<HACK>){
|
||||
last if (/<\/style>/);
|
||||
}
|
||||
}
|
||||
$last = $_;
|
||||
$doprint = 1;
|
||||
}
|
||||
if (!($last =~ /span/)){
|
||||
print HACKOUT $last;
|
||||
}
|
||||
|
||||
#system ("cp.exe $dir/html/$name $dir/deploy/$name");
|
||||
}
|
||||
}
|
||||
|
||||
sub process_doc {
|
||||
$doc = "";
|
||||
$func = <>;
|
||||
chop $func;
|
||||
$func =~ s/^ \* //;
|
||||
$func =~ s/:$//;
|
||||
print "Function: $func\n" if (!$html);
|
||||
$args = "";
|
||||
$inbody = 0;
|
||||
$returns = "";
|
||||
$body = "";
|
||||
$functions[$fn++] = $func;
|
||||
$deprecated = 0;
|
||||
# Process arguments
|
||||
while (<>){
|
||||
s/NULL/<code>NULL<\/code>/g;
|
||||
s/TRUE/<code>TRUE<\/code>/g;
|
||||
s/FALSE/<code>FALSE<\/code>/g;
|
||||
if (/^ \*\*?\//){
|
||||
$body =~ s/@(\w+)/<i>\1<\/i>/g;
|
||||
$returns =~ s/@(\w+)/<i>\1<\/i>/g;
|
||||
$args =~ s/@(\w+)/<i>\1<\/i>/g;
|
||||
|
||||
$body =~ s/#(\w+)/<code>\1<\/code>/g;
|
||||
$returns =~ s/#(\w+)/<code>\1<\/code>/g;
|
||||
$args =~ s/#(\w+)/<code>\1<\/code>/g;
|
||||
|
||||
$returns =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
|
||||
$args =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
|
||||
$body =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
|
||||
|
||||
$body =~ s/\n/ /;
|
||||
$bodies{$func} = $body;
|
||||
$arguments{$func} = $args;
|
||||
$deprecated{$func} = $deprecated;
|
||||
$returns{$func} = $returns;
|
||||
$proto = "";
|
||||
while (<>){
|
||||
$proto .= $_;
|
||||
last if (/\{/);
|
||||
}
|
||||
$proto =~ s/{//;
|
||||
# clean it up a little, remove newlines, empty space at end
|
||||
$proto =~ s/ +$//;
|
||||
# Turn "Type * xxx" into "Type* xxx"
|
||||
$proto =~ s/^(\w+)\W+\*/\1\*/;
|
||||
$prototype{$func} = $proto;
|
||||
return;
|
||||
}
|
||||
chop;
|
||||
s/^\ \*//;
|
||||
$_ = "<p>" if (/^\s*$/);
|
||||
|
||||
if ($inbody == 0){
|
||||
if (/\s*(\w+):(.*)/){
|
||||
if ($1 eq "deprecated"){
|
||||
$deprecated = $2;
|
||||
} else {
|
||||
#$args .= "<dt><i>$1:</i></dt><dd>$2</dd>";
|
||||
$args .= "<tr><td><i>$1</i><td>$2</td></td></tr>";
|
||||
}
|
||||
} else {
|
||||
|
||||
$body = "\t$_\n";
|
||||
|
||||
$inbody = 1;
|
||||
}
|
||||
} elsif ($inbody == 1) {
|
||||
if (/Returns?:/){
|
||||
s/Returns?://;
|
||||
$returns = "\t$_\n";
|
||||
$inbody = 2;
|
||||
} else {
|
||||
$body .= "\n\t$_";
|
||||
}
|
||||
} else {
|
||||
$returns .= "\n\t$_";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
sub create_toc {
|
||||
my ($docs, $apis_listed) = @_;
|
||||
my ($apis_listed) = @_;
|
||||
my $type_size = 0;
|
||||
my $name_size = 0;
|
||||
my ($ret, $xname, $args);
|
||||
my $apis_toc = "";
|
||||
my $ret, $xname, $args, $line;
|
||||
$apis_toc = "";
|
||||
|
||||
# Try to align things; compute type size, method size, and arguments.
|
||||
foreach my $line (split /\n/, $apis_listed) {
|
||||
if (exists ($docs->{prototype}->{$line})) {
|
||||
my $p = $docs->{prototype}->{$line};
|
||||
if (my ($ret, $xname, $args) = ($p =~ /(.*)\n(\w+)[ \t](.*)/)) {
|
||||
my $tl = length ($ret);
|
||||
my $pl = length ($xname);
|
||||
$type_size = $tl if ($tl > $type_size);
|
||||
$name_size = $pl if ($pl > $name_size);
|
||||
}
|
||||
}
|
||||
|
||||
# Try to align things, so compute type size, method size, and arguments
|
||||
foreach $line (split /\n/, $apis_listed){
|
||||
$p = $prototype{$line};
|
||||
($ret, $xname, $args) = $p =~ /(.*)\n(\w+)[ \t](.*)/;
|
||||
$tl = length ($ret);
|
||||
$pl = length ($xname);
|
||||
|
||||
$type_size = $tl if ($tl > $type_size);
|
||||
$name_size = $pl if ($pl > $name_size);
|
||||
}
|
||||
|
||||
$type_size++;
|
||||
$name_size++;
|
||||
|
||||
foreach my $line (split /\n/, $apis_listed) {
|
||||
chomp($line);
|
||||
if (exists($docs->{prototype}->{$line})) {
|
||||
my $p = $docs->{prototype}->{$line};
|
||||
if (my ($ret, $xname, $args) = ($p =~ /(.*)\n(\w+)[ \t](.*)/)) {
|
||||
$xname = $line if $xname eq "";
|
||||
my $rspace = " " x ($type_size - length ($ret));
|
||||
my $nspace = " " x ($name_size - length ($xname));
|
||||
$args = wrap ($args, length ($ret . $rspace . $xname . $nspace), 60);
|
||||
$apis_toc .= "$ret$rspace<a href=\"\#api:$line\">$xname</a>$nspace$args\n";
|
||||
}
|
||||
}
|
||||
foreach $line (split /\n/, $apis_listed){
|
||||
chop;
|
||||
$p = $prototype{$line};
|
||||
($ret, $xname, $args) = $p =~ /(.*)\n(\w+)[ \t](.*)/;
|
||||
if ($xname eq ""){
|
||||
$xname = $line;
|
||||
}
|
||||
|
||||
$rspace = " " x ($type_size - length ($ret));
|
||||
$nspace = " " x ($name_size - length ($xname));
|
||||
$args = &format ($args, length ($ret . $rspace . $xname . $nspace), 60);
|
||||
$apis_toc .= "$ret$rspace<a href=\"\#api:$line\">$xname</a>$nspace$args\n";
|
||||
}
|
||||
return $apis_toc;
|
||||
}
|
||||
|
||||
sub wrap {
|
||||
#
|
||||
# Formats the rest of the arguments in a way that will fit in N columns
|
||||
#
|
||||
sub format {
|
||||
my ($args, $size, $limit) = @_;
|
||||
my $sret = "";
|
||||
|
||||
# return $args if ((length (args) + size) < $limit);
|
||||
# return $args if ((length (args) + size) < $limit);
|
||||
|
||||
my $remain = $limit - $size;
|
||||
my @sa = split /,/, $args;
|
||||
my $linelen = $size;
|
||||
foreach my $arg (@sa) {
|
||||
if ($sret eq "") {
|
||||
$sret = $arg . ", ";
|
||||
$linelen += length ($sret);
|
||||
} else {
|
||||
if ($linelen + length ($arg) < $limit) {
|
||||
$sret .= "FITS" . $arg . ", ";
|
||||
} else {
|
||||
my $newline = " " x ($size) . $arg . ", ";
|
||||
my $linelen = length ($newline);
|
||||
$sret .= "\n" . $newline;
|
||||
}
|
||||
}
|
||||
$remain = $limit - $size;
|
||||
@sa = split /,/, $args;
|
||||
$linelen = $size;
|
||||
foreach $arg (@sa){
|
||||
if ($sret eq ""){
|
||||
$sret = $arg . ", ";
|
||||
$linelen += length ($sret);
|
||||
} else {
|
||||
if ($linelen + length ($arg) < $limit){
|
||||
$sret .= "FITS" . $arg . ", ";
|
||||
} else {
|
||||
$newline = " " x ($size) . $arg . ", ";
|
||||
$linelen = length ($newline);
|
||||
$sret .= "\n" . $newline;
|
||||
}
|
||||
}
|
||||
}
|
||||
$sret =~ s/, $/;/;
|
||||
return $sret;
|
||||
}
|
||||
|
||||
#
|
||||
# Print a section if non-empty.
|
||||
#
|
||||
sub opt_print {
|
||||
my ($output, $caption, $opttext) = @_;
|
||||
if (defined($opttext) && $opttext ne '' && $opttext !~ /^[ \t]+$/) {
|
||||
print $output
|
||||
" <div class=\"mapi-section\">$caption</div>\n",
|
||||
" <div>$opttext</div>\n";
|
||||
my ($caption, $opttext, $quote) = @_;
|
||||
|
||||
if ($opttext ne "" && (!($opttext =~ /^[ \t]+$/))){
|
||||
print OUT " <div class=\"mapi-section\">$caption</div>\n";
|
||||
print OUT " <div>$opttext</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Render parameter information as table.
|
||||
#
|
||||
sub render_parameters {
|
||||
my ($parameters) = @_;
|
||||
my $result = '';
|
||||
for my $parameter (@$parameters) {
|
||||
$result .= "<tr><td><i>$parameter->{name}</i></td><td>$parameter->{description}</td></tr>";
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
exdoc - Compiles API docs from Mono sources and HTML templates.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
exdoc [OPTIONS] [FILE...]
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Print this help message.
|
||||
|
||||
=item B<--html> I<DIR>, B<-h> I<DIR>
|
||||
|
||||
Use I<DIR> as the input path for HTML sources.
|
||||
|
||||
=item B<--target> I<DIR>, B<-t> I<DIR>
|
||||
|
||||
Use I<DIR> as the target path for output.
|
||||
|
||||
=item B<--warnings>, B<-W>
|
||||
|
||||
Enable warnings about documentation errors.
|
||||
|
||||
=back
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Reads HTML templates and C sources, extracting documentation from the sources and splicing it into the templates.
|
||||
|
||||
=cut
|
||||
+1
-1
@@ -326,7 +326,7 @@ mono_poll
|
||||
mono_dynamic_stream_reset
|
||||
mono_domain_get_tls_offset
|
||||
mono_domain_add_class_static_data
|
||||
mono_handle_native_crash
|
||||
mono_handle_native_sigsegv
|
||||
mono_set_config_dir
|
||||
mono_profiler_coverage_alloc
|
||||
mono_profiler_coverage_free
|
||||
|
||||
@@ -40,8 +40,9 @@
|
||||
<p>The output of the SCC analysis is passed to the
|
||||
`cross_references()` callback. It is expected to set the
|
||||
`is_alive` flag on those strongly connected components that it
|
||||
wishes to be kept alive. The value of `is_alive` will be
|
||||
ignored on any SCCs which lack bridges.
|
||||
wishes to be kept alive. Only bridged objects will be
|
||||
reported to the callback, i.e., non-bridged objects are
|
||||
removed from the callback graph.
|
||||
|
||||
<p>In monodroid each bridged object has a corresponding Java
|
||||
mirror object. In the bridge callback it reifies the Mono
|
||||
@@ -62,7 +63,7 @@
|
||||
|
||||
<div class="mapi-header">
|
||||
enum {
|
||||
SGEN_BRIDGE_VERSION = 5
|
||||
SGEN_BRIDGE_VERSION = 4
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -27,6 +27,7 @@ typedef enum {
|
||||
|
||||
<h3>Opening and closing MonoImages</h3>
|
||||
|
||||
<h4><a name="api:mono_load_image">mono_load_image</a></h4>
|
||||
<h4><a name="api:mono_image_open">mono_image_open</a></h4>
|
||||
<h4><a name="api:mono_image_open_full">mono_image_open_full</a></h4>
|
||||
<h4><a name="api:mono_image_open_from_data">mono_image_open_from_data</a></h4>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<h4><a name="api:mono_marshal_get_delegate_invoke">mono_marshal_get_delegate_invoke</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_icall_wrapper">mono_marshal_get_icall_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_isinst">mono_marshal_get_isinst</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_ldfld_remote_wrapper">mono_marshal_get_ldfld_remote_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_ldfld_wrapper">mono_marshal_get_ldfld_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_managed_wrapper">mono_marshal_get_managed_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_native_wrapper">mono_marshal_get_native_wrapper</a></h4>
|
||||
@@ -50,6 +51,7 @@
|
||||
<h4><a name="api:mono_marshal_get_remoting_invoke_with_check">mono_marshal_get_remoting_invoke_with_check</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_runtime_invoke">mono_marshal_get_runtime_invoke</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_stelemref">mono_marshal_get_stelemref</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_stfld_remote_wrapper">mono_marshal_get_stfld_remote_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_stfld_wrapper">mono_marshal_get_stfld_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_struct_to_ptr">mono_marshal_get_struct_to_ptr</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_synchronized_wrapper">mono_marshal_get_synchronized_wrapper</a></h4>
|
||||
@@ -57,9 +59,47 @@
|
||||
<h4><a name="api:mono_marshal_get_xappdomain_invoke">mono_marshal_get_xappdomain_invoke</a></h4>
|
||||
<h4><a name="api:mono_marshal_load_type_info">mono_marshal_load_type_info</a></h4>
|
||||
<h4><a name="api:mono_marshal_method_from_wrapper">mono_marshal_method_from_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_realloc">mono_marshal_realloc</a></h4>
|
||||
<h4><a name="api:mono_marshal_set_last_error">mono_marshal_set_last_error</a></h4>
|
||||
<h4><a name="api:mono_marshal_type_size">mono_marshal_type_size</a></h4>
|
||||
|
||||
<h2>Metadata Loading Errors</h2>
|
||||
|
||||
<p>The routines in this section are used to cope with errors
|
||||
during metadata loading. Errors in metadata handling can
|
||||
happen for many reason, and these include (this is not an
|
||||
exhaustive list).
|
||||
|
||||
<ul>
|
||||
<li>An assembly referenced is missing.
|
||||
<li>Fields referenced are missing.
|
||||
<li>Methods referenced are missing.
|
||||
</ul>
|
||||
|
||||
<p>The <tt>mono_loader_set_*</tt> routines are invoked during
|
||||
metadata loading to flag that an error has happened. The
|
||||
class loading errros are flagged in a per-thread basis.
|
||||
|
||||
<P>In various spots in the runtime the
|
||||
<tt>mono_loader_get_last_error</tt> routine is called to check
|
||||
if there was a problem, and then errors are propagated upwards
|
||||
on the stack until we reach a point where an exception can be
|
||||
raised and no runtime locks are held.
|
||||
|
||||
<p>The <tt>mono_loader_error_prepare_exception</tt> takes a
|
||||
<tt>MonoLoaderError</tt> structure (the value returned from
|
||||
<tt>mono_loader_get_last_error</tt>), turns that into an
|
||||
exception and clears the error condition from the current
|
||||
thread.
|
||||
|
||||
<h4><a name="api:mono_loader_set_error_field_load">mono_loader_set_error_field_load</a></h4>
|
||||
<h4><a name="api:mono_loader_set_error_method_load">mono_loader_set_error_method_load</a></h4>
|
||||
<h4><a name="api:mono_loader_set_error_type_load">mono_loader_set_error_type_load</a></h4>
|
||||
|
||||
<h4><a name="api:mono_loader_get_last_error">mono_loader_get_last_error</a></h4>
|
||||
<h4><a name="api:mono_loader_clear_error">mono_loader_clear_error</a></h4>
|
||||
<h4><a name="api:mono_loader_error_prepare_exception">mono_loader_error_prepare_exception</a></h4>
|
||||
|
||||
<h2>Metadata Loader Locking: Internals</h2>
|
||||
|
||||
<p>The locking functions here are used by code in class.c and
|
||||
@@ -74,6 +114,10 @@
|
||||
<p>The internal interface of the Mono GC is the interface used
|
||||
between the runtime engine and the garbage collector.
|
||||
|
||||
<h4><a name="api:mono_gc_disable">mono_gc_disable</a></h4>
|
||||
<h4><a name="api:mono_gc_enable">mono_gc_enable</a></h4>
|
||||
<h4><a name="api:mono_gc_start_world">mono_gc_start_world</a></h4>
|
||||
<h4><a name="api:mono_gc_stop_world">mono_gc_stop_world</a></h4>
|
||||
<h4><a name="api:mono_gc_alloc_fixed">mono_gc_alloc_fixed</a></h4>
|
||||
<h4><a name="api:mono_gc_free_fixed">mono_gc_free_fixed</a></h4>
|
||||
<h4><a name="api:mono_gc_make_descr_from_bitmap">mono_gc_make_descr_from_bitmap</a></h4>
|
||||
|
||||
@@ -31,12 +31,17 @@
|
||||
<h4><a name="api:mono_g_hash_table_destroy">mono_g_hash_table_destroy</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_foreach">mono_g_hash_table_foreach</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_foreach_remove">mono_g_hash_table_foreach_remove</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_foreach_steal">mono_g_hash_table_foreach_steal</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_insert">mono_g_hash_table_insert</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_lookup">mono_g_hash_table_lookup</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_lookup_extended">mono_g_hash_table_lookup_extended</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_new">mono_g_hash_table_new</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_new_full">mono_g_hash_table_new_full</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_remap">mono_g_hash_table_remap</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_remove">mono_g_hash_table_remove</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_replace">mono_g_hash_table_replace</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_size">mono_g_hash_table_size</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_steal">mono_g_hash_table_steal</a></h4>
|
||||
|
||||
|
||||
<h3>Memory Pools</h3>
|
||||
@@ -62,6 +67,7 @@
|
||||
<h4><a name="api:mono_mempool_destroy">mono_mempool_destroy</a></h4>
|
||||
<h4><a name="api:mono_mempool_alloc">mono_mempool_alloc</a></h4>
|
||||
<h4><a name="api:mono_mempool_alloc0">mono_mempool_alloc0</a></h4>
|
||||
<h4><a name="api:mono_mempool_empty">mono_mempool_empty</a></h4>
|
||||
<h4><a name="api:mono_mempool_invalidate">mono_mempool_invalidate</a></h4>
|
||||
<h4><a name="api:mono_mempool_stats">mono_mempool_stats</a></h4>
|
||||
<h4><a name="api:mono_mempool_contains_addr">mono_mempool_contains_addr</a></h4>
|
||||
@@ -147,4 +153,6 @@
|
||||
<h4><a name="api:mono_profiler_startup">mono_profiler_startup</a></h4>
|
||||
<h4><a name="api:mono_profiler_gc_event">mono_profiler_gc_event</a></h4>
|
||||
<h4><a name="api:mono_profiler_gc_heap_resize">mono_profiler_gc_heap_resize</a></h4>
|
||||
<h4><a name="api:mono_profiler_gc_event">mono_profiler_gc_event</a></h4>
|
||||
<h4><a name="api:mono_profiler_gc_heap_resize">mono_profiler_gc_heap_resize</a></h4>
|
||||
<h4><a name="api:mono_profiler_stat_hit">mono_profiler_stat_hit</a></h4>
|
||||
@@ -669,12 +669,15 @@ MONO_TYPESPEC_SIZE
|
||||
<h4><a name="api:mono_metadata_parse_method_signature">mono_metadata_parse_method_signature</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_mh">mono_metadata_parse_mh</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_param">mono_metadata_parse_param</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_ret_type">mono_metadata_parse_ret_type</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_signature">mono_metadata_parse_signature</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_typedef_or_ref">mono_metadata_parse_typedef_or_ref</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_type">mono_metadata_parse_type</a></h4>
|
||||
|
||||
<h2>Generics Support</h2>
|
||||
|
||||
<h4><a name="api:mono_metadata_generic_class_equal">mono_metadata_generic_class_equal</a></h4>
|
||||
<h4><a name="api:mono_metadata_generic_class_hash">mono_metadata_generic_class_hash</a></h4>
|
||||
<h4><a name="api:mono_metadata_generic_class_is_valuetype">mono_metadata_generic_class_is_valuetype</a></h4>
|
||||
|
||||
<h2>Tokens</h2>
|
||||
|
||||
+14
-18
@@ -94,9 +94,6 @@ arm*-darwin*|aarch64*-*)
|
||||
i*86-*-darwin*)
|
||||
ORDER=G_LITTLE_ENDIAN
|
||||
;;
|
||||
*-*-haiku*)
|
||||
LDFLAGS="$LDFLAGS -ltextencoding"
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
@@ -133,10 +130,6 @@ AM_CONDITIONAL(TARGET_WIN32, test x$OS = xWIN32)
|
||||
AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
|
||||
AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
|
||||
|
||||
# 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])
|
||||
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
@@ -145,15 +138,6 @@ AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
|
||||
AC_CHECK_FUNCS(getrlimit)
|
||||
AC_CHECK_FUNCS(fork execv execve)
|
||||
|
||||
AC_ARG_WITH([overridable-allocators], [ --with-overridable-allocators allow g_*alloc/g_free to call custom allocators set via g_mem_set_vtable])
|
||||
|
||||
if test x$with_overridable_allocators = xyes; then
|
||||
AC_DEFINE(ENABLE_OVERRIDABLE_ALLOCATORS,1,[Overridable allocator support enabled])
|
||||
AC_MSG_NOTICE([Overridable allocator support enabled])
|
||||
else
|
||||
AC_MSG_NOTICE([Overridable allocator support disabled])
|
||||
fi
|
||||
|
||||
#
|
||||
# Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding
|
||||
# the detection of strndup on OS X so Mono built on 10.7+ still runs on 10.6. This can be
|
||||
@@ -167,7 +151,7 @@ elif test x$target_ios = xno; then
|
||||
AC_CHECK_FUNCS(strndup getpwuid_r)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno || test x$with_overridable_allocators = xyes)
|
||||
AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno )
|
||||
AM_ICONV()
|
||||
AC_SEARCH_LIBS(sqrtf, m)
|
||||
|
||||
@@ -197,7 +181,7 @@ if test "x$have_iso_varargs" = "xyes"; then
|
||||
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_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h langinfo.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_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
|
||||
AC_SUBST(HAVE_ALLOCA_H)
|
||||
@@ -209,6 +193,10 @@ if test $ac_cv_sizeof_void_p = $ac_cv_sizeof_int; then
|
||||
GUINT_TO_POINTER="((gpointer) (v))"
|
||||
GSIZE="int"
|
||||
GSIZE_FORMAT='"u"'
|
||||
G_GUINT64_FORMAT='"llu"'
|
||||
G_GINT64_FORMAT='"lld"'
|
||||
G_GUINT32_FORMAT='"lu"'
|
||||
G_GINT32_FORMAT='"ld"'
|
||||
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long; then
|
||||
GPOINTER_TO_INT="((gint)(long) (ptr))"
|
||||
GPOINTER_TO_UINT="((guint)(long) (ptr))"
|
||||
@@ -216,6 +204,10 @@ elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long; then
|
||||
GUINT_TO_POINTER="((gpointer)(gulong) (v))"
|
||||
GSIZE="long"
|
||||
GSIZE_FORMAT='"lu"'
|
||||
G_GUINT64_FORMAT='"lu"'
|
||||
G_GINT64_FORMAT='"ld"'
|
||||
G_GUINT32_FORMAT='"u"'
|
||||
G_GINT32_FORMAT='"d"'
|
||||
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long_long; then
|
||||
GPOINTER_TO_INT="((gint)(long long) (ptr))"
|
||||
GPOINTER_TO_UINT="((guint)(unsigned long long) (ptr))"
|
||||
@@ -223,6 +215,10 @@ elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long_long; then
|
||||
GUINT_TO_POINTER="((gpointer)(unsigned long long) (v))"
|
||||
GSIZE="long long"
|
||||
GSIZE_FORMAT='"I64u"'
|
||||
G_GUINT64_FORMAT='"I64u"'
|
||||
G_GINT64_FORMAT='"I64i"'
|
||||
G_GUINT32_FORMAT='"I32u"'
|
||||
G_GINT32_FORMAT='"I32i"'
|
||||
else
|
||||
AC_MSG_ERROR([unsupported pointer size])
|
||||
fi
|
||||
|
||||
+12
-2
@@ -5,12 +5,20 @@ AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
win_files = \
|
||||
eglib-config.hw \
|
||||
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
|
||||
gmodule-win32.c gmodule-win32-internals.h gtimer-win32.c gunicode-win32.c
|
||||
gmodule-win32.c gtimer-win32.c
|
||||
|
||||
unix_files = \
|
||||
gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c \
|
||||
gmodule-unix.c gtimer-unix.c
|
||||
|
||||
# some unices and windows do not have an implementation of vasprintf
|
||||
# used by eglib, use provided implementation instead
|
||||
if NEED_VASPRINTF
|
||||
vasprintf_files = vasprintf.c
|
||||
else
|
||||
vaprinttf_files = foo.c
|
||||
endif
|
||||
|
||||
if HOST_WIN32
|
||||
os_files = $(win_files)
|
||||
else
|
||||
@@ -24,6 +32,7 @@ libeglib_la_SOURCES = \
|
||||
garray.c \
|
||||
gbytearray.c \
|
||||
gerror.c \
|
||||
vasprintf.h \
|
||||
ghashtable.c \
|
||||
giconv.c \
|
||||
gmem.c \
|
||||
@@ -46,7 +55,8 @@ libeglib_la_SOURCES = \
|
||||
gutf8.c \
|
||||
gunicode.c \
|
||||
unicode-data.h \
|
||||
$(os_files)
|
||||
$(os_files) \
|
||||
$(vasprintf_files)
|
||||
|
||||
libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ typedef unsigned @GSIZE@ gsize;
|
||||
typedef signed @GSIZE@ gssize;
|
||||
|
||||
#define G_GSIZE_FORMAT @GSIZE_FORMAT@
|
||||
#define G_GUINT64_FORMAT @G_GUINT64_FORMAT@
|
||||
#define G_GINT64_FORMAT @G_GINT64_FORMAT@
|
||||
#define G_GUINT32_FORMAT @G_GUINT32_FORMAT@
|
||||
#define G_GINT32_FORMAT @G_GINT32_FORMAT@
|
||||
|
||||
#if @G_HAVE_ISO_VARARGS@ == 1
|
||||
#define G_HAVE_ISO_VARARGS
|
||||
|
||||
@@ -26,14 +26,27 @@ typedef int pid_t;
|
||||
#define G_SEARCHPATH_SEPARATOR_S ";"
|
||||
#define G_SEARCHPATH_SEPARATOR ';'
|
||||
#define G_GSIZE_FORMAT "d"
|
||||
#define G_GUINT64_FORMAT "d"
|
||||
#define G_GINT64_FORMAT "d"
|
||||
#define GPOINTER_TO_INT(ptr) ((gint)(intptr_t) (ptr))
|
||||
#define GPOINTER_TO_UINT(ptr) ((guint)(intptr_t) (ptr))
|
||||
#define GINT_TO_POINTER(v) ((gpointer)(intptr_t) (v))
|
||||
#define GUINT_TO_POINTER(v) ((gpointer)(intptr_t) (v))
|
||||
|
||||
/* VS 2010 and later have stdint.h */
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1600
|
||||
#define INT32_MAX 2147483647
|
||||
#define INT32_MIN (~ INT32_MAX)
|
||||
#define INT64_MAX 9223372036854775807i64
|
||||
#define INT64_MIN (~INT64_MAX)
|
||||
#define UINT32_MAX 0xffffffffU
|
||||
#define UINT64_MAX 0xffffffffffffffffULL
|
||||
#endif
|
||||
|
||||
#define STDOUT_FILENO (int)(intptr_t)stdout
|
||||
#define STDERR_FILENO (int)(intptr_t)stderr
|
||||
|
||||
|
||||
/* FIXME: what should this be ?*/
|
||||
#define X_OK 4 /* This is really read */
|
||||
#define WNOHANG 1
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#define g_byte_array_append monoeg_g_byte_array_append
|
||||
#define g_byte_array_free monoeg_g_byte_array_free
|
||||
#define g_byte_array_new monoeg_g_byte_array_new
|
||||
#define g_byte_array_set_size monoeg_g_byte_array_set_size
|
||||
#define g_calloc monoeg_g_calloc
|
||||
#define g_clear_error monoeg_g_clear_error
|
||||
#define g_convert monoeg_g_convert
|
||||
#define g_convert_error_quark monoeg_g_convert_error_quark
|
||||
@@ -27,7 +25,6 @@
|
||||
#define g_mkdir_with_parents monoeg_g_mkdir_with_parents
|
||||
#define g_direct_equal monoeg_g_direct_equal
|
||||
#define g_direct_hash monoeg_g_direct_hash
|
||||
#define g_ensure_directory_exists monoeg_g_ensure_directory_exists
|
||||
#define g_error_free monoeg_g_error_free
|
||||
#define g_error_new monoeg_g_error_new
|
||||
#define g_error_vnew monoeg_g_error_vnew
|
||||
@@ -51,7 +48,6 @@
|
||||
#define g_get_tmp_dir monoeg_g_get_tmp_dir
|
||||
#define g_get_user_name monoeg_g_get_user_name
|
||||
#define g_getenv monoeg_g_getenv
|
||||
#define g_hasenv monoeg_g_hasenv
|
||||
#define g_hash_table_destroy monoeg_g_hash_table_destroy
|
||||
#define g_hash_table_find monoeg_g_hash_table_find
|
||||
#define g_hash_table_foreach monoeg_g_hash_table_foreach
|
||||
@@ -111,8 +107,6 @@
|
||||
#define g_markup_parse_context_new monoeg_g_markup_parse_context_new
|
||||
#define g_markup_parse_context_parse monoeg_g_markup_parse_context_parse
|
||||
#define g_memdup monoeg_g_memdup
|
||||
#define g_mem_set_vtable monoeg_g_mem_set_vtable
|
||||
#define g_mkdtemp monoeg_g_mkdtemp
|
||||
#define g_module_build_path monoeg_g_module_build_path
|
||||
#define g_module_close monoeg_g_module_close
|
||||
#define g_module_error monoeg_g_module_error
|
||||
@@ -257,7 +251,6 @@
|
||||
#define g_utf8_offset_to_pointer monoeg_g_utf8_offset_to_pointer
|
||||
#define g_utf8_pointer_to_offset monoeg_g_utf8_pointer_to_offset
|
||||
#define g_utf8_to_ucs4_fast monoeg_g_utf8_to_ucs4_fast
|
||||
#define g_vasprintf monoeg_g_vasprintf
|
||||
#define g_win32_getlocale monoeg_g_win32_getlocale
|
||||
#define g_assertion_message monoeg_assertion_message
|
||||
#define g_malloc monoeg_malloc
|
||||
|
||||
+6
-4
@@ -28,8 +28,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "vasprintf.h"
|
||||
|
||||
GError *
|
||||
g_error_new (gpointer domain, gint code, const char *format, ...)
|
||||
{
|
||||
@@ -40,7 +42,7 @@ g_error_new (gpointer domain, gint code, const char *format, ...)
|
||||
err->code = code;
|
||||
|
||||
va_start (args, format);
|
||||
if (g_vasprintf (&err->message, format, args) == -1)
|
||||
if (vasprintf (&err->message, format, args) == -1)
|
||||
err->message = g_strdup_printf ("internal: invalid format string %s", format);
|
||||
va_end (args);
|
||||
|
||||
@@ -55,7 +57,7 @@ g_error_vnew (gpointer domain, gint code, const char *format, va_list ap)
|
||||
err->domain = domain;
|
||||
err->code = code;
|
||||
|
||||
if (g_vasprintf (&err->message, format, ap) == -1)
|
||||
if (vasprintf (&err->message, format, ap) == -1)
|
||||
err->message = g_strdup_printf ("internal: invalid format string %s", format);
|
||||
|
||||
return err;
|
||||
@@ -75,7 +77,7 @@ g_error_free (GError *error)
|
||||
{
|
||||
g_return_if_fail (error != NULL);
|
||||
|
||||
g_free (error->message);
|
||||
free (error->message);
|
||||
g_free (error);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,15 +78,3 @@ g_file_test (const gchar *filename, GFileTest test)
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_mkdtemp (char *tmp_template)
|
||||
{
|
||||
#ifdef HAVE_MKDTEMP
|
||||
char *template_copy = g_strdup (tmp_template);
|
||||
|
||||
return mkdtemp (template_copy);
|
||||
#else
|
||||
g_error("Function not supported");
|
||||
#endif
|
||||
}
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <direct.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <io.h>
|
||||
@@ -69,26 +68,6 @@ int mkstemp (char *tmp_template)
|
||||
return fd;
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_mkdtemp (char *tmp_template)
|
||||
{
|
||||
gunichar2* utf16_template;
|
||||
|
||||
utf16_template = u8to16 (tmp_template);
|
||||
|
||||
utf16_template = _wmktemp(utf16_template);
|
||||
if (utf16_template && *utf16_template) {
|
||||
if (_wmkdir (utf16_template) == 0){
|
||||
char *ret = u16to8 (utf16_template);
|
||||
g_free (utf16_template);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
g_free (utf16_template);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4701)
|
||||
#endif
|
||||
|
||||
+1
-4
@@ -199,11 +199,8 @@ g_iconv (GIConv cd, gchar **inbytes, gsize *inbytesleft,
|
||||
} else {
|
||||
outleftptr = NULL;
|
||||
}
|
||||
#if defined(__NetBSD__)
|
||||
return iconv (cd->cd, (const gchar **)inbytes, inleftptr, outbytes, outleftptr);
|
||||
#else
|
||||
|
||||
return iconv (cd->cd, inbytes, inleftptr, outbytes, outleftptr);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+28
-20
@@ -1,5 +1,6 @@
|
||||
#ifndef __GLIB_H
|
||||
#define __GLIB_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -8,12 +9,15 @@
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma include_alias(<eglib-config.h>, <eglib-config.hw>)
|
||||
#endif
|
||||
|
||||
/* VS 2010 and later have stdint.h */
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1600
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <eglib-config.h>
|
||||
#ifndef EGLIB_NO_REMAP
|
||||
@@ -59,6 +63,21 @@ typedef const void * gconstpointer;
|
||||
typedef char gchar;
|
||||
typedef unsigned char guchar;
|
||||
|
||||
#if !G_TYPES_DEFINED
|
||||
/* VS 2010 and later have stdint.h */
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1600
|
||||
typedef __int8 gint8;
|
||||
typedef unsigned __int8 guint8;
|
||||
typedef __int16 gint16;
|
||||
typedef unsigned __int16 guint16;
|
||||
typedef __int32 gint32;
|
||||
typedef unsigned __int32 guint32;
|
||||
typedef __int64 gint64;
|
||||
typedef unsigned __int64 guint64;
|
||||
typedef float gfloat;
|
||||
typedef double gdouble;
|
||||
typedef int gboolean;
|
||||
#else
|
||||
/* Types defined in terms of the stdint.h */
|
||||
typedef int8_t gint8;
|
||||
typedef uint8_t guint8;
|
||||
@@ -71,6 +90,8 @@ typedef uint64_t guint64;
|
||||
typedef float gfloat;
|
||||
typedef double gdouble;
|
||||
typedef int32_t gboolean;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef guint16 gunichar2;
|
||||
typedef guint32 gunichar;
|
||||
@@ -114,11 +135,6 @@ typedef guint32 gunichar;
|
||||
|
||||
#define G_CONST_RETURN const
|
||||
|
||||
#define G_GUINT64_FORMAT PRIu64
|
||||
#define G_GINT64_FORMAT PRIi64
|
||||
#define G_GUINT32_FORMAT PRIu32
|
||||
#define G_GINT32_FORMAT PRIi32
|
||||
|
||||
/*
|
||||
* Allocation
|
||||
*/
|
||||
@@ -126,7 +142,6 @@ void g_free (void *ptr);
|
||||
gpointer g_realloc (gpointer obj, gsize size);
|
||||
gpointer g_malloc (gsize x);
|
||||
gpointer g_malloc0 (gsize x);
|
||||
gpointer g_calloc (gsize n, gsize x);
|
||||
gpointer g_try_malloc (gsize x);
|
||||
gpointer g_try_realloc (gpointer obj, gsize size);
|
||||
|
||||
@@ -139,7 +154,7 @@ gpointer g_try_realloc (gpointer obj, gsize size);
|
||||
#define g_alloca(size) alloca (size)
|
||||
|
||||
gpointer g_memdup (gconstpointer mem, guint byte_size);
|
||||
static inline gchar *g_strdup (const gchar *str) { if (str) { return (gchar*) g_memdup (str, (guint)strlen (str) + 1); } return NULL; }
|
||||
static inline gchar *g_strdup (const gchar *str) { if (str) {return strdup (str);} return NULL; }
|
||||
gchar **g_strdupv (gchar **str_array);
|
||||
|
||||
typedef struct {
|
||||
@@ -147,9 +162,11 @@ typedef struct {
|
||||
gpointer (*realloc) (gpointer mem, gsize n_bytes);
|
||||
void (*free) (gpointer mem);
|
||||
gpointer (*calloc) (gsize n_blocks, gsize n_block_bytes);
|
||||
gpointer (*try_malloc) (gsize n_bytes);
|
||||
gpointer (*try_realloc) (gpointer mem, gsize n_bytes);
|
||||
} GMemVTable;
|
||||
|
||||
void g_mem_set_vtable (GMemVTable* vtable);
|
||||
#define g_mem_set_vtable(x)
|
||||
|
||||
struct _GMemChunk {
|
||||
guint alloc_size;
|
||||
@@ -160,8 +177,7 @@ typedef struct _GMemChunk GMemChunk;
|
||||
* Misc.
|
||||
*/
|
||||
|
||||
gboolean g_hasenv(const gchar *variable);
|
||||
gchar * g_getenv(const gchar *variable);
|
||||
const gchar * g_getenv(const gchar *variable);
|
||||
gboolean g_setenv(const gchar *variable, const gchar *value, gboolean overwrite);
|
||||
void g_unsetenv(const gchar *variable);
|
||||
|
||||
@@ -223,11 +239,11 @@ gint g_printf (gchar const *format, ...);
|
||||
gint g_fprintf (FILE *file, gchar const *format, ...);
|
||||
gint g_sprintf (gchar *string, gchar const *format, ...);
|
||||
gint g_snprintf (gchar *string, gulong n, gchar const *format, ...);
|
||||
gint g_vasprintf (gchar **ret, const gchar *fmt, va_list ap);
|
||||
#define g_vprintf vprintf
|
||||
#define g_vfprintf vfprintf
|
||||
#define g_vsprintf vsprintf
|
||||
#define g_vsnprintf vsnprintf
|
||||
#define g_vasprintf vasprintf
|
||||
|
||||
gsize g_strlcpy (gchar *dest, const gchar *src, gsize dest_size);
|
||||
gchar *g_stpcpy (gchar *dest, const char *src);
|
||||
@@ -772,8 +788,6 @@ const gchar *g_get_user_name (void);
|
||||
gchar *g_get_prgname (void);
|
||||
void g_set_prgname (const gchar *prgname);
|
||||
|
||||
gboolean g_ensure_directory_exists (const gchar *filename);
|
||||
|
||||
/*
|
||||
* Shell
|
||||
*/
|
||||
@@ -888,8 +902,6 @@ gboolean g_file_test (const gchar *filename, GFileTest test);
|
||||
#define g_ascii_strtod strtod
|
||||
#define g_ascii_isalnum isalnum
|
||||
|
||||
gchar *g_mkdtemp (gchar *tmpl);
|
||||
|
||||
/*
|
||||
* Pattern matching
|
||||
*/
|
||||
@@ -1065,10 +1077,6 @@ glong g_utf8_pointer_to_offset (const gchar *str, const gchar *pos);
|
||||
#define _EGLIB_MINOR 0
|
||||
|
||||
#define GLIB_CHECK_VERSION(a,b,c) ((a < _EGLIB_MAJOR) || (a == _EGLIB_MAJOR && (b < _EGLIB_MIDDLE || (b == _EGLIB_MIDDLE && c <= _EGLIB_MINOR))))
|
||||
|
||||
#define G_HAVE_API_SUPPORT(x) (x)
|
||||
#define G_UNSUPPORTED_API "%s:%d: '%s' not supported.", __FILE__, __LINE__
|
||||
#define g_unsupported_api(name) G_STMT_START { g_warning (G_UNSUPPORTED_API, name); } G_STMT_END
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
+1
-1
@@ -367,7 +367,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
if (context->parser.end_element != NULL && context->state == START_ELEMENT){
|
||||
context->parser.end_element (context, ename, context->user_data, error);
|
||||
if (error != NULL && *error != NULL){
|
||||
g_free (ename);
|
||||
free (ename);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-47
@@ -25,45 +25,15 @@
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#if defined (ENABLE_OVERRIDABLE_ALLOCATORS)
|
||||
|
||||
static GMemVTable sGMemVTable = { malloc, realloc, free, calloc };
|
||||
|
||||
void
|
||||
g_mem_set_vtable (GMemVTable* vtable)
|
||||
{
|
||||
sGMemVTable.calloc = vtable->calloc ? vtable->calloc : calloc;
|
||||
sGMemVTable.realloc = vtable->realloc ? vtable->realloc : realloc;
|
||||
sGMemVTable.malloc = vtable->malloc ? vtable->malloc : malloc;
|
||||
sGMemVTable.free = vtable->free ? vtable->free : free;
|
||||
}
|
||||
|
||||
#define G_FREE_INTERNAL sGMemVTable.free
|
||||
#define G_REALLOC_INTERNAL sGMemVTable.realloc
|
||||
#define G_CALLOC_INTERNAL sGMemVTable.calloc
|
||||
#define G_MALLOC_INTERNAL sGMemVTable.malloc
|
||||
#else
|
||||
|
||||
void
|
||||
g_mem_set_vtable (GMemVTable* vtable)
|
||||
{
|
||||
}
|
||||
|
||||
#define G_FREE_INTERNAL free
|
||||
#define G_REALLOC_INTERNAL realloc
|
||||
#define G_CALLOC_INTERNAL calloc
|
||||
#define G_MALLOC_INTERNAL malloc
|
||||
#endif
|
||||
void
|
||||
g_free (void *ptr)
|
||||
{
|
||||
if (ptr != NULL)
|
||||
G_FREE_INTERNAL (ptr);
|
||||
free (ptr);
|
||||
}
|
||||
|
||||
gpointer
|
||||
@@ -88,7 +58,7 @@ gpointer g_realloc (gpointer obj, gsize size)
|
||||
g_free (obj);
|
||||
return 0;
|
||||
}
|
||||
ptr = G_REALLOC_INTERNAL (obj, size);
|
||||
ptr = realloc (obj, size);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i bytes", size);
|
||||
@@ -100,31 +70,27 @@ g_malloc (gsize x)
|
||||
gpointer ptr;
|
||||
if (!x)
|
||||
return 0;
|
||||
ptr = G_MALLOC_INTERNAL (x);
|
||||
ptr = malloc (x);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i bytes", x);
|
||||
}
|
||||
|
||||
gpointer g_calloc (gsize n, gsize x)
|
||||
{
|
||||
gpointer ptr;
|
||||
if (!x || !n)
|
||||
return 0;
|
||||
ptr = G_CALLOC_INTERNAL (n, x);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i (%i * %i) bytes", x*n, n, x);
|
||||
}
|
||||
gpointer g_malloc0 (gsize x)
|
||||
{
|
||||
return g_calloc (1,x);
|
||||
gpointer ptr;
|
||||
if (!x)
|
||||
return 0;
|
||||
ptr = calloc(1,x);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i bytes", x);
|
||||
}
|
||||
|
||||
gpointer g_try_malloc (gsize x)
|
||||
{
|
||||
if (x)
|
||||
return G_MALLOC_INTERNAL (x);
|
||||
return malloc (x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -132,8 +98,8 @@ gpointer g_try_malloc (gsize x)
|
||||
gpointer g_try_realloc (gpointer obj, gsize size)
|
||||
{
|
||||
if (!size) {
|
||||
G_FREE_INTERNAL (obj);
|
||||
g_free (obj);
|
||||
return 0;
|
||||
}
|
||||
return G_REALLOC_INTERNAL (obj, size);
|
||||
return realloc (obj, size);
|
||||
}
|
||||
+4
-50
@@ -39,69 +39,23 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
static pthread_mutex_t env_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
/* MONO Comment
|
||||
*
|
||||
* As per the UNIX spec,
|
||||
* "The return value from getenv() may point to static data which may be overwritten by subsequent calls to getenv(), setenv(), or unsetenv()."
|
||||
* Source: Unix Manual Pages for getenv, IEEE Std 1003.1
|
||||
*
|
||||
* This means that using pointers returned from getenv may (and does) lead to many
|
||||
* pointers which refer to the same piece of memory. When one is freed, all will be freed.
|
||||
*
|
||||
* This is unsafe and an ergonomics risk to fix in the callers. While the caller could lock,
|
||||
* this introduces the risk for looping or exiting while inside of a lock. For this reason,
|
||||
* g_getenv does not mimic the behavior of POSIX getenv anymore.
|
||||
*
|
||||
* The memory address returned will be unique to the invocaton, and must be freed.
|
||||
* */
|
||||
gchar *
|
||||
g_getenv (const gchar *variable)
|
||||
const gchar *
|
||||
g_getenv(const gchar *variable)
|
||||
{
|
||||
gchar *ret = NULL;
|
||||
pthread_mutex_lock (&env_lock);
|
||||
gchar *res = getenv(variable);
|
||||
if (res)
|
||||
ret = g_strdup(res);
|
||||
pthread_mutex_unlock (&env_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function checks if the given variable is non-NULL
|
||||
* in the environment. It's useful because it removes memory
|
||||
* freeing requirements.
|
||||
*
|
||||
*/
|
||||
gboolean
|
||||
g_hasenv (const gchar *variable)
|
||||
{
|
||||
pthread_mutex_lock (&env_lock);
|
||||
gchar *res = getenv(variable);
|
||||
gboolean not_null = (res != NULL);
|
||||
pthread_mutex_unlock (&env_lock);
|
||||
|
||||
return not_null;
|
||||
return getenv(variable);
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_setenv(const gchar *variable, const gchar *value, gboolean overwrite)
|
||||
{
|
||||
gboolean res;
|
||||
pthread_mutex_lock (&env_lock);
|
||||
res = (setenv(variable, value, overwrite) == 0);
|
||||
pthread_mutex_unlock (&env_lock);
|
||||
return res;
|
||||
return setenv(variable, value, overwrite) == 0;
|
||||
}
|
||||
|
||||
void
|
||||
g_unsetenv(const gchar *variable)
|
||||
{
|
||||
pthread_mutex_lock (&env_lock);
|
||||
unsetenv(variable);
|
||||
pthread_mutex_unlock (&env_lock);
|
||||
}
|
||||
|
||||
gchar*
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* gmisc-win32-uwp.c: UWP misc support.
|
||||
*
|
||||
* Copyright 2016 Microsoft
|
||||
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
|
||||
#include <windows.h>
|
||||
#include <assert.h>
|
||||
|
||||
gchar*
|
||||
g_win32_getlocale(void)
|
||||
{
|
||||
gunichar2 buf[19];
|
||||
gint ccBuf = GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SISO639LANGNAME, buf, 9);
|
||||
assert (ccBuf <= 9);
|
||||
if (ccBuf != 0) {
|
||||
buf[ccBuf - 1] = L'-';
|
||||
ccBuf = GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
|
||||
assert (ccBuf <= 9);
|
||||
}
|
||||
|
||||
// Check for GetLocaleInfoEx failure.
|
||||
if (ccBuf == 0)
|
||||
buf[0] = L'\0';
|
||||
|
||||
return u16to8 (buf);
|
||||
}
|
||||
|
||||
#else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
|
||||
void __mono_win32_gmisc_win32_uwp_quiet_lnk4221(void) {}
|
||||
#endif
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
+14
-59
@@ -26,26 +26,14 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include <windows.h>
|
||||
#if _MSC_VER && G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
#include <shlobj.h>
|
||||
#endif
|
||||
#include <direct.h>
|
||||
#include <io.h>
|
||||
#include <assert.h>
|
||||
|
||||
gboolean
|
||||
g_hasenv (const gchar *variable)
|
||||
{
|
||||
return g_getenv (variable) != NULL;
|
||||
}
|
||||
|
||||
gchar *
|
||||
const gchar *
|
||||
g_getenv(const gchar *variable)
|
||||
{
|
||||
gunichar2 *var, *buffer;
|
||||
@@ -96,18 +84,16 @@ g_unsetenv(const gchar *variable)
|
||||
g_free(var);
|
||||
}
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
gchar*
|
||||
g_win32_getlocale(void)
|
||||
{
|
||||
LCID lcid = GetThreadLocale();
|
||||
gchar buf[19];
|
||||
gint ccBuf = GetLocaleInfoA(lcid, LOCALE_SISO639LANGNAME, buf, 9);
|
||||
gint ccBuf = GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, buf, 9);
|
||||
buf[ccBuf - 1] = '-';
|
||||
ccBuf += GetLocaleInfoA(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
|
||||
return g_strdup (buf);
|
||||
ccBuf += GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
|
||||
return strdup(buf);
|
||||
}
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
|
||||
|
||||
gboolean
|
||||
g_path_is_absolute (const char *filename)
|
||||
@@ -127,51 +113,19 @@ g_path_is_absolute (const char *filename)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#if _MSC_VER && G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
static gchar*
|
||||
g_get_known_folder_path (void)
|
||||
{
|
||||
gchar *folder_path = NULL;
|
||||
PWSTR profile_path = NULL;
|
||||
HRESULT hr = SHGetKnownFolderPath (&FOLDERID_Profile, KF_FLAG_DEFAULT, NULL, &profile_path);
|
||||
if (SUCCEEDED(hr)) {
|
||||
folder_path = u16to8 (profile_path);
|
||||
CoTaskMemFree (profile_path);
|
||||
}
|
||||
|
||||
return folder_path;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline gchar *
|
||||
g_get_known_folder_path (void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
const gchar *
|
||||
g_get_home_dir (void)
|
||||
{
|
||||
gchar *home_dir = g_get_known_folder_path ();
|
||||
|
||||
if (!home_dir) {
|
||||
home_dir = (gchar *) g_getenv ("USERPROFILE");
|
||||
}
|
||||
|
||||
if (!home_dir) {
|
||||
const gchar *drive = g_getenv ("HOMEDRIVE");
|
||||
const gchar *path = g_getenv ("HOMEPATH");
|
||||
|
||||
if (drive && path) {
|
||||
home_dir = g_malloc (strlen (drive) + strlen (path) + 1);
|
||||
if (home_dir) {
|
||||
sprintf (home_dir, "%s%s", drive, path);
|
||||
}
|
||||
/* FIXME */
|
||||
const gchar *drive = g_getenv ("HOMEDRIVE");
|
||||
const gchar *path = g_getenv ("HOMEPATH");
|
||||
gchar *home_dir = NULL;
|
||||
|
||||
if (drive && path) {
|
||||
home_dir = g_malloc(strlen(drive) + strlen(path) +1);
|
||||
if (home_dir) {
|
||||
sprintf(home_dir, "%s%s", drive, path);
|
||||
}
|
||||
g_free (drive);
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
return home_dir;
|
||||
@@ -206,3 +160,4 @@ g_get_tmp_dir (void)
|
||||
}
|
||||
return tmp_dir;
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#ifndef __G_MODULE_WINDOWS_INTERNALS_H__
|
||||
#define __G_MODULE_WINDOWS_INTERNALS_H__
|
||||
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <gmodule.h>
|
||||
|
||||
gpointer
|
||||
w32_find_symbol (const gchar *symbol_name);
|
||||
#endif /* G_OS_WIN32 */
|
||||
#endif /* __G_MODULE_WINDOWS_INTERNALS_H__ */
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* gmodule-win32-uwp.c: UWP gmodule support.
|
||||
*
|
||||
* Copyright 2016 Microsoft
|
||||
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
|
||||
#include <windows.h>
|
||||
#include <gmodule-win32-internals.h>
|
||||
|
||||
gpointer
|
||||
w32_find_symbol (const gchar *symbol_name)
|
||||
{
|
||||
g_unsupported_api ("EnumProcessModules");
|
||||
SetLastError (ERROR_NOT_SUPPORTED);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
g_module_error (void)
|
||||
{
|
||||
gchar *ret = NULL;
|
||||
TCHAR buf [1024];
|
||||
DWORD code = GetLastError ();
|
||||
|
||||
if (!FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
|
||||
code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, G_N_ELEMENTS (buf) - 1, NULL) )
|
||||
buf[0] = TEXT('\0');
|
||||
|
||||
ret = u16to8 (buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
|
||||
void __mono_win32_gmodule_win32_uwp_quiet_lnk4221(void) {}
|
||||
#endif
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
@@ -28,11 +28,10 @@
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <windows.h>
|
||||
#include <psapi.h>
|
||||
#include <gmodule-win32-internals.h>
|
||||
|
||||
#define LIBSUFFIX ".dll"
|
||||
#define LIBPREFIX ""
|
||||
@@ -69,8 +68,7 @@ g_module_open (const gchar *file, GModuleFlags flags)
|
||||
return module;
|
||||
}
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
gpointer
|
||||
static gpointer
|
||||
w32_find_symbol (const gchar *symbol_name)
|
||||
{
|
||||
HMODULE *modules;
|
||||
@@ -116,7 +114,6 @@ w32_find_symbol (const gchar *symbol_name)
|
||||
g_free (modules);
|
||||
return NULL;
|
||||
}
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
|
||||
|
||||
gboolean
|
||||
g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol)
|
||||
@@ -137,7 +134,6 @@ g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol)
|
||||
}
|
||||
}
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
const gchar *
|
||||
g_module_error (void)
|
||||
{
|
||||
@@ -154,7 +150,6 @@ g_module_error (void)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
|
||||
|
||||
gboolean
|
||||
g_module_close (GModule *module)
|
||||
|
||||
+8
-10
@@ -31,6 +31,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "vasprintf.h"
|
||||
|
||||
/* The current fatal levels, error is always fatal */
|
||||
static GLogLevelFlags fatal = G_LOG_LEVEL_ERROR;
|
||||
static GLogFunc default_log_func;
|
||||
@@ -47,17 +49,15 @@ g_print (const gchar *format, ...)
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
if (g_vasprintf (&msg, format, args) < 0) {
|
||||
va_end (args);
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
}
|
||||
va_end (args);
|
||||
|
||||
if (!stdout_handler)
|
||||
stdout_handler = default_stdout_handler;
|
||||
|
||||
stdout_handler (msg);
|
||||
g_free (msg);
|
||||
free (msg);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -67,17 +67,15 @@ g_printerr (const gchar *format, ...)
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
if (g_vasprintf (&msg, format, args) < 0) {
|
||||
va_end (args);
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
}
|
||||
va_end (args);
|
||||
|
||||
if (!stderr_handler)
|
||||
stderr_handler = default_stderr_handler;
|
||||
|
||||
stderr_handler (msg);
|
||||
g_free (msg);
|
||||
free (msg);
|
||||
}
|
||||
|
||||
GLogLevelFlags
|
||||
@@ -109,11 +107,11 @@ g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format,
|
||||
if (!default_log_func)
|
||||
default_log_func = g_log_default_handler;
|
||||
|
||||
if (g_vasprintf (&msg, format, args) < 0)
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
|
||||
default_log_func (log_domain, log_level, msg, default_log_func_user_data);
|
||||
g_free (msg);
|
||||
free (msg);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <direct.h>
|
||||
@@ -295,95 +294,3 @@ g_get_prgname (void)
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_ensure_directory_exists (const gchar *filename)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
gchar *dir_utf8 = g_path_get_dirname (filename);
|
||||
gunichar2 *p;
|
||||
gunichar2 *dir_utf16 = NULL;
|
||||
int retval;
|
||||
|
||||
if (!dir_utf8 || !dir_utf8 [0])
|
||||
return FALSE;
|
||||
|
||||
dir_utf16 = g_utf8_to_utf16 (dir_utf8, strlen (dir_utf8), NULL, NULL, NULL);
|
||||
g_free (dir_utf8);
|
||||
|
||||
if (!dir_utf16)
|
||||
return FALSE;
|
||||
|
||||
p = dir_utf16;
|
||||
|
||||
/* make life easy and only use one directory seperator */
|
||||
while (*p != '\0')
|
||||
{
|
||||
if (*p == '/')
|
||||
*p = '\\';
|
||||
p++;
|
||||
}
|
||||
|
||||
p = dir_utf16;
|
||||
|
||||
/* get past C:\ )*/
|
||||
while (*p++ != '\\')
|
||||
{
|
||||
}
|
||||
|
||||
while (1) {
|
||||
gboolean bRet = FALSE;
|
||||
p = wcschr (p, '\\');
|
||||
if (p)
|
||||
*p = '\0';
|
||||
retval = _wmkdir (dir_utf16);
|
||||
if (retval != 0 && errno != EEXIST) {
|
||||
g_free (dir_utf16);
|
||||
return FALSE;
|
||||
}
|
||||
if (!p)
|
||||
break;
|
||||
*p++ = '\\';
|
||||
}
|
||||
|
||||
g_free (dir_utf16);
|
||||
return TRUE;
|
||||
#else
|
||||
char *p;
|
||||
gchar *dir = g_path_get_dirname (filename);
|
||||
int retval;
|
||||
struct stat sbuf;
|
||||
|
||||
if (!dir || !dir [0]) {
|
||||
g_free (dir);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (stat (dir, &sbuf) == 0 && S_ISDIR (sbuf.st_mode)) {
|
||||
g_free (dir);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
p = dir;
|
||||
while (*p == '/')
|
||||
p++;
|
||||
|
||||
while (1) {
|
||||
p = strchr (p, '/');
|
||||
if (p)
|
||||
*p = '\0';
|
||||
retval = mkdir (dir, 0777);
|
||||
if (retval != 0 && errno != EEXIST) {
|
||||
g_free (dir);
|
||||
return FALSE;
|
||||
}
|
||||
if (!p)
|
||||
break;
|
||||
*p++ = '/';
|
||||
}
|
||||
|
||||
g_free (dir);
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
+4
-39
@@ -32,17 +32,13 @@
|
||||
#include <ctype.h>
|
||||
#include <glib.h>
|
||||
|
||||
/*
|
||||
* g_strndup and g_vasprintf need to allocate memory with g_malloc if
|
||||
* ENABLE_OVERRIDABLE_ALLOCATORS is defined so that it can be safely freed with g_free
|
||||
* rather than free.
|
||||
*/
|
||||
#include "vasprintf.h"
|
||||
|
||||
/* This is not a macro, because I dont want to put _GNU_SOURCE in the glib.h header */
|
||||
gchar *
|
||||
g_strndup (const gchar *str, gsize n)
|
||||
{
|
||||
#if defined (HAVE_STRNDUP) && !defined (ENABLE_OVERRIDABLE_ALLOCATORS)
|
||||
#ifdef HAVE_STRNDUP
|
||||
return strndup (str, n);
|
||||
#else
|
||||
if (str) {
|
||||
@@ -56,37 +52,6 @@ g_strndup (const gchar *str, gsize n)
|
||||
#endif
|
||||
}
|
||||
|
||||
gint g_vasprintf (gchar **ret, const gchar *fmt, va_list ap)
|
||||
{
|
||||
#if defined (HAVE_VASPRINTF) && !defined (ENABLE_OVERRIDABLE_ALLOCATORS)
|
||||
return vasprintf (ret, fmt, ap);
|
||||
#else
|
||||
char *buf;
|
||||
int len;
|
||||
size_t buflen;
|
||||
va_list ap2;
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
|
||||
ap2 = ap;
|
||||
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
|
||||
#else
|
||||
va_copy(ap2, ap);
|
||||
len = vsnprintf(NULL, 0, fmt, ap2);
|
||||
#endif
|
||||
|
||||
if (len >= 0 && (buf = g_malloc ((buflen = (size_t) (len + 1)))) != NULL) {
|
||||
len = vsnprintf(buf, buflen, fmt, ap);
|
||||
*ret = buf;
|
||||
} else {
|
||||
*ret = NULL;
|
||||
len = -1;
|
||||
}
|
||||
|
||||
va_end(ap2);
|
||||
return len;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
g_strfreev (gchar **str_array)
|
||||
{
|
||||
@@ -168,7 +133,7 @@ g_strdup_vprintf (const gchar *format, va_list args)
|
||||
int n;
|
||||
char *ret;
|
||||
|
||||
n = g_vasprintf (&ret, format, args);
|
||||
n = vasprintf (&ret, format, args);
|
||||
if (n == -1)
|
||||
return NULL;
|
||||
|
||||
@@ -183,7 +148,7 @@ g_strdup_printf (const gchar *format, ...)
|
||||
int n;
|
||||
|
||||
va_start (args, format);
|
||||
n = g_vasprintf (&ret, format, args);
|
||||
n = vasprintf (&ret, format, args);
|
||||
va_end (args);
|
||||
if (n == -1)
|
||||
return NULL;
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* gunicode-win32-uwp.c: UWP unicode support.
|
||||
*
|
||||
* Copyright 2016 Microsoft
|
||||
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
|
||||
#define CODESET 1
|
||||
#include <windows.h>
|
||||
|
||||
extern const char *my_charset;
|
||||
static gboolean is_utf8;
|
||||
|
||||
gboolean
|
||||
g_get_charset (G_CONST_RETURN char **charset)
|
||||
{
|
||||
if (my_charset == NULL) {
|
||||
static char buf [14];
|
||||
CPINFOEXA cp_info;
|
||||
|
||||
GetCPInfoExA (CP_ACP, 0, &cp_info);
|
||||
sprintf (buf, "CP%u", cp_info.CodePage);
|
||||
my_charset = buf;
|
||||
is_utf8 = FALSE;
|
||||
}
|
||||
|
||||
if (charset != NULL)
|
||||
*charset = my_charset;
|
||||
|
||||
return is_utf8;
|
||||
}
|
||||
|
||||
#else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
|
||||
void __mono_win32_gunicode_win32_uwp_quiet_lnk4221(void) {}
|
||||
#endif
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* gunicode-win32.c: Windows unicode support.
|
||||
*
|
||||
* Copyright 2016 Microsoft
|
||||
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
#define CODESET 1
|
||||
#include <windows.h>
|
||||
|
||||
extern const char *my_charset;
|
||||
static gboolean is_utf8;
|
||||
|
||||
gboolean
|
||||
g_get_charset (G_CONST_RETURN char **charset)
|
||||
{
|
||||
if (my_charset == NULL) {
|
||||
static char buf [14];
|
||||
sprintf (buf, "CP%u", GetACP ());
|
||||
my_charset = buf;
|
||||
is_utf8 = FALSE;
|
||||
}
|
||||
|
||||
if (charset != NULL)
|
||||
*charset = my_charset;
|
||||
|
||||
return is_utf8;
|
||||
}
|
||||
|
||||
#else /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
|
||||
void __mono_win32_mono_gunicode_win32_quiet_lnk4221(void) {}
|
||||
#endif
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
|
||||
+20
-7
@@ -39,13 +39,21 @@
|
||||
#include <unicode-data.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#if defined(_MSC_VER) || defined(G_OS_WIN32)
|
||||
/* FIXME */
|
||||
# define CODESET 1
|
||||
# include <windows.h>
|
||||
#else
|
||||
# ifdef HAVE_LANGINFO_H
|
||||
# include <langinfo.h>
|
||||
# endif
|
||||
# ifdef HAVE_LOCALCHARSET_H
|
||||
# include <localcharset.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
const char *my_charset;
|
||||
static const char *my_charset;
|
||||
static gboolean is_utf8;
|
||||
|
||||
/*
|
||||
* Character set conversion
|
||||
@@ -200,20 +208,26 @@ g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gs
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
static gboolean is_utf8;
|
||||
|
||||
gboolean
|
||||
g_get_charset (G_CONST_RETURN char **charset)
|
||||
{
|
||||
if (my_charset == NULL) {
|
||||
#ifdef G_OS_WIN32
|
||||
static char buf [14];
|
||||
sprintf (buf, "CP%u", GetACP ());
|
||||
my_charset = buf;
|
||||
is_utf8 = FALSE;
|
||||
#else
|
||||
/* These shouldn't be heap allocated */
|
||||
#if defined(HAVE_LOCALCHARSET_H)
|
||||
#if defined(HAVE_LANGINFO_H)
|
||||
my_charset = nl_langinfo (CODESET);
|
||||
#elif defined(HAVE_LOCALCHARSET_H)
|
||||
my_charset = locale_charset ();
|
||||
#else
|
||||
my_charset = "UTF-8";
|
||||
#endif
|
||||
is_utf8 = strcmp (my_charset, "UTF-8") == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (charset != NULL)
|
||||
@@ -221,7 +235,6 @@ g_get_charset (G_CONST_RETURN char **charset)
|
||||
|
||||
return is_utf8;
|
||||
}
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
gchar *
|
||||
g_locale_to_utf8 (const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int vasprintf(char **ret, const char *fmt, va_list ap)
|
||||
{
|
||||
char *buf;
|
||||
int len;
|
||||
size_t buflen;
|
||||
va_list ap2;
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
|
||||
ap2 = ap;
|
||||
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
|
||||
#else
|
||||
va_copy(ap2, ap);
|
||||
len = vsnprintf(NULL, 0, fmt, ap2);
|
||||
#endif
|
||||
|
||||
if (len >= 0 && (buf = malloc ((buflen = (size_t) (len + 1)))) != NULL) {
|
||||
len = vsnprintf(buf, buflen, fmt, ap);
|
||||
*ret = buf;
|
||||
} else {
|
||||
*ret = NULL;
|
||||
len = -1;
|
||||
}
|
||||
|
||||
va_end(ap2);
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef __VASPRINTF_H
|
||||
#define __VASPRINTF_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <config.h>
|
||||
|
||||
#ifndef HAVE_VASPRINTF
|
||||
int vasprintf(char **ret, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
#endif /* __VASPRINTF_H */
|
||||
@@ -28,10 +28,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "test.h"
|
||||
|
||||
#ifndef DRIVER_EXTERNAL_TESTS
|
||||
#include "tests.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_GETOPT_H
|
||||
@@ -105,11 +102,7 @@ static void print_help(char *s)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
#ifdef DRIVER_EXTERNAL_MAIN
|
||||
gint run_tests_main(gint argc, gchar **argv)
|
||||
#else
|
||||
gint main(gint argc, gchar **argv)
|
||||
#endif
|
||||
{
|
||||
gint i, j, c, iterations = 1;
|
||||
StringArray *tests_to_run = NULL;
|
||||
|
||||
+8
-1
@@ -46,6 +46,13 @@
|
||||
#include "test.h"
|
||||
|
||||
extern gint global_passed, global_tests;
|
||||
|
||||
#ifndef HAVE_VASPRINTF
|
||||
/* systen does not provide a vasprintf function, use the one
|
||||
provided within eglib itself */
|
||||
extern int vasprintf(char **ret, const char *format, va_list ap);
|
||||
#endif
|
||||
|
||||
static gchar *last_result = NULL;
|
||||
|
||||
gboolean
|
||||
@@ -176,7 +183,7 @@ FAILED(const gchar *format, ...)
|
||||
return NULL;
|
||||
#else
|
||||
va_start(args, format);
|
||||
n = g_vasprintf(&ret, format, args);
|
||||
n = vasprintf(&ret, format, args);
|
||||
va_end(args);
|
||||
|
||||
if(n == -1) {
|
||||
|
||||
@@ -5,32 +5,6 @@
|
||||
#include "cygconfig.h"
|
||||
#else
|
||||
|
||||
#ifndef HAVE_WINAPI_FAMILY_SUPPORT
|
||||
|
||||
#define HAVE_WINAPI_FAMILY_SUPPORT
|
||||
|
||||
/* WIN API Family support */
|
||||
#include <winapifamily.h>
|
||||
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
#define HAVE_CLASSIC_WINAPI_SUPPORT 1
|
||||
#define HAVE_UWP_WINAPI_SUPPORT 0
|
||||
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
#define HAVE_CLASSIC_WINAPI_SUPPORT 0
|
||||
#define HAVE_UWP_WINAPI_SUPPORT 1
|
||||
#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
|
||||
#error Unsupported WINAPI family
|
||||
#endif
|
||||
#else
|
||||
#define HAVE_CLASSIC_WINAPI_SUPPORT 0
|
||||
#define HAVE_UWP_WINAPI_SUPPORT 0
|
||||
#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
|
||||
#error Unsupported WINAPI family
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
|
||||
+1
Submodule external/Lucene.Net.Light added at 85978b7eb9.
Vendored
-1
Submodule external/api-doc-tools deleted from d03e819838.
Vendored
-1
Submodule external/api-snapshot deleted from ba90b3440d.
Vendored
+1
-1
Submodule external/binary-reference-assemblies updated: 142cbeb62f...fcb3074202.
Vendored
-1
Submodule external/bockbuild deleted from 31c98f3cab.
Vendored
-1
Submodule external/boringssl deleted from c06ac6b33d.
Vendored
-1
Submodule external/buildtools deleted from b5cc6e6ab5.
Vendored
+1
-1
Submodule external/cecil updated: 0b523fa7e0...33d50b874f.
Vendored
-1
Submodule external/cecil-legacy deleted from 33d50b874f.
Vendored
-1
Submodule external/corefx deleted from b6cf577f9c.
Vendored
-1
Submodule external/corert deleted from 814f76de6a.
+1
Submodule external/debian-snapshot added at 9342f8f052.
Vendored
+1
-1
Submodule external/ikdasm updated: 88b67c42ca...323eeecdf1.
Vendored
+1
-1
Submodule external/ikvm updated: 7c1e61bec8...d6b00edf21.
Vendored
-1
Submodule external/linker deleted from 21e445c26c.
Vendored
-1
Submodule external/nuget-buildtasks deleted from 8d307472ea.
Vendored
+1
-1
Submodule external/nunit-lite updated: 690603bea9...5a80e74622.
+1
Submodule external/referencesource added at bf43bae316.
Vendored
-1
Submodule external/roslyn-binaries deleted from 1e3dfe1003.
Vendored
-1
Submodule external/xunit-binaries deleted from b8e20d265b.
@@ -1,4 +1,2 @@
|
||||
ltconfig crlf=input
|
||||
install-sh crlf=input
|
||||
/BCC_MAKEFILE -crlf
|
||||
/digimars.mak -crlf
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
* See the definition of page_hash_table in gc_private.h.
|
||||
* False hits from the stack(s) are much more dangerous than false hits
|
||||
* from elsewhere, since the former can pin a large object that spans the
|
||||
* block, even though it does not start on the dangerous block.
|
||||
* block, eventhough it does not start on the dangerous block.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+4
-2
@@ -233,8 +233,10 @@ AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
|
||||
AC_MSG_CHECKING(for __sync_bool_compare_and_swap)
|
||||
AC_TRY_COMPILE([],[
|
||||
volatile unsigned int foo = 0;
|
||||
unsigned int r1 = __sync_bool_compare_and_swap(&foo, 0, 1);
|
||||
return 0;
|
||||
int main(int argc, char** argv) {
|
||||
unsigned int r1 = __sync_bool_compare_and_swap(&foo, 0, 1);
|
||||
return 0;
|
||||
}
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAS___SYNC_BOOL_COMPARE_AND_SWAP)
|
||||
|
||||
@@ -1872,7 +1872,7 @@ Since 6.2alpha6:
|
||||
- Fixed Makefile.direct for DARWIN. (Thanks to Manuel Serrano.)
|
||||
- There was a race between GC_pthread_detach and thread exit that could
|
||||
result in a thread structure being deallocated by GC_pthread_detach
|
||||
even though it was still needed by the thread exit code. (Thanks to
|
||||
eventhough it was still needed by the thread exit code. (Thanks to
|
||||
Dick Porter for the small test case that allowed this to be debugged.)
|
||||
- Fixed version parsing for non-alpha versions in acinclude.m4 and
|
||||
version checking in version.h.
|
||||
|
||||
Loaded 100 of 18675 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user