添加client
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 713 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 637 B |
|
After Width: | Height: | Size: 649 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 869 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 801 B |
|
After Width: | Height: | Size: 836 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
|
@ -0,0 +1,73 @@
|
||||||
|
GCC RUNTIME LIBRARY EXCEPTION
|
||||||
|
|
||||||
|
Version 3.1, 31 March 2009
|
||||||
|
|
||||||
|
Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies of this
|
||||||
|
license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
This GCC Runtime Library Exception ("Exception") is an additional
|
||||||
|
permission under section 7 of the GNU General Public License, version
|
||||||
|
3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
|
||||||
|
bears a notice placed by the copyright holder of the file stating that
|
||||||
|
the file is governed by GPLv3 along with this Exception.
|
||||||
|
|
||||||
|
When you use GCC to compile a program, GCC may combine portions of
|
||||||
|
certain GCC header files and runtime libraries with the compiled
|
||||||
|
program. The purpose of this Exception is to allow compilation of
|
||||||
|
non-GPL (including proprietary) programs to use, in this way, the
|
||||||
|
header files and runtime libraries covered by this Exception.
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
A file is an "Independent Module" if it either requires the Runtime
|
||||||
|
Library for execution after a Compilation Process, or makes use of an
|
||||||
|
interface provided by the Runtime Library, but is not otherwise based
|
||||||
|
on the Runtime Library.
|
||||||
|
|
||||||
|
"GCC" means a version of the GNU Compiler Collection, with or without
|
||||||
|
modifications, governed by version 3 (or a specified later version) of
|
||||||
|
the GNU General Public License (GPL) with the option of using any
|
||||||
|
subsequent versions published by the FSF.
|
||||||
|
|
||||||
|
"GPL-compatible Software" is software whose conditions of propagation,
|
||||||
|
modification and use would permit combination with GCC in accord with
|
||||||
|
the license of GCC.
|
||||||
|
|
||||||
|
"Target Code" refers to output from any compiler for a real or virtual
|
||||||
|
target processor architecture, in executable form or suitable for
|
||||||
|
input to an assembler, loader, linker and/or execution
|
||||||
|
phase. Notwithstanding that, Target Code does not include data in any
|
||||||
|
format that is used as a compiler intermediate representation, or used
|
||||||
|
for producing a compiler intermediate representation.
|
||||||
|
|
||||||
|
The "Compilation Process" transforms code entirely represented in
|
||||||
|
non-intermediate languages designed for human-written code, and/or in
|
||||||
|
Java Virtual Machine byte code, into Target Code. Thus, for example,
|
||||||
|
use of source code generators and preprocessors need not be considered
|
||||||
|
part of the Compilation Process, since the Compilation Process can be
|
||||||
|
understood as starting with the output of the generators or
|
||||||
|
preprocessors.
|
||||||
|
|
||||||
|
A Compilation Process is "Eligible" if it is done using GCC, alone or
|
||||||
|
with other GPL-compatible software, or if it is done without using any
|
||||||
|
work based on GCC. For example, using non-GPL-compatible Software to
|
||||||
|
optimize any GCC intermediate representations would not qualify as an
|
||||||
|
Eligible Compilation Process.
|
||||||
|
|
||||||
|
1. Grant of Additional Permission.
|
||||||
|
|
||||||
|
You have permission to propagate a work of Target Code formed by
|
||||||
|
combining the Runtime Library with Independent Modules, even if such
|
||||||
|
propagation would otherwise violate the terms of GPLv3, provided that
|
||||||
|
all Target Code was generated by Eligible Compilation Processes. You
|
||||||
|
may then convey such a combination under terms of your choice,
|
||||||
|
consistent with the licensing of the Independent Modules.
|
||||||
|
|
||||||
|
2. No Weakening of GCC Copyleft.
|
||||||
|
|
||||||
|
The availability of this Exception does not imply any general
|
||||||
|
presumption that third-party software is unaffected by the copyleft
|
||||||
|
requirements of the license of GCC.
|
||||||
|
|
||||||
|
|
@ -0,0 +1,674 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, 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
|
||||||
|
them 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 prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If 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 convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU 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
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state 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 program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
|
|
@ -0,0 +1,165 @@
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates
|
||||||
|
the terms and conditions of version 3 of the GNU General Public
|
||||||
|
License, supplemented by the additional permissions listed below.
|
||||||
|
|
||||||
|
0. Additional Definitions.
|
||||||
|
|
||||||
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||||
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||||
|
General Public License.
|
||||||
|
|
||||||
|
"The Library" refers to a covered work governed by this License,
|
||||||
|
other than an Application or a Combined Work as defined below.
|
||||||
|
|
||||||
|
An "Application" is any work that makes use of an interface provided
|
||||||
|
by the Library, but which is not otherwise based on the Library.
|
||||||
|
Defining a subclass of a class defined by the Library is deemed a mode
|
||||||
|
of using an interface provided by the Library.
|
||||||
|
|
||||||
|
A "Combined Work" is a work produced by combining or linking an
|
||||||
|
Application with the Library. The particular version of the Library
|
||||||
|
with which the Combined Work was made is also called the "Linked
|
||||||
|
Version".
|
||||||
|
|
||||||
|
The "Minimal Corresponding Source" for a Combined Work means the
|
||||||
|
Corresponding Source for the Combined Work, excluding any source code
|
||||||
|
for portions of the Combined Work that, considered in isolation, are
|
||||||
|
based on the Application, and not on the Linked Version.
|
||||||
|
|
||||||
|
The "Corresponding Application Code" for a Combined Work means the
|
||||||
|
object code and/or source code for the Application, including any data
|
||||||
|
and utility programs needed for reproducing the Combined Work from the
|
||||||
|
Application, but excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
You may convey a covered work under sections 3 and 4 of this License
|
||||||
|
without being bound by section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
2. Conveying Modified Versions.
|
||||||
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a
|
||||||
|
facility refers to a function or data to be supplied by an Application
|
||||||
|
that uses the facility (other than as an argument passed when the
|
||||||
|
facility is invoked), then you may convey a copy of the modified
|
||||||
|
version:
|
||||||
|
|
||||||
|
a) under this License, provided that you make a good faith effort to
|
||||||
|
ensure that, in the event an Application does not supply the
|
||||||
|
function or data, the facility still operates, and performs
|
||||||
|
whatever part of its purpose remains meaningful, or
|
||||||
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of
|
||||||
|
this License applicable to that copy.
|
||||||
|
|
||||||
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
|
The object code form of an Application may incorporate material from
|
||||||
|
a header file that is part of the Library. You may convey such object
|
||||||
|
code under terms of your choice, provided that, if the incorporated
|
||||||
|
material is not limited to numerical parameters, data structure
|
||||||
|
layouts and accessors, or small macros, inline functions and templates
|
||||||
|
(ten or fewer lines in length), you do both of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the object code that the
|
||||||
|
Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
4. Combined Works.
|
||||||
|
|
||||||
|
You may convey a Combined Work under terms of your choice that,
|
||||||
|
taken together, effectively do not restrict modification of the
|
||||||
|
portions of the Library contained in the Combined Work and reverse
|
||||||
|
engineering for debugging such modifications, if you also do each of
|
||||||
|
the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the Combined Work that
|
||||||
|
the Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
c) For a Combined Work that displays copyright notices during
|
||||||
|
execution, include the copyright notice for the Library among
|
||||||
|
these notices, as well as a reference directing the user to the
|
||||||
|
copies of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
d) Do one of the following:
|
||||||
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this
|
||||||
|
License, and the Corresponding Application Code in a form
|
||||||
|
suitable for, and under terms that permit, the user to
|
||||||
|
recombine or relink the Application with a modified version of
|
||||||
|
the Linked Version to produce a modified Combined Work, in the
|
||||||
|
manner specified by section 6 of the GNU GPL for conveying
|
||||||
|
Corresponding Source.
|
||||||
|
|
||||||
|
1) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (a) uses at run time
|
||||||
|
a copy of the Library already present on the user's computer
|
||||||
|
system, and (b) will operate properly with a modified version
|
||||||
|
of the Library that is interface-compatible with the Linked
|
||||||
|
Version.
|
||||||
|
|
||||||
|
e) Provide Installation Information, but only if you would otherwise
|
||||||
|
be required to provide such information under section 6 of the
|
||||||
|
GNU GPL, and only to the extent that such information is
|
||||||
|
necessary to install and execute a modified version of the
|
||||||
|
Combined Work produced by recombining or relinking the
|
||||||
|
Application with a modified version of the Linked Version. (If
|
||||||
|
you use option 4d0, the Installation Information must accompany
|
||||||
|
the Minimal Corresponding Source and Corresponding Application
|
||||||
|
Code. If you use option 4d1, you must provide the Installation
|
||||||
|
Information in the manner specified by section 6 of the GNU GPL
|
||||||
|
for conveying Corresponding Source.)
|
||||||
|
|
||||||
|
5. Combined Libraries.
|
||||||
|
|
||||||
|
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 that are not Applications and are not covered by this
|
||||||
|
License, and convey such a combined library under terms of your
|
||||||
|
choice, if you do both of the following:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work based
|
||||||
|
on the Library, uncombined with any other library facilities,
|
||||||
|
conveyed under the terms of this License.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library that part of it
|
||||||
|
is a work based on the Library, and explaining where to find the
|
||||||
|
accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the GNU Lesser 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 as you received it specifies that a certain numbered version
|
||||||
|
of the GNU Lesser General Public License "or any later version"
|
||||||
|
applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that published version or of any later version
|
||||||
|
published by the Free Software Foundation. If the Library as you
|
||||||
|
received it does not specify a version number of the GNU Lesser
|
||||||
|
General Public License, you may choose any version of the GNU Lesser
|
||||||
|
General Public License ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Library as you received it specifies that a proxy can decide
|
||||||
|
whether future versions of the GNU Lesser General Public License shall
|
||||||
|
apply, that proxy's public statement of acceptance of any version is
|
||||||
|
permanent authorization for you to choose that version for the
|
||||||
|
Library.
|
||||||
|
|
@ -0,0 +1,312 @@
|
||||||
|
=== TDM-GCC Compiler Suite for Windows ===
|
||||||
|
--- GCC 4.6 & 4.7 Series ---
|
||||||
|
*** Standard MinGW 32-bit Edition ***
|
||||||
|
|
||||||
|
|
||||||
|
This edition of TDM-GCC is an unofficial replacement for the official GCC
|
||||||
|
binaries distributed by the MinGW project; please note the following caveats:
|
||||||
|
* TDM-GCC is not formally affiliated with or endorsed by the MinGW project.
|
||||||
|
* No level of support for TDM-GCC is in any way guaranteed, although a best
|
||||||
|
effort is made to fix bugs as they are found or forward them to GCC
|
||||||
|
Bugzilla.
|
||||||
|
|
||||||
|
|
||||||
|
BUGS:
|
||||||
|
If you encounter a problem while using a TDM-GCC build that isn't present in a
|
||||||
|
previous MinGW or TDM release, you are encouraged to submit a helpful bug
|
||||||
|
report. Please see <http://tdm-gcc.tdragon.net/bugs> for further instructions.
|
||||||
|
|
||||||
|
|
||||||
|
>>>>> INSTALLATION
|
||||||
|
|
||||||
|
*** TDM/MinGW Installer ***
|
||||||
|
|
||||||
|
Using the TDM/MinGW installer is highly recommended; it can automatically
|
||||||
|
install TDM-GCC (or the official MinGW GCC) as well as all supplementary base
|
||||||
|
system packages. The installer uses a standard wizard interface with reasonable
|
||||||
|
defaults.
|
||||||
|
|
||||||
|
*** Manual Installation ***
|
||||||
|
|
||||||
|
Do not install TDM-GCC packages on top of a previous working GCC installation of
|
||||||
|
any kind.
|
||||||
|
|
||||||
|
You will need to download and unpack a set of archives. A minimal base set of
|
||||||
|
archives is required; there are also some additional components that are
|
||||||
|
optional, adding support for additional programming languages or GCC features.
|
||||||
|
|
||||||
|
TDM-GCC provides a ZIP-compressed version and a TAR.LZMA-compressed version of
|
||||||
|
each archive. Use whichever is easiest.
|
||||||
|
|
||||||
|
REQUIRED BASE:
|
||||||
|
* gcc-core (gcc-4.7.1-tdm-1-core)
|
||||||
|
* binutils (binutils-2.22-1-mingw32-bin)
|
||||||
|
* mingwrt (mingwrt-3.20-2-mingw32-dev, mingwrt-3.20-2-mingw32-dll)
|
||||||
|
* w32api (w32api-3.17-2-mingw32-dev)
|
||||||
|
|
||||||
|
OPTIONAL:
|
||||||
|
* gcc-c++ (gcc-4.7.1-tdm-1-c++) - C++ support
|
||||||
|
* gcc-ada (gcc-4.7.1-tdm-1-ada) - Ada support
|
||||||
|
* gcc-fortran (gcc-4.7.1-tdm-1-fortran) - Fortran support
|
||||||
|
* gcc-objc (gcc-4.7.1-tdm-1-objc) - Objective-C/C++ support
|
||||||
|
* gcc-openmp (gcc-4.7.1-tdm-1-openmp) - OpenMP support
|
||||||
|
* mingw32-make (make-3.82-5-mingw32-bin, libintl-0.17-1-mingw32-dll-8,
|
||||||
|
libiconv-1.13.1-1-mingw32-dll-2) - GNU make for *-mingw32 GCC
|
||||||
|
* gdb (gdb-7.4-2-mingw32-bin, libexpat-2.0.1-1-mingw32-dll-1) - GNU
|
||||||
|
source-level debugger, for mingw32
|
||||||
|
You'll need GDB particularly if you want to use an IDE with debugging support.
|
||||||
|
|
||||||
|
Unpack all the archives to an empty directory. You may choose any path, though
|
||||||
|
it is recommended that you avoid a path with any spaces in the folder names.
|
||||||
|
Finally, consider adding the bin subdirectory to your Windows PATH environment
|
||||||
|
variable.
|
||||||
|
|
||||||
|
|
||||||
|
>>>>> USAGE NOTES
|
||||||
|
|
||||||
|
*** Inline member functions and DLLs ***
|
||||||
|
|
||||||
|
[[[ IMPORTANT NOTE:
|
||||||
|
[[[ You will probably need to use "-fno-keep-inline-dllexport" when building
|
||||||
|
[[[ large DLLs with lots of inline member functions, such as the "wxWidgets"
|
||||||
|
[[[ library's monolithic DLL.
|
||||||
|
|
||||||
|
As of the 4.5 series, GCC conforms more closely to the behavior of MSVC on
|
||||||
|
Windows platforms by always emitting inline functions that are class members
|
||||||
|
when creating a DLL. This behavior doesn't necessarily conform to the
|
||||||
|
expectations of libraries that are used to the old behavior, however, and in
|
||||||
|
some cases can cause the linker to run out of memory when creating the DLL. If
|
||||||
|
necessary, use the "-fno-keep-inline-dllexport" flag to avoid emitting these
|
||||||
|
functions.
|
||||||
|
|
||||||
|
*** LTO (Link-Time Optimization) ***
|
||||||
|
|
||||||
|
Every TDM-GCC release since 4.5.1 includes support for GCC's Link-Time
|
||||||
|
Optimizer. As long as GCC's own drivers (gcc, g++, etc.) are used at both
|
||||||
|
compile-time and link-time, and the "-flto" option is specified at both compile-
|
||||||
|
time and link-time, link-time optimization will be applied. See
|
||||||
|
<http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html> for further details.
|
||||||
|
|
||||||
|
*** DW2 vs. SJLJ unwinding ***
|
||||||
|
|
||||||
|
GCC currently supports two methods of stack frame unwinding: Dwarf-2 (DW2) or
|
||||||
|
SJLJ (setjmp/longjmp). Until recently, only SJLJ has been available for the
|
||||||
|
Windows platform. This affects you, the end user, primarily in programs that
|
||||||
|
throw and catch exceptions. Programs which utilize the DW2 unwind method
|
||||||
|
generally execute more quickly than programs which utilize the SJLJ method,
|
||||||
|
because the DW2 method incurs no runtime overhead until an exception is thrown.
|
||||||
|
However, the DW2 method does incur a size penalty on code that must handle
|
||||||
|
exceptions, and more importantly the DW2 method cannot yet unwind (pass
|
||||||
|
exceptions) through "foreign" stack frames: stack frames compiled by another
|
||||||
|
non-DW2-enabled compiler, such as OS DLLs in a Windows callback.
|
||||||
|
|
||||||
|
This means that you should in general choose the SJLJ version of the TDM-GCC
|
||||||
|
builds unless you know you need faster exception-aware programs and can be
|
||||||
|
certain you will never throw an exception through a foreign stack area.
|
||||||
|
|
||||||
|
As distributed, the SJLJ and DW2 packages of TDM-GCC can coexist peacefully
|
||||||
|
extracted to the same directory (i.e. any files in common are for all intents
|
||||||
|
and purposes identical), because the driver executables (the ones in the "bin"
|
||||||
|
directory) are suffixed with "-dw2" for the DW2 build, and the libraries and
|
||||||
|
other executables hide in another "-dw2" directory in "lib(exec)/gcc/mingw32".
|
||||||
|
This allows you to use the same single addition to your PATH, and use DW2
|
||||||
|
exceptions only when you need them by calling "gcc-dw2", etc. If you truly want
|
||||||
|
DW2 exceptions as the default when calling "gcc" (from Makefiles or configury
|
||||||
|
systems, for example), you can rename or copy the suffixed executables to their
|
||||||
|
original names.
|
||||||
|
|
||||||
|
*** Exceptions and DLLs ***
|
||||||
|
|
||||||
|
[[[ IMPORTANT NOTE:
|
||||||
|
[[[ TDM-GCC uses a statically-linked libstdc++ by default! To use the libstdc++
|
||||||
|
[[[ DLL, specify "-shared-libstdc++" on the command line.
|
||||||
|
|
||||||
|
With the advent of the GCC 4.5 release series, the mingw32 port finally supports
|
||||||
|
fully the same method every other platform uses to allow exceptions to propagate
|
||||||
|
out of shared libraries (DLLs): gcc library DLLs. For any GCC language that
|
||||||
|
supports exceptions (and DLLs), this method requires the runtime presence of two
|
||||||
|
additional DLLs: (1) libgcc_s*.dll, which contains common core data, and (2) a
|
||||||
|
language-specific DLL.
|
||||||
|
|
||||||
|
However, TDM-GCC also continues to integrate a versioned shared memory region
|
||||||
|
for the *static* (non-DLL) runtime libraries, which will still allow you to
|
||||||
|
throw exceptions between any DLLs or executables that are built with TDM-GCC.
|
||||||
|
This method incurs a very small execution overhead as compared to the shared
|
||||||
|
library method, but has the very important benefit of not requiring you to
|
||||||
|
redistribute extra DLLs with your program.
|
||||||
|
|
||||||
|
By default, TDM-GCC will continue to create executables and DLLs that use the
|
||||||
|
static libraries and do not require you to redistribute further DLLs. If you
|
||||||
|
would like to use the shared libraries, you should add "-shared-libgcc" to the
|
||||||
|
command line to use a shared version of libgcc, and additionally ensure that the
|
||||||
|
shared version of your language-specific runtime library is being used. For C++,
|
||||||
|
add "-shared-libstdc++".
|
||||||
|
|
||||||
|
You cannot use a shared version of libgcc with a static version of a language-
|
||||||
|
specific runtime. The reverse -- static libgcc with shared language-specific
|
||||||
|
runtime -- should work fine.
|
||||||
|
|
||||||
|
IMPORTANT NOTE:
|
||||||
|
There has been an update to the license exception clause that permits you to
|
||||||
|
distribute programs that make use of the GCC runtime libraries without requiring
|
||||||
|
you to license your programs under the GPLv3. As always, please be familiar with
|
||||||
|
the terms of GCC's GPLv3 license and exception clauses, and do not redistribute
|
||||||
|
any portion of GCC, including its runtime DLLs, in any way except as granted by
|
||||||
|
the license. If you are unclear about which permissions are granted by the
|
||||||
|
license, please consult a lawyer and/or the Free Software Foundation
|
||||||
|
(<http://www.fsf.org/>).
|
||||||
|
|
||||||
|
A copy of the GPLv3 may be found in the file
|
||||||
|
COPYING-gcc-tdm.txt, and a copy of the runtime library exception clause may be
|
||||||
|
found in COPYING.RUNTIME-gcc-tdm.txt. In general, the runtime library exception
|
||||||
|
clause probably applies to any file found in the "lib" directory or its
|
||||||
|
subdirectories, and any DLL found in the "bin" directory -- but you should
|
||||||
|
consult the sources, available for download from the TDM-GCC project site on
|
||||||
|
SourceForge, if you are unsure.
|
||||||
|
|
||||||
|
*** OpenMP and pthreads-w32 ***
|
||||||
|
|
||||||
|
TDM-GCC has been built to allow the use of GCC's "-fopenmp" option for
|
||||||
|
generating parallel code as specified by the OpenMP API. (See
|
||||||
|
<http://gcc.gnu.org/onlinedocs/libgomp/> for details.) If you want to use
|
||||||
|
OpenMP in your programs, be sure to install the "openmp" optional package.
|
||||||
|
|
||||||
|
The OpenMP support in the TDM-GCC builds has received very little testing; if
|
||||||
|
you find build or packaging problems, please send a bug report (see BUGS above).
|
||||||
|
|
||||||
|
LibGOMP, GCC's implementation of OpenMP, currently only supports the use of the
|
||||||
|
POSIX Threads (pthreads) api for implementing its threading model. Because the
|
||||||
|
MinGW project itself doesn't distribute a pthreads implementation, the
|
||||||
|
"pthreads-win32" library, available from http://sourceware.org/pthreads-win32/,
|
||||||
|
is included in this distribution. If you aren't familiar with pthreads-win32,
|
||||||
|
please read the file "pthreads-win32-README" for more information, or the
|
||||||
|
documentation available at the website referenced above. pthreads-win32 is
|
||||||
|
distributed under the terms of the LGPL; see "COPYING.lib-gcc-tdm.txt" for
|
||||||
|
details.
|
||||||
|
|
||||||
|
In order to correctly compile code that utilizes OpenMP/libGOMP, you need to add
|
||||||
|
the "-fopenmp" option at compile time AND link time. By default, this will link
|
||||||
|
the standard C-cleanup DLL version of pthreads-win32 to your program, which
|
||||||
|
means that you will need to ensure that the file "pthreadGC2.dll" (included in
|
||||||
|
the "bin" subdirectory in the openmp package) can be found by your program. If
|
||||||
|
you plan to distribute a program that relies on pthreads-win32, be sure to
|
||||||
|
understand and comply with the terms of the LGPL (see COPYING.lib-gcc-tdm.txt).
|
||||||
|
|
||||||
|
"libpthread.a" is included in the "lib" subdirectory of the openmp package along
|
||||||
|
with two other pthreads library files:
|
||||||
|
- "libpthreadGC2-static.a" provides a static version of the pthreads-win32
|
||||||
|
library, but it requires some additional non-POSIX-compliant startup code
|
||||||
|
to be included in your program. See "pthreads-win32-README" for
|
||||||
|
details.
|
||||||
|
- "libpthreadGCE2.a" provides a version of the pthreads-win32 library with
|
||||||
|
a somewhat safer response in the face of unexpected C++ exceptions.
|
||||||
|
The creators of the pthreads-win32 library recommend, however, that this
|
||||||
|
version not be used, because code written to rely on this is less portable.
|
||||||
|
|
||||||
|
*** Warnings and errors ***
|
||||||
|
|
||||||
|
GCC 4 represents a significant step forward in optimization capabilities, error
|
||||||
|
detection, and standards compliance, and this is more true than ever with the
|
||||||
|
most recent GCC releases. For you, the end user, this will mean that code which
|
||||||
|
compiled and ran without problems on previous GCC releases will almost certainly
|
||||||
|
exhibit some warnings and maybe even a few errors.
|
||||||
|
|
||||||
|
These meaningful warnings and errors are a very good thing, as they help the
|
||||||
|
programmer to write safer and more correct code. Unfortunately, there's also a
|
||||||
|
chance you might encounter incorrect warnings or errors, ICE's (internal
|
||||||
|
compiler errors, where the compiler makes a mistake and has to bail out), or
|
||||||
|
even miscompilations (where your code is incorrectly compiled and produces the
|
||||||
|
wrong result).
|
||||||
|
|
||||||
|
If you encounter an ICE while using a TDM-GCC build, feel free to file a bug
|
||||||
|
report (see BUGS above). With any other unexpected problem, you are urged to
|
||||||
|
work from the assumption that it stems from user error, and ensure that your
|
||||||
|
code is correct and standards-compliant.
|
||||||
|
|
||||||
|
|
||||||
|
>>>>> BUGS AND KNOWN ISSUES
|
||||||
|
|
||||||
|
- When GMP is built as a DLL with the *DW2* version of TDM-GCC and with the
|
||||||
|
default static libgcc/libstdc++, exceptions apparently cannot propagate
|
||||||
|
correctly out of the DLL. This problem does *NOT* appear in the SJLJ
|
||||||
|
version.
|
||||||
|
|
||||||
|
As these builds are provided on the same basis as the source releases, and the
|
||||||
|
mingw32 target in GCC tends to receive somewhat less-than-average attention,
|
||||||
|
some bugs are expected. If you encounter a bug that you are certain is in the
|
||||||
|
GCC sources (such as an ICE), or that is due to an issue in the building or
|
||||||
|
packaging process, you are encouraged to report it. Please visit the TDM-GCC
|
||||||
|
Bugs Page at <http://tdm-gcc.tdragon.net/bugs> for bug reporting instructions.
|
||||||
|
|
||||||
|
|
||||||
|
>>>>> LOCAL FIXES AND CHANGES
|
||||||
|
|
||||||
|
- Includes a patch to make all search paths for headers, libraries and
|
||||||
|
helper executables relative to the installation directory of the driver
|
||||||
|
executables -- in other words, TDM-GCC is fully relocatable and does not
|
||||||
|
search any absolute system paths.
|
||||||
|
- Includes a patch to allow libgomp to interoperate correctly with user-
|
||||||
|
generated pthreads. See
|
||||||
|
<http://sourceforge.net/tracker/?func=detail&aid=2921774&group_id=200665&atid=974439>.
|
||||||
|
- Includes a patch to propagate exceptions out of DLLs without the need for
|
||||||
|
shared runtime libraries.
|
||||||
|
- Includes a patch to keep GCC from erroneously using the CWD as the
|
||||||
|
installation directory.
|
||||||
|
- Configured with "--enable-fully-dynamic-string", which fixes a bug when
|
||||||
|
passing empty std::string objects between DLLs and EXEs.
|
||||||
|
- Includes a patch which reintegrates the code from libgcc_eh.a into libgcc.a
|
||||||
|
and the libgcc DLL. As long as the shared memory region is used to handle
|
||||||
|
exceptions in the static runtimes, this library is unnecessary, and it
|
||||||
|
causes multiple definition errors for the symbols in it because it hasn't
|
||||||
|
been added to binutils' exception libraries yet.
|
||||||
|
- Includes a patch to re-enable large file support for C++ fstreams (LFS
|
||||||
|
detection fails because there is no definition for struct stat64 in
|
||||||
|
mingw-runtime).
|
||||||
|
|
||||||
|
[The following patches are only necessary for the 4.6 series and have been
|
||||||
|
applied in the 4.7 sources]
|
||||||
|
|
||||||
|
- Includes a patch which corrects backslash usage in header paths and fixes
|
||||||
|
path problems when debugging. See
|
||||||
|
<http://sourceforge.net/tracker/?func=detail&aid=2145427&group_id=200665&atid=974439>.
|
||||||
|
|
||||||
|
|
||||||
|
>>>>> SOURCE CODE
|
||||||
|
|
||||||
|
The source code for the TDM-GCC binary releases is available from the TDM-GCC
|
||||||
|
download page on SourceForge: <http://sourceforge.net/projects/tdm-gcc/files/>.
|
||||||
|
(The most up-to-date link to the download site will always be available at
|
||||||
|
<http://tdm-gcc.tdragon.net/>.)
|
||||||
|
|
||||||
|
The source is distributed in the form of the original ("vanilla") separate
|
||||||
|
source packages as downloaded, plus an additional "TDM Sources" package. The TDM
|
||||||
|
Sources package includes unified diffs of any changes made to the vanilla
|
||||||
|
sources, as well as the set of scripts used to build the binary releases.
|
||||||
|
|
||||||
|
|
||||||
|
>>>>> LICENSE
|
||||||
|
|
||||||
|
The TDM-GCC core and language packages in this edition contain binary
|
||||||
|
distributions constituting a work based on GCC, CLooG, PPL, MPC, libiconv, GMP,
|
||||||
|
and MPFR. GCC itself, CLooG, and PPL are each licensed under the GPLv3; for
|
||||||
|
further details, see "COPYING3-gcc-tdm.txt". MPC, libiconv, GMP, and MPFR are
|
||||||
|
each licensed under the LGPL, a somewhat more permissive version of the GPL; see
|
||||||
|
"COPYING3.LIB-gcc-tdm.txt". Additionally, GCC's runtime libraries are licensed
|
||||||
|
with an additional exception clause; see "COPYING.RUNTIME-gcc-tdm.txt".
|
||||||
|
|
||||||
|
The OpenMP support package provides binary and source files based on GCC's
|
||||||
|
libgomp, which is licensed under the GPLv3 with an additional exception (see
|
||||||
|
"COPYING3-gcc-tdm.txt" and "COPYING.RUNTIME-gcc-tdm.txt"), and on pthreads-w32,
|
||||||
|
which is licensed under the LGPL (see "COPYING3.LIB-gcc-tdm.txt").
|
||||||
|
|
||||||
|
The TDM-GCC distribution is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by the Free
|
||||||
|
Software Foundation; either version 3 of the License, or (at your option) any
|
||||||
|
later version.
|
||||||
|
|
||||||
|
TDM-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* CONTRIBUTORS
|
||||||
|
* This file has no copyright assigned and is placed in the Public Domain.
|
||||||
|
* This file is a part of the mingw-runtime package.
|
||||||
|
* No warranty is given; refer to the file DISCLAIMER within the package.
|
||||||
|
*
|
||||||
|
* HISTORICAL:
|
||||||
|
* Colin Peters <colin@fu.is.saga-u.ac.jp> - Original author of the
|
||||||
|
* mingw-runtime package.
|
||||||
|
* Mumit Khan <khan@xraylith.wisc.EDU> - Original maintainer of the
|
||||||
|
* mingw-runtime package.
|
||||||
|
* Gunther Ebert <gunther.ebert@ixos-leipzig.de> - Adaptations of his DLL
|
||||||
|
* support.
|
||||||
|
* Stan Cox <scox@cygnus.com> - Provided gccmain.c.
|
||||||
|
* J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl> - Provided
|
||||||
|
* dos.h.
|
||||||
|
* Mikey <jeffdb@netzone.com> - Adaptated excpt.h from his code.
|
||||||
|
* Pedro A. Aranda <paag@tid.es> - Provided lots of types for types.h.
|
||||||
|
*
|
||||||
|
* CURRENT:
|
||||||
|
* Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
* Earnie Boyd <earnie@users.sourceforge.net>
|
||||||
|
* Luke Dunstan <coder_infidel@users.sourceforge.net>
|
||||||
|
*
|
||||||
|
* Many others in the MinGW user community. They are listed in the ChangeLog.
|
||||||
|
* Please review that file for the names of those contributors.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
/*
|
||||||
|
* DISCLAIMER
|
||||||
|
* This file has no copyright assigned and is placed in the Public Domain.
|
||||||
|
* This file is a part of the mingw-runtime package.
|
||||||
|
*
|
||||||
|
* The mingw-runtime package and its code is distributed in the hope that it
|
||||||
|
* will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR
|
||||||
|
* IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to
|
||||||
|
* warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*
|
||||||
|
* You are free to use this package and its code without limitation.
|
||||||
|
*/
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
Free Microsoft C Runtime and import library definitions
|
||||||
|
|
||||||
|
Maintained by MinGW Developers
|
||||||
|
Send bug reports and questions to MinGW-users@lists.sourceforge.net
|
||||||
|
URL: http://www.mingw.org
|
||||||
|
|
||||||
|
A historical readme.txt exists and is distributed for your edification. The
|
||||||
|
references within may or may not be correct. Please do not rely on them. See
|
||||||
|
http://www.mingw.org for a list of valid references.
|
||||||
|
|
||||||
|
|
@ -0,0 +1,289 @@
|
||||||
|
/*
|
||||||
|
** License Applicability. Except to the extent portions of this file are
|
||||||
|
** made subject to an alternative license as permitted in the SGI Free
|
||||||
|
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||||
|
** file are subject only to the provisions of the License. You may not use
|
||||||
|
** this file except in compliance with the License. You may obtain a copy
|
||||||
|
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||||
|
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||||
|
**
|
||||||
|
** http://oss.sgi.com/projects/FreeB
|
||||||
|
**
|
||||||
|
** Note that, as provided in the License, the Software is distributed on an
|
||||||
|
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||||
|
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||||
|
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||||
|
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||||
|
**
|
||||||
|
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||||
|
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||||
|
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||||
|
** Copyright in any portions created by third parties is as indicated
|
||||||
|
** elsewhere herein. All Rights Reserved.
|
||||||
|
**
|
||||||
|
** Additional Notice Provisions: This software was created using the
|
||||||
|
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
|
||||||
|
** not been independently verified as being compliant with the OpenGL(R)
|
||||||
|
** version 1.2.1 Specification.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __glu_h__
|
||||||
|
#define __glu_h__
|
||||||
|
#define _GLU_H
|
||||||
|
#if __GNUC__ >= 3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stddef.h> /* for wchar_t */
|
||||||
|
#include <GL/gl.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*************************************************************/
|
||||||
|
|
||||||
|
/* Boolean */
|
||||||
|
#define GLU_FALSE 0
|
||||||
|
#define GLU_TRUE 1
|
||||||
|
|
||||||
|
/* Version */
|
||||||
|
#define GLU_VERSION_1_1 1
|
||||||
|
#define GLU_VERSION_1_2 1
|
||||||
|
|
||||||
|
/* StringName */
|
||||||
|
#define GLU_VERSION 100800
|
||||||
|
#define GLU_EXTENSIONS 100801
|
||||||
|
|
||||||
|
/* ErrorCode */
|
||||||
|
#define GLU_INVALID_ENUM 100900
|
||||||
|
#define GLU_INVALID_VALUE 100901
|
||||||
|
#define GLU_OUT_OF_MEMORY 100902
|
||||||
|
#define GLU_INVALID_OPERATION 100904
|
||||||
|
|
||||||
|
/* NurbsDisplay */
|
||||||
|
/* GLU_FILL */
|
||||||
|
#define GLU_OUTLINE_POLYGON 100240
|
||||||
|
#define GLU_OUTLINE_PATCH 100241
|
||||||
|
|
||||||
|
/* NurbsError */
|
||||||
|
#define GLU_NURBS_ERROR1 100251
|
||||||
|
#define GLU_NURBS_ERROR2 100252
|
||||||
|
#define GLU_NURBS_ERROR3 100253
|
||||||
|
#define GLU_NURBS_ERROR4 100254
|
||||||
|
#define GLU_NURBS_ERROR5 100255
|
||||||
|
#define GLU_NURBS_ERROR6 100256
|
||||||
|
#define GLU_NURBS_ERROR7 100257
|
||||||
|
#define GLU_NURBS_ERROR8 100258
|
||||||
|
#define GLU_NURBS_ERROR9 100259
|
||||||
|
#define GLU_NURBS_ERROR10 100260
|
||||||
|
#define GLU_NURBS_ERROR11 100261
|
||||||
|
#define GLU_NURBS_ERROR12 100262
|
||||||
|
#define GLU_NURBS_ERROR13 100263
|
||||||
|
#define GLU_NURBS_ERROR14 100264
|
||||||
|
#define GLU_NURBS_ERROR15 100265
|
||||||
|
#define GLU_NURBS_ERROR16 100266
|
||||||
|
#define GLU_NURBS_ERROR17 100267
|
||||||
|
#define GLU_NURBS_ERROR18 100268
|
||||||
|
#define GLU_NURBS_ERROR19 100269
|
||||||
|
#define GLU_NURBS_ERROR20 100270
|
||||||
|
#define GLU_NURBS_ERROR21 100271
|
||||||
|
#define GLU_NURBS_ERROR22 100272
|
||||||
|
#define GLU_NURBS_ERROR23 100273
|
||||||
|
#define GLU_NURBS_ERROR24 100274
|
||||||
|
#define GLU_NURBS_ERROR25 100275
|
||||||
|
#define GLU_NURBS_ERROR26 100276
|
||||||
|
#define GLU_NURBS_ERROR27 100277
|
||||||
|
#define GLU_NURBS_ERROR28 100278
|
||||||
|
#define GLU_NURBS_ERROR29 100279
|
||||||
|
#define GLU_NURBS_ERROR30 100280
|
||||||
|
#define GLU_NURBS_ERROR31 100281
|
||||||
|
#define GLU_NURBS_ERROR32 100282
|
||||||
|
#define GLU_NURBS_ERROR33 100283
|
||||||
|
#define GLU_NURBS_ERROR34 100284
|
||||||
|
#define GLU_NURBS_ERROR35 100285
|
||||||
|
#define GLU_NURBS_ERROR36 100286
|
||||||
|
#define GLU_NURBS_ERROR37 100287
|
||||||
|
|
||||||
|
/* NurbsProperty */
|
||||||
|
#define GLU_AUTO_LOAD_MATRIX 100200
|
||||||
|
#define GLU_CULLING 100201
|
||||||
|
#define GLU_SAMPLING_TOLERANCE 100203
|
||||||
|
#define GLU_DISPLAY_MODE 100204
|
||||||
|
#define GLU_PARAMETRIC_TOLERANCE 100202
|
||||||
|
#define GLU_SAMPLING_METHOD 100205
|
||||||
|
#define GLU_U_STEP 100206
|
||||||
|
#define GLU_V_STEP 100207
|
||||||
|
|
||||||
|
/* NurbsSampling */
|
||||||
|
#define GLU_PATH_LENGTH 100215
|
||||||
|
#define GLU_PARAMETRIC_ERROR 100216
|
||||||
|
#define GLU_DOMAIN_DISTANCE 100217
|
||||||
|
|
||||||
|
/* NurbsTrim */
|
||||||
|
#define GLU_MAP1_TRIM_2 100210
|
||||||
|
#define GLU_MAP1_TRIM_3 100211
|
||||||
|
|
||||||
|
/* QuadricDrawStyle */
|
||||||
|
#define GLU_POINT 100010
|
||||||
|
#define GLU_LINE 100011
|
||||||
|
#define GLU_FILL 100012
|
||||||
|
#define GLU_SILHOUETTE 100013
|
||||||
|
|
||||||
|
/* QuadricCallback */
|
||||||
|
#define GLU_ERROR 100103
|
||||||
|
|
||||||
|
/* QuadricNormal */
|
||||||
|
#define GLU_SMOOTH 100000
|
||||||
|
#define GLU_FLAT 100001
|
||||||
|
#define GLU_NONE 100002
|
||||||
|
|
||||||
|
/* QuadricOrientation */
|
||||||
|
#define GLU_OUTSIDE 100020
|
||||||
|
#define GLU_INSIDE 100021
|
||||||
|
|
||||||
|
/* TessCallback */
|
||||||
|
#define GLU_TESS_BEGIN 100100
|
||||||
|
#define GLU_BEGIN 100100
|
||||||
|
#define GLU_TESS_VERTEX 100101
|
||||||
|
#define GLU_VERTEX 100101
|
||||||
|
#define GLU_TESS_END 100102
|
||||||
|
#define GLU_END 100102
|
||||||
|
#define GLU_TESS_ERROR 100103
|
||||||
|
#define GLU_TESS_EDGE_FLAG 100104
|
||||||
|
#define GLU_EDGE_FLAG 100104
|
||||||
|
#define GLU_TESS_COMBINE 100105
|
||||||
|
#define GLU_TESS_BEGIN_DATA 100106
|
||||||
|
#define GLU_TESS_VERTEX_DATA 100107
|
||||||
|
#define GLU_TESS_END_DATA 100108
|
||||||
|
#define GLU_TESS_ERROR_DATA 100109
|
||||||
|
#define GLU_TESS_EDGE_FLAG_DATA 100110
|
||||||
|
#define GLU_TESS_COMBINE_DATA 100111
|
||||||
|
|
||||||
|
/* TessContour */
|
||||||
|
#define GLU_CW 100120
|
||||||
|
#define GLU_CCW 100121
|
||||||
|
#define GLU_INTERIOR 100122
|
||||||
|
#define GLU_EXTERIOR 100123
|
||||||
|
#define GLU_UNKNOWN 100124
|
||||||
|
|
||||||
|
/* TessProperty */
|
||||||
|
#define GLU_TESS_WINDING_RULE 100140
|
||||||
|
#define GLU_TESS_BOUNDARY_ONLY 100141
|
||||||
|
#define GLU_TESS_TOLERANCE 100142
|
||||||
|
|
||||||
|
/* TessError */
|
||||||
|
#define GLU_TESS_ERROR1 100151
|
||||||
|
#define GLU_TESS_ERROR2 100152
|
||||||
|
#define GLU_TESS_ERROR3 100153
|
||||||
|
#define GLU_TESS_ERROR4 100154
|
||||||
|
#define GLU_TESS_ERROR5 100155
|
||||||
|
#define GLU_TESS_ERROR6 100156
|
||||||
|
#define GLU_TESS_ERROR7 100157
|
||||||
|
#define GLU_TESS_ERROR8 100158
|
||||||
|
#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
|
||||||
|
#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
|
||||||
|
#define GLU_TESS_MISSING_END_POLYGON 100153
|
||||||
|
#define GLU_TESS_MISSING_END_CONTOUR 100154
|
||||||
|
#define GLU_TESS_COORD_TOO_LARGE 100155
|
||||||
|
#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
|
||||||
|
|
||||||
|
/* TessWinding */
|
||||||
|
#define GLU_TESS_WINDING_ODD 100130
|
||||||
|
#define GLU_TESS_WINDING_NONZERO 100131
|
||||||
|
#define GLU_TESS_WINDING_POSITIVE 100132
|
||||||
|
#define GLU_TESS_WINDING_NEGATIVE 100133
|
||||||
|
#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
|
||||||
|
|
||||||
|
/* Obsolete. For compatibility with previous Sun OpenGL versions */
|
||||||
|
#define GLU_INCOMPATIBLE_GL_VERSION 100903
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
class GLUnurbs;
|
||||||
|
class GLUquadric;
|
||||||
|
class GLUtesselator;
|
||||||
|
#else
|
||||||
|
typedef struct GLUnurbs GLUnurbs;
|
||||||
|
typedef struct GLUquadric GLUquadric;
|
||||||
|
typedef struct GLUtesselator GLUtesselator;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef GLUnurbs GLUnurbsObj;
|
||||||
|
typedef GLUquadric GLUquadricObj;
|
||||||
|
typedef GLUtesselator GLUtesselatorObj;
|
||||||
|
typedef GLUtesselator GLUtriangulatorObj;
|
||||||
|
|
||||||
|
#define GLU_TESS_MAX_COORD 1.0e150
|
||||||
|
|
||||||
|
/* Internal convenience typedefs */
|
||||||
|
typedef void (APIENTRY *_GLUfuncptr)();
|
||||||
|
|
||||||
|
GLAPI void APIENTRY gluBeginCurve (GLUnurbs* nurb);
|
||||||
|
GLAPI void APIENTRY gluBeginPolygon (GLUtesselator* tess);
|
||||||
|
GLAPI void APIENTRY gluBeginSurface (GLUnurbs* nurb);
|
||||||
|
GLAPI void APIENTRY gluBeginTrim (GLUnurbs* nurb);
|
||||||
|
GLAPI GLint APIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
|
||||||
|
GLAPI GLint APIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
|
||||||
|
GLAPI void APIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
|
||||||
|
GLAPI void APIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
|
||||||
|
GLAPI void APIENTRY gluDeleteQuadric (GLUquadric* quad);
|
||||||
|
GLAPI void APIENTRY gluDeleteTess (GLUtesselator* tess);
|
||||||
|
GLAPI void APIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
|
||||||
|
GLAPI void APIENTRY gluEndCurve (GLUnurbs* nurb);
|
||||||
|
GLAPI void APIENTRY gluEndPolygon (GLUtesselator* tess);
|
||||||
|
GLAPI void APIENTRY gluEndSurface (GLUnurbs* nurb);
|
||||||
|
GLAPI void APIENTRY gluEndTrim (GLUnurbs* nurb);
|
||||||
|
GLAPI const GLubyte * APIENTRY gluErrorString (GLenum error);
|
||||||
|
GLAPI const wchar_t * APIENTRY gluErrorUnicodeStringEXT (GLenum error);
|
||||||
|
GLAPI void APIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
|
||||||
|
GLAPI const GLubyte * APIENTRY gluGetString (GLenum name);
|
||||||
|
GLAPI void APIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
|
||||||
|
GLAPI void APIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
|
||||||
|
GLAPI void APIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
|
||||||
|
GLAPI GLUnurbs* APIENTRY gluNewNurbsRenderer (void);
|
||||||
|
GLAPI GLUquadric* APIENTRY gluNewQuadric (void);
|
||||||
|
GLAPI GLUtesselator* APIENTRY gluNewTess (void);
|
||||||
|
GLAPI void APIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
|
||||||
|
GLAPI void APIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
|
||||||
|
GLAPI void APIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
|
||||||
|
GLAPI void APIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
|
||||||
|
GLAPI void APIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
|
||||||
|
GLAPI void APIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
|
||||||
|
GLAPI void APIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
|
||||||
|
GLAPI void APIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
|
||||||
|
GLAPI void APIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
|
||||||
|
GLAPI GLint APIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
|
||||||
|
GLAPI void APIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
|
||||||
|
GLAPI void APIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
|
||||||
|
GLAPI void APIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
|
||||||
|
GLAPI void APIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
|
||||||
|
GLAPI void APIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
|
||||||
|
GLAPI void APIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
|
||||||
|
GLAPI GLint APIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
|
||||||
|
GLAPI void APIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
|
||||||
|
GLAPI void APIENTRY gluTessBeginContour (GLUtesselator* tess);
|
||||||
|
GLAPI void APIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
|
||||||
|
GLAPI void APIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
|
||||||
|
GLAPI void APIENTRY gluTessEndContour (GLUtesselator* tess);
|
||||||
|
GLAPI void APIENTRY gluTessEndPolygon (GLUtesselator* tess);
|
||||||
|
GLAPI void APIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
|
||||||
|
GLAPI void APIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
|
||||||
|
GLAPI void APIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
|
||||||
|
GLAPI GLint APIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
|
||||||
|
GLAPI GLint APIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
#define gluErrorStringWIN gluErrorUnicodeStringEXT
|
||||||
|
#else
|
||||||
|
#define gluErrorStringWIN gluErrorString
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __glu_h__ */
|
||||||
|
|
@ -0,0 +1,286 @@
|
||||||
|
#ifndef __MINGW_H
|
||||||
|
/*
|
||||||
|
* _mingw.h
|
||||||
|
*
|
||||||
|
* Mingw specific macros included by ALL include files.
|
||||||
|
*
|
||||||
|
* This file is part of the Mingw32 package.
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Created by Mumit Khan <khan@xraylith.wisc.edu>
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||||
|
*
|
||||||
|
* This source code is offered for use in the public domain. You may
|
||||||
|
* use, modify or distribute it freely.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful but
|
||||||
|
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||||
|
* DISCLAIMED. This includes but is not limited to warranties of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define __MINGW_H
|
||||||
|
|
||||||
|
#define __MINGW32_VERSION 3.20
|
||||||
|
#define __MINGW32_MAJOR_VERSION 3
|
||||||
|
#define __MINGW32_MINOR_VERSION 20
|
||||||
|
#define __MINGW32_PATCHLEVEL 0
|
||||||
|
|
||||||
|
#if __GNUC__ >= 3
|
||||||
|
#ifndef __PCC__
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* These are defined by the user (or the compiler)
|
||||||
|
to specify how identifiers are imported from a DLL.
|
||||||
|
|
||||||
|
__DECLSPEC_SUPPORTED Defined if dllimport attribute is supported.
|
||||||
|
__MINGW_IMPORT The attribute definition to specify imported
|
||||||
|
variables/functions.
|
||||||
|
_CRTIMP As above. For MS compatibility.
|
||||||
|
__MINGW32_VERSION Runtime version.
|
||||||
|
__MINGW32_MAJOR_VERSION Runtime major version.
|
||||||
|
__MINGW32_MINOR_VERSION Runtime minor version.
|
||||||
|
__MINGW32_BUILD_DATE Runtime build date.
|
||||||
|
|
||||||
|
Macros to enable MinGW features which deviate from standard MSVC
|
||||||
|
compatible behaviour; these may be specified directly in user code,
|
||||||
|
activated implicitly, (e.g. by specifying _POSIX_C_SOURCE or such),
|
||||||
|
or by inclusion in __MINGW_FEATURES__:
|
||||||
|
|
||||||
|
__USE_MINGW_ANSI_STDIO Select a more ANSI C99 compatible
|
||||||
|
implementation of printf() and friends.
|
||||||
|
|
||||||
|
Other macros:
|
||||||
|
|
||||||
|
__int64 define to be long long. Using a typedef
|
||||||
|
doesn't work for "unsigned __int64"
|
||||||
|
|
||||||
|
All headers should include this first, and then use __DECLSPEC_SUPPORTED
|
||||||
|
to choose between the old ``__imp__name'' style or __MINGW_IMPORT
|
||||||
|
style declarations. */
|
||||||
|
|
||||||
|
|
||||||
|
/* Manifest definitions identifying the flag bits, controlling activation
|
||||||
|
* of MinGW features, as specified by the user in __MINGW_FEATURES__.
|
||||||
|
*/
|
||||||
|
#define __MINGW_ANSI_STDIO__ 0x0000000000000001ULL
|
||||||
|
/*
|
||||||
|
* The following three are not yet formally supported; they are
|
||||||
|
* included here, to document anticipated future usage.
|
||||||
|
*/
|
||||||
|
#define __MINGW_LC_EXTENSIONS__ 0x0000000000000050ULL
|
||||||
|
#define __MINGW_LC_MESSAGES__ 0x0000000000000010ULL
|
||||||
|
#define __MINGW_LC_ENVVARS__ 0x0000000000000040ULL
|
||||||
|
|
||||||
|
/* Try to avoid problems with outdated checks for GCC __attribute__ support. */
|
||||||
|
#undef __attribute__
|
||||||
|
|
||||||
|
#if defined (__PCC__)
|
||||||
|
# undef __DECLSPEC_SUPPORTED
|
||||||
|
# ifndef __MINGW_IMPORT
|
||||||
|
# define __MINGW_IMPORT extern
|
||||||
|
# endif
|
||||||
|
# ifndef _CRTIMP
|
||||||
|
# define _CRTIMP
|
||||||
|
# endif
|
||||||
|
# ifndef __cdecl
|
||||||
|
# define __cdecl _Pragma("cdecl")
|
||||||
|
# endif
|
||||||
|
# ifndef __stdcall
|
||||||
|
# define __stdcall _Pragma("stdcall")
|
||||||
|
# endif
|
||||||
|
# ifndef __int64
|
||||||
|
# define __int64 long long
|
||||||
|
# endif
|
||||||
|
# ifndef __int32
|
||||||
|
# define __int32 long
|
||||||
|
# endif
|
||||||
|
# ifndef __int16
|
||||||
|
# define __int16 short
|
||||||
|
# endif
|
||||||
|
# ifndef __int8
|
||||||
|
# define __int8 char
|
||||||
|
# endif
|
||||||
|
# ifndef __small
|
||||||
|
# define __small char
|
||||||
|
# endif
|
||||||
|
# ifndef __hyper
|
||||||
|
# define __hyper long long
|
||||||
|
# endif
|
||||||
|
# ifndef __volatile__
|
||||||
|
# define __volatile__ volatile
|
||||||
|
# endif
|
||||||
|
# ifndef __restrict__
|
||||||
|
# define __restrict__ restrict
|
||||||
|
# endif
|
||||||
|
# define NONAMELESSUNION
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
# ifdef __declspec
|
||||||
|
# ifndef __MINGW_IMPORT
|
||||||
|
/* Note the extern. This is needed to work around GCC's
|
||||||
|
limitations in handling dllimport attribute. */
|
||||||
|
# define __MINGW_IMPORT extern __attribute__ ((__dllimport__))
|
||||||
|
# endif
|
||||||
|
# ifndef _CRTIMP
|
||||||
|
# ifdef __USE_CRTIMP
|
||||||
|
# define _CRTIMP __attribute__ ((dllimport))
|
||||||
|
# else
|
||||||
|
# define _CRTIMP
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# define __DECLSPEC_SUPPORTED
|
||||||
|
# else /* __declspec */
|
||||||
|
# undef __DECLSPEC_SUPPORTED
|
||||||
|
# undef __MINGW_IMPORT
|
||||||
|
# ifndef _CRTIMP
|
||||||
|
# define _CRTIMP
|
||||||
|
# endif
|
||||||
|
# endif /* __declspec */
|
||||||
|
/*
|
||||||
|
* The next two defines can cause problems if user code adds the
|
||||||
|
* __cdecl attribute like so:
|
||||||
|
* void __attribute__ ((__cdecl)) foo(void);
|
||||||
|
*/
|
||||||
|
# ifndef __cdecl
|
||||||
|
# define __cdecl __attribute__ ((__cdecl__))
|
||||||
|
# endif
|
||||||
|
# ifndef __stdcall
|
||||||
|
# define __stdcall __attribute__ ((__stdcall__))
|
||||||
|
# endif
|
||||||
|
# ifndef __int64
|
||||||
|
# define __int64 long long
|
||||||
|
# endif
|
||||||
|
# ifndef __int32
|
||||||
|
# define __int32 long
|
||||||
|
# endif
|
||||||
|
# ifndef __int16
|
||||||
|
# define __int16 short
|
||||||
|
# endif
|
||||||
|
# ifndef __int8
|
||||||
|
# define __int8 char
|
||||||
|
# endif
|
||||||
|
# ifndef __small
|
||||||
|
# define __small char
|
||||||
|
# endif
|
||||||
|
# ifndef __hyper
|
||||||
|
# define __hyper long long
|
||||||
|
# endif
|
||||||
|
#else /* ! __GNUC__ && ! __PCC__ */
|
||||||
|
# ifndef __MINGW_IMPORT
|
||||||
|
# define __MINGW_IMPORT __declspec(dllimport)
|
||||||
|
# endif
|
||||||
|
# ifndef _CRTIMP
|
||||||
|
# define _CRTIMP __declspec(dllimport)
|
||||||
|
# endif
|
||||||
|
# define __DECLSPEC_SUPPORTED
|
||||||
|
# define __attribute__(x) /* nothing */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (__GNUC__) && defined (__GNUC_MINOR__)
|
||||||
|
#define __MINGW_GNUC_PREREQ(major, minor) \
|
||||||
|
(__GNUC__ > (major) \
|
||||||
|
|| (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
|
||||||
|
#else
|
||||||
|
#define __MINGW_GNUC_PREREQ(major, minor) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
# define __CRT_INLINE inline
|
||||||
|
#else
|
||||||
|
# if __GNUC_STDC_INLINE__
|
||||||
|
# define __CRT_INLINE extern inline __attribute__((__gnu_inline__))
|
||||||
|
# else
|
||||||
|
# define __CRT_INLINE extern __inline__
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
# ifdef __GNUC__
|
||||||
|
# define _CRTALIAS __CRT_INLINE __attribute__ ((__always_inline__))
|
||||||
|
# else
|
||||||
|
# define _CRTALIAS __CRT_INLINE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
# define __UNUSED_PARAM(x)
|
||||||
|
#else
|
||||||
|
# ifdef __GNUC__
|
||||||
|
# define __UNUSED_PARAM(x) x __attribute__ ((__unused__))
|
||||||
|
# else
|
||||||
|
# define __UNUSED_PARAM(x) x
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define __MINGW_ATTRIB_NORETURN __attribute__ ((__noreturn__))
|
||||||
|
#define __MINGW_ATTRIB_CONST __attribute__ ((__const__))
|
||||||
|
#else
|
||||||
|
#define __MINGW_ATTRIB_NORETURN
|
||||||
|
#define __MINGW_ATTRIB_CONST
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __MINGW_GNUC_PREREQ (3, 0)
|
||||||
|
#define __MINGW_ATTRIB_MALLOC __attribute__ ((__malloc__))
|
||||||
|
#define __MINGW_ATTRIB_PURE __attribute__ ((__pure__))
|
||||||
|
#else
|
||||||
|
#define __MINGW_ATTRIB_MALLOC
|
||||||
|
#define __MINGW_ATTRIB_PURE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
|
||||||
|
variadiac macro facility, because variadic macros cause syntax
|
||||||
|
errors with --traditional-cpp. */
|
||||||
|
#if __MINGW_GNUC_PREREQ (3, 3)
|
||||||
|
#define __MINGW_ATTRIB_NONNULL(arg) __attribute__ ((__nonnull__ (arg)))
|
||||||
|
#else
|
||||||
|
#define __MINGW_ATTRIB_NONNULL(arg)
|
||||||
|
#endif /* GNUC >= 3.3 */
|
||||||
|
|
||||||
|
#if __MINGW_GNUC_PREREQ (3, 1)
|
||||||
|
#define __MINGW_ATTRIB_DEPRECATED __attribute__ ((__deprecated__))
|
||||||
|
#else
|
||||||
|
#define __MINGW_ATTRIB_DEPRECATED
|
||||||
|
#endif /* GNUC >= 3.1 */
|
||||||
|
|
||||||
|
#if __MINGW_GNUC_PREREQ (3, 3)
|
||||||
|
#define __MINGW_NOTHROW __attribute__ ((__nothrow__))
|
||||||
|
#else
|
||||||
|
#define __MINGW_NOTHROW
|
||||||
|
#endif /* GNUC >= 3.3 */
|
||||||
|
|
||||||
|
|
||||||
|
/* TODO: Mark (almost) all CRT functions as __MINGW_NOTHROW. This will
|
||||||
|
allow GCC to optimize away some EH unwind code, at least in DW2 case. */
|
||||||
|
|
||||||
|
#ifndef __MSVCRT_VERSION__
|
||||||
|
/* High byte is the major version, low byte is the minor. */
|
||||||
|
# define __MSVCRT_VERSION__ 0x0600
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Activation of MinGW specific extended features:
|
||||||
|
*/
|
||||||
|
#ifndef __USE_MINGW_ANSI_STDIO
|
||||||
|
/*
|
||||||
|
* If user didn't specify it explicitly...
|
||||||
|
*/
|
||||||
|
# if defined __STRICT_ANSI__ || defined _ISOC99_SOURCE \
|
||||||
|
|| defined _POSIX_SOURCE || defined _POSIX_C_SOURCE \
|
||||||
|
|| defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED \
|
||||||
|
|| defined _GNU_SOURCE || defined _BSD_SOURCE \
|
||||||
|
|| defined _SVID_SOURCE
|
||||||
|
/*
|
||||||
|
* but where any of these source code qualifiers are specified,
|
||||||
|
* then assume ANSI I/O standards are preferred over Microsoft's...
|
||||||
|
*/
|
||||||
|
# define __USE_MINGW_ANSI_STDIO 1
|
||||||
|
# else
|
||||||
|
/*
|
||||||
|
* otherwise use whatever __MINGW_FEATURES__ specifies...
|
||||||
|
*/
|
||||||
|
# define __USE_MINGW_ANSI_STDIO (__MINGW_FEATURES__ & __MINGW_ANSI_STDIO__)
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __MINGW_H */
|
||||||
|
|
@ -0,0 +1,329 @@
|
||||||
|
#ifndef _ACCCTRL_H
|
||||||
|
#define _ACCCTRL_H
|
||||||
|
#if __GNUC__ >=3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define AccFree LocalFree
|
||||||
|
#define ACTRL_RESERVED 0x00000000
|
||||||
|
#define ACTRL_ACCESS_PROTECTED 0x00000001
|
||||||
|
#define ACTRL_ACCESS_ALLOWED 0x00000001
|
||||||
|
#define ACTRL_ACCESS_DENIED 0x00000002
|
||||||
|
#define ACTRL_AUDIT_SUCCESS 0x00000004
|
||||||
|
#define ACTRL_AUDIT_FAILURE 0x00000008
|
||||||
|
#define ACTRL_SYSTEM_ACCESS 0x04000000
|
||||||
|
#define ACTRL_DELETE 0x08000000
|
||||||
|
#define ACTRL_READ_CONTROL 0x10000000
|
||||||
|
#define ACTRL_CHANGE_ACCESS 0x20000000
|
||||||
|
#define ACTRL_CHANGE_OWNER 0x40000000
|
||||||
|
#define ACTRL_SYNCHRONIZE 0x80000000
|
||||||
|
#define ACTRL_STD_RIGHTS_ALL 0xf8000000
|
||||||
|
|
||||||
|
#define ACTRL_FILE_READ 0x00000001
|
||||||
|
#define ACTRL_FILE_WRITE 0x00000002
|
||||||
|
#define ACTRL_FILE_APPEND 0x00000004
|
||||||
|
#define ACTRL_FILE_READ_PROP 0x00000008
|
||||||
|
#define ACTRL_FILE_WRITE_PROP 0x00000010
|
||||||
|
#define ACTRL_FILE_EXECUTE 0x00000020
|
||||||
|
#define ACTRL_FILE_READ_ATTRIB 0x00000080
|
||||||
|
#define ACTRL_FILE_WRITE_ATTRIB 0x00000100
|
||||||
|
#define ACTRL_FILE_CREATE_PIPE 0x00000200
|
||||||
|
#define ACTRL_DIR_LIST 0x00000001
|
||||||
|
#define ACTRL_DIR_CREATE_OBJECT 0x00000002
|
||||||
|
#define ACTRL_DIR_CREATE_CHILD 0x00000004
|
||||||
|
#define ACTRL_DIR_DELETE_CHILD 0x00000040
|
||||||
|
#define ACTRL_DIR_TRAVERSE 0x00000020
|
||||||
|
#define ACTRL_KERNEL_TERMINATE 0x00000001
|
||||||
|
#define ACTRL_KERNEL_THREAD 0x00000002
|
||||||
|
#define ACTRL_KERNEL_VM 0x00000004
|
||||||
|
#define ACTRL_KERNEL_VM_READ 0x00000008
|
||||||
|
#define ACTRL_KERNEL_VM_WRITE 0x00000010
|
||||||
|
#define ACTRL_KERNEL_DUP_HANDLE 0x00000020
|
||||||
|
#define ACTRL_KERNEL_PROCESS 0x00000040
|
||||||
|
#define ACTRL_KERNEL_SET_INFO 0x00000080
|
||||||
|
#define ACTRL_KERNEL_GET_INFO 0x00000100
|
||||||
|
#define ACTRL_KERNEL_CONTROL 0x00000200
|
||||||
|
#define ACTRL_KERNEL_ALERT 0x00000400
|
||||||
|
#define ACTRL_KERNEL_GET_CONTEXT 0x00000800
|
||||||
|
#define ACTRL_KERNEL_SET_CONTEXT 0x00001000
|
||||||
|
#define ACTRL_KERNEL_TOKEN 0x00002000
|
||||||
|
#define ACTRL_KERNEL_IMPERSONATE 0x00004000
|
||||||
|
#define ACTRL_KERNEL_DIMPERSONATE 0x00008000
|
||||||
|
#define ACTRL_PRINT_SADMIN 0x00000001
|
||||||
|
#define ACTRL_PRINT_SLIST 0x00000002
|
||||||
|
#define ACTRL_PRINT_PADMIN 0x00000004
|
||||||
|
#define ACTRL_PRINT_PUSE 0x00000008
|
||||||
|
#define ACTRL_PRINT_JADMIN 0x00000010
|
||||||
|
#define ACTRL_SVC_GET_INFO 0x00000001
|
||||||
|
#define ACTRL_SVC_SET_INFO 0x00000002
|
||||||
|
#define ACTRL_SVC_STATUS 0x00000004
|
||||||
|
#define ACTRL_SVC_LIST 0x00000008
|
||||||
|
#define ACTRL_SVC_START 0x00000010
|
||||||
|
#define ACTRL_SVC_STOP 0x00000020
|
||||||
|
#define ACTRL_SVC_PAUSE 0x00000040
|
||||||
|
#define ACTRL_SVC_INTERROGATE 0x00000080
|
||||||
|
#define ACTRL_SVC_UCONTROL 0x00000100
|
||||||
|
#define ACTRL_REG_QUERY 0x00000001
|
||||||
|
#define ACTRL_REG_SET 0x00000002
|
||||||
|
#define ACTRL_REG_CREATE_CHILD 0x00000004
|
||||||
|
#define ACTRL_REG_LIST 0x00000008
|
||||||
|
#define ACTRL_REG_NOTIFY 0x00000010
|
||||||
|
#define ACTRL_REG_LINK 0x00000020
|
||||||
|
#define ACTRL_WIN_CLIPBRD 0x00000001
|
||||||
|
#define ACTRL_WIN_GLOBAL_ATOMS 0x00000002
|
||||||
|
#define ACTRL_WIN_CREATE 0x00000004
|
||||||
|
#define ACTRL_WIN_LIST_DESK 0x00000008
|
||||||
|
#define ACTRL_WIN_LIST 0x00000010
|
||||||
|
#define ACTRL_WIN_READ_ATTRIBS 0x00000020
|
||||||
|
#define ACTRL_WIN_WRITE_ATTRIBS 0x00000040
|
||||||
|
#define ACTRL_WIN_SCREEN 0x00000080
|
||||||
|
#define ACTRL_WIN_EXIT 0x00000100
|
||||||
|
#define ACTRL_ACCESS_NO_OPTIONS 0x00000000
|
||||||
|
#define ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES 0x00000001
|
||||||
|
#define ACCCTRL_DEFAULT_PROVIDERA "Windows NT Access Provider"
|
||||||
|
#define ACCCTRL_DEFAULT_PROVIDERW L"Windows NT Access Provider"
|
||||||
|
#define TRUSTEE_ACCESS_ALLOWED 0x00000001L
|
||||||
|
#define TRUSTEE_ACCESS_READ 0x00000002L
|
||||||
|
#define TRUSTEE_ACCESS_WRITE 0x00000004L
|
||||||
|
#define TRUSTEE_ACCESS_EXPLICIT 0x00000001L
|
||||||
|
#define TRUSTEE_ACCESS_READ_WRITE (TRUSTEE_ACCESS_READ | TRUSTEE_ACCESS_WRITE)
|
||||||
|
#define TRUSTEE_ACCESS_ALL 0xFFFFFFFFL
|
||||||
|
#define NO_INHERITANCE 0x0
|
||||||
|
#define SUB_OBJECTS_ONLY_INHERIT 0x1
|
||||||
|
#define SUB_CONTAINERS_ONLY_INHERIT 0x2
|
||||||
|
#define SUB_CONTAINERS_AND_OBJECTS_INHERIT 0x3
|
||||||
|
#define INHERIT_NO_PROPAGATE 0x4
|
||||||
|
#define INHERIT_ONLY 0x8
|
||||||
|
#define INHERITED_ACCESS_ENTRY 0x10
|
||||||
|
#define INHERITED_PARENT 0x10000000
|
||||||
|
#define INHERITED_GRANDPARENT 0x20000000
|
||||||
|
|
||||||
|
typedef ULONG INHERIT_FLAGS, *PINHERIT_FLAGS;
|
||||||
|
typedef ULONG ACCESS_RIGHTS, *PACCESS_RIGHTS;
|
||||||
|
|
||||||
|
typedef enum _ACCESS_MODE {
|
||||||
|
NOT_USED_ACCESS = 0,
|
||||||
|
GRANT_ACCESS,
|
||||||
|
SET_ACCESS,
|
||||||
|
DENY_ACCESS,
|
||||||
|
REVOKE_ACCESS,
|
||||||
|
SET_AUDIT_SUCCESS,
|
||||||
|
SET_AUDIT_FAILURE
|
||||||
|
} ACCESS_MODE;
|
||||||
|
typedef enum _SE_OBJECT_TYPE {
|
||||||
|
SE_UNKNOWN_OBJECT_TYPE = 0,
|
||||||
|
SE_FILE_OBJECT,
|
||||||
|
SE_SERVICE,
|
||||||
|
SE_PRINTER,
|
||||||
|
SE_REGISTRY_KEY,
|
||||||
|
SE_LMSHARE,
|
||||||
|
SE_KERNEL_OBJECT,
|
||||||
|
SE_WINDOW_OBJECT,
|
||||||
|
SE_DS_OBJECT,
|
||||||
|
SE_DS_OBJECT_ALL,
|
||||||
|
SE_PROVIDER_DEFINED_OBJECT,
|
||||||
|
SE_WMIGUID_OBJECT,
|
||||||
|
SE_REGISTRY_WOW64_32KEY
|
||||||
|
} SE_OBJECT_TYPE;
|
||||||
|
typedef enum _TRUSTEE_TYPE {
|
||||||
|
TRUSTEE_IS_UNKNOWN,
|
||||||
|
TRUSTEE_IS_USER,
|
||||||
|
TRUSTEE_IS_GROUP,
|
||||||
|
TRUSTEE_IS_DOMAIN,
|
||||||
|
TRUSTEE_IS_ALIAS,
|
||||||
|
TRUSTEE_IS_WELL_KNOWN_GROUP,
|
||||||
|
TRUSTEE_IS_DELETED,
|
||||||
|
TRUSTEE_IS_INVALID,
|
||||||
|
TRUSTEE_IS_COMPUTER
|
||||||
|
} TRUSTEE_TYPE;
|
||||||
|
typedef enum _TRUSTEE_FORM {
|
||||||
|
TRUSTEE_IS_SID,
|
||||||
|
TRUSTEE_IS_NAME,
|
||||||
|
TRUSTEE_BAD_FORM,
|
||||||
|
TRUSTEE_IS_OBJECTS_AND_SID,
|
||||||
|
TRUSTEE_IS_OBJECTS_AND_NAME
|
||||||
|
} TRUSTEE_FORM;
|
||||||
|
typedef enum _MULTIPLE_TRUSTEE_OPERATION {
|
||||||
|
NO_MULTIPLE_TRUSTEE,
|
||||||
|
TRUSTEE_IS_IMPERSONATE
|
||||||
|
} MULTIPLE_TRUSTEE_OPERATION;
|
||||||
|
typedef struct _TRUSTEE_A {
|
||||||
|
struct _TRUSTEE_A *pMultipleTrustee;
|
||||||
|
MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
|
||||||
|
TRUSTEE_FORM TrusteeForm;
|
||||||
|
TRUSTEE_TYPE TrusteeType;
|
||||||
|
LPSTR ptstrName;
|
||||||
|
} TRUSTEE_A, *PTRUSTEE_A, TRUSTEEA, *PTRUSTEEA;
|
||||||
|
typedef struct _TRUSTEE_W {
|
||||||
|
struct _TRUSTEE_W *pMultipleTrustee;
|
||||||
|
MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
|
||||||
|
TRUSTEE_FORM TrusteeForm;
|
||||||
|
TRUSTEE_TYPE TrusteeType;
|
||||||
|
LPWSTR ptstrName;
|
||||||
|
} TRUSTEE_W, *PTRUSTEE_W, TRUSTEEW, *PTRUSTEEW;
|
||||||
|
typedef struct _ACTRL_ACCESS_ENTRYA {
|
||||||
|
TRUSTEE_A Trustee;
|
||||||
|
ULONG fAccessFlags;
|
||||||
|
ACCESS_RIGHTS Access;
|
||||||
|
ACCESS_RIGHTS ProvSpecificAccess;
|
||||||
|
INHERIT_FLAGS Inheritance;
|
||||||
|
LPCSTR lpInheritProperty;
|
||||||
|
} ACTRL_ACCESS_ENTRYA, *PACTRL_ACCESS_ENTRYA;
|
||||||
|
typedef struct _ACTRL_ACCESS_ENTRYW {
|
||||||
|
TRUSTEE_W Trustee;
|
||||||
|
ULONG fAccessFlags;
|
||||||
|
ACCESS_RIGHTS Access;
|
||||||
|
ACCESS_RIGHTS ProvSpecificAccess;
|
||||||
|
INHERIT_FLAGS Inheritance;
|
||||||
|
LPCWSTR lpInheritProperty;
|
||||||
|
} ACTRL_ACCESS_ENTRYW, *PACTRL_ACCESS_ENTRYW;
|
||||||
|
typedef struct _ACTRL_ACCESS_ENTRY_LISTA {
|
||||||
|
ULONG cEntries;
|
||||||
|
ACTRL_ACCESS_ENTRYA *pAccessList;
|
||||||
|
} ACTRL_ACCESS_ENTRY_LISTA, *PACTRL_ACCESS_ENTRY_LISTA;
|
||||||
|
typedef struct _ACTRL_ACCESS_ENTRY_LISTW {
|
||||||
|
ULONG cEntries;
|
||||||
|
ACTRL_ACCESS_ENTRYW *pAccessList;
|
||||||
|
} ACTRL_ACCESS_ENTRY_LISTW, *PACTRL_ACCESS_ENTRY_LISTW;
|
||||||
|
typedef struct _ACTRL_PROPERTY_ENTRYA {
|
||||||
|
LPCSTR lpProperty;
|
||||||
|
PACTRL_ACCESS_ENTRY_LISTA pAccessEntryList;
|
||||||
|
ULONG fListFlags;
|
||||||
|
} ACTRL_PROPERTY_ENTRYA, *PACTRL_PROPERTY_ENTRYA;
|
||||||
|
typedef struct _ACTRL_PROPERTY_ENTRYW {
|
||||||
|
LPCWSTR lpProperty;
|
||||||
|
PACTRL_ACCESS_ENTRY_LISTW pAccessEntryList;
|
||||||
|
ULONG fListFlags;
|
||||||
|
} ACTRL_PROPERTY_ENTRYW, *PACTRL_PROPERTY_ENTRYW;
|
||||||
|
typedef struct _ACTRL_ALISTA {
|
||||||
|
ULONG cEntries;
|
||||||
|
PACTRL_PROPERTY_ENTRYA pPropertyAccessList;
|
||||||
|
} ACTRL_ACCESSA, *PACTRL_ACCESSA, ACTRL_AUDITA, *PACTRL_AUDITA;
|
||||||
|
typedef struct _ACTRL_ALISTW {
|
||||||
|
ULONG cEntries;
|
||||||
|
PACTRL_PROPERTY_ENTRYW pPropertyAccessList;
|
||||||
|
} ACTRL_ACCESSW, *PACTRL_ACCESSW, ACTRL_AUDITW, *PACTRL_AUDITW;
|
||||||
|
typedef struct _TRUSTEE_ACCESSA {
|
||||||
|
LPSTR lpProperty;
|
||||||
|
ACCESS_RIGHTS Access;
|
||||||
|
ULONG fAccessFlags;
|
||||||
|
ULONG fReturnedAccess;
|
||||||
|
} TRUSTEE_ACCESSA, *PTRUSTEE_ACCESSA;
|
||||||
|
typedef struct _TRUSTEE_ACCESSW {
|
||||||
|
LPWSTR lpProperty;
|
||||||
|
ACCESS_RIGHTS Access;
|
||||||
|
ULONG fAccessFlags;
|
||||||
|
ULONG fReturnedAccess;
|
||||||
|
} TRUSTEE_ACCESSW, *PTRUSTEE_ACCESSW;
|
||||||
|
typedef struct _ACTRL_OVERLAPPED {
|
||||||
|
_ANONYMOUS_UNION
|
||||||
|
union {
|
||||||
|
PVOID Provider;
|
||||||
|
ULONG Reserved1;
|
||||||
|
} DUMMYUNIONNAME;
|
||||||
|
ULONG Reserved2;
|
||||||
|
HANDLE hEvent;
|
||||||
|
} ACTRL_OVERLAPPED, *PACTRL_OVERLAPPED;
|
||||||
|
typedef struct _ACTRL_ACCESS_INFOA {
|
||||||
|
ULONG fAccessPermission;
|
||||||
|
LPSTR lpAccessPermissionName;
|
||||||
|
} ACTRL_ACCESS_INFOA, *PACTRL_ACCESS_INFOA;
|
||||||
|
typedef struct _ACTRL_ACCESS_INFOW {
|
||||||
|
ULONG fAccessPermission;
|
||||||
|
LPWSTR lpAccessPermissionName;
|
||||||
|
} ACTRL_ACCESS_INFOW, *PACTRL_ACCESS_INFOW;
|
||||||
|
typedef struct _ACTRL_CONTROL_INFOA {
|
||||||
|
LPSTR lpControlId;
|
||||||
|
LPSTR lpControlName;
|
||||||
|
} ACTRL_CONTROL_INFOA, *PACTRL_CONTROL_INFOA;
|
||||||
|
typedef struct _ACTRL_CONTROL_INFOW {
|
||||||
|
LPWSTR lpControlId;
|
||||||
|
LPWSTR lpControlName;
|
||||||
|
} ACTRL_CONTROL_INFOW, *PACTRL_CONTROL_INFOW;
|
||||||
|
typedef struct _EXPLICIT_ACCESS_A {
|
||||||
|
DWORD grfAccessPermissions;
|
||||||
|
ACCESS_MODE grfAccessMode;
|
||||||
|
DWORD grfInheritance;
|
||||||
|
TRUSTEE_A Trustee;
|
||||||
|
} EXPLICIT_ACCESS_A, *PEXPLICIT_ACCESS_A, EXPLICIT_ACCESSA, *PEXPLICIT_ACCESSA;
|
||||||
|
typedef struct _EXPLICIT_ACCESS_W {
|
||||||
|
DWORD grfAccessPermissions;
|
||||||
|
ACCESS_MODE grfAccessMode;
|
||||||
|
DWORD grfInheritance;
|
||||||
|
TRUSTEE_W Trustee;
|
||||||
|
} EXPLICIT_ACCESS_W, *PEXPLICIT_ACCESS_W, EXPLICIT_ACCESSW, *PEXPLICIT_ACCESSW;
|
||||||
|
typedef struct _OBJECTS_AND_SID {
|
||||||
|
DWORD ObjectsPresent;
|
||||||
|
GUID ObjectTypeGuid;
|
||||||
|
GUID InheritedObjectTypeGuid;
|
||||||
|
SID * pSid;
|
||||||
|
} OBJECTS_AND_SID, *POBJECTS_AND_SID;
|
||||||
|
typedef struct _OBJECTS_AND_NAME_A {
|
||||||
|
DWORD ObjectsPresent;
|
||||||
|
SE_OBJECT_TYPE ObjectType;
|
||||||
|
LPSTR ObjectTypeName;
|
||||||
|
LPSTR InheritedObjectTypeName;
|
||||||
|
LPSTR ptstrName;
|
||||||
|
} OBJECTS_AND_NAME_A, *POBJECTS_AND_NAME_A;
|
||||||
|
typedef struct _OBJECTS_AND_NAME_W {
|
||||||
|
DWORD ObjectsPresent;
|
||||||
|
SE_OBJECT_TYPE ObjectType;
|
||||||
|
LPWSTR ObjectTypeName;
|
||||||
|
LPWSTR InheritedObjectTypeName;
|
||||||
|
LPWSTR ptstrName;
|
||||||
|
} OBJECTS_AND_NAME_W, *POBJECTS_AND_NAME_W;
|
||||||
|
#if (_WIN32_WINNT >= 0x0501)
|
||||||
|
typedef struct {
|
||||||
|
LONG GenerationGap;
|
||||||
|
LPSTR AncestorName;
|
||||||
|
} INHERITED_FROMA, *PINHERITED_FROMA;
|
||||||
|
typedef struct {
|
||||||
|
LONG GenerationGap;
|
||||||
|
LPWSTR AncestorName;
|
||||||
|
} INHERITED_FROMW, *PINHERITED_FROMW;
|
||||||
|
#endif /* (_WIN32_WINNT >= 0x0501) */
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
#define ACCCTRL_DEFAULT_PROVIDER ACCCTRL_DEFAULT_PROVIDERW
|
||||||
|
typedef TRUSTEE_W TRUSTEE_, *PTRUSTEE_;
|
||||||
|
typedef TRUSTEEW TRUSTEE, *PTRUSTEE;
|
||||||
|
typedef ACTRL_ACCESSW ACTRL_ACCESS, *PACTRL_ACCESS;
|
||||||
|
typedef ACTRL_ACCESS_ENTRY_LISTW ACTRL_ACCESS_ENTRY_LIST, *PACTRL_ACCESS_ENTRY_LIST;
|
||||||
|
typedef ACTRL_ACCESS_INFOW ACTRL_ACCESS_INFO, *PACTRL_ACCESS_INFO;
|
||||||
|
typedef ACTRL_ACCESS_ENTRYW ACTRL_ACCESS_ENTRY, *PACTRL_ACCESS_ENTRY;
|
||||||
|
typedef ACTRL_AUDITW ACTRL_AUDIT, *PACTRL_AUDIT;
|
||||||
|
typedef ACTRL_CONTROL_INFOW ACTRL_CONTROL_INFO, *PACTRL_CONTROL_INFO;
|
||||||
|
typedef EXPLICIT_ACCESS_W EXPLICIT_ACCESS_, *PEXPLICIT_ACCESS_;
|
||||||
|
typedef EXPLICIT_ACCESSW EXPLICIT_ACCESS, *PEXPLICIT_ACCESS;
|
||||||
|
typedef TRUSTEE_ACCESSW TRUSTEE_ACCESS, *PTRUSTEE_ACCESS;
|
||||||
|
typedef OBJECTS_AND_NAME_W OBJECTS_AND_NAME_, *POBJECTS_AND_NAME_;
|
||||||
|
#if (_WIN32_WINNT >= 0x0501)
|
||||||
|
typedef INHERITED_FROMW INHERITED_FROM, *PINHERITED_FROM;
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define ACCCTRL_DEFAULT_PROVIDER ACCCTRL_DEFAULT_PROVIDERA
|
||||||
|
typedef TRUSTEE_A TRUSTEE_, *PTRUSTEE_;
|
||||||
|
typedef TRUSTEEA TRUSTEE, *PTRUSTEE;
|
||||||
|
typedef ACTRL_ACCESSA ACTRL_ACCESS, *PACTRL_ACCESS;
|
||||||
|
typedef ACTRL_ACCESS_ENTRY_LISTA ACTRL_ACCESS_ENTRY_LIST, *PACTRL_ACCESS_ENTRY_LIST;
|
||||||
|
typedef ACTRL_ACCESS_INFOA ACTRL_ACCESS_INFO, *PACTRL_ACCESS_INFO;
|
||||||
|
typedef ACTRL_ACCESS_ENTRYA ACTRL_ACCESS_ENTRY, *PACTRL_ACCESS_ENTRY;
|
||||||
|
typedef ACTRL_AUDITA ACTRL_AUDIT, *PACTRL_AUDIT;
|
||||||
|
typedef ACTRL_CONTROL_INFOA ACTRL_CONTROL_INFO, *PACTRL_CONTROL_INFO;
|
||||||
|
typedef EXPLICIT_ACCESS_A EXPLICIT_ACCESS_, *PEXPLICIT_ACCESS_;
|
||||||
|
typedef EXPLICIT_ACCESSA EXPLICIT_ACCESS, *PEXPLICIT_ACCESS;
|
||||||
|
typedef TRUSTEE_ACCESSA TRUSTEE_ACCESS, *PTRUSTEE_ACCESS;
|
||||||
|
typedef OBJECTS_AND_NAME_A OBJECTS_AND_NAME_, *POBJECTS_AND_NAME_;
|
||||||
|
#if (_WIN32_WINNT >= 0x0501)
|
||||||
|
typedef INHERITED_FROMA INHERITED_FROM, *PINHERITED_FROM;
|
||||||
|
#endif
|
||||||
|
#endif /* UNICODE */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
#ifndef _ACLAPI_H
|
||||||
|
#define _ACLAPI_H
|
||||||
|
#if __GNUC__ >= 3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include <accctrl.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
WINADVAPI VOID WINAPI BuildExplicitAccessWithNameA(PEXPLICIT_ACCESS_A,LPSTR,DWORD,ACCESS_MODE,DWORD);
|
||||||
|
WINADVAPI VOID WINAPI BuildExplicitAccessWithNameW(PEXPLICIT_ACCESS_W,LPWSTR,DWORD,ACCESS_MODE,DWORD);
|
||||||
|
WINADVAPI DWORD WINAPI BuildSecurityDescriptorA(PTRUSTEE_A,PTRUSTEE_A ,ULONG,PEXPLICIT_ACCESS_A,
|
||||||
|
ULONG,PEXPLICIT_ACCESS_A,PSECURITY_DESCRIPTOR,PULONG,PSECURITY_DESCRIPTOR*);
|
||||||
|
WINADVAPI DWORD WINAPI BuildSecurityDescriptorW(PTRUSTEE_W,PTRUSTEE_W ,ULONG,PEXPLICIT_ACCESS_W,
|
||||||
|
ULONG,PEXPLICIT_ACCESS_W,PSECURITY_DESCRIPTOR,PULONG,PSECURITY_DESCRIPTOR*);
|
||||||
|
WINADVAPI VOID WINAPI BuildTrusteeWithNameA(PTRUSTEE_A,LPSTR);
|
||||||
|
WINADVAPI VOID WINAPI BuildTrusteeWithNameW(PTRUSTEE_W,LPWSTR);
|
||||||
|
WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndNameA(PTRUSTEE_A,POBJECTS_AND_NAME_A,SE_OBJECT_TYPE,
|
||||||
|
LPSTR,LPSTR,LPSTR);
|
||||||
|
WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndNameW(PTRUSTEE_W,POBJECTS_AND_NAME_W,SE_OBJECT_TYPE,
|
||||||
|
LPWSTR,LPWSTR,LPWSTR);
|
||||||
|
WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndSidA(PTRUSTEE_A,POBJECTS_AND_SID,GUID*,GUID*,PSID);
|
||||||
|
WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndSidW(PTRUSTEE_W,POBJECTS_AND_SID,GUID*,GUID*,PSID);
|
||||||
|
WINADVAPI VOID WINAPI BuildTrusteeWithSidA(PTRUSTEE_A,PSID);
|
||||||
|
WINADVAPI VOID WINAPI BuildTrusteeWithSidW(PTRUSTEE_W,PSID);
|
||||||
|
WINADVAPI DWORD WINAPI GetAuditedPermissionsFromAclA(PACL,PTRUSTEE_A,PACCESS_MASK,PACCESS_MASK);
|
||||||
|
WINADVAPI DWORD WINAPI GetAuditedPermissionsFromAclW(PACL,PTRUSTEE_W,PACCESS_MASK,PACCESS_MASK);
|
||||||
|
WINADVAPI DWORD WINAPI GetEffectiveRightsFromAclA(PACL,PTRUSTEE_A,PACCESS_MASK);
|
||||||
|
WINADVAPI DWORD WINAPI GetEffectiveRightsFromAclW(PACL,PTRUSTEE_W,PACCESS_MASK);
|
||||||
|
WINADVAPI DWORD WINAPI GetExplicitEntriesFromAclA(PACL,PULONG,PEXPLICIT_ACCESS_A*);
|
||||||
|
WINADVAPI DWORD WINAPI GetExplicitEntriesFromAclW(PACL,PULONG,PEXPLICIT_ACCESS_W*);
|
||||||
|
#if (_WIN32_WINNT >= 0x0501)
|
||||||
|
WINADVAPI DWORD WINAPI GetInheritanceSourceA(LPSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,BOOL,GUID**,DWORD,PACL,void*,PGENERIC_MAPPING,PINHERITED_FROMA);
|
||||||
|
WINADVAPI DWORD WINAPI GetInheritanceSourceW(LPWSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,BOOL,GUID**,DWORD,PACL,void*,PGENERIC_MAPPING,PINHERITED_FROMW);
|
||||||
|
#endif
|
||||||
|
WINADVAPI DWORD WINAPI GetNamedSecurityInfoA(LPSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,
|
||||||
|
PSID*,PSID*,PACL*,PACL*,PSECURITY_DESCRIPTOR*);
|
||||||
|
WINADVAPI DWORD WINAPI GetNamedSecurityInfoW(LPWSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,
|
||||||
|
PSID*,PSID*,PACL*,PACL*,PSECURITY_DESCRIPTOR*);
|
||||||
|
WINADVAPI DWORD WINAPI GetSecurityInfo(HANDLE,SE_OBJECT_TYPE,SECURITY_INFORMATION,
|
||||||
|
PSID*,PSID*,PACL*,PACL*,PSECURITY_DESCRIPTOR*);
|
||||||
|
WINADVAPI TRUSTEE_FORM WINAPI GetTrusteeFormA(PTRUSTEE_A);
|
||||||
|
WINADVAPI TRUSTEE_FORM WINAPI GetTrusteeFormW(PTRUSTEE_W);
|
||||||
|
WINADVAPI LPSTR WINAPI GetTrusteeNameA(PTRUSTEE_A);
|
||||||
|
WINADVAPI LPWSTR WINAPI GetTrusteeNameW(PTRUSTEE_W);
|
||||||
|
WINADVAPI TRUSTEE_TYPE WINAPI GetTrusteeTypeA(PTRUSTEE_A);
|
||||||
|
WINADVAPI TRUSTEE_TYPE WINAPI GetTrusteeTypeW(PTRUSTEE_W);
|
||||||
|
WINADVAPI DWORD WINAPI LookupSecurityDescriptorPartsA(PTRUSTEE_A*,PTRUSTEE_A*,PULONG,PEXPLICIT_ACCESS_A*,
|
||||||
|
PULONG,PEXPLICIT_ACCESS_A*,PSECURITY_DESCRIPTOR);
|
||||||
|
WINADVAPI DWORD WINAPI LookupSecurityDescriptorPartsW(PTRUSTEE_W*,PTRUSTEE_W*,PULONG,PEXPLICIT_ACCESS_W*,
|
||||||
|
PULONG,PEXPLICIT_ACCESS_W*,PSECURITY_DESCRIPTOR);
|
||||||
|
WINADVAPI DWORD WINAPI SetEntriesInAclA(ULONG,PEXPLICIT_ACCESS_A,PACL,PACL*);
|
||||||
|
WINADVAPI DWORD WINAPI SetEntriesInAclW(ULONG,PEXPLICIT_ACCESS_W,PACL,PACL*);
|
||||||
|
WINADVAPI DWORD WINAPI SetNamedSecurityInfoA(LPSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,PSID,PSID,PACL,PACL);
|
||||||
|
WINADVAPI DWORD WINAPI SetNamedSecurityInfoW(LPWSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,PSID,PSID,PACL,PACL);
|
||||||
|
WINADVAPI DWORD WINAPI SetSecurityInfo(HANDLE,SE_OBJECT_TYPE,SECURITY_INFORMATION,PSID,PSID,PACL,PACL);
|
||||||
|
WINADVAPI VOID WINAPI BuildImpersonateExplicitAccessWithNameA(PEXPLICIT_ACCESS_A,LPSTR,PTRUSTEE_A,DWORD,ACCESS_MODE,DWORD);
|
||||||
|
WINADVAPI VOID WINAPI BuildImpersonateExplicitAccessWithNameW(PEXPLICIT_ACCESS_W,LPWSTR,PTRUSTEE_W,DWORD,ACCESS_MODE,DWORD);
|
||||||
|
WINADVAPI VOID WINAPI BuildImpersonateTrusteeA(PTRUSTEE_A,PTRUSTEE_A);
|
||||||
|
WINADVAPI VOID WINAPI BuildImpersonateTrusteeW(PTRUSTEE_W,PTRUSTEE_W);
|
||||||
|
WINADVAPI PTRUSTEE_A WINAPI GetMultipleTrusteeA(PTRUSTEE_A);
|
||||||
|
WINADVAPI PTRUSTEE_W WINAPI GetMultipleTrusteeW(PTRUSTEE_W);
|
||||||
|
WINADVAPI MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationA(PTRUSTEE_A);
|
||||||
|
WINADVAPI MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationW(PTRUSTEE_W);
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
#define BuildExplicitAccessWithName BuildExplicitAccessWithNameW
|
||||||
|
#define BuildSecurityDescriptor BuildSecurityDescriptorW
|
||||||
|
#define BuildTrusteeWithName BuildTrusteeWithNameW
|
||||||
|
#define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameW
|
||||||
|
#define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidW
|
||||||
|
#define BuildTrusteeWithSid BuildTrusteeWithSidW
|
||||||
|
#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclW
|
||||||
|
#define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclW
|
||||||
|
#define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclW
|
||||||
|
#define GetNamedSecurityInfo GetNamedSecurityInfoW
|
||||||
|
#define GetTrusteeForm GetTrusteeFormW
|
||||||
|
#define GetTrusteeName GetTrusteeNameW
|
||||||
|
#define GetTrusteeType GetTrusteeTypeW
|
||||||
|
#define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsW
|
||||||
|
#define SetEntriesInAcl SetEntriesInAclW
|
||||||
|
#define SetNamedSecurityInfo SetNamedSecurityInfoW
|
||||||
|
#define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameW
|
||||||
|
#define BuildImpersonateTrustee BuildImpersonateTrusteeW
|
||||||
|
#define GetMultipleTrustee GetMultipleTrusteeW
|
||||||
|
#define GetMultipleTrusteeOperation GetMultipleTrusteeOperationW
|
||||||
|
#else
|
||||||
|
#define BuildExplicitAccessWithName BuildExplicitAccessWithNameA
|
||||||
|
#define BuildSecurityDescriptor BuildSecurityDescriptorA
|
||||||
|
#define BuildTrusteeWithName BuildTrusteeWithNameA
|
||||||
|
#define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameA
|
||||||
|
#define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidA
|
||||||
|
#define BuildTrusteeWithSid BuildTrusteeWithSidA
|
||||||
|
#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclA
|
||||||
|
#define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclA
|
||||||
|
#define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclA
|
||||||
|
#define GetNamedSecurityInfo GetNamedSecurityInfoA
|
||||||
|
#define GetTrusteeForm GetTrusteeFormA
|
||||||
|
#define GetTrusteeName GetTrusteeNameA
|
||||||
|
#define GetTrusteeType GetTrusteeTypeA
|
||||||
|
#define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsA
|
||||||
|
#define SetEntriesInAcl SetEntriesInAclA
|
||||||
|
#define SetNamedSecurityInfo SetNamedSecurityInfoA
|
||||||
|
#define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameA
|
||||||
|
#define BuildImpersonateTrustee BuildImpersonateTrusteeA
|
||||||
|
#define GetMultipleTrustee GetMultipleTrusteeA
|
||||||
|
#define GetMultipleTrusteeOperation GetMultipleTrusteeOperationA
|
||||||
|
#endif /* UNICODE */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,134 @@
|
||||||
|
#ifndef _ACLUI_H
|
||||||
|
#define _ACLUI_H
|
||||||
|
#if __GNUC__ >= 3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _OBJC_NO_COM
|
||||||
|
#include <objbase.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include <accctrl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(_ACLUI_)
|
||||||
|
#define ACLUIAPI DECLSPEC_IMPORT WINAPI
|
||||||
|
#else
|
||||||
|
#define ACLUIAPI WINAPI
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct _SI_OBJECT_INFO
|
||||||
|
{
|
||||||
|
DWORD dwFlags;
|
||||||
|
HINSTANCE hInstance;
|
||||||
|
LPWSTR pszServerName;
|
||||||
|
LPWSTR pszObjectName;
|
||||||
|
LPWSTR pszPageTitle;
|
||||||
|
GUID guidObjectType;
|
||||||
|
} SI_OBJECT_INFO, *PSI_OBJECT_INFO;
|
||||||
|
|
||||||
|
/* values for SI_OBJECT_INFO.dwFlags */
|
||||||
|
#define SI_EDIT_PERMS 0x00000000L
|
||||||
|
#define SI_EDIT_OWNER 0x00000001L
|
||||||
|
#define SI_EDIT_AUDITS 0x00000002L
|
||||||
|
#define SI_CONTAINER 0x00000004L
|
||||||
|
#define SI_READONLY 0x00000008L
|
||||||
|
#define SI_ADVANCED 0x00000010L
|
||||||
|
#define SI_RESET 0x00000020L
|
||||||
|
#define SI_OWNER_READONLY 0x00000040L
|
||||||
|
#define SI_EDIT_PROPERTIES 0x00000080L
|
||||||
|
#define SI_OWNER_RECURSE 0x00000100L
|
||||||
|
#define SI_NO_ACL_PROTECT 0x00000200L
|
||||||
|
#define SI_NO_TREE_APPLY 0x00000400L
|
||||||
|
#define SI_PAGE_TITLE 0x00000800L
|
||||||
|
#define SI_SERVER_IS_DC 0x00001000L
|
||||||
|
#define SI_RESET_DACL_TREE 0x00004000L
|
||||||
|
#define SI_RESET_SACL_TREE 0x00008000L
|
||||||
|
#define SI_OBJECT_GUID 0x00010000L
|
||||||
|
#define SI_EDIT_EFFECTIVE 0x00020000L
|
||||||
|
#define SI_RESET_DACL 0x00040000L
|
||||||
|
#define SI_RESET_SACL 0x00080000L
|
||||||
|
#define SI_RESET_OWNER 0x00100000L
|
||||||
|
#define SI_NO_ADDITIONAL_PERMISSION 0x00200000L
|
||||||
|
#define SI_MAY_WRITE 0x10000000L
|
||||||
|
|
||||||
|
#define SI_EDIT_ALL (SI_EDIT_PERMS | SI_EDIT_OWNER | SI_EDIT_AUDITS)
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _SI_ACCESS
|
||||||
|
{
|
||||||
|
const GUID* pguid;
|
||||||
|
ACCESS_MASK mask;
|
||||||
|
LPCWSTR pszName;
|
||||||
|
DWORD dwFlags;
|
||||||
|
} SI_ACCESS, *PSI_ACCESS;
|
||||||
|
|
||||||
|
/* values for SI_ACCESS.dwFlags */
|
||||||
|
#define SI_ACCESS_SPECIFIC 0x00010000L
|
||||||
|
#define SI_ACCESS_GENERAL 0x00020000L
|
||||||
|
#define SI_ACCESS_CONTAINER 0x00040000L
|
||||||
|
#define SI_ACCESS_PROPERTY 0x00080000L
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _SI_INHERIT_TYPE
|
||||||
|
{
|
||||||
|
const GUID* pguid;
|
||||||
|
ULONG dwFlags;
|
||||||
|
LPCWSTR pszName;
|
||||||
|
} SI_INHERIT_TYPE, *PSI_INHERIT_TYPE;
|
||||||
|
|
||||||
|
/* values for SI_INHERIT_TYPE.dwFlags
|
||||||
|
INHERIT_ONLY_ACE, CONTAINER_INHERIT_ACE, OBJECT_INHERIT_ACE
|
||||||
|
defined elsewhere */
|
||||||
|
|
||||||
|
|
||||||
|
typedef enum _SI_PAGE_TYPE
|
||||||
|
{
|
||||||
|
SI_PAGE_PERM = 0,
|
||||||
|
SI_PAGE_ADVPERM,
|
||||||
|
SI_PAGE_AUDIT,
|
||||||
|
SI_PAGE_OWNER
|
||||||
|
} SI_PAGE_TYPE;
|
||||||
|
|
||||||
|
|
||||||
|
#define PSPCB_SI_INITDIALOG (WM_USER + 1)
|
||||||
|
|
||||||
|
#ifndef __ISecurityInformation_INTERFACE_DEFINED__
|
||||||
|
#define __ISecurityInformation_INTERFACE_DEFINED__
|
||||||
|
#define INTERFACE ISecurityInformation
|
||||||
|
DECLARE_INTERFACE_(ISecurityInformation, IUnknown)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
||||||
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||||
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||||
|
|
||||||
|
STDMETHOD(GetObjectInformation)(THIS_ PSI_OBJECT_INFO) PURE;
|
||||||
|
STDMETHOD(GetSecurity)(THIS_ SECURITY_INFORMATION,PSECURITY_DESCRIPTOR*,BOOL) PURE;
|
||||||
|
STDMETHOD(SetSecurity)(THIS_ SECURITY_INFORMATION,PSECURITY_DESCRIPTOR) PURE;
|
||||||
|
STDMETHOD(GetAccessRights)(THIS_ const GUID*,DWORD,PSI_ACCESS*,ULONG*,ULONG*) PURE;
|
||||||
|
STDMETHOD(MapGeneric)(THIS_ const GUID*,UCHAR*,ACCESS_MASK*) PURE;
|
||||||
|
STDMETHOD(GetInheritTypes)(THIS_ PSI_INHERIT_TYPE*,ULONG*) PURE;
|
||||||
|
STDMETHOD(PropertySheetPageCallback)(THIS_ HWND,UINT,SI_PAGE_TYPE) PURE;
|
||||||
|
};
|
||||||
|
#undef INTERFACE
|
||||||
|
typedef ISecurityInformation *LPSECURITYINFO;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO: ISecurityInformation2, IEffectivePermission, ISecurityObjectTypeInfo
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern DECLSPEC_IMPORT const IID IID_ISecurityInformation;
|
||||||
|
|
||||||
|
|
||||||
|
HPROPSHEETPAGE ACLUIAPI CreateSecurityPage(LPSECURITYINFO psi);
|
||||||
|
BOOL ACLUIAPI EditSecurity(HWND hwndOwner, LPSECURITYINFO psi);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* adsprop.h - Active Directory
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||||
|
*
|
||||||
|
* This source code is offered for use in the public domain. You may use,
|
||||||
|
* modify or distribute it freely.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful but
|
||||||
|
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||||
|
* DISCLAIMED. This includes but is not limited to warranties of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef _ADSPROP_H
|
||||||
|
#define _ADSPROP_H
|
||||||
|
#if __GNUC__ >= 3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*--- Active Directory Reference - Active Directory Messages */
|
||||||
|
#define WM_ADSPROP_NOTIFY_APPLY (WM_USER+1104)
|
||||||
|
#define WM_ADSPROP_NOTIFY_CHANGE (WM_USER+1103)
|
||||||
|
#define WM_ADSPROP_NOTIFY_ERROR (WM_USER+1110)
|
||||||
|
#define WM_ADSPROP_NOTIFY_EXIT (WM_USER+1107)
|
||||||
|
#define WM_ADSPROP_NOTIFY_FOREGROUND (WM_USER+1106)
|
||||||
|
#define WM_ADSPROP_NOTIFY_PAGEHWND (WM_USER+1102)
|
||||||
|
#define WM_ADSPROP_NOTIFY_PAGEINIT (WM_USER+1101)
|
||||||
|
#define WM_ADSPROP_NOTIFY_SETFOCUS (WM_USER+1105)
|
||||||
|
/*--- Active Directory Reference - Active Directory Structures - Active Directory MMC Property Page Structures */
|
||||||
|
#if (_WIN32_WINNT >= 0x0501)
|
||||||
|
typedef struct {
|
||||||
|
HWND hwndPage;
|
||||||
|
PWSTR pszPageTitle;
|
||||||
|
PWSTR pszObjPath;
|
||||||
|
PWSTR pszObjClass;
|
||||||
|
HRESULT hr;
|
||||||
|
PWSTR pszError;
|
||||||
|
} ADSPROPERROR,*PADSPROPERROR;
|
||||||
|
#endif /* (_WIN32_WINNT >= 0x0501) */
|
||||||
|
#if (_WIN32_WINNT >= 0x0500)
|
||||||
|
typedef struct {
|
||||||
|
DWORD dwSize;
|
||||||
|
DWORD dwFlags;
|
||||||
|
HRESULT hr;
|
||||||
|
IDirectoryObject *pDsObj;
|
||||||
|
LPWSTR pwzCN;
|
||||||
|
PADS_ATTR_INFO pWritableAttrs;
|
||||||
|
} ADSPROPINITPARAMS,*PADSPROPINITPARAMS;
|
||||||
|
#endif /* (_WIN32_WINNT >= 0x0500) */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
#ifndef _AFXRES_H
|
||||||
|
#define _AFXRES_H
|
||||||
|
#if __GNUC__ >= 3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WINDOWS_H
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* IDC_STATIC is documented in winuser.h, but not defined. */
|
||||||
|
#ifndef IDC_STATIC
|
||||||
|
#define IDC_STATIC (-1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
#ifndef _AMAUDIO_H
|
||||||
|
#define _AMAUDIO_H
|
||||||
|
#if __GNUC__ >= 3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <dsound.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define INTERFACE IAMDirectSound
|
||||||
|
DECLARE_INTERFACE_(IAMDirectSound, IUnknown)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
|
||||||
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||||
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||||
|
STDMETHOD(GetDirectSoundInterface)(THIS_ LPDIRECTSOUND*) PURE;
|
||||||
|
STDMETHOD(GetPrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER*) PURE;
|
||||||
|
STDMETHOD(GetSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER*) PURE;
|
||||||
|
STDMETHOD(GetFocusWindow)(THIS_ HWND*,BOOL*) PURE ;
|
||||||
|
STDMETHOD(ReleaseDirectSoundInterface)(THIS_ LPDIRECTSOUND) PURE;
|
||||||
|
STDMETHOD(ReleasePrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER) PURE;
|
||||||
|
STDMETHOD(ReleaseSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER) PURE;
|
||||||
|
STDMETHOD(SetFocusWindow)(THIS_ HWND,BOOL) PURE ;
|
||||||
|
};
|
||||||
|
#undef INTERFACE
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,179 @@
|
||||||
|
#ifndef _AMVIDEO_H
|
||||||
|
#define _AMVIDEO_H
|
||||||
|
#if __GNUC__ >=3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <ddraw.h>
|
||||||
|
#include <strmif.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define AMDDS_NONE 0x0000
|
||||||
|
#define AMDDS_DCIPS 0x0001
|
||||||
|
#define AMDDS_PS 0x0002
|
||||||
|
#define AMDDS_RGBOVR 0x0004
|
||||||
|
#define AMDDS_YUVOVR 0x0008
|
||||||
|
#define AMDDS_RGBOFF 0x0010
|
||||||
|
#define AMDDS_YUVOFF 0x0020
|
||||||
|
#define AMDDS_RGBFLP 0x0040
|
||||||
|
#define AMDDS_YUVFLP 0x0080
|
||||||
|
#define AMDDS_ ALL 0x00FF
|
||||||
|
#define AMDDS_DEFAULT 0x00FF
|
||||||
|
#define AMDDS_YUV (AMDDS_YUVOFF|AMDDS_YUVOVR|AMDDS_YUVFLP)
|
||||||
|
#define AMDDS_RGB (AMDDS_RGBOFF|AMDDS_RGBOVR|AMDDS_RGBFLP)
|
||||||
|
#define AMDDS_PRIMARY (AMDDS_DCIPS|AMDDS_PS)
|
||||||
|
#define BIT_MASKS_MATCH(pbmi1,pbmi2) ((pbmi1)->dwBitMasks[0] == (pbmi2)->dwBitMasks[0] && (pbmi1)->dwBitMasks[1] == (pbmi2)->dwBitMasks[1] && (pbmi1)->dwBitMasks[2] == (pbmi2)->dwBitMasks[2])
|
||||||
|
#define PALETTISED(pbmi) ((pbmi)->bmiHeader.biBitCount <= 8)
|
||||||
|
#define PALETTE_ENTRIES(pbmi) (1 << (pbmi)->bmiHeader.biBitCount)
|
||||||
|
#define RESET_MASKS(pbmi) (ZeroMemory((PVOID)(pbmi)->dwBitFields,3*sizeof(DWORD)))
|
||||||
|
#define RESET_PALETTE(pbmi) (ZeroMemory((PVOID)(pbmi)->bmiColors,256*sizeof(RGBQUAD)));
|
||||||
|
#define SIZE_EGA_PALETTE (16*sizeof(RGBQUAD))
|
||||||
|
#define SIZE_MASKS (3*sizeof(DWORD))
|
||||||
|
#define SIZE_PALETTE (256*sizeof(RGBQUAD))
|
||||||
|
typedef enum {
|
||||||
|
AM_PROPERTY_FRAMESTEP_STEP = 1,
|
||||||
|
AM_PROPERTY_FRAMESTEP_CANCEL = 2,
|
||||||
|
AM_PROPERTY_FRAMESTEP_CANSTEP = 3,
|
||||||
|
AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 4
|
||||||
|
} AM_PROPERTY_FRAMESTEP;
|
||||||
|
typedef struct tag_TRUECOLORINFO {
|
||||||
|
DWORD dwBitMasks[3];
|
||||||
|
RGBQUAD bmiColors[256];
|
||||||
|
} TRUECOLORINFO;
|
||||||
|
typedef struct tagVIDEOINFOHEADER {
|
||||||
|
RECT rcSource;
|
||||||
|
RECT rcTarget;
|
||||||
|
DWORD dwBitRate;
|
||||||
|
DWORD dwBitErrorRate;
|
||||||
|
REFERENCE_TIME AvgTimePerFrame;
|
||||||
|
BITMAPINFOHEADER bmiHeader;
|
||||||
|
} VIDEOINFOHEADER;
|
||||||
|
typedef struct tagVIDEOINFO {
|
||||||
|
RECT rcSource,
|
||||||
|
RECT rcTarget,
|
||||||
|
DWORD dwBitRate,
|
||||||
|
DWORD dwBitErrorRate,
|
||||||
|
REFERENCE_TIME AvgTimePerFrame;
|
||||||
|
BITMAPINFOHEADER bmiHeader;
|
||||||
|
union {
|
||||||
|
RGBQUAD bmiColors[256];
|
||||||
|
DWORD dwBitMasks[3];
|
||||||
|
TRUECOLORINFO TrueColorInfo;
|
||||||
|
};
|
||||||
|
} VIDEOINFO;
|
||||||
|
typedef struct tagMPEG1VIDEOINFO {
|
||||||
|
VIDEOINFOHEADER hdr;
|
||||||
|
DWORD dwStartTimeCode;
|
||||||
|
DWORD cbSequenceHeader;
|
||||||
|
BYTE bSequenceHeader[1];
|
||||||
|
} MPEG1VIDEOINFO;
|
||||||
|
typedef struct tagAnalogVideoInfo {
|
||||||
|
RECT rcSource;
|
||||||
|
RECT rcTarget;
|
||||||
|
DWORD dwActiveWidth;
|
||||||
|
DWORD dwActiveHeight;
|
||||||
|
REFERENCE_TIME AvgTimePerFrame;
|
||||||
|
} ANALOGVIDEOINFO;
|
||||||
|
typedef struct _AM_FRAMESTEP_STEP {
|
||||||
|
DWORD dwFramesToStep;
|
||||||
|
} AM_FRAMESTEP_STEP;
|
||||||
|
#define INTERFACE IDirectDrawVideo
|
||||||
|
DECLARE_INTERFACE_(IDirectDrawVideo, IUnknown)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
|
||||||
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||||
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||||
|
STDMETHOD(CanUseOverlayStretch)(THIS_ long*) PURE;
|
||||||
|
STDMETHOD(CanUseScanLine)(THIS_ long*) PURE;
|
||||||
|
STDMETHOD(GetCaps)(THIS_ DDCAPS*) PURE;
|
||||||
|
STDMETHOD(GetDirectDraw)(THIS_ LPDIRECTDRAW*) PURE;
|
||||||
|
STDMETHOD(GetEmulatedCaps)(THIS_ DDCAPS*) PURE;
|
||||||
|
STDMETHOD(GetFourCCCodes)(THIS_ DWORD*,DWORD*) PURE;
|
||||||
|
STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC*) PURE;
|
||||||
|
STDMETHOD(GetSurfaceType)(THIS_ DWORD*) PURE;
|
||||||
|
STDMETHOD(GetSwitches)(THIS_ DWORD*) PURE;
|
||||||
|
STDMETHOD(SetDefault)(THIS) PURE;
|
||||||
|
STDMETHOD(SetDirectDraw)(THIS_ LPDIRECTDRAW) PURE;
|
||||||
|
STDMETHOD(SetSwitches)(THIS_ DWORD) PURE;
|
||||||
|
STDMETHOD(UseOverlayStretch)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(UseScanLine)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(UseWhenFullScreen)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(WillUseFullScreen)(THIS_ long*) PURE;
|
||||||
|
};
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IQualProp
|
||||||
|
DECLARE_INTERFACE_(IQualProp, IUnknown)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
|
||||||
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||||
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||||
|
STDMETHOD(get_AvgFrameRate)(THIS_ int*) PURE;
|
||||||
|
STDMETHOD(get_AvgSyncOffset)(THIS_ int*) PURE;
|
||||||
|
STDMETHOD(get_DevSyncOffset)(THIS_ int*) PURE;
|
||||||
|
STDMETHOD(get_FramesDrawn)(THIS_ int*) PURE;
|
||||||
|
STDMETHOD(get_FramesDroppedInRenderer)(THIS_ int*) PURE;
|
||||||
|
STDMETHOD(get_Jitter)(THIS_ int*) PURE;
|
||||||
|
};
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IFullScreenVideo
|
||||||
|
DECLARE_INTERFACE_(IFullScreenVideo, IUnknown)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
|
||||||
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||||
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||||
|
STDMETHOD(CountModes)(THIS_ long*) PURE;
|
||||||
|
STDMETHOD(GetCaption)(THIS_ BSTR*) PURE;
|
||||||
|
STDMETHOD(GetClipFactor)(THIS_ long*) PURE;
|
||||||
|
STDMETHOD(GetCurrentMode)(THIS_ long*) PURE;
|
||||||
|
STDMETHOD(GetMessageDrain)(THIS_ HWND*) PURE;
|
||||||
|
STDMETHOD(GetModeInfo)(THIS_ long,long*,long*,long*) PURE;
|
||||||
|
STDMETHOD(GetMonitor)(THIS_ long*) PURE;
|
||||||
|
STDMETHOD(HideOnDeactivate)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(IsHideOnDeactivate)(THIS) PURE;
|
||||||
|
STDMETHOD(IsModeAvailable)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(IsModeEnabled)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(SetCaption)(THIS_ BSTR) PURE;
|
||||||
|
STDMETHOD(SetClipFactor)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(SetDefault)(THIS) PURE;
|
||||||
|
STDMETHOD(SetEnabled)(THIS_ long,long) PURE;
|
||||||
|
STDMETHOD(SetMessageDrain)(THIS_ HWND) PURE;
|
||||||
|
STDMETHOD(SetMonitor)(THIS_ long) PURE;
|
||||||
|
};
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IFullScreenVideoEx
|
||||||
|
DECLARE_INTERFACE_(IFullScreenVideoEx, IFullScreenVideo)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface)(THIS_ REFIID, LPVOID*) PURE;
|
||||||
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||||
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||||
|
STDMETHOD(CountModes)(THIS_ long*) PURE;
|
||||||
|
STDMETHOD(GetAcceleratorTable)(THIS_ HWND*,HACCEL*) PURE;
|
||||||
|
STDMETHOD(GetCaption)(THIS_ BSTR*) PURE;
|
||||||
|
STDMETHOD(GetClipFactor)(THIS_ long*) PURE;
|
||||||
|
STDMETHOD(GetCurrentMode)(THIS_ long*) PURE;
|
||||||
|
STDMETHOD(GetMessageDrain)(THIS_ HWND*) PURE;
|
||||||
|
STDMETHOD(GetModeInfo)(THIS_ long,long*,long*,long*) PURE;
|
||||||
|
STDMETHOD(GetMonitor)(THIS_ long*) PURE;
|
||||||
|
STDMETHOD(HideOnDeactivate)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(IsHideOnDeactivate)(THIS) PURE;
|
||||||
|
STDMETHOD(IsKeepPixelAspectRatio)(THIS_ long*) PURE;
|
||||||
|
STDMETHOD(IsModeAvailable)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(IsModeEnabled)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(KeepPixelAspectRatio)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(SetAcceleratorTable)(THIS_ HWND,HACCEL) PURE;
|
||||||
|
STDMETHOD(SetCaption)(THIS_ BSTR) PURE;
|
||||||
|
STDMETHOD(SetClipFactor)(THIS_ long) PURE;
|
||||||
|
STDMETHOD(SetDefault)(THIS) PURE;
|
||||||
|
STDMETHOD(SetEnabled)(THIS_ long,long) PURE;
|
||||||
|
STDMETHOD(SetMessageDrain)(THIS_ HWND) PURE;
|
||||||
|
STDMETHOD(SetMonitor)(THIS_ long) PURE;
|
||||||
|
};
|
||||||
|
#undef INTERFACE
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,432 @@
|
||||||
|
/* ANSI and traditional C compatability macros
|
||||||
|
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||||
|
2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
|
||||||
|
Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
|
/* ANSI and traditional C compatibility macros
|
||||||
|
|
||||||
|
ANSI C is assumed if __STDC__ is #defined.
|
||||||
|
|
||||||
|
Macro ANSI C definition Traditional C definition
|
||||||
|
----- ---- - ---------- ----------- - ----------
|
||||||
|
ANSI_PROTOTYPES 1 not defined
|
||||||
|
PTR `void *' `char *'
|
||||||
|
PTRCONST `void *const' `char *'
|
||||||
|
LONG_DOUBLE `long double' `double'
|
||||||
|
const not defined `'
|
||||||
|
volatile not defined `'
|
||||||
|
signed not defined `'
|
||||||
|
VA_START(ap, var) va_start(ap, var) va_start(ap)
|
||||||
|
|
||||||
|
Note that it is safe to write "void foo();" indicating a function
|
||||||
|
with no return value, in all K+R compilers we have been able to test.
|
||||||
|
|
||||||
|
For declaring functions with prototypes, we also provide these:
|
||||||
|
|
||||||
|
PARAMS ((prototype))
|
||||||
|
-- for functions which take a fixed number of arguments. Use this
|
||||||
|
when declaring the function. When defining the function, write a
|
||||||
|
K+R style argument list. For example:
|
||||||
|
|
||||||
|
char *strcpy PARAMS ((char *dest, char *source));
|
||||||
|
...
|
||||||
|
char *
|
||||||
|
strcpy (dest, source)
|
||||||
|
char *dest;
|
||||||
|
char *source;
|
||||||
|
{ ... }
|
||||||
|
|
||||||
|
|
||||||
|
VPARAMS ((prototype, ...))
|
||||||
|
-- for functions which take a variable number of arguments. Use
|
||||||
|
PARAMS to declare the function, VPARAMS to define it. For example:
|
||||||
|
|
||||||
|
int printf PARAMS ((const char *format, ...));
|
||||||
|
...
|
||||||
|
int
|
||||||
|
printf VPARAMS ((const char *format, ...))
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
For writing functions which take variable numbers of arguments, we
|
||||||
|
also provide the VA_OPEN, VA_CLOSE, and VA_FIXEDARG macros. These
|
||||||
|
hide the differences between K+R <varargs.h> and C89 <stdarg.h> more
|
||||||
|
thoroughly than the simple VA_START() macro mentioned above.
|
||||||
|
|
||||||
|
VA_OPEN and VA_CLOSE are used *instead of* va_start and va_end.
|
||||||
|
Immediately after VA_OPEN, put a sequence of VA_FIXEDARG calls
|
||||||
|
corresponding to the list of fixed arguments. Then use va_arg
|
||||||
|
normally to get the variable arguments, or pass your va_list object
|
||||||
|
around. You do not declare the va_list yourself; VA_OPEN does it
|
||||||
|
for you.
|
||||||
|
|
||||||
|
Here is a complete example:
|
||||||
|
|
||||||
|
int
|
||||||
|
printf VPARAMS ((const char *format, ...))
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
VA_OPEN (ap, format);
|
||||||
|
VA_FIXEDARG (ap, const char *, format);
|
||||||
|
|
||||||
|
result = vfprintf (stdout, format, ap);
|
||||||
|
VA_CLOSE (ap);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
You can declare variables either before or after the VA_OPEN,
|
||||||
|
VA_FIXEDARG sequence. Also, VA_OPEN and VA_CLOSE are the beginning
|
||||||
|
and end of a block. They must appear at the same nesting level,
|
||||||
|
and any variables declared after VA_OPEN go out of scope at
|
||||||
|
VA_CLOSE. Unfortunately, with a K+R compiler, that includes the
|
||||||
|
argument list. You can have multiple instances of VA_OPEN/VA_CLOSE
|
||||||
|
pairs in a single function in case you need to traverse the
|
||||||
|
argument list more than once.
|
||||||
|
|
||||||
|
For ease of writing code which uses GCC extensions but needs to be
|
||||||
|
portable to other compilers, we provide the GCC_VERSION macro that
|
||||||
|
simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
|
||||||
|
wrappers around __attribute__. Also, __extension__ will be #defined
|
||||||
|
to nothing if it doesn't work. See below.
|
||||||
|
|
||||||
|
This header also defines a lot of obsolete macros:
|
||||||
|
CONST, VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID,
|
||||||
|
AND, DOTS, NOARGS. Don't use them. */
|
||||||
|
|
||||||
|
#ifndef _ANSIDECL_H
|
||||||
|
#define _ANSIDECL_H 1
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Every source file includes this file,
|
||||||
|
so they will all get the switch for lint. */
|
||||||
|
/* LINTLIBRARY */
|
||||||
|
|
||||||
|
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
|
||||||
|
older preprocessors. Thus we can't define something like this:
|
||||||
|
|
||||||
|
#define HAVE_GCC_VERSION(MAJOR, MINOR) \
|
||||||
|
(__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
|
||||||
|
|
||||||
|
and then test "#if HAVE_GCC_VERSION(2,7)".
|
||||||
|
|
||||||
|
So instead we use the macro below and test it against specific values. */
|
||||||
|
|
||||||
|
/* This macro simplifies testing whether we are using gcc, and if it
|
||||||
|
is of a particular minimum version. (Both major & minor numbers are
|
||||||
|
significant.) This macro will evaluate to 0 if we are not using
|
||||||
|
gcc at all. */
|
||||||
|
#ifndef GCC_VERSION
|
||||||
|
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||||
|
#endif /* GCC_VERSION */
|
||||||
|
|
||||||
|
#if defined (__STDC__) || defined(__cplusplus) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
|
||||||
|
/* All known AIX compilers implement these things (but don't always
|
||||||
|
define __STDC__). The RISC/OS MIPS compiler defines these things
|
||||||
|
in SVR4 mode, but does not define __STDC__. */
|
||||||
|
/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
|
||||||
|
C++ compilers, does not define __STDC__, though it acts as if this
|
||||||
|
was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
|
||||||
|
|
||||||
|
#define ANSI_PROTOTYPES 1
|
||||||
|
#define PTR void *
|
||||||
|
#define PTRCONST void *const
|
||||||
|
#define LONG_DOUBLE long double
|
||||||
|
|
||||||
|
/* PARAMS is often defined elsewhere (e.g. by libintl.h), so wrap it in
|
||||||
|
a #ifndef. */
|
||||||
|
#ifndef PARAMS
|
||||||
|
#define PARAMS(ARGS) ARGS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define VPARAMS(ARGS) ARGS
|
||||||
|
#define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR)
|
||||||
|
|
||||||
|
/* variadic function helper macros */
|
||||||
|
/* "struct Qdmy" swallows the semicolon after VA_OPEN/VA_FIXEDARG's
|
||||||
|
use without inhibiting further decls and without declaring an
|
||||||
|
actual variable. */
|
||||||
|
#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP, VAR); { struct Qdmy
|
||||||
|
#define VA_CLOSE(AP) } va_end(AP); }
|
||||||
|
#define VA_FIXEDARG(AP, T, N) struct Qdmy
|
||||||
|
|
||||||
|
#undef const
|
||||||
|
#undef volatile
|
||||||
|
#undef signed
|
||||||
|
|
||||||
|
/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
|
||||||
|
it too, but it's not in C89. */
|
||||||
|
#undef inline
|
||||||
|
#if __STDC_VERSION__ >= 199901L || defined(__cplusplus) || (defined(__SUNPRO_C) && defined(__C99FEATURES__))
|
||||||
|
/* it's a keyword */
|
||||||
|
#else
|
||||||
|
# if GCC_VERSION >= 2007
|
||||||
|
# define inline __inline__ /* __inline__ prevents -pedantic warnings */
|
||||||
|
# else
|
||||||
|
# define inline /* nothing */
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* These are obsolete. Do not use. */
|
||||||
|
#ifndef IN_GCC
|
||||||
|
#define CONST const
|
||||||
|
#define VOLATILE volatile
|
||||||
|
#define SIGNED signed
|
||||||
|
|
||||||
|
#define PROTO(type, name, arglist) type name arglist
|
||||||
|
#define EXFUN(name, proto) name proto
|
||||||
|
#define DEFUN(name, arglist, args) name(args)
|
||||||
|
#define DEFUN_VOID(name) name(void)
|
||||||
|
#define AND ,
|
||||||
|
#define DOTS , ...
|
||||||
|
#define NOARGS void
|
||||||
|
#endif /* ! IN_GCC */
|
||||||
|
|
||||||
|
#else /* Not ANSI C. */
|
||||||
|
|
||||||
|
#undef ANSI_PROTOTYPES
|
||||||
|
#define PTR char *
|
||||||
|
#define PTRCONST PTR
|
||||||
|
#define LONG_DOUBLE double
|
||||||
|
|
||||||
|
#define PARAMS(args) ()
|
||||||
|
#define VPARAMS(args) (va_alist) va_dcl
|
||||||
|
#define VA_START(va_list, var) va_start(va_list)
|
||||||
|
|
||||||
|
#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP); { struct Qdmy
|
||||||
|
#define VA_CLOSE(AP) } va_end(AP); }
|
||||||
|
#define VA_FIXEDARG(AP, TYPE, NAME) TYPE NAME = va_arg(AP, TYPE)
|
||||||
|
|
||||||
|
/* some systems define these in header files for non-ansi mode */
|
||||||
|
#undef const
|
||||||
|
#undef volatile
|
||||||
|
#undef signed
|
||||||
|
#undef inline
|
||||||
|
#define const
|
||||||
|
#define volatile
|
||||||
|
#define signed
|
||||||
|
#define inline
|
||||||
|
|
||||||
|
#ifndef IN_GCC
|
||||||
|
#define CONST
|
||||||
|
#define VOLATILE
|
||||||
|
#define SIGNED
|
||||||
|
|
||||||
|
#define PROTO(type, name, arglist) type name ()
|
||||||
|
#define EXFUN(name, proto) name()
|
||||||
|
#define DEFUN(name, arglist, args) name arglist args;
|
||||||
|
#define DEFUN_VOID(name) name()
|
||||||
|
#define AND ;
|
||||||
|
#define DOTS
|
||||||
|
#define NOARGS
|
||||||
|
#endif /* ! IN_GCC */
|
||||||
|
|
||||||
|
#endif /* ANSI C. */
|
||||||
|
|
||||||
|
/* Define macros for some gcc attributes. This permits us to use the
|
||||||
|
macros freely, and know that they will come into play for the
|
||||||
|
version of gcc in which they are supported. */
|
||||||
|
|
||||||
|
#if (GCC_VERSION < 2007)
|
||||||
|
# define __attribute__(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
|
||||||
|
#ifndef ATTRIBUTE_MALLOC
|
||||||
|
# if (GCC_VERSION >= 2096)
|
||||||
|
# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_MALLOC
|
||||||
|
# endif /* GNUC >= 2.96 */
|
||||||
|
#endif /* ATTRIBUTE_MALLOC */
|
||||||
|
|
||||||
|
/* Attributes on labels were valid as of gcc 2.93 and g++ 4.5. For
|
||||||
|
g++ an attribute on a label must be followed by a semicolon. */
|
||||||
|
#ifndef ATTRIBUTE_UNUSED_LABEL
|
||||||
|
# ifndef __cplusplus
|
||||||
|
# if GCC_VERSION >= 2093
|
||||||
|
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_UNUSED_LABEL
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# if GCC_VERSION >= 4005
|
||||||
|
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED ;
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_UNUSED_LABEL
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ATTRIBUTE_UNUSED
|
||||||
|
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||||
|
#endif /* ATTRIBUTE_UNUSED */
|
||||||
|
|
||||||
|
/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the
|
||||||
|
identifier name. */
|
||||||
|
#if ! defined(__cplusplus) || (GCC_VERSION >= 3004)
|
||||||
|
# define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED
|
||||||
|
#else /* !__cplusplus || GNUC >= 3.4 */
|
||||||
|
# define ARG_UNUSED(NAME) NAME
|
||||||
|
#endif /* !__cplusplus || GNUC >= 3.4 */
|
||||||
|
|
||||||
|
#ifndef ATTRIBUTE_NORETURN
|
||||||
|
#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
|
||||||
|
#endif /* ATTRIBUTE_NORETURN */
|
||||||
|
|
||||||
|
/* Attribute `nonnull' was valid as of gcc 3.3. */
|
||||||
|
#ifndef ATTRIBUTE_NONNULL
|
||||||
|
# if (GCC_VERSION >= 3003)
|
||||||
|
# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_NONNULL(m)
|
||||||
|
# endif /* GNUC >= 3.3 */
|
||||||
|
#endif /* ATTRIBUTE_NONNULL */
|
||||||
|
|
||||||
|
/* Attribute `pure' was valid as of gcc 3.0. */
|
||||||
|
#ifndef ATTRIBUTE_PURE
|
||||||
|
# if (GCC_VERSION >= 3000)
|
||||||
|
# define ATTRIBUTE_PURE __attribute__ ((__pure__))
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_PURE
|
||||||
|
# endif /* GNUC >= 3.0 */
|
||||||
|
#endif /* ATTRIBUTE_PURE */
|
||||||
|
|
||||||
|
/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL.
|
||||||
|
This was the case for the `printf' format attribute by itself
|
||||||
|
before GCC 3.3, but as of 3.3 we need to add the `nonnull'
|
||||||
|
attribute to retain this behavior. */
|
||||||
|
#ifndef ATTRIBUTE_PRINTF
|
||||||
|
#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m)
|
||||||
|
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
|
||||||
|
#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
|
||||||
|
#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
|
||||||
|
#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
|
||||||
|
#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
|
||||||
|
#endif /* ATTRIBUTE_PRINTF */
|
||||||
|
|
||||||
|
/* Use ATTRIBUTE_FPTR_PRINTF when the format attribute is to be set on
|
||||||
|
a function pointer. Format attributes were allowed on function
|
||||||
|
pointers as of gcc 3.1. */
|
||||||
|
#ifndef ATTRIBUTE_FPTR_PRINTF
|
||||||
|
# if (GCC_VERSION >= 3001)
|
||||||
|
# define ATTRIBUTE_FPTR_PRINTF(m, n) ATTRIBUTE_PRINTF(m, n)
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_FPTR_PRINTF(m, n)
|
||||||
|
# endif /* GNUC >= 3.1 */
|
||||||
|
# define ATTRIBUTE_FPTR_PRINTF_1 ATTRIBUTE_FPTR_PRINTF(1, 2)
|
||||||
|
# define ATTRIBUTE_FPTR_PRINTF_2 ATTRIBUTE_FPTR_PRINTF(2, 3)
|
||||||
|
# define ATTRIBUTE_FPTR_PRINTF_3 ATTRIBUTE_FPTR_PRINTF(3, 4)
|
||||||
|
# define ATTRIBUTE_FPTR_PRINTF_4 ATTRIBUTE_FPTR_PRINTF(4, 5)
|
||||||
|
# define ATTRIBUTE_FPTR_PRINTF_5 ATTRIBUTE_FPTR_PRINTF(5, 6)
|
||||||
|
#endif /* ATTRIBUTE_FPTR_PRINTF */
|
||||||
|
|
||||||
|
/* Use ATTRIBUTE_NULL_PRINTF when the format specifier may be NULL. A
|
||||||
|
NULL format specifier was allowed as of gcc 3.3. */
|
||||||
|
#ifndef ATTRIBUTE_NULL_PRINTF
|
||||||
|
# if (GCC_VERSION >= 3003)
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF(m, n)
|
||||||
|
# endif /* GNUC >= 3.3 */
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF_1 ATTRIBUTE_NULL_PRINTF(1, 2)
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF_2 ATTRIBUTE_NULL_PRINTF(2, 3)
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF_3 ATTRIBUTE_NULL_PRINTF(3, 4)
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF_4 ATTRIBUTE_NULL_PRINTF(4, 5)
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6)
|
||||||
|
#endif /* ATTRIBUTE_NULL_PRINTF */
|
||||||
|
|
||||||
|
/* Attribute `sentinel' was valid as of gcc 3.5. */
|
||||||
|
#ifndef ATTRIBUTE_SENTINEL
|
||||||
|
# if (GCC_VERSION >= 3005)
|
||||||
|
# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_SENTINEL
|
||||||
|
# endif /* GNUC >= 3.5 */
|
||||||
|
#endif /* ATTRIBUTE_SENTINEL */
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ATTRIBUTE_ALIGNED_ALIGNOF
|
||||||
|
# if (GCC_VERSION >= 3000)
|
||||||
|
# define ATTRIBUTE_ALIGNED_ALIGNOF(m) __attribute__ ((__aligned__ (__alignof__ (m))))
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_ALIGNED_ALIGNOF(m)
|
||||||
|
# endif /* GNUC >= 3.0 */
|
||||||
|
#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */
|
||||||
|
|
||||||
|
/* Useful for structures whose layout must much some binary specification
|
||||||
|
regardless of the alignment and padding qualities of the compiler. */
|
||||||
|
#ifndef ATTRIBUTE_PACKED
|
||||||
|
# define ATTRIBUTE_PACKED __attribute__ ((packed))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Attribute `hot' and `cold' was valid as of gcc 4.3. */
|
||||||
|
#ifndef ATTRIBUTE_COLD
|
||||||
|
# if (GCC_VERSION >= 4003)
|
||||||
|
# define ATTRIBUTE_COLD __attribute__ ((__cold__))
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_COLD
|
||||||
|
# endif /* GNUC >= 4.3 */
|
||||||
|
#endif /* ATTRIBUTE_COLD */
|
||||||
|
#ifndef ATTRIBUTE_HOT
|
||||||
|
# if (GCC_VERSION >= 4003)
|
||||||
|
# define ATTRIBUTE_HOT __attribute__ ((__hot__))
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_HOT
|
||||||
|
# endif /* GNUC >= 4.3 */
|
||||||
|
#endif /* ATTRIBUTE_HOT */
|
||||||
|
|
||||||
|
/* We use __extension__ in some places to suppress -pedantic warnings
|
||||||
|
about GCC extensions. This feature didn't work properly before
|
||||||
|
gcc 2.8. */
|
||||||
|
#if GCC_VERSION < 2008
|
||||||
|
#define __extension__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* This is used to declare a const variable which should be visible
|
||||||
|
outside of the current compilation unit. Use it as
|
||||||
|
EXPORTED_CONST int i = 1;
|
||||||
|
This is because the semantics of const are different in C and C++.
|
||||||
|
"extern const" is permitted in C but it looks strange, and gcc
|
||||||
|
warns about it when -Wc++-compat is not used. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#define EXPORTED_CONST extern const
|
||||||
|
#else
|
||||||
|
#define EXPORTED_CONST const
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Be conservative and only use enum bitfields with GCC.
|
||||||
|
FIXME: provide a complete autoconf test for buggy enum bitfields. */
|
||||||
|
|
||||||
|
#if (GCC_VERSION > 2000)
|
||||||
|
#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
|
||||||
|
#else
|
||||||
|
#define ENUM_BITFIELD(TYPE) unsigned int
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ansidecl.h */
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
* assert.h
|
||||||
|
* This file has no copyright assigned and is placed in the Public Domain.
|
||||||
|
* This file is a part of the mingw-runtime package.
|
||||||
|
* No warranty is given; refer to the file DISCLAIMER within the package.
|
||||||
|
*
|
||||||
|
* Define the assert macro for debug output.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* We should be able to include this file multiple times to allow the assert
|
||||||
|
macro to be enabled/disabled for different parts of code. So don't add a
|
||||||
|
header guard. */
|
||||||
|
|
||||||
|
#ifndef RC_INVOKED
|
||||||
|
|
||||||
|
/* All the headers include this file. */
|
||||||
|
#include <_mingw.h>
|
||||||
|
|
||||||
|
#undef assert
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef NDEBUG
|
||||||
|
/*
|
||||||
|
* If not debugging, assert does nothing.
|
||||||
|
*/
|
||||||
|
#define assert(x) ((void)0)
|
||||||
|
|
||||||
|
#else /* debugging enabled */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CRTDLL nicely supplies a function which does the actual output and
|
||||||
|
* call to abort.
|
||||||
|
*/
|
||||||
|
_CRTIMP void __cdecl __MINGW_NOTHROW _assert (const char*, const char*, int) __MINGW_ATTRIB_NORETURN;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Definition of the assert macro.
|
||||||
|
*/
|
||||||
|
#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
|
||||||
|
|
||||||
|
#endif /* NDEBUG */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* Not RC_INVOKED */
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
#ifndef _AUDEVCOD_H
|
||||||
|
#define _AUDEVCOD_H
|
||||||
|
#if __GNUC__ >=3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef enum _tagSND_DEVICE_ERROR {
|
||||||
|
SNDDEV_ERROR_Open = 1,
|
||||||
|
SNDDEV_ERROR_Close = 2,
|
||||||
|
SNDDEV_ERROR_GetCaps = 3,
|
||||||
|
SNDDEV_ERROR_PrepareHeader = 4,
|
||||||
|
SNDDEV_ERROR_UnprepareHeader = 5,
|
||||||
|
SNDDEV_ERROR_Reset = 6,
|
||||||
|
SNDDEV_ERROR_Restart = 7,
|
||||||
|
SNDDEV_ERROR_GetPosition = 8,
|
||||||
|
SNDDEV_ERROR_Write = 9,
|
||||||
|
SNDDEV_ERROR_Pause = 10,
|
||||||
|
SNDDEV_ERROR_Stop = 11,
|
||||||
|
SNDDEV_ERROR_Start = 12,
|
||||||
|
SNDDEV_ERROR_AddBuffer = 13,
|
||||||
|
SNDDEV_ERROR_Query = 14
|
||||||
|
} SNDDEV_ERR;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
#ifndef _AVIRIFF_H
|
||||||
|
#define _AVIRIFF_H
|
||||||
|
#if __GNUC__ >=3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _MMSYSTEM_H
|
||||||
|
#include <mmsystem.h>
|
||||||
|
#endif
|
||||||
|
#ifndef _WINGDI_H
|
||||||
|
#include <wingdi.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*--- DirectShow Reference - DirectShow Structures */
|
||||||
|
typedef struct _avimainheader {
|
||||||
|
FOURCC fcc;
|
||||||
|
DWORD cb;
|
||||||
|
DWORD dwMicroSecPerFrame;
|
||||||
|
DWORD dwMaxBytesPerSec;
|
||||||
|
DWORD dwPaddingGranularity;
|
||||||
|
DWORD dwFlags;
|
||||||
|
DWORD dwTotalFrames;
|
||||||
|
DWORD dwInitialFrames;
|
||||||
|
DWORD dwStreams;
|
||||||
|
DWORD dwSuggestedBufferSize;
|
||||||
|
DWORD dwWidth;
|
||||||
|
DWORD dwHeight;
|
||||||
|
DWORD dwReserved[4];
|
||||||
|
} AVIMAINHEADER;
|
||||||
|
#define AVIF_COPYRIGHTED 0x00020000
|
||||||
|
#define AVIF_HASINDEX 0x00000010
|
||||||
|
#define AVIF_ISINTERLEAVED 0x00000100
|
||||||
|
#define AVIF_MUSTUSEINDEX 0x00000020
|
||||||
|
#define AVIF_WASCAPTUREFILE 0x00010000
|
||||||
|
typedef struct _avioldindex {
|
||||||
|
FOURCC fcc;
|
||||||
|
DWORD cb;
|
||||||
|
struct _avioldindex_entry {
|
||||||
|
DWORD dwChunkId;
|
||||||
|
DWORD dwFlags;
|
||||||
|
DWORD dwOffset;
|
||||||
|
DWORD dwSize;
|
||||||
|
} aIndex[];
|
||||||
|
} AVIOLDINDEX;
|
||||||
|
#define AVIIF_LIST 0x00000001
|
||||||
|
#define AVIIF_KEYFRAME 0x00000010
|
||||||
|
#define AVIIF_NO_TIME 0x00000100
|
||||||
|
typedef struct {
|
||||||
|
BYTE bFirstEntry;
|
||||||
|
BYTE bNumEntries;
|
||||||
|
WORD wFlags;
|
||||||
|
PALETTEENTRY peNew[];
|
||||||
|
} AVIPALCHANGE;
|
||||||
|
typedef struct _avistreamheader {
|
||||||
|
FOURCC fcc;
|
||||||
|
DWORD cb;
|
||||||
|
FOURCC fccType;
|
||||||
|
FOURCC fccHandler;
|
||||||
|
DWORD dwFlags;
|
||||||
|
WORD wPriority;
|
||||||
|
WORD wLanguage;
|
||||||
|
DWORD dwInitialFrames;
|
||||||
|
DWORD dwScale;
|
||||||
|
DWORD dwRate;
|
||||||
|
DWORD dwStart;
|
||||||
|
DWORD dwLength;
|
||||||
|
DWORD dwSuggestedBufferSize;
|
||||||
|
DWORD dwQuality;
|
||||||
|
DWORD dwSampleSize;
|
||||||
|
struct {
|
||||||
|
short int left;
|
||||||
|
short int top;
|
||||||
|
short int right;
|
||||||
|
short int bottom;
|
||||||
|
} rcFrame;
|
||||||
|
} AVISTREAMHEADER;
|
||||||
|
#define AVISF_DISABLED 0x00000001
|
||||||
|
#define AVISF_VIDEO_PALCHANGES 0x00010000
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
#ifndef _AYGSHELL_H
|
||||||
|
#define _AYGSHELL_H
|
||||||
|
#if __GNUC__ >=3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if _WIN32_WCE >= 400
|
||||||
|
|
||||||
|
#include <windef.h> /* shellapi needs this */
|
||||||
|
#include <basetyps.h>
|
||||||
|
#include <shellapi.h> /* for WINSHELLAPI */
|
||||||
|
|
||||||
|
typedef struct tagSHMENUBARINFO {
|
||||||
|
DWORD cbSize;
|
||||||
|
HWND hwndParent;
|
||||||
|
DWORD dwFlags;
|
||||||
|
UINT nToolBarId;
|
||||||
|
HINSTANCE hInstRes;
|
||||||
|
int nBmpId;
|
||||||
|
int cBmpImages;
|
||||||
|
HWND hwndMB;
|
||||||
|
COLORREF clrBk;
|
||||||
|
} SHMENUBARINFO, *PSHMENUBARINFO;
|
||||||
|
|
||||||
|
typedef struct tagSHACTIVATEINFO {
|
||||||
|
DWORD cbSize;
|
||||||
|
HWND hwndLastFocus;
|
||||||
|
UINT fSipUp :1;
|
||||||
|
UINT fSipOnDeactivation :1;
|
||||||
|
UINT fActive :1;
|
||||||
|
UINT fReserved :29;
|
||||||
|
} SHACTIVATEINFO, *PSHACTIVATEINFO;
|
||||||
|
|
||||||
|
WINSHELLAPI BOOL WINAPI SHCreateMenuBar(SHMENUBARINFO*);
|
||||||
|
WINSHELLAPI HWND WINAPI SHFindMenuBar(HWND);
|
||||||
|
WINSHELLAPI HRESULT WINAPI SHCreateNewItem(HWND,REFCLSID);
|
||||||
|
WINSHELLAPI BOOL WINAPI SHFullScreen(HWND,DWORD);
|
||||||
|
WINSHELLAPI BOOL WINAPI SHSipInfo(UINT,UINT,PVOID,UINT);
|
||||||
|
/* next exported by ordinal only: @84 */
|
||||||
|
WINSHELLAPI BOOL WINAPI SHHandleWMActivate(HWND,WPARAM,LPARAM,SHACTIVATEINFO*,DWORD);
|
||||||
|
/* next exported by ordinal only: @83 */
|
||||||
|
WINSHELLAPI BOOL WINAPI SHHandleWMSettingChange(HWND,WPARAM,LPARAM,SHACTIVATEINFO*);
|
||||||
|
|
||||||
|
/* The following are not in device ROMs. */
|
||||||
|
extern BOOL SHInvokeContextMenuCommand(HWND,UINT,HANDLE);
|
||||||
|
|
||||||
|
#endif /* _WIN32_WCE >= 400 */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,123 @@
|
||||||
|
#ifndef _BASETSD_H
|
||||||
|
#define _BASETSD_H
|
||||||
|
#if __GNUC__ >=3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#ifndef __int64
|
||||||
|
#define __int64 long long
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_WIN64)
|
||||||
|
#define __int3264 __int64
|
||||||
|
#define ADDRESS_TAG_BIT 0x40000000000UI64
|
||||||
|
#else /* !_WIN64 */
|
||||||
|
#define __int3264 __int32
|
||||||
|
#define ADDRESS_TAG_BIT 0x80000000UL
|
||||||
|
#define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
|
||||||
|
#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
|
||||||
|
#define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
|
||||||
|
#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
|
||||||
|
#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
|
||||||
|
#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
|
||||||
|
#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
|
||||||
|
#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
|
||||||
|
#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
|
||||||
|
#define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
|
||||||
|
#define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
|
||||||
|
#define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
|
||||||
|
#define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
|
||||||
|
#endif /* !_WIN64 */
|
||||||
|
|
||||||
|
#define UlongToPtr(ul) ULongToPtr(ul)
|
||||||
|
#define UintToPtr(ui) UIntToPtr(ui)
|
||||||
|
#define MAXUINT_PTR (~((UINT_PTR)0))
|
||||||
|
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
|
||||||
|
#define MININT_PTR (~MAXINT_PTR)
|
||||||
|
#define MAXULONG_PTR (~((ULONG_PTR)0))
|
||||||
|
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
|
||||||
|
#define MINLONG_PTR (~MAXLONG_PTR)
|
||||||
|
#define MAXUHALF_PTR ((UHALF_PTR)~0)
|
||||||
|
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
|
||||||
|
#define MINHALF_PTR (~MAXHALF_PTR)
|
||||||
|
|
||||||
|
#ifndef RC_INVOKED
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
typedef signed char INT8;
|
||||||
|
typedef signed short INT16;
|
||||||
|
typedef int LONG32, *PLONG32;
|
||||||
|
#ifndef XFree86Server
|
||||||
|
typedef int INT32, *PINT32;
|
||||||
|
#endif /* ndef XFree86Server */
|
||||||
|
typedef unsigned char UINT8;
|
||||||
|
typedef unsigned short UINT16;
|
||||||
|
typedef unsigned int ULONG32, *PULONG32;
|
||||||
|
typedef unsigned int DWORD32, *PDWORD32;
|
||||||
|
typedef unsigned int UINT32, *PUINT32;
|
||||||
|
|
||||||
|
#if defined(_WIN64)
|
||||||
|
typedef __int64 INT_PTR, *PINT_PTR;
|
||||||
|
typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
|
||||||
|
typedef __int64 LONG_PTR, *PLONG_PTR;
|
||||||
|
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
|
||||||
|
typedef unsigned __int64 HANDLE_PTR;
|
||||||
|
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
|
||||||
|
typedef int HALF_PTR, *PHALF_PTR;
|
||||||
|
|
||||||
|
#if 0 /* TODO when WIN64 is here */
|
||||||
|
inline unsigned long HandleToUlong(const void* h )
|
||||||
|
{ return((unsigned long) h ); }
|
||||||
|
inline long HandleToLong( const void* h )
|
||||||
|
{ return((long) h ); }
|
||||||
|
inline void* LongToHandle( const long h )
|
||||||
|
{ return((void*) (INT_PTR) h ); }
|
||||||
|
inline unsigned long PtrToUlong( const void* p)
|
||||||
|
{ return((unsigned long) p ); }
|
||||||
|
inline unsigned int PtrToUint( const void* p )
|
||||||
|
{ return((unsigned int) p ); }
|
||||||
|
inline unsigned short PtrToUshort( const void* p )
|
||||||
|
{ return((unsigned short) p ); }
|
||||||
|
inline long PtrToLong( const void* p )
|
||||||
|
{ return((long) p ); }
|
||||||
|
inline int PtrToInt( const void* p )
|
||||||
|
{ return((int) p ); }
|
||||||
|
inline short PtrToShort( const void* p )
|
||||||
|
{ return((short) p ); }
|
||||||
|
inline void* IntToPtr( const int i )
|
||||||
|
{ return( (void*)(INT_PTR)i ); }
|
||||||
|
inline void* UIntToPtr(const unsigned int ui)
|
||||||
|
{ return( (void*)(UINT_PTR)ui ); }
|
||||||
|
inline void* LongToPtr( const long l )
|
||||||
|
{ return( (void*)(LONG_PTR)l ); }
|
||||||
|
inline void* ULongToPtr( const unsigned long ul )
|
||||||
|
{ return( (void*)(ULONG_PTR)ul ); }
|
||||||
|
#endif /* 0_ */
|
||||||
|
|
||||||
|
#else /* !_WIN64 */
|
||||||
|
typedef int INT_PTR, *PINT_PTR;
|
||||||
|
typedef unsigned int UINT_PTR, *PUINT_PTR;
|
||||||
|
typedef long LONG_PTR, *PLONG_PTR;
|
||||||
|
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||||
|
typedef unsigned short UHALF_PTR, *PUHALF_PTR;
|
||||||
|
typedef short HALF_PTR, *PHALF_PTR;
|
||||||
|
typedef unsigned long HANDLE_PTR;
|
||||||
|
#endif /* !_WIN64 */
|
||||||
|
|
||||||
|
typedef ULONG_PTR SIZE_T, *PSIZE_T;
|
||||||
|
typedef LONG_PTR SSIZE_T, *PSSIZE_T;
|
||||||
|
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
|
||||||
|
typedef __int64 LONG64, *PLONG64;
|
||||||
|
typedef __int64 INT64, *PINT64;
|
||||||
|
typedef unsigned __int64 ULONG64, *PULONG64;
|
||||||
|
typedef unsigned __int64 DWORD64, *PDWORD64;
|
||||||
|
typedef unsigned __int64 UINT64, *PUINT64;
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* !RC_INVOKED */
|
||||||
|
|
||||||
|
#endif /* _BASETSD_H */
|
||||||
|
|
@ -0,0 +1,182 @@
|
||||||
|
#ifndef _BASETYPS_H
|
||||||
|
#define _BASETYPS_H
|
||||||
|
#if __GNUC__ >=3
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _OBJC_NO_COM_
|
||||||
|
# ifdef __cplusplus
|
||||||
|
# define EXTERN_C extern "C"
|
||||||
|
# else
|
||||||
|
# define EXTERN_C extern
|
||||||
|
# endif /* __cplusplus */
|
||||||
|
# ifndef __int64
|
||||||
|
# define __int64 long long
|
||||||
|
# endif
|
||||||
|
# ifndef __int32
|
||||||
|
# define __int32 long
|
||||||
|
# endif
|
||||||
|
# ifndef __int16
|
||||||
|
# define __int16 short
|
||||||
|
# endif
|
||||||
|
# ifndef __int8
|
||||||
|
# define __int8 char
|
||||||
|
# endif
|
||||||
|
# ifndef __small
|
||||||
|
# define __small char
|
||||||
|
# endif
|
||||||
|
# ifndef __hyper
|
||||||
|
# define __hyper long long
|
||||||
|
# endif
|
||||||
|
# define STDMETHODCALLTYPE __stdcall
|
||||||
|
# define STDMETHODVCALLTYPE __cdecl
|
||||||
|
# define STDAPICALLTYPE __stdcall
|
||||||
|
# define STDAPIVCALLTYPE __cdecl
|
||||||
|
# define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
|
||||||
|
# define STDAPI_(t) EXTERN_C t STDAPICALLTYPE
|
||||||
|
# define STDMETHODIMP HRESULT STDMETHODCALLTYPE
|
||||||
|
# define STDMETHODIMP_(t) t STDMETHODCALLTYPE
|
||||||
|
# define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
|
||||||
|
# define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE
|
||||||
|
# define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
|
||||||
|
# define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
|
||||||
|
/* Newer MS compilers support the __interface keyword, but
|
||||||
|
that has a specific meaning that is enforced by the compiler.
|
||||||
|
For now, just get 'interface' out of the global namespace
|
||||||
|
for __OBJC__ */
|
||||||
|
# define _COM_interface struct
|
||||||
|
# ifndef __OBJC__
|
||||||
|
# define interface _COM_interface
|
||||||
|
# endif
|
||||||
|
# if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
|
# define STDMETHOD(m) virtual HRESULT STDMETHODCALLTYPE m
|
||||||
|
# define STDMETHOD_(t,m) virtual t STDMETHODCALLTYPE m
|
||||||
|
# define PURE =0
|
||||||
|
# define THIS_
|
||||||
|
# define THIS void
|
||||||
|
/*
|
||||||
|
__attribute__((com_interface)) is obsolete in __GNUC__ >= 3
|
||||||
|
g++ vtables are now COM-compatible by default
|
||||||
|
*/
|
||||||
|
# if defined(__GNUC__) && __GNUC__ < 3 && !defined(NOCOMATTRIBUTE)
|
||||||
|
# define DECLARE_INTERFACE(i) _COM_interface __attribute__((com_interface)) i
|
||||||
|
# define DECLARE_INTERFACE_(i,b) _COM_interface __attribute__((com_interface)) i : public b
|
||||||
|
# else
|
||||||
|
# define DECLARE_INTERFACE(i) _COM_interface i
|
||||||
|
# define DECLARE_INTERFACE_(i,b) _COM_interface i : public b
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# define STDMETHOD(m) HRESULT(STDMETHODCALLTYPE *m)
|
||||||
|
# define STDMETHOD_(t,m) t(STDMETHODCALLTYPE *m)
|
||||||
|
# define PURE
|
||||||
|
# define THIS_ INTERFACE *,
|
||||||
|
# define THIS INTERFACE *
|
||||||
|
# ifndef CONST_VTABLE
|
||||||
|
# define CONST_VTABLE
|
||||||
|
# endif
|
||||||
|
# define DECLARE_INTERFACE(i) \
|
||||||
|
typedef _COM_interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; } i; \
|
||||||
|
typedef CONST_VTABLE struct i##Vtbl i##Vtbl; \
|
||||||
|
CONST_VTABLE struct i##Vtbl
|
||||||
|
# define DECLARE_INTERFACE_(i,b) DECLARE_INTERFACE(i)
|
||||||
|
# endif
|
||||||
|
# define BEGIN_INTERFACE
|
||||||
|
# define END_INTERFACE
|
||||||
|
|
||||||
|
# define FWD_DECL(i) typedef _COM_interface i i
|
||||||
|
# if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
|
# define IENUM_THIS(T)
|
||||||
|
# define IENUM_THIS_(T)
|
||||||
|
# else
|
||||||
|
# define IENUM_THIS(T) T*
|
||||||
|
# define IENUM_THIS_(T) T*,
|
||||||
|
# endif
|
||||||
|
# define DECLARE_ENUMERATOR_(I,T) \
|
||||||
|
DECLARE_INTERFACE_(I,IUnknown) \
|
||||||
|
{ \
|
||||||
|
STDMETHOD(QueryInterface)(IENUM_THIS_(I) REFIID,PVOID*) PURE; \
|
||||||
|
STDMETHOD_(ULONG,AddRef)(IENUM_THIS(I)) PURE; \
|
||||||
|
STDMETHOD_(ULONG,Release)(IENUM_THIS(I)) PURE; \
|
||||||
|
STDMETHOD(Next)(IENUM_THIS_(I) ULONG,T*,ULONG*) PURE; \
|
||||||
|
STDMETHOD(Skip)(IENUM_THIS_(I) ULONG) PURE; \
|
||||||
|
STDMETHOD(Reset)(IENUM_THIS(I)) PURE; \
|
||||||
|
STDMETHOD(Clone)(IENUM_THIS_(I) I**) PURE; \
|
||||||
|
}
|
||||||
|
# define DECLARE_ENUMERATOR(T) DECLARE_ENUMERATOR_(IEnum##T,T)
|
||||||
|
|
||||||
|
#endif /* _OBJC_NO_COM_ */
|
||||||
|
|
||||||
|
#ifdef _GUID_DEFINED
|
||||||
|
# warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ! (defined _GUID_DEFINED || defined GUID_DEFINED) /* also defined in winnt.h */
|
||||||
|
#define GUID_DEFINED
|
||||||
|
typedef struct _GUID
|
||||||
|
{
|
||||||
|
unsigned long Data1;
|
||||||
|
unsigned short Data2;
|
||||||
|
unsigned short Data3;
|
||||||
|
unsigned char Data4[8];
|
||||||
|
} GUID,*REFGUID,*LPGUID;
|
||||||
|
#endif /* GUID_DEFINED */
|
||||||
|
#ifndef UUID_DEFINED
|
||||||
|
#define UUID_DEFINED
|
||||||
|
typedef GUID UUID;
|
||||||
|
#endif /* UUID_DEFINED */
|
||||||
|
#ifndef __IID_DEFINED__
|
||||||
|
#define __IID_DEFINED__
|
||||||
|
typedef GUID IID;
|
||||||
|
#endif /* __IID_DEFINED__ */
|
||||||
|
typedef GUID CLSID;
|
||||||
|
typedef CLSID *LPCLSID;
|
||||||
|
typedef IID *LPIID;
|
||||||
|
typedef IID *REFIID;
|
||||||
|
typedef CLSID *REFCLSID;
|
||||||
|
typedef GUID FMTID;
|
||||||
|
typedef FMTID *REFFMTID;
|
||||||
|
typedef unsigned long error_status_t;
|
||||||
|
#define uuid_t UUID
|
||||||
|
typedef unsigned long PROPID;
|
||||||
|
|
||||||
|
#ifndef _REFGUID_DEFINED
|
||||||
|
#if defined (__cplusplus) && !defined (CINTERFACE)
|
||||||
|
#define REFGUID const GUID&
|
||||||
|
#define REFIID const IID&
|
||||||
|
#define REFCLSID const CLSID&
|
||||||
|
#define REFFMTID const FMTID&
|
||||||
|
#else
|
||||||
|
#define REFGUID const GUID* const
|
||||||
|
#define REFIID const IID* const
|
||||||
|
#define REFCLSID const CLSID* const
|
||||||
|
#define REFFMTID const FMTID* const
|
||||||
|
#endif
|
||||||
|
#define _REFGUID_DEFINED
|
||||||
|
#define _REFIID_DEFINED
|
||||||
|
#define _REFCLSID_DEFINED
|
||||||
|
#define _REFFMTID_DEFINED
|
||||||
|
#endif
|
||||||
|
#ifndef GUID_SECTION
|
||||||
|
#define GUID_SECTION ".text"
|
||||||
|
#endif
|
||||||
|
/* Explicit naming of .text section for readonly data is only
|
||||||
|
needed for older GGC (pre-2.95).
|
||||||
|
More recent (3.4) GCC puts readonly data in .rdata. */
|
||||||
|
#if defined (__GNUC__) && (__GNUC__ <= 2 && __GNUC_MINOR__ < 95)
|
||||||
|
#define GUID_SECT __attribute__ ((section (GUID_SECTION)))
|
||||||
|
#else
|
||||||
|
#define GUID_SECT
|
||||||
|
#endif
|
||||||
|
#if !defined(INITGUID) || (defined(INITGUID) && defined(__cplusplus))
|
||||||
|
#define GUID_EXT EXTERN_C
|
||||||
|
#else
|
||||||
|
#define GUID_EXT
|
||||||
|
#endif
|
||||||
|
#ifdef INITGUID
|
||||||
|
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
|
||||||
|
#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
|
||||||
|
#else
|
||||||
|
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n
|
||||||
|
#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||