gss-1.0.2/ 0000755 0000000 0000000 00000000000 11663555057 007272 5 0000000 0000000 gss-1.0.2/ABOUT-NLS 0000644 0000000 0000000 00000267133 11663554672 010457 0000000 0000000 1 Notes on the Free Translation Project
***************************************
Free software is going international! The Free Translation Project is
a way to get maintainers of free software, translators, and users all
together, so that free software will gradually become able to speak many
languages. A few packages already provide translations for their
messages.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
itself available at your nearest GNU archive site. But you do _not_
need to install GNU `gettext' prior to configuring, installing or using
this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work on translations can contact the appropriate team.
1.1 INSTALL Matters
===================
Some packages are "localizable" when properly installed; the programs
they contain can be made to speak your own native language. Most such
packages use GNU `gettext'. Other packages have their own ways to
internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system already
provides the GNU `gettext' functions. Installers may use special
options at configuration time for changing the default behaviour. The
command:
./configure --disable-nls
will _totally_ disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl' library
and will decide to use it. If not, you may have to to use the
`--with-libintl-prefix' option to tell `configure' where to look for it.
Internationalized packages usually have many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
together with the package. However, the environment variable `LINGUAS'
may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
1.2 Using This Package
======================
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
`LL_CC' combination. If you happen to have the `LC_ALL' or some other
`LC_xxx' environment variables set, you should unset them before
setting `LANG', otherwise the setting of `LANG' will not have the
desired effect. Here `LL' is an ISO 639 two-letter language code, and
`CC' is an ISO 3166 two-letter country code. For example, let's
suppose that you speak German and live in Germany. At the shell
prompt, merely execute `setenv LANG de_DE' (in `csh'),
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
This can be done from your `.login' or `.profile' file, once and for
all.
You might think that the country code specification is redundant.
But in fact, some languages have dialects in different countries. For
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
country code serves to distinguish the dialects.
The locale naming convention of `LL_CC', with `LL' denoting the
language and `CC' denoting the country, is the one use on systems based
on GNU libc. On other systems, some variations of this scheme are
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
locales supported by your system for your language by running the
command `locale -a | grep '^LL''.
Not all programs have translations for all languages. By default, an
English message is shown in place of a nonexistent translation. If you
understand other languages, you can set up a priority list of languages.
This is done through a different environment variable, called
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
for the purpose of message handling, but you still need to have `LANG'
set to the primary language; this is required by other parts of the
system libraries. For example, some Swedish users who would rather
read translations in German than English for when Swedish is not
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
Special advice for Norwegian users: The language code for Norwegian
bokma*l changed from `no' to `nb' recently (in 2003). During the
transition period, while some message catalogs for this language are
installed under `nb' and some older ones under `no', it's recommended
for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
older translations are used.
In the `LANGUAGE' environment variable, but not in the `LANG'
environment variable, `LL_CC' combinations can be abbreviated as `LL'
to denote the language's main dialect. For example, `de' is equivalent
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
(Portuguese as spoken in Portugal) in this context.
1.3 Translating Teams
=====================
For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translation team has its own mailing list. The up-to-date list of
teams can be found at the Free Translation Project's homepage,
`http://translationproject.org/', in the "Teams" area.
If you'd like to volunteer to _work_ at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is _not_ the same as the list itself, it has
`-request' appended. For example, speakers of Swedish can send a
message to `sv-request@li.org', having this message body:
subscribe
Keep in mind that team members are expected to participate
_actively_ in translations, or at solving translational difficulties,
rather than merely lurking around. If your team does not exist yet and
you want to start one, or if you are unsure about what to do or how to
get started, please write to `coordinator@translationproject.org' to
reach the coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology in use. Proven linguistic skills are praised more than
programming skills, here.
1.4 Available Packages
======================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of June
2010. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination, with a
translation percentage of at least 50%.
Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca
+--------------------------------------------------+
a2ps | [] [] |
aegis | |
ant-phone | |
anubis | |
aspell | [] [] |
bash | |
bfd | |
bibshelf | [] |
binutils | |
bison | |
bison-runtime | [] |
bluez-pin | [] [] |
bombono-dvd | |
buzztard | |
cflow | |
clisp | |
coreutils | [] [] |
cpio | |
cppi | |
cpplib | [] |
cryptsetup | |
dfarc | |
dialog | [] [] |
dico | |
diffutils | [] |
dink | |
doodle | |
e2fsprogs | [] |
enscript | [] |
exif | |
fetchmail | [] |
findutils | [] |
flex | [] |
freedink | |
gas | |
gawk | [] [] |
gcal | [] |
gcc | |
gettext-examples | [] [] [] [] |
gettext-runtime | [] [] |
gettext-tools | [] [] |
gip | [] |
gjay | |
gliv | [] |
glunarclock | [] [] |
gnubiff | |
gnucash | [] |
gnuedu | |
gnulib | |
gnunet | |
gnunet-gtk | |
gnutls | |
gold | |
gpe-aerial | |
gpe-beam | |
gpe-bluetooth | |
gpe-calendar | |
gpe-clock | [] |
gpe-conf | |
gpe-contacts | |
gpe-edit | |
gpe-filemanager | |
gpe-go | |
gpe-login | |
gpe-ownerinfo | [] |
gpe-package | |
gpe-sketchbook | |
gpe-su | [] |
gpe-taskmanager | [] |
gpe-timesheet | [] |
gpe-today | [] |
gpe-todo | |
gphoto2 | |
gprof | [] |
gpsdrive | |
gramadoir | |
grep | |
grub | [] [] |
gsasl | |
gss | |
gst-plugins-bad | [] |
gst-plugins-base | [] |
gst-plugins-good | [] |
gst-plugins-ugly | [] |
gstreamer | [] [] [] |
gtick | |
gtkam | [] |
gtkorphan | [] |
gtkspell | [] [] [] |
gutenprint | |
hello | [] |
help2man | |
hylafax | |
idutils | |
indent | [] [] |
iso_15924 | |
iso_3166 | [] [] [] [] [] [] [] |
iso_3166_2 | |
iso_4217 | |
iso_639 | [] [] [] [] |
iso_639_3 | |
jwhois | |
kbd | |
keytouch | [] |
keytouch-editor | |
keytouch-keyboa... | [] |
klavaro | [] |
latrine | |
ld | [] |
leafpad | [] [] |
libc | [] [] |
libexif | () |
libextractor | |
libgnutls | |
libgpewidget | |
libgpg-error | |
libgphoto2 | |
libgphoto2_port | |
libgsasl | |
libiconv | [] |
libidn | |
lifelines | |
liferea | [] [] |
lilypond | |
linkdr | [] |
lordsawar | |
lprng | |
lynx | [] |
m4 | |
mailfromd | |
mailutils | |
make | |
man-db | |
man-db-manpages | |
minicom | |
mkisofs | |
myserver | |
nano | [] [] |
opcodes | |
parted | |
pies | |
popt | |
psmisc | |
pspp | [] |
pwdutils | |
radius | [] |
recode | [] [] |
rosegarden | |
rpm | |
rush | |
sarg | |
screem | |
scrollkeeper | [] [] [] |
sed | [] [] |
sharutils | [] [] |
shishi | |
skencil | |
solfege | |
solfege-manual | |
soundtracker | |
sp | |
sysstat | |
tar | [] |
texinfo | |
tin | |
unicode-han-tra... | |
unicode-transla... | |
util-linux-ng | [] |
vice | |
vmm | |
vorbis-tools | |
wastesedge | |
wdiff | |
wget | [] [] |
wyslij-po | |
xchat | [] [] [] [] |
xdg-user-dirs | [] [] [] [] [] [] [] [] [] |
xkeyboard-config | [] [] |
+--------------------------------------------------+
af am an ar as ast az be be@latin bg bn_IN bs ca
6 0 1 2 3 19 1 10 3 28 3 1 38
crh cs da de el en en_GB en_ZA eo es et eu fa
+-------------------------------------------------+
a2ps | [] [] [] [] [] [] [] |
aegis | [] [] [] |
ant-phone | [] () |
anubis | [] [] |
aspell | [] [] [] [] [] |
bash | [] [] [] |
bfd | [] |
bibshelf | [] [] [] |
binutils | [] |
bison | [] [] |
bison-runtime | [] [] [] [] |
bluez-pin | [] [] [] [] [] [] |
bombono-dvd | [] |
buzztard | [] [] [] |
cflow | [] [] |
clisp | [] [] [] [] |
coreutils | [] [] [] [] |
cpio | |
cppi | |
cpplib | [] [] [] |
cryptsetup | [] |
dfarc | [] [] [] |
dialog | [] [] [] [] [] |
dico | |
diffutils | [] [] [] [] [] [] |
dink | [] [] [] |
doodle | [] |
e2fsprogs | [] [] [] |
enscript | [] [] [] |
exif | () [] [] |
fetchmail | [] [] () [] [] [] |
findutils | [] [] [] |
flex | [] [] |
freedink | [] [] [] |
gas | [] |
gawk | [] [] [] |
gcal | [] |
gcc | [] [] |
gettext-examples | [] [] [] [] |
gettext-runtime | [] [] [] [] |
gettext-tools | [] [] [] |
gip | [] [] [] [] |
gjay | [] |
gliv | [] [] [] |
glunarclock | [] [] |
gnubiff | () |
gnucash | [] () () () () |
gnuedu | [] [] |
gnulib | [] [] |
gnunet | |
gnunet-gtk | [] |
gnutls | [] [] |
gold | [] |
gpe-aerial | [] [] [] [] |
gpe-beam | [] [] [] [] |
gpe-bluetooth | [] [] |
gpe-calendar | [] |
gpe-clock | [] [] [] [] |
gpe-conf | [] [] [] |
gpe-contacts | [] [] [] |
gpe-edit | [] [] |
gpe-filemanager | [] [] [] |
gpe-go | [] [] [] [] |
gpe-login | [] [] |
gpe-ownerinfo | [] [] [] [] |
gpe-package | [] [] [] |
gpe-sketchbook | [] [] [] [] |
gpe-su | [] [] [] [] |
gpe-taskmanager | [] [] [] [] |
gpe-timesheet | [] [] [] [] |
gpe-today | [] [] [] [] |
gpe-todo | [] [] [] |
gphoto2 | [] [] () [] [] [] |
gprof | [] [] [] |
gpsdrive | [] [] [] |
gramadoir | [] [] [] |
grep | [] |
grub | [] [] |
gsasl | [] |
gss | |
gst-plugins-bad | [] [] [] [] [] |
gst-plugins-base | [] [] [] [] [] |
gst-plugins-good | [] [] [] [] [] [] |
gst-plugins-ugly | [] [] [] [] [] [] |
gstreamer | [] [] [] [] [] |
gtick | [] () [] |
gtkam | [] [] () [] [] |
gtkorphan | [] [] [] [] |
gtkspell | [] [] [] [] [] [] [] |
gutenprint | [] [] [] |
hello | [] [] [] [] |
help2man | [] |
hylafax | [] [] |
idutils | [] [] |
indent | [] [] [] [] [] [] [] |
iso_15924 | [] () [] [] |
iso_3166 | [] [] [] [] () [] [] [] () |
iso_3166_2 | () |
iso_4217 | [] [] [] () [] [] |
iso_639 | [] [] [] [] () [] [] |
iso_639_3 | [] |
jwhois | [] |
kbd | [] [] [] [] [] |
keytouch | [] [] |
keytouch-editor | [] [] |
keytouch-keyboa... | [] |
klavaro | [] [] [] [] |
latrine | [] () |
ld | [] [] |
leafpad | [] [] [] [] [] [] |
libc | [] [] [] [] |
libexif | [] [] () |
libextractor | |
libgnutls | [] |
libgpewidget | [] [] |
libgpg-error | [] [] |
libgphoto2 | [] () |
libgphoto2_port | [] () [] |
libgsasl | |
libiconv | [] [] [] [] [] |
libidn | [] [] [] |
lifelines | [] () |
liferea | [] [] [] [] [] |
lilypond | [] [] [] |
linkdr | [] [] [] |
lordsawar | [] |
lprng | |
lynx | [] [] [] [] |
m4 | [] [] [] [] |
mailfromd | |
mailutils | [] |
make | [] [] [] |
man-db | |
man-db-manpages | |
minicom | [] [] [] [] |
mkisofs | |
myserver | |
nano | [] [] [] |
opcodes | [] [] |
parted | [] [] |
pies | |
popt | [] [] [] [] [] |
psmisc | [] [] [] |
pspp | [] |
pwdutils | [] |
radius | [] |
recode | [] [] [] [] [] [] |
rosegarden | () () () |
rpm | [] [] [] |
rush | |
sarg | |
screem | |
scrollkeeper | [] [] [] [] [] |
sed | [] [] [] [] [] [] |
sharutils | [] [] [] [] |
shishi | |
skencil | [] () [] |
solfege | [] [] [] |
solfege-manual | [] [] |
soundtracker | [] [] [] |
sp | [] |
sysstat | [] [] [] |
tar | [] [] [] [] |
texinfo | [] [] [] |
tin | [] [] |
unicode-han-tra... | |
unicode-transla... | |
util-linux-ng | [] [] [] [] |
vice | () () |
vmm | [] |
vorbis-tools | [] [] |
wastesedge | [] |
wdiff | [] [] |
wget | [] [] [] |
wyslij-po | |
xchat | [] [] [] [] [] |
xdg-user-dirs | [] [] [] [] [] [] [] [] [] |
xkeyboard-config | [] [] [] [] [] [] |
+-------------------------------------------------+
crh cs da de el en en_GB en_ZA eo es et eu fa
5 64 105 117 18 1 8 0 28 89 18 19 0
fi fr ga gl gu he hi hr hu hy id is it ja ka kn
+----------------------------------------------------+
a2ps | [] [] [] [] |
aegis | [] [] |
ant-phone | [] [] |
anubis | [] [] [] [] |
aspell | [] [] [] [] |
bash | [] [] [] [] |
bfd | [] [] [] |
bibshelf | [] [] [] [] [] |
binutils | [] [] [] |
bison | [] [] [] [] |
bison-runtime | [] [] [] [] [] [] |
bluez-pin | [] [] [] [] [] [] [] [] |
bombono-dvd | [] |
buzztard | [] |
cflow | [] [] [] |
clisp | [] |
coreutils | [] [] [] [] [] |
cpio | [] [] [] [] |
cppi | [] [] |
cpplib | [] [] [] |
cryptsetup | [] [] [] |
dfarc | [] [] [] |
dialog | [] [] [] [] [] [] [] |
dico | |
diffutils | [] [] [] [] [] [] [] [] [] |
dink | [] |
doodle | [] [] |
e2fsprogs | [] [] |
enscript | [] [] [] [] |
exif | [] [] [] [] [] [] |
fetchmail | [] [] [] [] |
findutils | [] [] [] [] [] [] |
flex | [] [] [] |
freedink | [] [] [] |
gas | [] [] |
gawk | [] [] [] [] () [] |
gcal | [] |
gcc | [] |
gettext-examples | [] [] [] [] [] [] [] |
gettext-runtime | [] [] [] [] [] [] |
gettext-tools | [] [] [] [] |
gip | [] [] [] [] [] [] |
gjay | [] |
gliv | [] () |
glunarclock | [] [] [] [] |
gnubiff | () [] () |
gnucash | () () () () () [] |
gnuedu | [] [] |
gnulib | [] [] [] [] [] [] |
gnunet | |
gnunet-gtk | [] |
gnutls | [] [] |
gold | [] [] |
gpe-aerial | [] [] [] |
gpe-beam | [] [] [] [] |
gpe-bluetooth | [] [] [] [] |
gpe-calendar | [] [] |
gpe-clock | [] [] [] [] [] |
gpe-conf | [] [] [] [] |
gpe-contacts | [] [] [] [] |
gpe-edit | [] [] [] |
gpe-filemanager | [] [] [] [] |
gpe-go | [] [] [] [] [] |
gpe-login | [] [] [] |
gpe-ownerinfo | [] [] [] [] [] |
gpe-package | [] [] [] |
gpe-sketchbook | [] [] [] [] |
gpe-su | [] [] [] [] [] [] |
gpe-taskmanager | [] [] [] [] [] |
gpe-timesheet | [] [] [] [] [] |
gpe-today | [] [] [] [] [] [] [] |
gpe-todo | [] [] [] |
gphoto2 | [] [] [] [] [] [] |
gprof | [] [] [] [] |
gpsdrive | [] [] [] |
gramadoir | [] [] [] |
grep | [] [] |
grub | [] [] [] [] |
gsasl | [] [] [] [] [] |
gss | [] [] [] [] [] |
gst-plugins-bad | [] [] [] [] [] [] |
gst-plugins-base | [] [] [] [] [] [] |
gst-plugins-good | [] [] [] [] [] [] |
gst-plugins-ugly | [] [] [] [] [] [] |
gstreamer | [] [] [] [] [] |
gtick | [] [] [] [] [] |
gtkam | [] [] [] [] [] |
gtkorphan | [] [] [] |
gtkspell | [] [] [] [] [] [] [] [] [] |
gutenprint | [] [] [] [] |
hello | [] [] [] |
help2man | [] [] |
hylafax | [] |
idutils | [] [] [] [] [] [] |
indent | [] [] [] [] [] [] [] [] |
iso_15924 | [] () [] [] |
iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] |
iso_3166_2 | () [] [] [] |
iso_4217 | [] () [] [] [] [] |
iso_639 | [] () [] [] [] [] [] [] [] |
iso_639_3 | () [] [] |
jwhois | [] [] [] [] [] |
kbd | [] [] |
keytouch | [] [] [] [] [] [] |
keytouch-editor | [] [] [] [] [] |
keytouch-keyboa... | [] [] [] [] [] |
klavaro | [] [] |
latrine | [] [] [] |
ld | [] [] [] [] |
leafpad | [] [] [] [] [] [] [] () |
libc | [] [] [] [] [] |
libexif | [] |
libextractor | |
libgnutls | [] [] |
libgpewidget | [] [] [] [] |
libgpg-error | [] [] |
libgphoto2 | [] [] [] |
libgphoto2_port | [] [] [] |
libgsasl | [] [] [] [] [] |
libiconv | [] [] [] [] [] [] |
libidn | [] [] [] [] |
lifelines | () |
liferea | [] [] [] [] |
lilypond | [] [] |
linkdr | [] [] [] [] [] |
lordsawar | |
lprng | [] |
lynx | [] [] [] [] [] |
m4 | [] [] [] [] [] [] |
mailfromd | |
mailutils | [] [] |
make | [] [] [] [] [] [] [] [] [] |
man-db | [] [] |
man-db-manpages | [] |
minicom | [] [] [] [] [] |
mkisofs | [] [] [] [] |
myserver | |
nano | [] [] [] [] [] [] |
opcodes | [] [] [] [] |
parted | [] [] [] [] |
pies | |
popt | [] [] [] [] [] [] [] [] [] |
psmisc | [] [] [] |
pspp | |
pwdutils | [] [] |
radius | [] [] |
recode | [] [] [] [] [] [] [] [] |
rosegarden | () () () () () |
rpm | [] [] |
rush | |
sarg | [] |
screem | [] [] |
scrollkeeper | [] [] [] [] |
sed | [] [] [] [] [] [] [] [] |
sharutils | [] [] [] [] [] [] [] |
shishi | [] |
skencil | [] |
solfege | [] [] [] [] |
solfege-manual | [] [] |
soundtracker | [] [] |
sp | [] () |
sysstat | [] [] [] [] [] |
tar | [] [] [] [] [] [] [] |
texinfo | [] [] [] [] |
tin | [] |
unicode-han-tra... | |
unicode-transla... | [] [] |
util-linux-ng | [] [] [] [] [] [] |
vice | () () () |
vmm | [] |
vorbis-tools | [] |
wastesedge | () () |
wdiff | [] |
wget | [] [] [] [] [] [] [] [] |
wyslij-po | [] [] [] |
xchat | [] [] [] [] [] [] [] [] [] |
xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] |
xkeyboard-config | [] [] [] [] [] |
+----------------------------------------------------+
fi fr ga gl gu he hi hr hu hy id is it ja ka kn
105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4
ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
+-----------------------------------------------+
a2ps | [] |
aegis | |
ant-phone | |
anubis | [] [] |
aspell | [] |
bash | |
bfd | |
bibshelf | [] [] |
binutils | |
bison | [] |
bison-runtime | [] [] [] [] [] |
bluez-pin | [] [] [] [] [] |
bombono-dvd | |
buzztard | |
cflow | |
clisp | |
coreutils | [] |
cpio | |
cppi | |
cpplib | |
cryptsetup | |
dfarc | [] |
dialog | [] [] [] [] [] |
dico | |
diffutils | [] [] |
dink | |
doodle | |
e2fsprogs | |
enscript | |
exif | [] |
fetchmail | |
findutils | |
flex | |
freedink | [] |
gas | |
gawk | |
gcal | |
gcc | |
gettext-examples | [] [] [] [] |
gettext-runtime | [] |
gettext-tools | [] |
gip | [] [] |
gjay | |
gliv | |
glunarclock | [] |
gnubiff | |
gnucash | () () () () |
gnuedu | |
gnulib | |
gnunet | |
gnunet-gtk | |
gnutls | [] |
gold | |
gpe-aerial | [] |
gpe-beam | [] |
gpe-bluetooth | [] [] |
gpe-calendar | [] |
gpe-clock | [] [] [] [] [] |
gpe-conf | [] [] |
gpe-contacts | [] [] |
gpe-edit | [] |
gpe-filemanager | [] [] |
gpe-go | [] [] [] |
gpe-login | [] |
gpe-ownerinfo | [] [] |
gpe-package | [] [] |
gpe-sketchbook | [] [] |
gpe-su | [] [] [] [] [] [] |
gpe-taskmanager | [] [] [] [] [] [] |
gpe-timesheet | [] [] |
gpe-today | [] [] [] [] |
gpe-todo | [] [] |
gphoto2 | |
gprof | [] |
gpsdrive | |
gramadoir | |
grep | |
grub | |
gsasl | |
gss | |
gst-plugins-bad | [] [] [] [] |
gst-plugins-base | [] [] |
gst-plugins-good | [] [] |
gst-plugins-ugly | [] [] [] [] [] |
gstreamer | |
gtick | |
gtkam | [] |
gtkorphan | [] [] |
gtkspell | [] [] [] [] [] [] [] |
gutenprint | |
hello | [] [] [] |
help2man | |
hylafax | |
idutils | |
indent | |
iso_15924 | [] [] |
iso_3166 | [] [] () [] [] [] [] [] |
iso_3166_2 | |
iso_4217 | [] [] |
iso_639 | [] [] |
iso_639_3 | [] |
jwhois | [] |
kbd | |
keytouch | [] |
keytouch-editor | [] |
keytouch-keyboa... | [] |
klavaro | [] |
latrine | [] |
ld | |
leafpad | [] [] [] |
libc | [] |
libexif | |
libextractor | |
libgnutls | [] |
libgpewidget | [] [] |
libgpg-error | |
libgphoto2 | |
libgphoto2_port | |
libgsasl | |
libiconv | |
libidn | |
lifelines | |
liferea | |
lilypond | |
linkdr | |
lordsawar | |
lprng | |
lynx | |
m4 | |
mailfromd | |
mailutils | |
make | [] |
man-db | |
man-db-manpages | |
minicom | [] |
mkisofs | |
myserver | |
nano | [] [] |
opcodes | |
parted | |
pies | |
popt | [] [] [] |
psmisc | |
pspp | |
pwdutils | |
radius | |
recode | |
rosegarden | |
rpm | |
rush | |
sarg | |
screem | |
scrollkeeper | [] [] |
sed | |
sharutils | |
shishi | |
skencil | |
solfege | [] |
solfege-manual | |
soundtracker | |
sp | |
sysstat | [] |
tar | [] |
texinfo | [] |
tin | |
unicode-han-tra... | |
unicode-transla... | |
util-linux-ng | |
vice | |
vmm | |
vorbis-tools | |
wastesedge | |
wdiff | |
wget | [] |
wyslij-po | |
xchat | [] [] [] |
xdg-user-dirs | [] [] [] [] [] [] [] [] |
xkeyboard-config | [] [] [] |
+-----------------------------------------------+
ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
20 5 10 1 13 48 4 2 2 4 24 10 20 3 1
nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr
+---------------------------------------------------+
a2ps | [] [] [] [] [] [] [] [] |
aegis | [] [] [] |
ant-phone | [] [] |
anubis | [] [] [] |
aspell | [] [] [] [] [] |
bash | [] [] |
bfd | [] |
bibshelf | [] [] |
binutils | [] [] |
bison | [] [] [] |
bison-runtime | [] [] [] [] [] [] [] |
bluez-pin | [] [] [] [] [] [] [] [] |
bombono-dvd | [] () |
buzztard | [] [] |
cflow | [] |
clisp | [] [] |
coreutils | [] [] [] [] [] [] |
cpio | [] [] [] |
cppi | [] |
cpplib | [] |
cryptsetup | [] |
dfarc | [] |
dialog | [] [] [] [] |
dico | [] |
diffutils | [] [] [] [] [] [] |
dink | () |
doodle | [] [] |
e2fsprogs | [] [] |
enscript | [] [] [] [] [] |
exif | [] [] [] () [] |
fetchmail | [] [] [] [] |
findutils | [] [] [] [] [] |
flex | [] [] [] [] [] |
freedink | [] [] |
gas | |
gawk | [] [] [] [] |
gcal | |
gcc | [] |
gettext-examples | [] [] [] [] [] [] [] [] |
gettext-runtime | [] [] [] [] [] [] [] [] [] |
gettext-tools | [] [] [] [] [] [] |
gip | [] [] [] [] [] |
gjay | |
gliv | [] [] [] [] [] [] |
glunarclock | [] [] [] [] [] |
gnubiff | [] () |
gnucash | [] () () () |
gnuedu | [] |
gnulib | [] [] [] [] |
gnunet | |
gnunet-gtk | |
gnutls | [] [] |
gold | |
gpe-aerial | [] [] [] [] [] [] [] |
gpe-beam | [] [] [] [] [] [] [] |
gpe-bluetooth | [] [] |
gpe-calendar | [] [] [] [] |
gpe-clock | [] [] [] [] [] [] [] [] |
gpe-conf | [] [] [] [] [] [] [] |
gpe-contacts | [] [] [] [] [] |
gpe-edit | [] [] [] |
gpe-filemanager | [] [] [] |
gpe-go | [] [] [] [] [] [] [] [] |
gpe-login | [] [] |
gpe-ownerinfo | [] [] [] [] [] [] [] [] |
gpe-package | [] [] |
gpe-sketchbook | [] [] [] [] [] [] [] |
gpe-su | [] [] [] [] [] [] [] [] |
gpe-taskmanager | [] [] [] [] [] [] [] [] |
gpe-timesheet | [] [] [] [] [] [] [] [] |
gpe-today | [] [] [] [] [] [] [] [] |
gpe-todo | [] [] [] [] [] |
gphoto2 | [] [] [] [] [] [] [] [] |
gprof | [] [] [] |
gpsdrive | [] [] |
gramadoir | [] [] |
grep | [] [] [] [] |
grub | [] [] [] |
gsasl | [] [] [] [] |
gss | [] [] [] |
gst-plugins-bad | [] [] [] [] [] [] |
gst-plugins-base | [] [] [] [] [] |
gst-plugins-good | [] [] [] [] [] |
gst-plugins-ugly | [] [] [] [] [] [] |
gstreamer | [] [] [] [] [] |
gtick | [] [] [] |
gtkam | [] [] [] [] [] [] |
gtkorphan | [] |
gtkspell | [] [] [] [] [] [] [] [] [] [] |
gutenprint | [] [] |
hello | [] [] [] [] |
help2man | [] [] |
hylafax | [] |
idutils | [] [] [] [] [] |
indent | [] [] [] [] [] [] [] |
iso_15924 | [] [] [] [] |
iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] |
iso_3166_2 | [] [] [] |
iso_4217 | [] [] [] [] [] [] [] [] |
iso_639 | [] [] [] [] [] [] [] [] [] |
iso_639_3 | [] [] |
jwhois | [] [] [] [] |
kbd | [] [] [] |
keytouch | [] [] [] |
keytouch-editor | [] [] [] |
keytouch-keyboa... | [] [] [] |
klavaro | [] [] |
latrine | [] [] |
ld | |
leafpad | [] [] [] [] [] [] [] [] [] |
libc | [] [] [] [] |
libexif | [] [] () [] |
libextractor | |
libgnutls | [] [] |
libgpewidget | [] [] [] |
libgpg-error | [] [] |
libgphoto2 | [] [] |
libgphoto2_port | [] [] [] [] [] |
libgsasl | [] [] [] [] [] |
libiconv | [] [] [] [] [] |
libidn | [] [] |
lifelines | [] [] |
liferea | [] [] [] [] [] () () [] |
lilypond | [] |
linkdr | [] [] [] |
lordsawar | |
lprng | [] |
lynx | [] [] [] |
m4 | [] [] [] [] [] |
mailfromd | [] |
mailutils | [] |
make | [] [] [] [] |
man-db | [] [] [] |
man-db-manpages | [] [] [] |
minicom | [] [] [] [] |
mkisofs | [] [] [] |
myserver | |
nano | [] [] [] [] |
opcodes | [] [] |
parted | [] [] [] [] |
pies | [] |
popt | [] [] [] [] |
psmisc | [] [] [] |
pspp | [] [] |
pwdutils | [] |
radius | [] [] [] |
recode | [] [] [] [] [] [] [] [] |
rosegarden | () () |
rpm | [] [] [] |
rush | [] [] |
sarg | |
screem | |
scrollkeeper | [] [] [] [] [] [] [] [] |
sed | [] [] [] [] [] [] [] [] [] |
sharutils | [] [] [] [] |
shishi | [] |
skencil | [] [] |
solfege | [] [] [] [] |
solfege-manual | [] [] [] |
soundtracker | [] |
sp | |
sysstat | [] [] [] [] |
tar | [] [] [] [] |
texinfo | [] [] [] [] |
tin | [] |
unicode-han-tra... | |
unicode-transla... | |
util-linux-ng | [] [] [] [] [] |
vice | [] |
vmm | [] |
vorbis-tools | [] [] |
wastesedge | [] |
wdiff | [] [] |
wget | [] [] [] [] [] [] [] |
wyslij-po | [] [] [] |
xchat | [] [] [] [] [] [] [] [] [] |
xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] |
xkeyboard-config | [] [] [] |
+---------------------------------------------------+
nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr
135 10 4 7 105 1 29 62 47 91 3 54 46 9 37
sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW
+---------------------------------------------------+
a2ps | [] [] [] [] [] | 27
aegis | [] | 9
ant-phone | [] [] [] [] | 9
anubis | [] [] [] [] | 15
aspell | [] [] [] | 20
bash | [] [] [] | 12
bfd | [] | 6
bibshelf | [] [] [] | 16
binutils | [] [] | 8
bison | [] [] | 12
bison-runtime | [] [] [] [] [] [] | 29
bluez-pin | [] [] [] [] [] [] [] [] | 37
bombono-dvd | [] | 4
buzztard | [] | 7
cflow | [] [] [] | 9
clisp | | 10
coreutils | [] [] [] [] | 22
cpio | [] [] [] [] [] [] | 13
cppi | [] [] | 5
cpplib | [] [] [] [] [] [] | 14
cryptsetup | [] [] | 7
dfarc | [] | 9
dialog | [] [] [] [] [] [] [] | 30
dico | [] | 2
diffutils | [] [] [] [] [] [] | 30
dink | | 4
doodle | [] [] | 7
e2fsprogs | [] [] [] | 11
enscript | [] [] [] [] | 17
exif | [] [] [] | 16
fetchmail | [] [] [] | 17
findutils | [] [] [] [] [] | 20
flex | [] [] [] [] | 15
freedink | [] | 10
gas | [] | 4
gawk | [] [] [] [] | 18
gcal | [] [] | 5
gcc | [] [] [] | 7
gettext-examples | [] [] [] [] [] [] [] | 34
gettext-runtime | [] [] [] [] [] [] [] | 29
gettext-tools | [] [] [] [] [] [] | 22
gip | [] [] [] [] | 22
gjay | [] | 3
gliv | [] [] [] | 14
glunarclock | [] [] [] [] [] | 19
gnubiff | [] [] | 4
gnucash | () [] () [] () | 10
gnuedu | [] [] | 7
gnulib | [] [] [] [] | 16
gnunet | [] | 1
gnunet-gtk | [] [] [] | 5
gnutls | [] [] [] | 10
gold | [] | 4
gpe-aerial | [] [] [] | 18
gpe-beam | [] [] [] | 19
gpe-bluetooth | [] [] [] | 13
gpe-calendar | [] [] [] [] | 12
gpe-clock | [] [] [] [] [] | 28
gpe-conf | [] [] [] [] | 20
gpe-contacts | [] [] [] | 17
gpe-edit | [] [] [] | 12
gpe-filemanager | [] [] [] [] | 16
gpe-go | [] [] [] [] [] | 25
gpe-login | [] [] [] | 11
gpe-ownerinfo | [] [] [] [] [] | 25
gpe-package | [] [] [] | 13
gpe-sketchbook | [] [] [] | 20
gpe-su | [] [] [] [] [] | 30
gpe-taskmanager | [] [] [] [] [] | 29
gpe-timesheet | [] [] [] [] [] | 25
gpe-today | [] [] [] [] [] [] | 30
gpe-todo | [] [] [] [] | 17
gphoto2 | [] [] [] [] [] | 24
gprof | [] [] [] | 15
gpsdrive | [] [] [] | 11
gramadoir | [] [] [] | 11
grep | [] [] [] | 10
grub | [] [] [] | 14
gsasl | [] [] [] [] | 14
gss | [] [] [] | 11
gst-plugins-bad | [] [] [] [] | 26
gst-plugins-base | [] [] [] [] [] | 24
gst-plugins-good | [] [] [] [] | 24
gst-plugins-ugly | [] [] [] [] [] | 29
gstreamer | [] [] [] [] | 22
gtick | [] [] [] | 13
gtkam | [] [] [] | 20
gtkorphan | [] [] [] | 14
gtkspell | [] [] [] [] [] [] [] [] [] | 45
gutenprint | [] | 10
hello | [] [] [] [] [] [] | 21
help2man | [] [] | 7
hylafax | [] | 5
idutils | [] [] [] [] | 17
indent | [] [] [] [] [] [] | 30
iso_15924 | () [] () [] [] | 16
iso_3166 | [] [] () [] [] () [] [] [] () | 53
iso_3166_2 | () [] () [] | 9
iso_4217 | [] () [] [] () [] [] | 26
iso_639 | [] [] [] () [] () [] [] [] [] | 38
iso_639_3 | [] () | 8
jwhois | [] [] [] [] [] | 16
kbd | [] [] [] [] [] | 15
keytouch | [] [] [] | 16
keytouch-editor | [] [] [] | 14
keytouch-keyboa... | [] [] [] | 14
klavaro | [] | 11
latrine | [] [] [] | 10
ld | [] [] [] [] | 11
leafpad | [] [] [] [] [] [] | 33
libc | [] [] [] [] [] | 21
libexif | [] () | 7
libextractor | [] | 1
libgnutls | [] [] [] | 9
libgpewidget | [] [] [] | 14
libgpg-error | [] [] [] | 9
libgphoto2 | [] [] | 8
libgphoto2_port | [] [] [] [] | 14
libgsasl | [] [] [] | 13
libiconv | [] [] [] [] | 21
libidn | () [] [] | 11
lifelines | [] | 4
liferea | [] [] [] | 21
lilypond | [] | 7
linkdr | [] [] [] [] [] | 17
lordsawar | | 1
lprng | [] | 3
lynx | [] [] [] [] | 17
m4 | [] [] [] [] | 19
mailfromd | [] [] | 3
mailutils | [] | 5
make | [] [] [] [] | 21
man-db | [] [] [] | 8
man-db-manpages | | 4
minicom | [] [] | 16
mkisofs | [] [] | 9
myserver | | 0
nano | [] [] [] [] | 21
opcodes | [] [] [] | 11
parted | [] [] [] [] [] | 15
pies | [] [] | 3
popt | [] [] [] [] [] [] | 27
psmisc | [] [] | 11
pspp | | 4
pwdutils | [] [] | 6
radius | [] [] | 9
recode | [] [] [] [] | 28
rosegarden | () | 0
rpm | [] [] [] | 11
rush | [] [] | 4
sarg | | 1
screem | [] | 3
scrollkeeper | [] [] [] [] [] | 27
sed | [] [] [] [] [] | 30
sharutils | [] [] [] [] [] | 22
shishi | [] | 3
skencil | [] [] | 7
solfege | [] [] [] [] | 16
solfege-manual | [] | 8
soundtracker | [] [] [] | 9
sp | [] | 3
sysstat | [] [] | 15
tar | [] [] [] [] [] [] | 23
texinfo | [] [] [] [] [] | 17
tin | | 4
unicode-han-tra... | | 0
unicode-transla... | | 2
util-linux-ng | [] [] [] [] | 20
vice | () () | 1
vmm | [] | 4
vorbis-tools | [] | 6
wastesedge | | 2
wdiff | [] [] | 7
wget | [] [] [] [] [] | 26
wyslij-po | [] [] | 8
xchat | [] [] [] [] [] [] | 36
xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63
xkeyboard-config | [] [] [] | 22
+---------------------------------------------------+
85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW
178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
used for implementing regional variants of languages, or language
dialects.
For a PO file in the matrix above to be effective, the package to
which it applies should also have been internationalized and
distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
If June 2010 seems to be old, you may fetch a more recent copy of
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
matrix with full percentage details can be found at
`http://translationproject.org/extra/matrix.html'.
1.5 Using `gettext' in new packages
===================================
If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your
package. Of course you have to respect the GNU Library General Public
License which covers the use of the GNU `gettext' library. This means
in particular that even non-free programs can use `libintl' as a shared
library, whereas only free software can use `libintl' as a static
library or use modified versions of `libintl'.
Once the sources are changed appropriately and the setup can handle
the use of `gettext' the only thing missing are the translations. The
Free Translation Project is also available for packages which are not
developed inside the GNU project. Therefore the information given above
applies also for every other Free Software Project. Contact
`coordinator@translationproject.org' to make the `.pot' files available
to the translation teams.
gss-1.0.2/GNUmakefile 0000644 0000000 0000000 00000011447 11662446265 011272 0000000 0000000 # Having a separate GNUmakefile lets me `include' the dynamically
# generated rules created via cfg.mk (package-local configuration)
# as well as maint.mk (generic maintainer rules).
# This makefile is used only if you run GNU Make.
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
# Copyright (C) 2001, 2003, 2006-2011 Free Software Foundation, Inc.
# 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 .
# Systems where /bin/sh is not the default shell need this. The $(shell)
# command below won't work with e.g. stock DOS/Windows shells.
ifeq ($(wildcard /bin/s[h]),/bin/sh)
SHELL = /bin/sh
else
# will be used only with the next shell-test line, then overwritten
# by a configured-in value
SHELL = sh
endif
# If the user runs GNU make but has not yet run ./configure,
# give them a diagnostic.
_have-Makefile := $(shell test -f Makefile && echo yes)
ifeq ($(_have-Makefile),yes)
# Make tar archive easier to reproduce.
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
# Allow the user to add to this in the Makefile.
ALL_RECURSIVE_TARGETS =
include Makefile
# Some projects override e.g., _autoreconf here.
-include $(srcdir)/cfg.mk
# Allow cfg.mk to override these.
_build-aux ?= build-aux
_autoreconf ?= autoreconf -v
include $(srcdir)/maint.mk
# Ensure that $(VERSION) is up to date for dist-related targets, but not
# for others: rerunning autoreconf and recompiling everything isn't cheap.
_have-git-version-gen := \
$(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
_is-dist-target ?= $(filter-out %clean, \
$(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS)))
_is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
ifneq (,$(_is-dist-target)$(_is-install-target))
_curr-ver := $(shell cd $(srcdir) \
&& $(_build-aux)/git-version-gen \
.tarball-version \
$(git-version-gen-tag-sed-script))
ifneq ($(_curr-ver),$(VERSION))
ifeq ($(_curr-ver),UNKNOWN)
$(info WARNING: unable to verify if $(VERSION) is the correct version)
else
ifneq (,$(_is-install-target))
# GNU Coding Standards state that 'make install' should not cause
# recompilation after 'make all'. But as long as changing the version
# string alters config.h, the cost of having 'make all' always have an
# up-to-date version is prohibitive. So, as a compromise, we merely
# warn when installing a version string that is out of date; the user
# should run 'autoreconf' (or something like 'make distcheck') to
# fix the version, 'make all' to propagate it, then 'make install'.
$(info WARNING: version string $(VERSION) is out of date;)
$(info run '$(MAKE) _version' to fix it)
else
$(info INFO: running autoreconf for new version string: $(_curr-ver))
GNUmakefile: _version
touch GNUmakefile
endif
endif
endif
endif
endif
.PHONY: _version
_version:
cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
$(MAKE) $(AM_MAKEFLAGS) Makefile
else
.DEFAULT_GOAL := abort-due-to-no-makefile
srcdir = .
# The package can override .DEFAULT_GOAL to run actions like autoreconf.
-include ./cfg.mk
# Allow cfg.mk to override these.
_build-aux ?= build-aux
_autoreconf ?= autoreconf -v
include ./maint.mk
ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
$(MAKECMDGOALS): abort-due-to-no-makefile
endif
abort-due-to-no-makefile:
@echo There seems to be no Makefile in this directory. 1>&2
@echo "You must run ./configure before running \`make'." 1>&2
@exit 1
endif
# Tell version 3.79 and up of GNU make to not build goals in this
# directory in parallel, in case someone tries to build multiple
# targets, and one of them can cause a recursive target to be invoked.
# Only set this if Automake doesn't provide it.
AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) \
dist distcheck tags ctags
ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS)
ifneq ($(word 2, $(MAKECMDGOALS)), )
ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), )
.NOTPARALLEL:
endif
endif
gss-1.0.2/lib/ 0000755 0000000 0000000 00000000000 11663555055 010036 5 0000000 0000000 gss-1.0.2/lib/oid.c 0000644 0000000 0000000 00000013772 11662452056 010703 0000000 0000000 /* oid.c --- Definition of static GSS-API OIDs.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
* "\x01\x02\x01\x01"},
* corresponding to an object-identifier value of
* {iso(1) member-body(2) United States(840) mit(113554)
* infosys(1) gssapi(2) generic(1) user_name(1)}. The constant
* GSS_C_NT_USER_NAME should be initialized to point
* to that gss_OID_desc.
*/
gss_OID_desc GSS_C_NT_USER_NAME_static = {
10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01"
};
gss_OID GSS_C_NT_USER_NAME = &GSS_C_NT_USER_NAME_static;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
* "\x01\x02\x01\x02"},
* corresponding to an object-identifier value of
* {iso(1) member-body(2) United States(840) mit(113554)
* infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
* The constant GSS_C_NT_MACHINE_UID_NAME should be
* initialized to point to that gss_OID_desc.
*/
gss_OID_desc GSS_C_NT_MACHINE_UID_NAME_static = {
10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02"
};
gss_OID GSS_C_NT_MACHINE_UID_NAME = &GSS_C_NT_MACHINE_UID_NAME_static;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
* "\x01\x02\x01\x03"},
* corresponding to an object-identifier value of
* {iso(1) member-body(2) United States(840) mit(113554)
* infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
* The constant GSS_C_NT_STRING_UID_NAME should be
* initialized to point to that gss_OID_desc.
*/
gss_OID_desc GSS_C_NT_STRING_UID_NAME_static = {
10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03"
};
gss_OID GSS_C_NT_STRING_UID_NAME = &GSS_C_NT_STRING_UID_NAME_static;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
* corresponding to an object-identifier value of
* {iso(1) org(3) dod(6) internet(1) security(5)
* nametypes(6) gss-host-based-services(2)). The constant
* GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
* to that gss_OID_desc. This is a deprecated OID value, and
* implementations wishing to support hostbased-service names
* should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
* defined below, to identify such names;
* GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
* for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
* parameter, but should not be emitted by GSS-API
* implementations
*/
gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_X_static = {
6, (void *) "\x2b\x06\x01\x05\x06\x02"
};
gss_OID GSS_C_NT_HOSTBASED_SERVICE_X = &GSS_C_NT_HOSTBASED_SERVICE_X_static;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
* "\x01\x02\x01\x04"}, corresponding to an
* object-identifier value of {iso(1) member-body(2)
* Unites States(840) mit(113554) infosys(1) gssapi(2)
* generic(1) service_name(4)}. The constant
* GSS_C_NT_HOSTBASED_SERVICE should be initialized
* to point to that gss_OID_desc.
*/
gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_static = {
10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x04"
};
gss_OID GSS_C_NT_HOSTBASED_SERVICE = &GSS_C_NT_HOSTBASED_SERVICE_static;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {6, (void *)"\x2b\x06\01\x05\x06\x03"},
* corresponding to an object identifier value of
* {1(iso), 3(org), 6(dod), 1(internet), 5(security),
* 6(nametypes), 3(gss-anonymous-name)}. The constant
* and GSS_C_NT_ANONYMOUS should be initialized to point
* to that gss_OID_desc.
*/
gss_OID_desc GSS_C_NT_ANONYMOUS_static = {
6, (void *) "\x2b\x06\01\x05\x06\x03"
};
gss_OID GSS_C_NT_ANONYMOUS = &GSS_C_NT_ANONYMOUS_static;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
* corresponding to an object-identifier value of
* {1(iso), 3(org), 6(dod), 1(internet), 5(security),
* 6(nametypes), 4(gss-api-exported-name)}. The constant
* GSS_C_NT_EXPORT_NAME should be initialized to point
* to that gss_OID_desc.
*/
gss_OID_desc GSS_C_NT_EXPORT_NAME_static = {
6, (void *) "\x2b\x06\x01\x05\x06\x04"
};
gss_OID GSS_C_NT_EXPORT_NAME = &GSS_C_NT_EXPORT_NAME_static;
/**
* gss_oid_equal:
* @first_oid: (Object ID, read) First Object identifier.
* @second_oid: (Object ID, read) First Object identifier.
*
* Compare two OIDs for equality. The comparison is "deep", i.e., the
* actual byte sequences of the OIDs are compared instead of just the
* pointer equality. This function is standardized in RFC 6339.
*
* Return value: Returns boolean value true when the two OIDs are
* equal, otherwise false.
**/
int
gss_oid_equal (gss_const_OID first_oid, gss_const_OID second_oid)
{
return first_oid && second_oid &&
first_oid->length == second_oid->length &&
memcmp (first_oid->elements, second_oid->elements,
second_oid->length) == 0;
}
gss-1.0.2/lib/meta.h 0000644 0000000 0000000 00000011367 11546676340 011066 0000000 0000000 /* meta.h --- Prototypes for internally visible symbols from meta.c.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef META_H
#define META_H
#include
#define MAX_NT 5
typedef struct _gss_mech_api_struct
{
gss_OID mech;
const char *sasl_name;
const char *mech_name;
const char *mech_description;
gss_OID name_types[MAX_NT];
OM_uint32 (*init_sec_context)
(OM_uint32 * minor_status,
const gss_cred_id_t initiator_cred_handle,
gss_ctx_id_t * context_handle,
const gss_name_t target_name,
const gss_OID mech_type,
OM_uint32 req_flags,
OM_uint32 time_req,
const gss_channel_bindings_t input_chan_bindings,
const gss_buffer_t input_token,
gss_OID * actual_mech_type,
gss_buffer_t output_token, OM_uint32 * ret_flags, OM_uint32 * time_rec);
OM_uint32 (*canonicalize_name)
(OM_uint32 * minor_status,
const gss_name_t input_name,
const gss_OID mech_type, gss_name_t * output_name);
OM_uint32 (*export_name)
(OM_uint32 * minor_status,
const gss_name_t input_name, gss_buffer_t exported_name);
OM_uint32 (*wrap)
(OM_uint32 * minor_status,
const gss_ctx_id_t context_handle, int conf_req_flag,
gss_qop_t qop_req,
const gss_buffer_t input_message_buffer,
int *conf_state, gss_buffer_t output_message_buffer);
OM_uint32 (*unwrap)
(OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t input_message_buffer,
gss_buffer_t output_message_buffer, int *conf_state,
gss_qop_t * qop_state);
OM_uint32 (*get_mic)
(OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
gss_qop_t qop_req,
const gss_buffer_t message_buffer, gss_buffer_t message_token);
OM_uint32 (*verify_mic)
(OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t message_buffer,
const gss_buffer_t token_buffer, gss_qop_t * qop_state);
OM_uint32 (*display_status)
(OM_uint32 * minor_status,
OM_uint32 status_value, int status_type,
const gss_OID mech_type,
OM_uint32 * message_context, gss_buffer_t status_string);
OM_uint32 (*acquire_cred)
(OM_uint32 * minor_status,
const gss_name_t desired_name,
OM_uint32 time_req,
const gss_OID_set desired_mechs,
gss_cred_usage_t cred_usage,
gss_cred_id_t * output_cred_handle,
gss_OID_set * actual_mechs, OM_uint32 * time_rec);
OM_uint32 (*release_cred)
(OM_uint32 * minor_status, gss_cred_id_t * cred_handle);
OM_uint32 (*accept_sec_context)
(OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
const gss_cred_id_t acceptor_cred_handle,
const gss_buffer_t input_token_buffer,
const gss_channel_bindings_t input_chan_bindings,
gss_name_t * src_name,
gss_OID * mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags,
OM_uint32 * time_rec, gss_cred_id_t * delegated_cred_handle);
OM_uint32 (*delete_sec_context)
(OM_uint32 * minor_status,
gss_ctx_id_t * context_handle, gss_buffer_t output_token);
OM_uint32 (*context_time)
(OM_uint32 * minor_status,
const gss_ctx_id_t context_handle, OM_uint32 * time_rec);
OM_uint32 (*inquire_cred)
(OM_uint32 * minor_status,
const gss_cred_id_t cred_handle,
gss_name_t * name, OM_uint32 * lifetime,
gss_cred_usage_t * cred_usage, gss_OID_set * mechanisms);
OM_uint32 (*inquire_cred_by_mech)
(OM_uint32 * minor_status,
const gss_cred_id_t cred_handle,
const gss_OID mech_type,
gss_name_t * name,
OM_uint32 * initiator_lifetime,
OM_uint32 * acceptor_lifetime, gss_cred_usage_t * cred_usage);
} _gss_mech_api_desc, *_gss_mech_api_t;
_gss_mech_api_t _gss_find_mech (const gss_OID oid);
_gss_mech_api_t _gss_find_mech_no_default (const gss_OID oid);
_gss_mech_api_t _gss_find_mech_by_saslname (const gss_buffer_t
sasl_mech_name);
OM_uint32 _gss_indicate_mechs1 (OM_uint32 * minor_status,
gss_OID_set * mech_set);
#endif /* META_H */
gss-1.0.2/lib/gl/ 0000755 0000000 0000000 00000000000 11663555055 010440 5 0000000 0000000 gss-1.0.2/lib/gl/dummy.c 0000644 0000000 0000000 00000003254 11662447025 011657 0000000 0000000 /* A dummy file, to prevent empty libraries from breaking builds.
Copyright (C) 2004, 2007, 2009-2011 Free Software Foundation, Inc.
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 . */
/* Some systems, reportedly OpenBSD and Mac OS X, refuse to create
libraries without any object files. You might get an error like:
> ar cru .libs/libgl.a
> ar: no archive members specified
Compiling this file, and adding its object file to the library, will
prevent the library from being empty. */
/* Some systems, such as Solaris with cc 5.0, refuse to work with libraries
that don't export any symbol. You might get an error like:
> cc ... libgnu.a
> ild: (bad file) garbled symbol table in archive ../gllib/libgnu.a
Compiling this file, and adding its object file to the library, will
prevent the library from exporting no symbols. */
#ifdef __sun
/* This declaration ensures that the library will export at least 1 symbol. */
int gl_dummy_symbol;
#else
/* This declaration is solely to ensure that after preprocessing
this file is never empty. */
typedef int dummy;
#endif
gss-1.0.2/lib/gl/Makefile.am 0000644 0000000 0000000 00000025467 11662447025 012426 0000000 0000000 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
#
# This file 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 file 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 file. If not, see .
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --local-dir=lib/gl/override --lib=libgnu --source-base=lib/gl --m4-base=lib/gl/m4 --doc-base=doc --tests-base=lib/gl/tests --aux-dir=build-aux --avoid=xalloc-die --no-conditional-dependencies --libtool --macro-prefix=libgl --no-vc-files gettext-h lib-msvc-compat strverscmp
AUTOMAKE_OPTIONS = 1.5 gnits
SUBDIRS =
noinst_HEADERS =
noinst_LIBRARIES =
noinst_LTLIBRARIES =
EXTRA_DIST =
BUILT_SOURCES =
SUFFIXES =
MOSTLYCLEANFILES = core *.stackdump
MOSTLYCLEANDIRS =
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
EXTRA_DIST += m4/gnulib-cache.m4
AM_CPPFLAGS =
AM_CFLAGS =
noinst_LTLIBRARIES += libgnu.la
libgnu_la_SOURCES =
libgnu_la_LIBADD = $(libgl_LTLIBOBJS)
libgnu_la_DEPENDENCIES = $(libgl_LTLIBOBJS)
EXTRA_libgnu_la_SOURCES =
libgnu_la_LDFLAGS = $(AM_LDFLAGS)
libgnu_la_LDFLAGS += -no-undefined
libgnu_la_LDFLAGS += $(LTLIBINTL)
## begin gnulib module gettext-h
libgnu_la_SOURCES += gettext.h
## end gnulib module gettext-h
## begin gnulib module snippet/arg-nonnull
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
BUILT_SOURCES += arg-nonnull.h
# The arg-nonnull.h that gets inserted into generated .h files is the same as
# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
# off.
arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/GL_ARG_NONNULL/,$$p' \
< $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
ARG_NONNULL_H=arg-nonnull.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
## end gnulib module snippet/arg-nonnull
## begin gnulib module snippet/c++defs
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
BUILT_SOURCES += c++defs.h
# The c++defs.h that gets inserted into generated .h files is the same as
# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/_GL_CXXDEFS/,$$p' \
< $(top_srcdir)/build-aux/snippet/c++defs.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += c++defs.h c++defs.h-t
CXXDEFS_H=c++defs.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
## end gnulib module snippet/c++defs
## begin gnulib module snippet/warn-on-use
BUILT_SOURCES += warn-on-use.h
# The warn-on-use.h that gets inserted into generated .h files is the same as
# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
# off.
warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/^.ifndef/,$$p' \
< $(top_srcdir)/build-aux/snippet/warn-on-use.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
WARN_ON_USE_H=warn-on-use.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
## end gnulib module snippet/warn-on-use
## begin gnulib module stddef
BUILT_SOURCES += $(STDDEF_H)
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_STDDEF_H
stddef.h: stddef.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL_LIBGL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
-e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
-e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
< $(srcdir)/stddef.in.h; \
} > $@-t && \
mv $@-t $@
else
stddef.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += stddef.h stddef.h-t
EXTRA_DIST += stddef.in.h
## end gnulib module stddef
## begin gnulib module string
BUILT_SOURCES += string.h
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL_LIBGL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
-e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
-e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
-e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
-e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
-e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
-e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
-e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
-e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
-e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
-e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
-e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
-e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
-e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
-e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
-e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
-e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
-e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
-e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
-e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
-e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
-e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
-e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
-e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
-e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
-e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
-e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
-e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
-e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
-e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
-e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
-e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
-e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
-e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
-e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
< $(srcdir)/string.in.h | \
sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
-e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
-e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
-e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
-e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
-e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
-e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
-e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
-e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
< $(srcdir)/string.in.h; \
} > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += string.h string.h-t
EXTRA_DIST += string.in.h
## end gnulib module string
## begin gnulib module strverscmp
EXTRA_DIST += strverscmp.c
EXTRA_libgnu_la_SOURCES += strverscmp.c
## end gnulib module strverscmp
## begin gnulib module dummy
libgnu_la_SOURCES += dummy.c
## end gnulib module dummy
mostlyclean-local: mostlyclean-generic
@for dir in '' $(MOSTLYCLEANDIRS); do \
if test -n "$$dir" && test -d $$dir; then \
echo "rmdir $$dir"; rmdir $$dir; \
fi; \
done; \
:
gss-1.0.2/lib/gl/stddef.in.h 0000644 0000000 0000000 00000005343 11662447025 012410 0000000 0000000 /* A substitute for POSIX 2008 , for platforms that have issues.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
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, 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. */
/* Written by Eric Blake. */
/*
* POSIX 2008 for platforms that have issues.
*
*/
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
#if defined __need_wchar_t || defined __need_size_t \
|| defined __need_ptrdiff_t || defined __need_NULL \
|| defined __need_wint_t
/* Special invocation convention inside gcc header files. In
particular, gcc provides a version of that blindly
redefines NULL even when __need_wint_t was defined, even though
wint_t is not normally provided by . Hence, we must
remember if special invocation has ever been used to obtain wint_t,
in which case we need to clean up NULL yet again. */
# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
# ifdef __need_wint_t
# undef _@GUARD_PREFIX@_STDDEF_H
# define _GL_STDDEF_WINT_T
# endif
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
# endif
#else
/* Normal invocation convention. */
# ifndef _@GUARD_PREFIX@_STDDEF_H
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
# ifndef _@GUARD_PREFIX@_STDDEF_H
# define _@GUARD_PREFIX@_STDDEF_H
/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
#if @REPLACE_NULL@
# undef NULL
# ifdef __cplusplus
/* ISO C++ says that the macro NULL must expand to an integer constant
expression, hence '((void *) 0)' is not allowed in C++. */
# if __GNUG__ >= 3
/* GNU C++ has a __null macro that behaves like an integer ('int' or
'long') but has the same size as a pointer. Use that, to avoid
warnings. */
# define NULL __null
# else
# define NULL 0L
# endif
# else
# define NULL ((void *) 0)
# endif
#endif
/* Some platforms lack wchar_t. */
#if !@HAVE_WCHAR_T@
# define wchar_t int
#endif
# endif /* _@GUARD_PREFIX@_STDDEF_H */
# endif /* _@GUARD_PREFIX@_STDDEF_H */
#endif /* __need_XXX */
gss-1.0.2/lib/gl/Makefile.in 0000644 0000000 0000000 00000123616 11663554705 012437 0000000 0000000 # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
#
# This file 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 file 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 file. If not, see .
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --local-dir=lib/gl/override --lib=libgnu --source-base=lib/gl --m4-base=lib/gl/m4 --doc-base=doc --tests-base=lib/gl/tests --aux-dir=build-aux --avoid=xalloc-die --no-conditional-dependencies --libtool --macro-prefix=libgl --no-vc-files gettext-h lib-msvc-compat strverscmp
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = lib/gl
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/src/gl/m4/errno_h.m4 \
$(top_srcdir)/src/gl/m4/error.m4 \
$(top_srcdir)/src/gl/m4/getopt.m4 \
$(top_srcdir)/src/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/src/gl/m4/msvc-inval.m4 \
$(top_srcdir)/src/gl/m4/msvc-nothrow.m4 \
$(top_srcdir)/src/gl/m4/nocrash.m4 \
$(top_srcdir)/src/gl/m4/ssize_t.m4 \
$(top_srcdir)/src/gl/m4/stdarg.m4 \
$(top_srcdir)/src/gl/m4/strerror.m4 \
$(top_srcdir)/src/gl/m4/sys_socket_h.m4 \
$(top_srcdir)/src/gl/m4/unistd_h.m4 \
$(top_srcdir)/src/gl/m4/version-etc.m4 \
$(top_srcdir)/lib/gl/m4/extensions.m4 \
$(top_srcdir)/lib/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/lib/gl/m4/include_next.m4 \
$(top_srcdir)/lib/gl/m4/ld-output-def.m4 \
$(top_srcdir)/lib/gl/m4/stddef_h.m4 \
$(top_srcdir)/lib/gl/m4/string_h.m4 \
$(top_srcdir)/lib/gl/m4/strverscmp.m4 \
$(top_srcdir)/lib/gl/m4/warn-on-use.m4 \
$(top_srcdir)/gl/m4/00gnulib.m4 \
$(top_srcdir)/gl/m4/autobuild.m4 \
$(top_srcdir)/gl/m4/gnulib-common.m4 \
$(top_srcdir)/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/gl/m4/ld-version-script.m4 \
$(top_srcdir)/gl/m4/manywarnings.m4 \
$(top_srcdir)/gl/m4/valgrind-tests.m4 \
$(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po-suffix.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
LTLIBRARIES = $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
am_libgnu_la_OBJECTS = dummy.lo
libgnu_la_OBJECTS = $(am_libgnu_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
libgnu_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libgnu_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES)
DIST_SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
HEADERS = $(noinst_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ARFLAGS = @ARFLAGS@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFIG_INCLUDE = @CONFIG_INCLUDE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DLL_VERSION = @DLL_VERSION@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
ENOLINK_VALUE = @ENOLINK_VALUE@
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
GNULIB_FFSL = @GNULIB_FFSL@
GNULIB_FFSLL = @GNULIB_FFSLL@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
GNULIB_MBSCHR = @GNULIB_MBSCHR@
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
GNULIB_MBSLEN = @GNULIB_MBSLEN@
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
GNULIB_MBSSEP = @GNULIB_MBSSEP@
GNULIB_MBSSPN = @GNULIB_MBSSPN@
GNULIB_MBSSTR = @GNULIB_MBSSTR@
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
GNULIB_MEMCHR = @GNULIB_MEMCHR@
GNULIB_MEMMEM = @GNULIB_MEMMEM@
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PWRITE = @GNULIB_PWRITE@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
GNULIB_READ = @GNULIB_READ@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
GNULIB_STRPBRK = @GNULIB_STRPBRK@
GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
GNULIB_USLEEP = @GNULIB_USLEEP@
GNULIB_WRITE = @GNULIB_WRITE@
GREP = @GREP@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
HAVE_CHOWN = @HAVE_CHOWN@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FDATASYNC = @HAVE_FDATASYNC@
HAVE_FFSL = @HAVE_FFSL@
HAVE_FFSLL = @HAVE_FFSLL@
HAVE_FSYNC = @HAVE_FSYNC@
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
HAVE_GETGROUPS = @HAVE_GETGROUPS@
HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
HAVE_GETLOGIN = @HAVE_GETLOGIN@
HAVE_GETOPT_H = @HAVE_GETOPT_H@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
HAVE_LCHOWN = @HAVE_LCHOWN@
HAVE_LIBSHISHI = @HAVE_LIBSHISHI@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
HAVE_MBSLEN = @HAVE_MBSLEN@
HAVE_MEMCHR = @HAVE_MEMCHR@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_OS_H = @HAVE_OS_H@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
HAVE_PREAD = @HAVE_PREAD@
HAVE_PWRITE = @HAVE_PWRITE@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_STPCPY = @HAVE_STPCPY@
HAVE_STPNCPY = @HAVE_STPNCPY@
HAVE_STRCASESTR = @HAVE_STRCASESTR@
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
HAVE_STRPBRK = @HAVE_STRPBRK@
HAVE_STRSEP = @HAVE_STRSEP@
HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_USLEEP = @HAVE_USLEEP@
HAVE_WCHAR_T = @HAVE_WCHAR_T@
HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HELP2MAN = @HELP2MAN@
HTML_DIR = @HTML_DIR@
INCLUDE_GSS_KRB5 = @INCLUDE_GSS_KRB5@
INCLUDE_GSS_KRB5_EXT = @INCLUDE_GSS_KRB5_EXT@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBSHISHI = @LIBSHISHI@
LIBSHISHI_PREFIX = @LIBSHISHI_PREFIX@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
LTLIBSHISHI = @LTLIBSHISHI@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_STDARG_H = @NEXT_STDARG_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STRING_H = @NEXT_STRING_H@
NEXT_UNISTD_H = @NEXT_UNISTD_H@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PMCCABE = @PMCCABE@
POSUB = @POSUB@
PO_SUFFIX = @PO_SUFFIX@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
RANLIB = @RANLIB@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_MEMCHR = @REPLACE_MEMCHR@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
REPLACE_NULL = @REPLACE_NULL@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
REPLACE_UNLINK = @REPLACE_UNLINK@
REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_USLEEP = @REPLACE_USLEEP@
REPLACE_WRITE = @REPLACE_WRITE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STDARG_H = @STDARG_H@
STDDEF_H = @STDDEF_H@
STRIP = @STRIP@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
USE_NLS = @USE_NLS@
VALGRIND = @VALGRIND@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
VERSION_NUMBER = @VERSION_NUMBER@
VERSION_PATCH = @VERSION_PATCH@
WARN_CFLAGS = @WARN_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
gl_LIBOBJS = @gl_LIBOBJS@
gl_LTLIBOBJS = @gl_LTLIBOBJS@
gltests_LIBOBJS = @gltests_LIBOBJS@
gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
gltests_WITNESS = @gltests_WITNESS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libgl_LIBOBJS = @libgl_LIBOBJS@
libgl_LTLIBOBJS = @libgl_LTLIBOBJS@
libgltests_LIBOBJS = @libgltests_LIBOBJS@
libgltests_LTLIBOBJS = @libgltests_LTLIBOBJS@
libgltests_WITNESS = @libgltests_WITNESS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
srcgl_LIBOBJS = @srcgl_LIBOBJS@
srcgl_LTLIBOBJS = @srcgl_LTLIBOBJS@
srcgltests_LIBOBJS = @srcgltests_LIBOBJS@
srcgltests_LTLIBOBJS = @srcgltests_LTLIBOBJS@
srcgltests_WITNESS = @srcgltests_WITNESS@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.5 gnits
SUBDIRS =
noinst_HEADERS =
noinst_LIBRARIES =
noinst_LTLIBRARIES = libgnu.la
EXTRA_DIST = m4/gnulib-cache.m4 \
$(top_srcdir)/build-aux/snippet/arg-nonnull.h \
$(top_srcdir)/build-aux/snippet/c++defs.h \
$(top_srcdir)/build-aux/snippet/warn-on-use.h stddef.in.h \
string.in.h strverscmp.c
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
BUILT_SOURCES = arg-nonnull.h c++defs.h warn-on-use.h $(STDDEF_H) \
string.h
SUFFIXES =
MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \
c++defs.h c++defs.h-t warn-on-use.h warn-on-use.h-t stddef.h \
stddef.h-t string.h string.h-t
MOSTLYCLEANDIRS =
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
AM_CPPFLAGS =
AM_CFLAGS =
libgnu_la_SOURCES = gettext.h dummy.c
libgnu_la_LIBADD = $(libgl_LTLIBOBJS)
libgnu_la_DEPENDENCIES = $(libgl_LTLIBOBJS)
EXTRA_libgnu_la_SOURCES = strverscmp.c
libgnu_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(LTLIBINTL)
ARG_NONNULL_H = arg-nonnull.h
CXXDEFS_H = c++defs.h
WARN_ON_USE_H = warn-on-use.h
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits lib/gl/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnits lib/gl/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES)
$(AM_V_CCLD)$(libgnu_la_LINK) $(libgnu_la_OBJECTS) $(libgnu_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strverscmp.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS)
installdirs: installdirs-recursive
installdirs-am:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-recursive
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool mostlyclean-local
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
ctags-recursive install install-am install-strip \
tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic clean-libtool \
clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \
ctags-recursive distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# The arg-nonnull.h that gets inserted into generated .h files is the same as
# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
# off.
arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/GL_ARG_NONNULL/,$$p' \
< $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
> $@-t && \
mv $@-t $@
# The c++defs.h that gets inserted into generated .h files is the same as
# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/_GL_CXXDEFS/,$$p' \
< $(top_srcdir)/build-aux/snippet/c++defs.h \
> $@-t && \
mv $@-t $@
# The warn-on-use.h that gets inserted into generated .h files is the same as
# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
# off.
warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/^.ifndef/,$$p' \
< $(top_srcdir)/build-aux/snippet/warn-on-use.h \
> $@-t && \
mv $@-t $@
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
@GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status
@GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
@GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
@GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL_LIBGL|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
@GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \
@GL_GENERATE_STDDEF_H_TRUE@ } > $@-t && \
@GL_GENERATE_STDDEF_H_TRUE@ mv $@-t $@
@GL_GENERATE_STDDEF_H_FALSE@stddef.h: $(top_builddir)/config.status
@GL_GENERATE_STDDEF_H_FALSE@ rm -f $@
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL_LIBGL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
-e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
-e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
-e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
-e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
-e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
-e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
-e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
-e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
-e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
-e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
-e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
-e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
-e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
-e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
-e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
-e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
-e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
-e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
-e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
-e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
-e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
-e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
-e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
-e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
-e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
-e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
-e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
-e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
-e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
-e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
-e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
-e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
-e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
-e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
< $(srcdir)/string.in.h | \
sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
-e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
-e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
-e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
-e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
-e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
-e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
-e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
-e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
< $(srcdir)/string.in.h; \
} > $@-t && \
mv $@-t $@
mostlyclean-local: mostlyclean-generic
@for dir in '' $(MOSTLYCLEANDIRS); do \
if test -n "$$dir" && test -d $$dir; then \
echo "rmdir $$dir"; rmdir $$dir; \
fi; \
done; \
:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gss-1.0.2/lib/gl/gettext.h 0000644 0000000 0000000 00000010444 11662447025 012214 0000000 0000000 /* Convenience header for conditional use of GNU .
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software
Foundation, Inc.
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, 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. */
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */
#if ENABLE_NLS
/* Get declarations of GNU message catalog functions. */
# include
/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
the gettext() and ngettext() macros. This is an alternative to calling
textdomain(), and is useful for libraries. */
# ifdef DEFAULT_TEXT_DOMAIN
# undef gettext
# define gettext(Msgid) \
dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
# undef ngettext
# define ngettext(Msgid1, Msgid2, N) \
dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
# endif
#else
/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
chokes if dcgettext is defined as a macro. So include it now, to make
later inclusions of a NOP. We don't include
as well because people using "gettext.h" will not include ,
and also including would fail on SunOS 4, whereas
is OK. */
#if defined(__sun)
# include
#endif
/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
, which chokes if dcgettext is defined as a macro. So include
it now, to make later inclusions of a NOP. */
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
# include
# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
# include
# endif
#endif
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions.
On pre-ANSI systems without 'const', the config.h file is supposed to
contain "#define const". */
# undef gettext
# define gettext(Msgid) ((const char *) (Msgid))
# undef dgettext
# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
# undef dcgettext
# define dcgettext(Domainname, Msgid, Category) \
((void) (Category), dgettext (Domainname, Msgid))
# undef ngettext
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 \
? ((void) (Msgid2), (const char *) (Msgid1)) \
: ((void) (Msgid1), (const char *) (Msgid2)))
# undef dngettext
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((void) (Domainname), ngettext (Msgid1, Msgid2, N))
# undef dcngettext
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
# undef textdomain
# define textdomain(Domainname) ((const char *) (Domainname))
# undef bindtextdomain
# define bindtextdomain(Domainname, Dirname) \
((void) (Domainname), (const char *) (Dirname))
# undef bind_textdomain_codeset
# define bind_textdomain_codeset(Domainname, Codeset) \
((void) (Domainname), (const char *) (Codeset))
#endif
/* Prefer gnulib's setlocale override over libintl's setlocale override. */
#ifdef GNULIB_defined_setlocale
# undef setlocale
# define setlocale rpl_setlocale
#endif
/* A pseudo function call that serves as a marker for the automated
extraction of messages, but does not call gettext(). The run-time
translation is done at a different place in the code.
The argument, String, should be a literal string. Concatenated strings
and other string expressions won't work.
The macro's expansion is not parenthesized, so that it is suitable as
initializer for static 'char[]' or 'const char[]' variables. */
#define gettext_noop(String) String
#endif /* _LIBGETTEXT_H */
gss-1.0.2/lib/gl/m4/ 0000755 0000000 0000000 00000000000 11663555055 010760 5 0000000 0000000 gss-1.0.2/lib/gl/m4/warn-on-use.m4 0000644 0000000 0000000 00000004160 11662447025 013312 0000000 0000000 # warn-on-use.m4 serial 4
dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES)
# ---------------------------------------
# For each whitespace-separated element in the list of NAMES, define
# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES
# even after being undefined as a macro.
#
# See warn-on-use.h for some hints on how to poison function names, as
# well as ideas on poisoning global variables and macros. NAMES may
# include global variables, but remember that only functions work with
# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single
# header, but if the replacement header pulls in other headers because
# some systems declare functions in the wrong header, then INCLUDES
# should do likewise.
#
# If you assume C89, then it is generally safe to assume declarations
# for functions declared in that standard (such as gets) without
# needing gl_WARN_ON_USE_PREPARE.
AC_DEFUN([gl_WARN_ON_USE_PREPARE],
[
m4_foreach_w([gl_decl], [$2],
[AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
[Define to 1 if ]m4_defn([gl_decl])[ is declared even after
undefining macros.])])dnl
dnl FIXME: gl_Symbol must be used unquoted until we can assume
dnl autoconf 2.64 or newer.
for gl_func in m4_flatten([$2]); do
AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
AC_CACHE_CHECK([whether $gl_func is declared without a macro],
gl_Symbol,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
[@%:@undef $gl_func
(void) $gl_func;])],
[AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
AS_VAR_IF(gl_Symbol, [yes],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
dnl shortcut - if the raw declaration exists, then set a cache
dnl variable to allow skipping any later AC_CHECK_DECL efforts
eval ac_cv_have_decl_$gl_func=yes])
AS_VAR_POPDEF([gl_Symbol])dnl
done
])
gss-1.0.2/lib/gl/m4/ld-output-def.m4 0000644 0000000 0000000 00000002036 11662447025 013630 0000000 0000000 # ld-output-def.m4 serial 2
dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Simon Josefsson
# gl_LD_OUTPUT_DEF()
# -------------
# Check if linker supports -Wl,--output-def and define automake
# conditional HAVE_LD_OUTPUT_DEF if it is.
AC_DEFUN([gl_LD_OUTPUT_DEF],
[
AC_CACHE_CHECK([if gcc/ld supports -Wl,--output-def],
[gl_cv_ld_output_def],
[if test "$enable_shared" = no; then
gl_cv_ld_output_def="not needed, shared libraries are disabled"
else
gl_ldflags_save=$LDFLAGS
LDFLAGS="-Wl,--output-def,conftest.def"
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[gl_cv_ld_output_def=yes],
[gl_cv_ld_output_def=no])
rm -f conftest.def
LDFLAGS="$gl_ldflags_save"
fi])
AM_CONDITIONAL([HAVE_LD_OUTPUT_DEF], test "x$gl_cv_ld_output_def" = "xyes")
])
gss-1.0.2/lib/gl/m4/stddef_h.m4 0000644 0000000 0000000 00000002755 11662447025 012727 0000000 0000000 dnl A placeholder for POSIX 2008 , for platforms that have issues.
# stddef_h.m4 serial 4
dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STDDEF_H],
[
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
AC_REQUIRE([gt_TYPE_WCHAR_T])
STDDEF_H=
if test $gt_cv_c_wchar_t = no; then
HAVE_WCHAR_T=0
STDDEF_H=stddef.h
fi
AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
[gl_cv_decl_null_works],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include
int test[2 * (sizeof NULL == sizeof (void *)) -1];
]])],
[gl_cv_decl_null_works=yes],
[gl_cv_decl_null_works=no])])
if test $gl_cv_decl_null_works = no; then
REPLACE_NULL=1
STDDEF_H=stddef.h
fi
AC_SUBST([STDDEF_H])
AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"])
if test -n "$STDDEF_H"; then
gl_NEXT_HEADERS([stddef.h])
fi
])
AC_DEFUN([gl_STDDEF_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
])
AC_DEFUN([gl_STDDEF_H_DEFAULTS],
[
dnl Assume proper GNU behavior unless another module says otherwise.
REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
])
gss-1.0.2/lib/gl/m4/gnulib-cache.m4 0000644 0000000 0000000 00000003764 11662447025 013471 0000000 0000000 # Copyright (C) 2002-2011 Free Software Foundation, Inc.
#
# This file 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 file 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 file. If not, see .
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
#
# This file represents the specification of how gnulib-tool is used.
# It acts as a cache: It is written and read by gnulib-tool.
# In projects that use version control, this file is meant to be put under
# version control, like the configure.ac and various Makefile.am files.
# Specification in the form of a command-line invocation:
# gnulib-tool --import --dir=. --local-dir=lib/gl/override --lib=libgnu --source-base=lib/gl --m4-base=lib/gl/m4 --doc-base=doc --tests-base=lib/gl/tests --aux-dir=build-aux --avoid=xalloc-die --no-conditional-dependencies --libtool --macro-prefix=libgl --no-vc-files gettext-h lib-msvc-compat strverscmp
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([lib/gl/override])
gl_MODULES([
gettext-h
lib-msvc-compat
strverscmp
])
gl_AVOID([xalloc-die])
gl_SOURCE_BASE([lib/gl])
gl_M4_BASE([lib/gl/m4])
gl_PO_BASE([])
gl_DOC_BASE([doc])
gl_TESTS_BASE([lib/gl/tests])
gl_LIB([libgnu])
gl_MAKEFILE_NAME([])
gl_LIBTOOL
gl_MACRO_PREFIX([libgl])
gl_PO_DOMAIN([])
gl_WITNESS_C_DOMAIN([])
gl_VC_FILES([false])
gss-1.0.2/lib/gl/m4/include_next.m4 0000644 0000000 0000000 00000025424 11662447025 013626 0000000 0000000 # include_next.m4 serial 23
dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert and Derek Price.
dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER.
dnl
dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
dnl 'include' otherwise.
dnl
dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler
dnl supports it in the special case that it is the first include directive in
dnl the given file, or to 'include' otherwise.
dnl
dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next,
dnl so as to avoid GCC warnings when the gcc option -pedantic is used.
dnl '#pragma GCC system_header' has the same effect as if the file was found
dnl through the include search path specified with '-isystem' options (as
dnl opposed to the search path specified with '-I' options). Namely, gcc
dnl does not warn about some things, and on some systems (Solaris and Interix)
dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side
dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead
dnl of plain '__STDC__'.
dnl
dnl PRAGMA_COLUMNS can be used in files that override system header files, so
dnl as to avoid compilation errors on HP NonStop systems when the gnulib file
dnl is included by a system header file that does a "#pragma COLUMNS 80" (which
dnl has the effect of truncating the lines of that file and all files that it
dnl includes to 80 columns) and the gnulib file has lines longer than 80
dnl columns.
AC_DEFUN([gl_INCLUDE_NEXT],
[
AC_LANG_PREPROC_REQUIRE()
AC_CACHE_CHECK([whether the preprocessor supports include_next],
[gl_cv_have_include_next],
[rm -rf conftestd1a conftestd1b conftestd2
mkdir conftestd1a conftestd1b conftestd2
dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on
dnl AIX 6.1 support include_next when used as first preprocessor directive
dnl in a file, but not when preceded by another include directive. Check
dnl for this bug by including .
dnl Additionally, with this same compiler, include_next is a no-op when
dnl used in a header file that was included by specifying its absolute
dnl file name. Despite these two bugs, include_next is used in the
dnl compiler's . By virtue of the second bug, we need to use
dnl include_next as well in this case.
cat < conftestd1a/conftest.h
#define DEFINED_IN_CONFTESTD1
#include_next
#ifdef DEFINED_IN_CONFTESTD2
int foo;
#else
#error "include_next doesn't work"
#endif
EOF
cat < conftestd1b/conftest.h
#define DEFINED_IN_CONFTESTD1
#include
#include_next
#ifdef DEFINED_IN_CONFTESTD2
int foo;
#else
#error "include_next doesn't work"
#endif
EOF
cat < conftestd2/conftest.h
#ifndef DEFINED_IN_CONFTESTD1
#error "include_next test doesn't work"
#endif
#define DEFINED_IN_CONFTESTD2
EOF
gl_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
dnl We intentionally avoid using AC_LANG_SOURCE here.
AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]],
[gl_cv_have_include_next=yes],
[CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]],
[gl_cv_have_include_next=buggy],
[gl_cv_have_include_next=no])
])
CPPFLAGS="$gl_save_CPPFLAGS"
rm -rf conftestd1a conftestd1b conftestd2
])
PRAGMA_SYSTEM_HEADER=
if test $gl_cv_have_include_next = yes; then
INCLUDE_NEXT=include_next
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
if test -n "$GCC"; then
PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
fi
else
if test $gl_cv_have_include_next = buggy; then
INCLUDE_NEXT=include
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
else
INCLUDE_NEXT=include
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
fi
fi
AC_SUBST([INCLUDE_NEXT])
AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
AC_SUBST([PRAGMA_SYSTEM_HEADER])
AC_CACHE_CHECK([whether system header files limit the line length],
[gl_cv_pragma_columns],
[dnl HP NonStop systems, which define __TANDEM, have this misfeature.
AC_EGREP_CPP([choke me],
[
#ifdef __TANDEM
choke me
#endif
],
[gl_cv_pragma_columns=yes],
[gl_cv_pragma_columns=no])
])
if test $gl_cv_pragma_columns = yes; then
PRAGMA_COLUMNS="#pragma COLUMNS 10000"
else
PRAGMA_COLUMNS=
fi
AC_SUBST([PRAGMA_COLUMNS])
])
# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
# ------------------------------------------
# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be
# ''; otherwise define it to be
# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
# Also, if #include_next works as first preprocessing directive in a file,
# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be ''; otherwise define it to
# be
# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
# That way, a header file with the following line:
# #@INCLUDE_NEXT@ @NEXT_FOO_H@
# or
# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@
# behaves (after sed substitution) as if it contained
# #include_next
# even if the compiler does not support include_next.
# The three "///" are to pacify Sun C 5.8, which otherwise would say
# "warning: #include of /usr/include/... may be non-portable".
# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
# Note: This macro assumes that the header file is not empty after
# preprocessing, i.e. it does not only define preprocessor macros but also
# provides some type/enum definitions or function/variable declarations.
#
# This macro also checks whether each header exists, by invoking
# AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument.
AC_DEFUN([gl_CHECK_NEXT_HEADERS],
[
gl_NEXT_HEADERS_INTERNAL([$1], [check])
])
# gl_NEXT_HEADERS(HEADER1 HEADER2 ...)
# ------------------------------------
# Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist.
# This is suitable for headers like that are standardized by C89
# and therefore can be assumed to exist.
AC_DEFUN([gl_NEXT_HEADERS],
[
gl_NEXT_HEADERS_INTERNAL([$1], [assume])
])
# The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS.
AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
[
AC_REQUIRE([gl_INCLUDE_NEXT])
AC_REQUIRE([AC_CANONICAL_HOST])
m4_if([$2], [check],
[AC_CHECK_HEADERS_ONCE([$1])
])
dnl FIXME: gl_next_header and gl_header_exists must be used unquoted
dnl until we can assume autoconf 2.64 or newer.
m4_foreach_w([gl_HEADER_NAME], [$1],
[AS_VAR_PUSHDEF([gl_next_header],
[gl_cv_next_]m4_defn([gl_HEADER_NAME]))
if test $gl_cv_have_include_next = yes; then
AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
else
AC_CACHE_CHECK(
[absolute name of <]m4_defn([gl_HEADER_NAME])[>],
m4_defn([gl_next_header]),
[m4_if([$2], [check],
[AS_VAR_PUSHDEF([gl_header_exists],
[ac_cv_header_]m4_defn([gl_HEADER_NAME]))
if test AS_VAR_GET(gl_header_exists) = yes; then
AS_VAR_POPDEF([gl_header_exists])
])
AC_LANG_CONFTEST(
[AC_LANG_SOURCE(
[[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
)])
dnl AIX "xlc -E" and "cc -E" omit #line directives for header
dnl files that contain only a #include of other header files and
dnl no non-comment tokens of their own. This leads to a failure
dnl to detect the absolute name of , ,
dnl and others. The workaround is to force preservation
dnl of comments through option -C. This ensures all necessary
dnl #line directives are present. GCC supports option -C as well.
case "$host_os" in
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
changequote(,)
case "$host_os" in
mingw*)
dnl For the sake of native Windows compilers (excluding gcc),
dnl treat backslash as a directory separator, like /.
dnl Actually, these compilers use a double-backslash as
dnl directory separator, inside the
dnl # line "filename"
dnl directives.
gl_dirsep_regex='[/\\]'
;;
*)
gl_dirsep_regex='\/'
;;
esac
dnl A sed expression that turns a string into a basic regular
dnl expression, for use within "/.../".
gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
changequote([,])
gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \
| sed -e "$gl_make_literal_regex_sed"`
gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
changequote(,)dnl
s|^/[^/]|//&|
changequote([,])dnl
p
q
}'
dnl eval is necessary to expand gl_absname_cpp.
dnl Ultrix and Pyramid sh refuse to redirect output of eval,
dnl so use subshell.
AS_VAR_SET(gl_next_header,
['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
sed -n "$gl_absolute_header_sed"`'"'])
m4_if([$2], [check],
[else
AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
fi
])
])
fi
AC_SUBST(
AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
[AS_VAR_GET(gl_next_header)])
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
gl_next_as_first_directive='<'gl_HEADER_NAME'>'
else
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
gl_next_as_first_directive=AS_VAR_GET(gl_next_header)
fi
AC_SUBST(
AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
[$gl_next_as_first_directive])
AS_VAR_POPDEF([gl_next_header])])
])
# Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE;
# this fallback is safe for all earlier autoconf versions.
m4_define_default([AC_LANG_DEFINES_PROVIDED])
gss-1.0.2/lib/gl/m4/gnulib-comp.m4 0000644 0000000 0000000 00000020650 11662447025 013355 0000000 0000000 # DO NOT EDIT! GENERATED AUTOMATICALLY!
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
#
# This file 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 file 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 file. If not, see .
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
#
# This file represents the compiled summary of the specification in
# gnulib-cache.m4. It lists the computed macro invocations that need
# to be invoked from configure.ac.
# In projects that use version control, this file can be treated like
# other built files.
# This macro should be invoked from ./configure.ac, in the section
# "Checks for programs", right after AC_PROG_CC, and certainly before
# any checks for libraries, header files, types and library functions.
AC_DEFUN([libgl_EARLY],
[
m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
m4_pattern_allow([^gl_ES$])dnl a valid locale name
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
AC_REQUIRE([gl_PROG_AR_RANLIB])
# Code from module extensions:
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
# Code from module gettext-h:
# Code from module include_next:
# Code from module lib-msvc-compat:
# Code from module snippet/arg-nonnull:
# Code from module snippet/c++defs:
# Code from module snippet/warn-on-use:
# Code from module stddef:
# Code from module string:
# Code from module strverscmp:
])
# This macro should be invoked from ./configure.ac, in the section
# "Check for header files, types and library functions".
AC_DEFUN([libgl_INIT],
[
AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
gl_cond_libtool=true
gl_m4_base='lib/gl/m4'
m4_pushdef([AC_LIBOBJ], m4_defn([libgl_LIBOBJ]))
m4_pushdef([AC_REPLACE_FUNCS], m4_defn([libgl_REPLACE_FUNCS]))
m4_pushdef([AC_LIBSOURCES], m4_defn([libgl_LIBSOURCES]))
m4_pushdef([libgl_LIBSOURCES_LIST], [])
m4_pushdef([libgl_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='lib/gl'
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
gl_LD_OUTPUT_DEF
gl_STDDEF_H
gl_HEADER_STRING_H
gl_FUNC_STRVERSCMP
if test $HAVE_STRVERSCMP = 0; then
AC_LIBOBJ([strverscmp])
gl_PREREQ_STRVERSCMP
fi
gl_STRING_MODULE_INDICATOR([strverscmp])
# End of code from modules
m4_ifval(libgl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([libgl_LIBSOURCES_DIR])[ ||
for gl_file in ]libgl_LIBSOURCES_LIST[ ; do
if test ! -r ]m4_defn([libgl_LIBSOURCES_DIR])[/$gl_file ; then
echo "missing file ]m4_defn([libgl_LIBSOURCES_DIR])[/$gl_file" >&2
exit 1
fi
done])dnl
m4_if(m4_sysval, [0], [],
[AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
])
m4_popdef([libgl_LIBSOURCES_DIR])
m4_popdef([libgl_LIBSOURCES_LIST])
m4_popdef([AC_LIBSOURCES])
m4_popdef([AC_REPLACE_FUNCS])
m4_popdef([AC_LIBOBJ])
AC_CONFIG_COMMANDS_PRE([
libgl_libobjs=
libgl_ltlibobjs=
if test -n "$libgl_LIBOBJS"; then
# Remove the extension.
sed_drop_objext='s/\.o$//;s/\.obj$//'
for i in `for i in $libgl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
libgl_libobjs="$libgl_libobjs $i.$ac_objext"
libgl_ltlibobjs="$libgl_ltlibobjs $i.lo"
done
fi
AC_SUBST([libgl_LIBOBJS], [$libgl_libobjs])
AC_SUBST([libgl_LTLIBOBJS], [$libgl_ltlibobjs])
])
gltests_libdeps=
gltests_ltlibdeps=
m4_pushdef([AC_LIBOBJ], m4_defn([libgltests_LIBOBJ]))
m4_pushdef([AC_REPLACE_FUNCS], m4_defn([libgltests_REPLACE_FUNCS]))
m4_pushdef([AC_LIBSOURCES], m4_defn([libgltests_LIBSOURCES]))
m4_pushdef([libgltests_LIBSOURCES_LIST], [])
m4_pushdef([libgltests_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='lib/gl/tests'
changequote(,)dnl
libgltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
changequote([, ])dnl
AC_SUBST([libgltests_WITNESS])
gl_module_indicator_condition=$libgltests_WITNESS
m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
m4_popdef([gl_MODULE_INDICATOR_CONDITION])
m4_ifval(libgltests_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([libgltests_LIBSOURCES_DIR])[ ||
for gl_file in ]libgltests_LIBSOURCES_LIST[ ; do
if test ! -r ]m4_defn([libgltests_LIBSOURCES_DIR])[/$gl_file ; then
echo "missing file ]m4_defn([libgltests_LIBSOURCES_DIR])[/$gl_file" >&2
exit 1
fi
done])dnl
m4_if(m4_sysval, [0], [],
[AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
])
m4_popdef([libgltests_LIBSOURCES_DIR])
m4_popdef([libgltests_LIBSOURCES_LIST])
m4_popdef([AC_LIBSOURCES])
m4_popdef([AC_REPLACE_FUNCS])
m4_popdef([AC_LIBOBJ])
AC_CONFIG_COMMANDS_PRE([
libgltests_libobjs=
libgltests_ltlibobjs=
if test -n "$libgltests_LIBOBJS"; then
# Remove the extension.
sed_drop_objext='s/\.o$//;s/\.obj$//'
for i in `for i in $libgltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
libgltests_libobjs="$libgltests_libobjs $i.$ac_objext"
libgltests_ltlibobjs="$libgltests_ltlibobjs $i.lo"
done
fi
AC_SUBST([libgltests_LIBOBJS], [$libgltests_libobjs])
AC_SUBST([libgltests_LTLIBOBJS], [$libgltests_ltlibobjs])
])
])
# Like AC_LIBOBJ, except that the module name goes
# into libgl_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([libgl_LIBOBJ], [
AS_LITERAL_IF([$1], [libgl_LIBSOURCES([$1.c])])dnl
libgl_LIBOBJS="$libgl_LIBOBJS $1.$ac_objext"
])
# Like AC_REPLACE_FUNCS, except that the module name goes
# into libgl_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([libgl_REPLACE_FUNCS], [
m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
AC_CHECK_FUNCS([$1], , [libgl_LIBOBJ($ac_func)])
])
# Like AC_LIBSOURCES, except the directory where the source file is
# expected is derived from the gnulib-tool parameterization,
# and alloca is special cased (for the alloca-opt module).
# We could also entirely rely on EXTRA_lib..._SOURCES.
AC_DEFUN([libgl_LIBSOURCES], [
m4_foreach([_gl_NAME], [$1], [
m4_if(_gl_NAME, [alloca.c], [], [
m4_define([libgl_LIBSOURCES_DIR], [lib/gl])
m4_append([libgl_LIBSOURCES_LIST], _gl_NAME, [ ])
])
])
])
# Like AC_LIBOBJ, except that the module name goes
# into libgltests_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([libgltests_LIBOBJ], [
AS_LITERAL_IF([$1], [libgltests_LIBSOURCES([$1.c])])dnl
libgltests_LIBOBJS="$libgltests_LIBOBJS $1.$ac_objext"
])
# Like AC_REPLACE_FUNCS, except that the module name goes
# into libgltests_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([libgltests_REPLACE_FUNCS], [
m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
AC_CHECK_FUNCS([$1], , [libgltests_LIBOBJ($ac_func)])
])
# Like AC_LIBSOURCES, except the directory where the source file is
# expected is derived from the gnulib-tool parameterization,
# and alloca is special cased (for the alloca-opt module).
# We could also entirely rely on EXTRA_lib..._SOURCES.
AC_DEFUN([libgltests_LIBSOURCES], [
m4_foreach([_gl_NAME], [$1], [
m4_if(_gl_NAME, [alloca.c], [], [
m4_define([libgltests_LIBSOURCES_DIR], [lib/gl/tests])
m4_append([libgltests_LIBSOURCES_LIST], _gl_NAME, [ ])
])
])
])
# This macro records the list of files which have been installed by
# gnulib-tool and may be removed by future gnulib-tool invocations.
AC_DEFUN([libgl_FILE_LIST], [
build-aux/snippet/arg-nonnull.h
build-aux/snippet/c++defs.h
build-aux/snippet/warn-on-use.h
lib/dummy.c
lib/gettext.h
lib/stddef.in.h
lib/string.in.h
lib/strverscmp.c
m4/00gnulib.m4
m4/extensions.m4
m4/gnulib-common.m4
m4/include_next.m4
m4/ld-output-def.m4
m4/stddef_h.m4
m4/string_h.m4
m4/strverscmp.m4
m4/warn-on-use.m4
m4/wchar_t.m4
])
gss-1.0.2/lib/gl/m4/string_h.m4 0000644 0000000 0000000 00000012714 11662447025 012760 0000000 0000000 # Configure a GNU-like replacement for .
# Copyright (C) 2007-2011 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 21
# Written by Paul Eggert.
AC_DEFUN([gl_HEADER_STRING_H],
[
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_HEADER_STRING_H_BODY])
])
AC_DEFUN([gl_HEADER_STRING_H_BODY],
[
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
gl_NEXT_HEADERS([string.h])
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use, and which is not
dnl guaranteed by C89.
gl_WARN_ON_USE_PREPARE([[#include
]],
[ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
strerror_r strsignal strverscmp])
])
AC_DEFUN([gl_STRING_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
dnl Define it also as a C macro, for the benefit of the unit tests.
gl_MODULE_INDICATOR_FOR_TESTS([$1])
])
AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
[
GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR])
GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP])
GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT])
GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP])
GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR])
GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN])
GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR])
GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR])
GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR])
GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP])
GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR])
GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN])
GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK])
GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R])
GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR])
HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R])
HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY])
REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R])
REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN])
REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
])
gss-1.0.2/lib/gl/m4/extensions.m4 0000644 0000000 0000000 00000010736 11662447025 013344 0000000 0000000 # serial 10 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
# Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
# Autoconf. Perhaps we can remove this once we can assume Autoconf
# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
# If autoconf reports a warning
# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
# the fix is
# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
# but always AC_REQUIREd,
# 2) to ensure that for each occurrence of
# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
# or
# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
# the corresponding gnulib module description has 'extensions' among
# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
# invocation occurs in gl_EARLY, not in gl_INIT.
# AC_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
# Remember that #undef in AH_VERBATIM gets replaced with #define by
# AC_DEFINE. The goal here is to define all known feature-enabling
# macros, then, if reports of conflicts are made, disable macros that
# cause problems on some platforms (such as __EXTENSIONS__).
AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
if test "$MINIX" = yes; then
AC_DEFINE([_POSIX_SOURCE], [1],
[Define to 1 if you need to in order for `stat' and other
things to work.])
AC_DEFINE([_POSIX_1_SOURCE], [2],
[Define to 2 if the system does not provide POSIX.1 features
except with this defined.])
AC_DEFINE([_MINIX], [1],
[Define to 1 if on MINIX.])
fi
dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
dnl provided.
case "$host_os" in
hpux*)
AC_DEFINE([_XOPEN_SOURCE], [500],
[Define to 500 only on HP-UX.])
;;
esac
AH_VERBATIM([__EXTENSIONS__],
[/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable general extensions on MacOS X. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
])
AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
[ac_cv_safe_to_define___extensions__],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
# define __EXTENSIONS__ 1
]AC_INCLUDES_DEFAULT])],
[ac_cv_safe_to_define___extensions__=yes],
[ac_cv_safe_to_define___extensions__=no])])
test $ac_cv_safe_to_define___extensions__ = yes &&
AC_DEFINE([__EXTENSIONS__])
AC_DEFINE([_ALL_SOURCE])
AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([_TANDEM_SOURCE])
])# AC_USE_SYSTEM_EXTENSIONS
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
[
dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
dnl gnulib does not need it. But if it gets required by third-party macros
dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
])
gss-1.0.2/lib/gl/m4/strverscmp.m4 0000644 0000000 0000000 00000001206 11662447025 013345 0000000 0000000 # strverscmp.m4 serial 8
dnl Copyright (C) 2002, 2005-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRVERSCMP],
[
dnl Persuade glibc to declare strverscmp().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_CHECK_FUNCS([strverscmp])
if test $ac_cv_func_strverscmp = no; then
HAVE_STRVERSCMP=0
fi
])
# Prerequisites of lib/strverscmp.c.
AC_DEFUN([gl_PREREQ_STRVERSCMP], [
:
])
gss-1.0.2/lib/gl/strverscmp.c 0000644 0000000 0000000 00000007570 11662447025 012741 0000000 0000000 /* Compare strings while treating digits characters numerically.
Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2011 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jean-François Bignolles , 1997.
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, 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. */
#if !_LIBC
# include
#endif
#include
#include
/* states: S_N: normal, S_I: comparing integral part, S_F: comparing
fractional parts, S_Z: idem but with leading Zeroes only */
#define S_N 0x0
#define S_I 0x4
#define S_F 0x8
#define S_Z 0xC
/* result_type: CMP: return diff; LEN: compare using len_diff/diff */
#define CMP 2
#define LEN 3
/* ISDIGIT differs from isdigit, as follows:
- Its arg may be any int or unsigned int; it need not be an unsigned char
or EOF.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
isdigit unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
#undef __strverscmp
#undef strverscmp
#ifndef weak_alias
# define __strverscmp strverscmp
#endif
/* Compare S1 and S2 as strings holding indices/version numbers,
returning less than, equal to or greater than zero if S1 is less than,
equal to or greater than S2 (for more info, see the texinfo doc).
*/
int
__strverscmp (const char *s1, const char *s2)
{
const unsigned char *p1 = (const unsigned char *) s1;
const unsigned char *p2 = (const unsigned char *) s2;
unsigned char c1, c2;
int state;
int diff;
/* Symbol(s) 0 [1-9] others (padding)
Transition (10) 0 (01) d (00) x (11) - */
static const unsigned int next_state[] =
{
/* state x d 0 - */
/* S_N */ S_N, S_I, S_Z, S_N,
/* S_I */ S_N, S_I, S_I, S_I,
/* S_F */ S_N, S_F, S_F, S_F,
/* S_Z */ S_N, S_F, S_Z, S_Z
};
static const int result_type[] =
{
/* state x/x x/d x/0 x/- d/x d/d d/0 d/-
0/x 0/d 0/0 0/- -/x -/d -/0 -/- */
/* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
/* S_I */ CMP, -1, -1, CMP, 1, LEN, LEN, CMP,
1, LEN, LEN, CMP, CMP, CMP, CMP, CMP,
/* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
/* S_Z */ CMP, 1, 1, CMP, -1, CMP, CMP, CMP,
-1, CMP, CMP, CMP
};
if (p1 == p2)
return 0;
c1 = *p1++;
c2 = *p2++;
/* Hint: '0' is a digit too. */
state = S_N | ((c1 == '0') + (ISDIGIT (c1) != 0));
while ((diff = c1 - c2) == 0 && c1 != '\0')
{
state = next_state[state];
c1 = *p1++;
c2 = *p2++;
state |= (c1 == '0') + (ISDIGIT (c1) != 0);
}
state = result_type[state << 2 | ((c2 == '0') + (ISDIGIT (c2) != 0))];
switch (state)
{
case CMP:
return diff;
case LEN:
while (ISDIGIT (*p1++))
if (!ISDIGIT (*p2++))
return 1;
return ISDIGIT (*p2) ? -1 : diff;
default:
return state;
}
}
#ifdef weak_alias
weak_alias (__strverscmp, strverscmp)
#endif
gss-1.0.2/lib/gl/string.in.h 0000644 0000000 0000000 00000115224 11662447025 012445 0000000 0000000 /* A GNU-like .
Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc.
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, 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. */
#ifndef _@GUARD_PREFIX@_STRING_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STRING_H@
#ifndef _@GUARD_PREFIX@_STRING_H
#define _@GUARD_PREFIX@_STRING_H
/* NetBSD 5.0 mis-defines NULL. */
#include
/* MirBSD defines mbslen as a macro. */
#if @GNULIB_MBSLEN@ && defined __MirBSD__
# include
#endif
/* The __attribute__ feature is available in gcc versions 2.5 and later.
The attribute __pure__ was added in gcc 2.96. */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
#else
# define _GL_ATTRIBUTE_PURE /* empty */
#endif
/* NetBSD 5.0 declares strsignal in , not in . */
/* But in any case avoid namespace pollution on glibc systems. */
#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \
&& ! defined __GLIBC__
# include
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Find the index of the least-significant set bit. */
#if @GNULIB_FFSL@
# if !@HAVE_FFSL@
_GL_FUNCDECL_SYS (ffsl, int, (long int i));
# endif
_GL_CXXALIAS_SYS (ffsl, int, (long int i));
_GL_CXXALIASWARN (ffsl);
#elif defined GNULIB_POSIXCHECK
# undef ffsl
# if HAVE_RAW_DECL_FFSL
_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module");
# endif
#endif
/* Find the index of the least-significant set bit. */
#if @GNULIB_FFSLL@
# if !@HAVE_FFSLL@
_GL_FUNCDECL_SYS (ffsll, int, (long long int i));
# endif
_GL_CXXALIAS_SYS (ffsll, int, (long long int i));
_GL_CXXALIASWARN (ffsll);
#elif defined GNULIB_POSIXCHECK
# undef ffsll
# if HAVE_RAW_DECL_FFSLL
_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
# endif
#endif
/* Return the first instance of C within N bytes of S, or NULL. */
#if @GNULIB_MEMCHR@
# if @REPLACE_MEMCHR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define memchr rpl_memchr
# endif
_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
# else
# if ! @HAVE_MEMCHR@
_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
/* On some systems, this function is defined as an overloaded function:
extern "C" { const void * std::memchr (const void *, int, size_t); }
extern "C++" { void * std::memchr (void *, int, size_t); } */
_GL_CXXALIAS_SYS_CAST2 (memchr,
void *, (void const *__s, int __c, size_t __n),
void const *, (void const *__s, int __c, size_t __n));
# endif
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
_GL_CXXALIASWARN1 (memchr, void const *,
(void const *__s, int __c, size_t __n));
# else
_GL_CXXALIASWARN (memchr);
# endif
#elif defined GNULIB_POSIXCHECK
# undef memchr
/* Assume memchr is always declared. */
_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
"use gnulib module memchr for portability" );
#endif
/* Return the first occurrence of NEEDLE in HAYSTACK. */
#if @GNULIB_MEMMEM@
# if @REPLACE_MEMMEM@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define memmem rpl_memmem
# endif
_GL_FUNCDECL_RPL (memmem, void *,
(void const *__haystack, size_t __haystack_len,
void const *__needle, size_t __needle_len)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 3)));
_GL_CXXALIAS_RPL (memmem, void *,
(void const *__haystack, size_t __haystack_len,
void const *__needle, size_t __needle_len));
# else
# if ! @HAVE_DECL_MEMMEM@
_GL_FUNCDECL_SYS (memmem, void *,
(void const *__haystack, size_t __haystack_len,
void const *__needle, size_t __needle_len)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 3)));
# endif
_GL_CXXALIAS_SYS (memmem, void *,
(void const *__haystack, size_t __haystack_len,
void const *__needle, size_t __needle_len));
# endif
_GL_CXXALIASWARN (memmem);
#elif defined GNULIB_POSIXCHECK
# undef memmem
# if HAVE_RAW_DECL_MEMMEM
_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
"use gnulib module memmem-simple for portability, "
"and module memmem for speed" );
# endif
#endif
/* Copy N bytes of SRC to DEST, return pointer to bytes after the
last written byte. */
#if @GNULIB_MEMPCPY@
# if ! @HAVE_MEMPCPY@
_GL_FUNCDECL_SYS (mempcpy, void *,
(void *restrict __dest, void const *restrict __src,
size_t __n)
_GL_ARG_NONNULL ((1, 2)));
# endif
_GL_CXXALIAS_SYS (mempcpy, void *,
(void *restrict __dest, void const *restrict __src,
size_t __n));
_GL_CXXALIASWARN (mempcpy);
#elif defined GNULIB_POSIXCHECK
# undef mempcpy
# if HAVE_RAW_DECL_MEMPCPY
_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
"use gnulib module mempcpy for portability");
# endif
#endif
/* Search backwards through a block for a byte (specified as an int). */
#if @GNULIB_MEMRCHR@
# if ! @HAVE_DECL_MEMRCHR@
_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
/* On some systems, this function is defined as an overloaded function:
extern "C++" { const void * std::memrchr (const void *, int, size_t); }
extern "C++" { void * std::memrchr (void *, int, size_t); } */
_GL_CXXALIAS_SYS_CAST2 (memrchr,
void *, (void const *, int, size_t),
void const *, (void const *, int, size_t));
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t));
_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t));
# else
_GL_CXXALIASWARN (memrchr);
# endif
#elif defined GNULIB_POSIXCHECK
# undef memrchr
# if HAVE_RAW_DECL_MEMRCHR
_GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
"use gnulib module memrchr for portability");
# endif
#endif
/* Find the first occurrence of C in S. More efficient than
memchr(S,C,N), at the expense of undefined behavior if C does not
occur within N bytes. */
#if @GNULIB_RAWMEMCHR@
# if ! @HAVE_RAWMEMCHR@
_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
/* On some systems, this function is defined as an overloaded function:
extern "C++" { const void * std::rawmemchr (const void *, int); }
extern "C++" { void * std::rawmemchr (void *, int); } */
_GL_CXXALIAS_SYS_CAST2 (rawmemchr,
void *, (void const *__s, int __c_in),
void const *, (void const *__s, int __c_in));
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in));
_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in));
# else
_GL_CXXALIASWARN (rawmemchr);
# endif
#elif defined GNULIB_POSIXCHECK
# undef rawmemchr
# if HAVE_RAW_DECL_RAWMEMCHR
_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
"use gnulib module rawmemchr for portability");
# endif
#endif
/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
#if @GNULIB_STPCPY@
# if ! @HAVE_STPCPY@
_GL_FUNCDECL_SYS (stpcpy, char *,
(char *restrict __dst, char const *restrict __src)
_GL_ARG_NONNULL ((1, 2)));
# endif
_GL_CXXALIAS_SYS (stpcpy, char *,
(char *restrict __dst, char const *restrict __src));
_GL_CXXALIASWARN (stpcpy);
#elif defined GNULIB_POSIXCHECK
# undef stpcpy
# if HAVE_RAW_DECL_STPCPY
_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
"use gnulib module stpcpy for portability");
# endif
#endif
/* Copy no more than N bytes of SRC to DST, returning a pointer past the
last non-NUL byte written into DST. */
#if @GNULIB_STPNCPY@
# if @REPLACE_STPNCPY@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef stpncpy
# define stpncpy rpl_stpncpy
# endif
_GL_FUNCDECL_RPL (stpncpy, char *,
(char *restrict __dst, char const *restrict __src,
size_t __n)
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (stpncpy, char *,
(char *restrict __dst, char const *restrict __src,
size_t __n));
# else
# if ! @HAVE_STPNCPY@
_GL_FUNCDECL_SYS (stpncpy, char *,
(char *restrict __dst, char const *restrict __src,
size_t __n)
_GL_ARG_NONNULL ((1, 2)));
# endif
_GL_CXXALIAS_SYS (stpncpy, char *,
(char *restrict __dst, char const *restrict __src,
size_t __n));
# endif
_GL_CXXALIASWARN (stpncpy);
#elif defined GNULIB_POSIXCHECK
# undef stpncpy
# if HAVE_RAW_DECL_STPNCPY
_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
"use gnulib module stpncpy for portability");
# endif
#endif
#if defined GNULIB_POSIXCHECK
/* strchr() does not work with multibyte strings if the locale encoding is
GB18030 and the character to be searched is a digit. */
# undef strchr
/* Assume strchr is always declared. */
_GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
"in some multibyte locales - "
"use mbschr if you care about internationalization");
#endif
/* Find the first occurrence of C in S or the final NUL byte. */
#if @GNULIB_STRCHRNUL@
# if @REPLACE_STRCHRNUL@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define strchrnul rpl_strchrnul
# endif
_GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (strchrnul, char *,
(const char *str, int ch));
# else
# if ! @HAVE_STRCHRNUL@
_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
/* On some systems, this function is defined as an overloaded function:
extern "C++" { const char * std::strchrnul (const char *, int); }
extern "C++" { char * std::strchrnul (char *, int); } */
_GL_CXXALIAS_SYS_CAST2 (strchrnul,
char *, (char const *__s, int __c_in),
char const *, (char const *__s, int __c_in));
# endif
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in));
# else
_GL_CXXALIASWARN (strchrnul);
# endif
#elif defined GNULIB_POSIXCHECK
# undef strchrnul
# if HAVE_RAW_DECL_STRCHRNUL
_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
"use gnulib module strchrnul for portability");
# endif
#endif
/* Duplicate S, returning an identical malloc'd string. */
#if @GNULIB_STRDUP@
# if @REPLACE_STRDUP@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef strdup
# define strdup rpl_strdup
# endif
_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
# else
# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
/* strdup exists as a function and as a macro. Get rid of the macro. */
# undef strdup
# endif
# if !(@HAVE_DECL_STRDUP@ || defined strdup)
_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (strdup, char *, (char const *__s));
# endif
_GL_CXXALIASWARN (strdup);
#elif defined GNULIB_POSIXCHECK
# undef strdup
# if HAVE_RAW_DECL_STRDUP
_GL_WARN_ON_USE (strdup, "strdup is unportable - "
"use gnulib module strdup for portability");
# endif
#endif
/* Append no more than N characters from SRC onto DEST. */
#if @GNULIB_STRNCAT@
# if @REPLACE_STRNCAT@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef strncat
# define strncat rpl_strncat
# endif
_GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n)
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n));
# else
_GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n));
# endif
_GL_CXXALIASWARN (strncat);
#elif defined GNULIB_POSIXCHECK
# undef strncat
# if HAVE_RAW_DECL_STRNCAT
_GL_WARN_ON_USE (strncat, "strncat is unportable - "
"use gnulib module strncat for portability");
# endif
#endif
/* Return a newly allocated copy of at most N bytes of STRING. */
#if @GNULIB_STRNDUP@
# if @REPLACE_STRNDUP@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef strndup
# define strndup rpl_strndup
# endif
_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n));
# else
# if ! @HAVE_DECL_STRNDUP@
_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n)
_GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n));
# endif
_GL_CXXALIASWARN (strndup);
#elif defined GNULIB_POSIXCHECK
# undef strndup
# if HAVE_RAW_DECL_STRNDUP
_GL_WARN_ON_USE (strndup, "strndup is unportable - "
"use gnulib module strndup for portability");
# endif
#endif
/* Find the length (number of bytes) of STRING, but scan at most
MAXLEN bytes. If no '\0' terminator is found in that many bytes,
return MAXLEN. */
#if @GNULIB_STRNLEN@
# if @REPLACE_STRNLEN@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef strnlen
# define strnlen rpl_strnlen
# endif
_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
# else
# if ! @HAVE_DECL_STRNLEN@
_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
# endif
_GL_CXXALIASWARN (strnlen);
#elif defined GNULIB_POSIXCHECK
# undef strnlen
# if HAVE_RAW_DECL_STRNLEN
_GL_WARN_ON_USE (strnlen, "strnlen is unportable - "
"use gnulib module strnlen for portability");
# endif
#endif
#if defined GNULIB_POSIXCHECK
/* strcspn() assumes the second argument is a list of single-byte characters.
Even in this simple case, it does not work with multibyte strings if the
locale encoding is GB18030 and one of the characters to be searched is a
digit. */
# undef strcspn
/* Assume strcspn is always declared. */
_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
"in multibyte locales - "
"use mbscspn if you care about internationalization");
#endif
/* Find the first occurrence in S of any character in ACCEPT. */
#if @GNULIB_STRPBRK@
# if ! @HAVE_STRPBRK@
_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
# endif
/* On some systems, this function is defined as an overloaded function:
extern "C" { const char * strpbrk (const char *, const char *); }
extern "C++" { char * strpbrk (char *, const char *); } */
_GL_CXXALIAS_SYS_CAST2 (strpbrk,
char *, (char const *__s, char const *__accept),
const char *, (char const *__s, char const *__accept));
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
_GL_CXXALIASWARN1 (strpbrk, char const *,
(char const *__s, char const *__accept));
# else
_GL_CXXALIASWARN (strpbrk);
# endif
# if defined GNULIB_POSIXCHECK
/* strpbrk() assumes the second argument is a list of single-byte characters.
Even in this simple case, it does not work with multibyte strings if the
locale encoding is GB18030 and one of the characters to be searched is a
digit. */
# undef strpbrk
_GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings "
"in multibyte locales - "
"use mbspbrk if you care about internationalization");
# endif
#elif defined GNULIB_POSIXCHECK
# undef strpbrk
# if HAVE_RAW_DECL_STRPBRK
_GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - "
"use gnulib module strpbrk for portability");
# endif
#endif
#if defined GNULIB_POSIXCHECK
/* strspn() assumes the second argument is a list of single-byte characters.
Even in this simple case, it cannot work with multibyte strings. */
# undef strspn
/* Assume strspn is always declared. */
_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
"in multibyte locales - "
"use mbsspn if you care about internationalization");
#endif
#if defined GNULIB_POSIXCHECK
/* strrchr() does not work with multibyte strings if the locale encoding is
GB18030 and the character to be searched is a digit. */
# undef strrchr
/* Assume strrchr is always declared. */
_GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings "
"in some multibyte locales - "
"use mbsrchr if you care about internationalization");
#endif
/* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
If one is found, overwrite it with a NUL, and advance *STRINGP
to point to the next char after it. Otherwise, set *STRINGP to NULL.
If *STRINGP was already NULL, nothing happens.
Return the old value of *STRINGP.
This is a variant of strtok() that is multithread-safe and supports
empty fields.
Caveat: It modifies the original string.
Caveat: These functions cannot be used on constant strings.
Caveat: The identity of the delimiting character is lost.
Caveat: It doesn't work with multibyte strings unless all of the delimiter
characters are ASCII characters < 0x30.
See also strtok_r(). */
#if @GNULIB_STRSEP@
# if ! @HAVE_STRSEP@
_GL_FUNCDECL_SYS (strsep, char *,
(char **restrict __stringp, char const *restrict __delim)
_GL_ARG_NONNULL ((1, 2)));
# endif
_GL_CXXALIAS_SYS (strsep, char *,
(char **restrict __stringp, char const *restrict __delim));
_GL_CXXALIASWARN (strsep);
# if defined GNULIB_POSIXCHECK
# undef strsep
_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings "
"in multibyte locales - "
"use mbssep if you care about internationalization");
# endif
#elif defined GNULIB_POSIXCHECK
# undef strsep
# if HAVE_RAW_DECL_STRSEP
_GL_WARN_ON_USE (strsep, "strsep is unportable - "
"use gnulib module strsep for portability");
# endif
#endif
#if @GNULIB_STRSTR@
# if @REPLACE_STRSTR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define strstr rpl_strstr
# endif
_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle));
# else
/* On some systems, this function is defined as an overloaded function:
extern "C++" { const char * strstr (const char *, const char *); }
extern "C++" { char * strstr (char *, const char *); } */
_GL_CXXALIAS_SYS_CAST2 (strstr,
char *, (const char *haystack, const char *needle),
const char *, (const char *haystack, const char *needle));
# endif
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
_GL_CXXALIASWARN1 (strstr, const char *,
(const char *haystack, const char *needle));
# else
_GL_CXXALIASWARN (strstr);
# endif
#elif defined GNULIB_POSIXCHECK
/* strstr() does not work with multibyte strings if the locale encoding is
different from UTF-8:
POSIX says that it operates on "strings", and "string" in POSIX is defined
as a sequence of bytes, not of characters. */
# undef strstr
/* Assume strstr is always declared. */
_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
"work correctly on character strings in most "
"multibyte locales - "
"use mbsstr if you care about internationalization, "
"or use strstr if you care about speed");
#endif
/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
comparison. */
#if @GNULIB_STRCASESTR@
# if @REPLACE_STRCASESTR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define strcasestr rpl_strcasestr
# endif
_GL_FUNCDECL_RPL (strcasestr, char *,
(const char *haystack, const char *needle)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (strcasestr, char *,
(const char *haystack, const char *needle));
# else
# if ! @HAVE_STRCASESTR@
_GL_FUNCDECL_SYS (strcasestr, char *,
(const char *haystack, const char *needle)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
# endif
/* On some systems, this function is defined as an overloaded function:
extern "C++" { const char * strcasestr (const char *, const char *); }
extern "C++" { char * strcasestr (char *, const char *); } */
_GL_CXXALIAS_SYS_CAST2 (strcasestr,
char *, (const char *haystack, const char *needle),
const char *, (const char *haystack, const char *needle));
# endif
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle));
_GL_CXXALIASWARN1 (strcasestr, const char *,
(const char *haystack, const char *needle));
# else
_GL_CXXALIASWARN (strcasestr);
# endif
#elif defined GNULIB_POSIXCHECK
/* strcasestr() does not work with multibyte strings:
It is a glibc extension, and glibc implements it only for unibyte
locales. */
# undef strcasestr
# if HAVE_RAW_DECL_STRCASESTR
_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
"strings in multibyte locales - "
"use mbscasestr if you care about "
"internationalization, or use c-strcasestr if you want "
"a locale independent function");
# endif
#endif
/* Parse S into tokens separated by characters in DELIM.
If S is NULL, the saved pointer in SAVE_PTR is used as
the next starting point. For example:
char s[] = "-abc-=-def";
char *sp;
x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
x = strtok_r(NULL, "=", &sp); // x = NULL
// s = "abc\0-def\0"
This is a variant of strtok() that is multithread-safe.
For the POSIX documentation for this function, see:
http://www.opengroup.org/susv3xsh/strtok.html
Caveat: It modifies the original string.
Caveat: These functions cannot be used on constant strings.
Caveat: The identity of the delimiting character is lost.
Caveat: It doesn't work with multibyte strings unless all of the delimiter
characters are ASCII characters < 0x30.
See also strsep(). */
#if @GNULIB_STRTOK_R@
# if @REPLACE_STRTOK_R@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef strtok_r
# define strtok_r rpl_strtok_r
# endif
_GL_FUNCDECL_RPL (strtok_r, char *,
(char *restrict s, char const *restrict delim,
char **restrict save_ptr)
_GL_ARG_NONNULL ((2, 3)));
_GL_CXXALIAS_RPL (strtok_r, char *,
(char *restrict s, char const *restrict delim,
char **restrict save_ptr));
# else
# if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK
# undef strtok_r
# endif
# if ! @HAVE_DECL_STRTOK_R@
_GL_FUNCDECL_SYS (strtok_r, char *,
(char *restrict s, char const *restrict delim,
char **restrict save_ptr)
_GL_ARG_NONNULL ((2, 3)));
# endif
_GL_CXXALIAS_SYS (strtok_r, char *,
(char *restrict s, char const *restrict delim,
char **restrict save_ptr));
# endif
_GL_CXXALIASWARN (strtok_r);
# if defined GNULIB_POSIXCHECK
_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character "
"strings in multibyte locales - "
"use mbstok_r if you care about internationalization");
# endif
#elif defined GNULIB_POSIXCHECK
# undef strtok_r
# if HAVE_RAW_DECL_STRTOK_R
_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - "
"use gnulib module strtok_r for portability");
# endif
#endif
/* The following functions are not specified by POSIX. They are gnulib
extensions. */
#if @GNULIB_MBSLEN@
/* Return the number of multibyte characters in the character string STRING.
This considers multibyte characters, unlike strlen, which counts bytes. */
# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */
# undef mbslen
# endif
# if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define mbslen rpl_mbslen
# endif
_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string));
# else
_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
# endif
_GL_CXXALIASWARN (mbslen);
#endif
#if @GNULIB_MBSNLEN@
/* Return the number of multibyte characters in the character string starting
at STRING and ending at STRING + LEN. */
_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len)
_GL_ARG_NONNULL ((1));
#endif
#if @GNULIB_MBSCHR@
/* Locate the first single-byte character C in the character string STRING,
and return a pointer to it. Return NULL if C is not found in STRING.
Unlike strchr(), this function works correctly in multibyte locales with
encodings such as GB18030. */
# if defined __hpux
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define mbschr rpl_mbschr /* avoid collision with HP-UX function */
# endif
_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c));
# else
_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c));
# endif
_GL_CXXALIASWARN (mbschr);
#endif
#if @GNULIB_MBSRCHR@
/* Locate the last single-byte character C in the character string STRING,
and return a pointer to it. Return NULL if C is not found in STRING.
Unlike strrchr(), this function works correctly in multibyte locales with
encodings such as GB18030. */
# if defined __hpux || defined __INTERIX
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define mbsrchr rpl_mbsrchr /* avoid collision with system function */
# endif
_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c));
# else
_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c));
# endif
_GL_CXXALIASWARN (mbsrchr);
#endif
#if @GNULIB_MBSSTR@
/* Find the first occurrence of the character string NEEDLE in the character
string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK.
Unlike strstr(), this function works correctly in multibyte locales with
encodings different from UTF-8. */
_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle)
_GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSCASECMP@
/* Compare the character strings S1 and S2, ignoring case, returning less than,
equal to or greater than zero if S1 is lexicographically less than, equal to
or greater than S2.
Note: This function may, in multibyte locales, return 0 for strings of
different lengths!
Unlike strcasecmp(), this function works correctly in multibyte locales. */
_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2)
_GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSNCASECMP@
/* Compare the initial segment of the character string S1 consisting of at most
N characters with the initial segment of the character string S2 consisting
of at most N characters, ignoring case, returning less than, equal to or
greater than zero if the initial segment of S1 is lexicographically less
than, equal to or greater than the initial segment of S2.
Note: This function may, in multibyte locales, return 0 for initial segments
of different lengths!
Unlike strncasecmp(), this function works correctly in multibyte locales.
But beware that N is not a byte count but a character count! */
_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
_GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSPCASECMP@
/* Compare the initial segment of the character string STRING consisting of
at most mbslen (PREFIX) characters with the character string PREFIX,
ignoring case. If the two match, return a pointer to the first byte
after this prefix in STRING. Otherwise, return NULL.
Note: This function may, in multibyte locales, return non-NULL if STRING
is of smaller length than PREFIX!
Unlike strncasecmp(), this function works correctly in multibyte
locales. */
_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
_GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSCASESTR@
/* Find the first occurrence of the character string NEEDLE in the character
string HAYSTACK, using case-insensitive comparison.
Note: This function may, in multibyte locales, return success even if
strlen (haystack) < strlen (needle) !
Unlike strcasestr(), this function works correctly in multibyte locales. */
_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle)
_GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSCSPN@
/* Find the first occurrence in the character string STRING of any character
in the character string ACCEPT. Return the number of bytes from the
beginning of the string to this occurrence, or to the end of the string
if none exists.
Unlike strcspn(), this function works correctly in multibyte locales. */
_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept)
_GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSPBRK@
/* Find the first occurrence in the character string STRING of any character
in the character string ACCEPT. Return the pointer to it, or NULL if none
exists.
Unlike strpbrk(), this function works correctly in multibyte locales. */
# if defined __hpux
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
# endif
_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept)
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept));
# else
_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept)
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept));
# endif
_GL_CXXALIASWARN (mbspbrk);
#endif
#if @GNULIB_MBSSPN@
/* Find the first occurrence in the character string STRING of any character
not in the character string REJECT. Return the number of bytes from the
beginning of the string to this occurrence, or to the end of the string
if none exists.
Unlike strspn(), this function works correctly in multibyte locales. */
_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject)
_GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSSEP@
/* Search the next delimiter (multibyte character listed in the character
string DELIM) starting at the character string *STRINGP.
If one is found, overwrite it with a NUL, and advance *STRINGP to point
to the next multibyte character after it. Otherwise, set *STRINGP to NULL.
If *STRINGP was already NULL, nothing happens.
Return the old value of *STRINGP.
This is a variant of mbstok_r() that supports empty fields.
Caveat: It modifies the original string.
Caveat: These functions cannot be used on constant strings.
Caveat: The identity of the delimiting character is lost.
See also mbstok_r(). */
_GL_EXTERN_C char * mbssep (char **stringp, const char *delim)
_GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSTOK_R@
/* Parse the character string STRING into tokens separated by characters in
the character string DELIM.
If STRING is NULL, the saved pointer in SAVE_PTR is used as
the next starting point. For example:
char s[] = "-abc-=-def";
char *sp;
x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def"
x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL
x = mbstok_r(NULL, "=", &sp); // x = NULL
// s = "abc\0-def\0"
Caveat: It modifies the original string.
Caveat: These functions cannot be used on constant strings.
Caveat: The identity of the delimiting character is lost.
See also mbssep(). */
_GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr)
_GL_ARG_NONNULL ((2, 3));
#endif
/* Map any int, typically from errno, into an error message. */
#if @GNULIB_STRERROR@
# if @REPLACE_STRERROR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef strerror
# define strerror rpl_strerror
# endif
_GL_FUNCDECL_RPL (strerror, char *, (int));
_GL_CXXALIAS_RPL (strerror, char *, (int));
# else
_GL_CXXALIAS_SYS (strerror, char *, (int));
# endif
_GL_CXXALIASWARN (strerror);
#elif defined GNULIB_POSIXCHECK
# undef strerror
/* Assume strerror is always declared. */
_GL_WARN_ON_USE (strerror, "strerror is unportable - "
"use gnulib module strerror to guarantee non-NULL result");
#endif
/* Map any int, typically from errno, into an error message. Multithread-safe.
Uses the POSIX declaration, not the glibc declaration. */
#if @GNULIB_STRERROR_R@
# if @REPLACE_STRERROR_R@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef strerror_r
# define strerror_r rpl_strerror_r
# endif
_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen));
# else
# if !@HAVE_DECL_STRERROR_R@
_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)
_GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen));
# endif
# if @HAVE_DECL_STRERROR_R@
_GL_CXXALIASWARN (strerror_r);
# endif
#elif defined GNULIB_POSIXCHECK
# undef strerror_r
# if HAVE_RAW_DECL_STRERROR_R
_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
"use gnulib module strerror_r-posix for portability");
# endif
#endif
#if @GNULIB_STRSIGNAL@
# if @REPLACE_STRSIGNAL@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define strsignal rpl_strsignal
# endif
_GL_FUNCDECL_RPL (strsignal, char *, (int __sig));
_GL_CXXALIAS_RPL (strsignal, char *, (int __sig));
# else
# if ! @HAVE_DECL_STRSIGNAL@
_GL_FUNCDECL_SYS (strsignal, char *, (int __sig));
# endif
/* Need to cast, because on Cygwin 1.5.x systems, the return type is
'const char *'. */
_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig));
# endif
_GL_CXXALIASWARN (strsignal);
#elif defined GNULIB_POSIXCHECK
# undef strsignal
# if HAVE_RAW_DECL_STRSIGNAL
_GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
"use gnulib module strsignal for portability");
# endif
#endif
#if @GNULIB_STRVERSCMP@
# if !@HAVE_STRVERSCMP@
_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
_GL_ARG_NONNULL ((1, 2)));
# endif
_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));
_GL_CXXALIASWARN (strverscmp);
#elif defined GNULIB_POSIXCHECK
# undef strverscmp
# if HAVE_RAW_DECL_STRVERSCMP
_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
"use gnulib module strverscmp for portability");
# endif
#endif
#endif /* _@GUARD_PREFIX@_STRING_H */
#endif /* _@GUARD_PREFIX@_STRING_H */
gss-1.0.2/lib/headers/ 0000755 0000000 0000000 00000000000 11663555055 011451 5 0000000 0000000 gss-1.0.2/lib/headers/gss/ 0000755 0000000 0000000 00000000000 11663555055 012245 5 0000000 0000000 gss-1.0.2/lib/headers/gss/krb5-ext.h 0000644 0000000 0000000 00000003042 11546676457 014010 0000000 0000000 /* gss/krb5-ext.h --- Header file for Kerberos 5 GSS-API mechanism.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/*
* This file contains GNU GSS specific Kerberos V5 related GSS-API
* mechanism prototypes. See gss/krb5.h for official prototypes.
*
*/
#ifndef GSS_KRB5_EXT_H
# define GSS_KRB5_EXT_H
extern gss_OID GSS_KRB5;
/* Static symbols for other gss_OID types. These are useful in static
declarations. */
extern gss_OID_desc GSS_KRB5_static;
extern gss_OID_desc GSS_KRB5_NT_USER_NAME_static;
extern gss_OID_desc GSS_KRB5_NT_HOSTBASED_SERVICE_NAME_static;
extern gss_OID_desc GSS_KRB5_NT_PRINCIPAL_NAME_static;
extern gss_OID_desc GSS_KRB5_NT_MACHINE_UID_NAME_static;
extern gss_OID_desc GSS_KRB5_NT_STRING_UID_NAME_static;
#endif /* GSS_KRB5_EXT_H */
gss-1.0.2/lib/headers/gss/api.h 0000644 0000000 0000000 00000052571 11662451560 013114 0000000 0000000 /* api.h --- Header file for GSS-API.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/*
* This file was extracted by Simon Josefsson, for the GSS project,
* from RFC 2744, written by John Wray. RFC 2744 contains the
* copyright statement below.
*
* Copyright (C) The Internet Society (2000). All Rights Reserved.
*
* This document and translations of it may be copied and furnished to
* others, and derivative works that comment on or otherwise explain it
* or assist in its implementation may be prepared, copied, published
* and distributed, in whole or in part, without restriction of any
* kind, provided that the above copyright notice and this paragraph are
* included on all such copies and derivative works. However, this
* document itself may not be modified in any way, such as by removing
* the copyright notice or references to the Internet Society or other
* Internet organizations, except as needed for the purpose of
* developing Internet standards in which case the procedures for
* copyrights defined in the Internet Standards process must be
* followed, or as required to translate it into languages other than
* English.
*
* The limited permissions granted above are perpetual and will not be
* revoked by the Internet Society or its successors or assigns.
*
* This document and the information contained herein is provided on an
* "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
* TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
* BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
* HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef GSSAPI_H_
#define GSSAPI_H_
/*
* First, include stddef.h to get size_t defined.
*/
#include
/*
* Now define the three implementation-dependent types.
*/
typedef struct gss_ctx_id_struct *gss_ctx_id_t;
typedef struct gss_cred_id_struct *gss_cred_id_t;
typedef struct gss_name_struct *gss_name_t;
/*
* The following type must be defined as the smallest natural
* unsigned integer supported by the platform that has at least
* 32 bits of precision.
*/
#include
#if USHRT_MAX >= 4294967295
typedef unsigned short gss_uint32;
#elif UINT_MAX >= 4294967295
typedef unsigned int gss_uint32;
#else /* unsigned long's must be at least 32 bits according to K&R */
typedef unsigned long gss_uint32;
#endif
/*
* We don't use X/Open definitions, so roll our own.
*/
typedef gss_uint32 OM_uint32;
typedef struct gss_OID_desc_struct
{
OM_uint32 length;
void *elements;
} gss_OID_desc, *gss_OID;
typedef struct gss_OID_set_desc_struct
{
size_t count;
gss_OID elements;
} gss_OID_set_desc, *gss_OID_set;
typedef struct gss_buffer_desc_struct
{
size_t length;
void *value;
} gss_buffer_desc, *gss_buffer_t;
typedef struct gss_channel_bindings_struct
{
OM_uint32 initiator_addrtype;
gss_buffer_desc initiator_address;
OM_uint32 acceptor_addrtype;
gss_buffer_desc acceptor_address;
gss_buffer_desc application_data;
} *gss_channel_bindings_t;
/*
* For now, define a QOP-type as an OM_uint32
*/
typedef OM_uint32 gss_qop_t;
typedef int gss_cred_usage_t;
/*
* Flag bits for context-level services.
*/
#define GSS_C_DELEG_FLAG 1
#define GSS_C_MUTUAL_FLAG 2
#define GSS_C_REPLAY_FLAG 4
#define GSS_C_SEQUENCE_FLAG 8
#define GSS_C_CONF_FLAG 16
#define GSS_C_INTEG_FLAG 32
#define GSS_C_ANON_FLAG 64
#define GSS_C_PROT_READY_FLAG 128
#define GSS_C_TRANS_FLAG 256
/*
* Credential usage options
*/
#define GSS_C_BOTH 0
#define GSS_C_INITIATE 1
#define GSS_C_ACCEPT 2
/*
* Status code types for gss_display_status
*/
#define GSS_C_GSS_CODE 1
#define GSS_C_MECH_CODE 2
/*
* The constant definitions for channel-bindings address families
*/
#define GSS_C_AF_UNSPEC 0
#define GSS_C_AF_LOCAL 1
#define GSS_C_AF_INET 2
#define GSS_C_AF_IMPLINK 3
#define GSS_C_AF_PUP 4
#define GSS_C_AF_CHAOS 5
#define GSS_C_AF_NS 6
#define GSS_C_AF_NBS 7
#define GSS_C_AF_ECMA 8
#define GSS_C_AF_DATAKIT 9
#define GSS_C_AF_CCITT 10
#define GSS_C_AF_SNA 11
#define GSS_C_AF_DECnet 12
#define GSS_C_AF_DLI 13
#define GSS_C_AF_LAT 14
#define GSS_C_AF_HYLINK 15
#define GSS_C_AF_APPLETALK 16
#define GSS_C_AF_BSC 17
#define GSS_C_AF_DSS 18
#define GSS_C_AF_OSI 19
#define GSS_C_AF_X25 21
#define GSS_C_AF_NULLADDR 255
/*
* Various Null values
*/
#define GSS_C_NO_NAME ((gss_name_t) 0)
#define GSS_C_NO_BUFFER ((gss_buffer_t) 0)
#define GSS_C_NO_OID ((gss_OID) 0)
#define GSS_C_NO_OID_SET ((gss_OID_set) 0)
#define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)
#define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)
#define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)
#define GSS_C_EMPTY_BUFFER {0, NULL}
/*
* Some alternate names for a couple of the above
* values. These are defined for V1 compatibility.
*/
#define GSS_C_NULL_OID GSS_C_NO_OID
#define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET
/*
* Define the default Quality of Protection for per-message
* services. Note that an implementation that offers multiple
* levels of QOP may define GSS_C_QOP_DEFAULT to be either zero
* (as done here) to mean "default protection", or to a specific
* explicit QOP value. However, a value of 0 should always be
* interpreted by a GSS-API implementation as a request for the
* default protection level.
*/
#define GSS_C_QOP_DEFAULT 0
/*
* Expiration time of 2^32-1 seconds means infinite lifetime for a
* credential or security context
*/
#define GSS_C_INDEFINITE 0xfffffffful
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
* "\x01\x02\x01\x01"},
* corresponding to an object-identifier value of
* {iso(1) member-body(2) United States(840) mit(113554)
* infosys(1) gssapi(2) generic(1) user_name(1)}. The constant
* GSS_C_NT_USER_NAME should be initialized to point
* to that gss_OID_desc.
*/
extern gss_OID GSS_C_NT_USER_NAME;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
* "\x01\x02\x01\x02"},
* corresponding to an object-identifier value of
* {iso(1) member-body(2) United States(840) mit(113554)
* infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
* The constant GSS_C_NT_MACHINE_UID_NAME should be
* initialized to point to that gss_OID_desc.
*/
extern gss_OID GSS_C_NT_MACHINE_UID_NAME;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
* "\x01\x02\x01\x03"},
* corresponding to an object-identifier value of
* {iso(1) member-body(2) United States(840) mit(113554)
* infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
* The constant GSS_C_NT_STRING_UID_NAME should be
* initialized to point to that gss_OID_desc.
*/
extern gss_OID GSS_C_NT_STRING_UID_NAME;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
* corresponding to an object-identifier value of
* {iso(1) org(3) dod(6) internet(1) security(5)
* nametypes(6) gss-host-based-services(2)). The constant
* GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
* to that gss_OID_desc. This is a deprecated OID value, and
* implementations wishing to support hostbased-service names
* should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
* defined below, to identify such names;
* GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
* for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
* parameter, but should not be emitted by GSS-API
* implementations
*/
extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
* "\x01\x02\x01\x04"}, corresponding to an
* object-identifier value of {iso(1) member-body(2)
* Unites States(840) mit(113554) infosys(1) gssapi(2)
* generic(1) service_name(4)}. The constant
* GSS_C_NT_HOSTBASED_SERVICE should be initialized
* to point to that gss_OID_desc.
*/
extern gss_OID GSS_C_NT_HOSTBASED_SERVICE;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {6, (void *)"\x2b\x06\01\x05\x06\x03"},
* corresponding to an object identifier value of
* {1(iso), 3(org), 6(dod), 1(internet), 5(security),
* 6(nametypes), 3(gss-anonymous-name)}. The constant
* and GSS_C_NT_ANONYMOUS should be initialized to point
* to that gss_OID_desc.
*/
extern gss_OID GSS_C_NT_ANONYMOUS;
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
* corresponding to an object-identifier value of
* {1(iso), 3(org), 6(dod), 1(internet), 5(security),
* 6(nametypes), 4(gss-api-exported-name)}. The constant
* GSS_C_NT_EXPORT_NAME should be initialized to point
* to that gss_OID_desc.
*/
extern gss_OID GSS_C_NT_EXPORT_NAME;
/* Major status codes */
#define GSS_S_COMPLETE 0
/*
* Some "helper" definitions to make the status code macros obvious.
*/
#define GSS_C_CALLING_ERROR_OFFSET 24
#define GSS_C_ROUTINE_ERROR_OFFSET 16
#define GSS_C_SUPPLEMENTARY_OFFSET 0
#define GSS_C_CALLING_ERROR_MASK 0377ul
#define GSS_C_ROUTINE_ERROR_MASK 0377ul
#define GSS_C_SUPPLEMENTARY_MASK 0177777ul
/*
* The macros that test status codes for error conditions.
* Note that the GSS_ERROR() macro has changed slightly from
* the V1 GSS-API so that it now evaluates its argument
* only once.
*/
#define GSS_CALLING_ERROR(x) \
(x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
#define GSS_ROUTINE_ERROR(x) \
(x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
#define GSS_SUPPLEMENTARY_INFO(x) \
(x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
#define GSS_ERROR(x) \
(x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
(GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
/*
* Now the actual status code definitions
*/
/*
* Calling errors:
*/
#define GSS_S_CALL_INACCESSIBLE_READ (1ul << GSS_C_CALLING_ERROR_OFFSET)
#define GSS_S_CALL_INACCESSIBLE_WRITE (2ul << GSS_C_CALLING_ERROR_OFFSET)
#define GSS_S_CALL_BAD_STRUCTURE (3ul << GSS_C_CALLING_ERROR_OFFSET)
/*
* Routine errors:
*/
#define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_BAD_MIC GSS_S_BAD_SIG
#define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET)
#define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET)
/*
* Supplementary info bits:
*/
#define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
#define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
#define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
#define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
#define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
/*
* Finally, function prototypes for the GSS-API routines.
*/
OM_uint32
gss_acquire_cred (OM_uint32 * minor_status,
const gss_name_t desired_name,
OM_uint32 time_req,
const gss_OID_set desired_mechs,
gss_cred_usage_t cred_usage,
gss_cred_id_t * output_cred_handle,
gss_OID_set * actual_mechs, OM_uint32 * time_rec);
OM_uint32
gss_release_cred (OM_uint32 * minor_status, gss_cred_id_t * cred_handle);
OM_uint32
gss_init_sec_context (OM_uint32 * minor_status,
const gss_cred_id_t initiator_cred_handle,
gss_ctx_id_t * context_handle,
const gss_name_t target_name,
const gss_OID mech_type,
OM_uint32 req_flags,
OM_uint32 time_req,
const gss_channel_bindings_t input_chan_bindings,
const gss_buffer_t input_token,
gss_OID * actual_mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags, OM_uint32 * time_rec);
OM_uint32
gss_accept_sec_context (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
const gss_cred_id_t acceptor_cred_handle,
const gss_buffer_t input_token_buffer,
const gss_channel_bindings_t input_chan_bindings,
gss_name_t * src_name,
gss_OID * mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags, OM_uint32 * time_rec,
gss_cred_id_t * delegated_cred_handle);
OM_uint32
gss_process_context_token (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t token_buffer);
OM_uint32
gss_delete_sec_context (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
gss_buffer_t output_token);
OM_uint32
gss_context_time (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle, OM_uint32 * time_rec);
OM_uint32
gss_get_mic (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
gss_qop_t qop_req,
const gss_buffer_t message_buffer, gss_buffer_t message_token);
OM_uint32
gss_verify_mic (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t message_buffer,
const gss_buffer_t token_buffer, gss_qop_t * qop_state);
OM_uint32
gss_wrap (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
int conf_req_flag,
gss_qop_t qop_req,
const gss_buffer_t input_message_buffer,
int *conf_state, gss_buffer_t output_message_buffer);
OM_uint32
gss_unwrap (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t input_message_buffer,
gss_buffer_t output_message_buffer,
int *conf_state, gss_qop_t * qop_state);
OM_uint32
gss_display_status (OM_uint32 * minor_status,
OM_uint32 status_value,
int status_type,
const gss_OID mech_type,
OM_uint32 * message_context, gss_buffer_t status_string);
OM_uint32
gss_indicate_mechs (OM_uint32 * minor_status, gss_OID_set * mech_set);
OM_uint32
gss_compare_name (OM_uint32 * minor_status,
const gss_name_t name1,
const gss_name_t name2, int *name_equal);
OM_uint32
gss_display_name (OM_uint32 * minor_status,
const gss_name_t input_name,
gss_buffer_t output_name_buffer,
gss_OID * output_name_type);
OM_uint32
gss_import_name (OM_uint32 * minor_status,
const gss_buffer_t input_name_buffer,
const gss_OID input_name_type, gss_name_t * output_name);
OM_uint32
gss_export_name (OM_uint32 * minor_status,
const gss_name_t input_name, gss_buffer_t exported_name);
OM_uint32 gss_release_name (OM_uint32 * minor_status, gss_name_t * name);
OM_uint32 gss_release_buffer (OM_uint32 * minor_status, gss_buffer_t buffer);
OM_uint32 gss_release_oid_set (OM_uint32 * minor_status, gss_OID_set * set);
OM_uint32
gss_inquire_cred (OM_uint32 * minor_status,
const gss_cred_id_t cred_handle,
gss_name_t * name,
OM_uint32 * lifetime,
gss_cred_usage_t * cred_usage, gss_OID_set * mechanisms);
OM_uint32
gss_inquire_context (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
gss_name_t * src_name,
gss_name_t * targ_name,
OM_uint32 * lifetime_rec,
gss_OID * mech_type,
OM_uint32 * ctx_flags,
int *locally_initiated, int *open);
OM_uint32
gss_wrap_size_limit (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
int conf_req_flag,
gss_qop_t qop_req,
OM_uint32 req_output_size, OM_uint32 * max_input_size);
OM_uint32
gss_add_cred (OM_uint32 * minor_status,
const gss_cred_id_t input_cred_handle,
const gss_name_t desired_name,
const gss_OID desired_mech,
gss_cred_usage_t cred_usage,
OM_uint32 initiator_time_req,
OM_uint32 acceptor_time_req,
gss_cred_id_t * output_cred_handle,
gss_OID_set * actual_mechs,
OM_uint32 * initiator_time_rec, OM_uint32 * acceptor_time_rec);
OM_uint32
gss_inquire_cred_by_mech (OM_uint32 * minor_status,
const gss_cred_id_t cred_handle,
const gss_OID mech_type,
gss_name_t * name,
OM_uint32 * initiator_lifetime,
OM_uint32 * acceptor_lifetime,
gss_cred_usage_t * cred_usage);
OM_uint32
gss_export_sec_context (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
gss_buffer_t interprocess_token);
OM_uint32
gss_import_sec_context (OM_uint32 * minor_status,
const gss_buffer_t interprocess_token,
gss_ctx_id_t * context_handle);
OM_uint32
gss_create_empty_oid_set (OM_uint32 * minor_status, gss_OID_set * oid_set);
OM_uint32
gss_add_oid_set_member (OM_uint32 * minor_status,
const gss_OID member_oid, gss_OID_set * oid_set);
OM_uint32
gss_test_oid_set_member (OM_uint32 * minor_status,
const gss_OID member,
const gss_OID_set set, int *present);
OM_uint32
gss_inquire_names_for_mech (OM_uint32 * minor_status,
const gss_OID mechanism,
gss_OID_set * name_types);
OM_uint32
gss_inquire_mechs_for_name (OM_uint32 * minor_status,
const gss_name_t input_name,
gss_OID_set * mech_types);
OM_uint32
gss_canonicalize_name (OM_uint32 * minor_status,
const gss_name_t input_name,
const gss_OID mech_type, gss_name_t * output_name);
OM_uint32
gss_duplicate_name (OM_uint32 * minor_status,
const gss_name_t src_name, gss_name_t * dest_name);
/*
* The following routines are obsolete variants of gss_get_mic,
* gss_verify_mic, gss_wrap and gss_unwrap. They should be
* provided by GSS-API V2 implementations for backwards
* compatibility with V1 applications. Distinct entrypoints
* (as opposed to #defines) should be provided, both to allow
* GSS-API V1 applications to link against GSS-API V2
implementations,
* and to retain the slight parameter type differences between the
* obsolete versions of these routines and their current forms.
*/
OM_uint32
gss_sign (OM_uint32 * minor_status,
gss_ctx_id_t context_handle,
int qop_req,
gss_buffer_t message_buffer, gss_buffer_t message_token);
OM_uint32
gss_verify (OM_uint32 * minor_status,
gss_ctx_id_t context_handle,
gss_buffer_t message_buffer,
gss_buffer_t token_buffer, int *qop_state);
OM_uint32
gss_seal (OM_uint32 * minor_status,
gss_ctx_id_t context_handle,
int conf_req_flag,
int qop_req,
gss_buffer_t input_message_buffer,
int *conf_state, gss_buffer_t output_message_buffer);
OM_uint32
gss_unseal (OM_uint32 * minor_status,
gss_ctx_id_t context_handle,
gss_buffer_t input_message_buffer,
gss_buffer_t output_message_buffer,
int *conf_state, int *qop_state);
/* RFC 5801 SASL GS2 interfaces. */
OM_uint32
gss_inquire_saslname_for_mech (OM_uint32 * minor_status,
const gss_OID desired_mech,
gss_buffer_t sasl_mech_name,
gss_buffer_t mech_name,
gss_buffer_t mech_description);
OM_uint32
gss_inquire_mech_for_saslname (OM_uint32 * minor_status,
const gss_buffer_t sasl_mech_name,
gss_OID * mech_type);
/* RFC 5587 const typedefs. */
typedef const gss_buffer_desc *gss_const_buffer_t;
typedef const struct gss_channel_bindings_struct
*gss_const_channel_bindings_t;
typedef const struct gss_ctx_id_struct *gss_const_ctx_id_t;
typedef const struct gss_cred_id_struct *gss_const_cred_id_t;
typedef const struct gss_name_struct *gss_const_name_t;
typedef const gss_OID_desc *gss_const_OID;
typedef const gss_OID_set_desc *gss_const_OID_set;
/* RFC 6339 interfaces. */
extern int
gss_oid_equal (gss_const_OID first_oid,
gss_const_OID second_oid);
OM_uint32
gss_encapsulate_token (gss_const_buffer_t input_token,
gss_const_OID token_oid,
gss_buffer_t output_token);
OM_uint32
gss_decapsulate_token (gss_const_buffer_t input_token,
gss_const_OID token_oid,
gss_buffer_t output_token);
#endif /* GSSAPI_H_ */
gss-1.0.2/lib/headers/gss/ext.h 0000644 0000000 0000000 00000003207 11662451433 013132 0000000 0000000 /* ext.h --- Header file for non-standard GSS-API functions.
* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef GSS_EXT_H_
#define GSS_EXT_H_
/* Get size_t. */
#include
/* See version.c. */
extern const char *gss_check_version (const char *req_version);
/* See ext.c. */
extern int gss_userok (const gss_name_t name, const char *username);
/* Static versions of the public OIDs for use, e.g., in static
variable initalization. See oid.c. */
extern gss_OID_desc GSS_C_NT_USER_NAME_static;
extern gss_OID_desc GSS_C_NT_MACHINE_UID_NAME_static;
extern gss_OID_desc GSS_C_NT_STRING_UID_NAME_static;
extern gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_X_static;
extern gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_static;
extern gss_OID_desc GSS_C_NT_ANONYMOUS_static;
extern gss_OID_desc GSS_C_NT_EXPORT_NAME_static;
#endif
gss-1.0.2/lib/headers/gss/krb5.h 0000644 0000000 0000000 00000010207 11546676457 013213 0000000 0000000 /* gss/krb5.h --- Header file for Kerberos 5 GSS-API mechanism.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/*
* This file contains official Kerberos V5 GSS-API mechanism related
* prototypes defined as in RFC 1964 and RFC 4121. For GNU GSS
* specific extensions, see gss/krb5-ext.h.
*
*/
#ifndef GSS_KRB5_H
# define GSS_KRB5_H
/* 4.1.1. Non-Kerberos-specific codes */
#define GSS_KRB5_S_G_BAD_SERVICE_NAME 1
/* "No @ in SERVICE-NAME name string" */
#define GSS_KRB5_S_G_BAD_STRING_UID 2
/* "STRING-UID-NAME contains nondigits" */
#define GSS_KRB5_S_G_NOUSER 3
/* "UID does not resolve to username" */
#define GSS_KRB5_S_G_VALIDATE_FAILED 4
/* "Validation error" */
#define GSS_KRB5_S_G_BUFFER_ALLOC 5
/* "Couldn't allocate gss_buffer_t data" */
#define GSS_KRB5_S_G_BAD_MSG_CTX 6
/* "Message context invalid" */
#define GSS_KRB5_S_G_WRONG_SIZE 7
/* "Buffer is the wrong size" */
#define GSS_KRB5_S_G_BAD_USAGE 8
/* "Credential usage type is unknown" */
#define GSS_KRB5_S_G_UNKNOWN_QOP 9
/* "Unknown quality of protection specified" */
/* 4.1.2. Kerberos-specific-codes */
#define GSS_KRB5_S_KG_CCACHE_NOMATCH 10
/* "Principal in credential cache does not match desired name" */
#define GSS_KRB5_S_KG_KEYTAB_NOMATCH 11
/* "No principal in keytab matches desired name" */
#define GSS_KRB5_S_KG_TGT_MISSING 12
/* "Credential cache has no TGT" */
#define GSS_KRB5_S_KG_NO_SUBKEY 13
/* "Authenticator has no subkey" */
#define GSS_KRB5_S_KG_CONTEXT_ESTABLISHED 14
/* "Context is already fully established" */
#define GSS_KRB5_S_KG_BAD_SIGN_TYPE 15
/* "Unknown signature type in token" */
#define GSS_KRB5_S_KG_BAD_LENGTH 16
/* "Invalid field length in token" */
#define GSS_KRB5_S_KG_CTX_INCOMPLETE 17
/* "Attempt to use incomplete security context" */
/*
* This name form shall be represented by the Object Identifier
* {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
* gssapi(2) generic(1) user_name(1)}. The recommended symbolic name
* for this type is "GSS_KRB5_NT_USER_NAME".
*/
extern gss_OID GSS_KRB5_NT_USER_NAME;
/*
* This name form shall be represented by the Object Identifier
* {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
* gssapi(2) generic(1) service_name(4)}. The previously recommended
* symbolic name for this type is
* "GSS_KRB5_NT_HOSTBASED_SERVICE_NAME". The currently preferred
* symbolic name for this type is "GSS_C_NT_HOSTBASED_SERVICE".
*/
extern gss_OID GSS_KRB5_NT_HOSTBASED_SERVICE_NAME;
/*
* This name form shall be represented by the Object Identifier
* {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
* gssapi(2) krb5(2) krb5_name(1)}. The recommended symbolic name for
* this type is "GSS_KRB5_NT_PRINCIPAL_NAME".
*/
extern gss_OID GSS_KRB5_NT_PRINCIPAL_NAME;
/*
* This name form shall be represented by the Object Identifier
* {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
* gssapi(2) generic(1) machine_uid_name(2)}. The recommended
* symbolic name for this type is "GSS_KRB5_NT_MACHINE_UID_NAME".
*/
extern gss_OID GSS_KRB5_NT_MACHINE_UID_NAME;
/*
* This name form shall be represented by the Object Identifier
* {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
* gssapi(2) generic(1) string_uid_name(3)}. The recommended symbolic
* name for this type is "GSS_KRB5_NT_STRING_UID_NAME".
*/
extern gss_OID GSS_KRB5_NT_STRING_UID_NAME;
#endif /* GSS_KRB5_H */
gss-1.0.2/lib/headers/gss.h 0000644 0000000 0000000 00000004707 11663554717 012352 0000000 0000000 /* gss.h --- Header file for GSSLib. -*- c -*-
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef _GSS_H
#define _GSS_H
# ifdef __cplusplus
extern "C"
{
# endif
/**
* GSS_VERSION
*
* Pre-processor symbol with a string that describe the header file
* version number. Used together with gss_check_version() to verify
* header file and run-time library consistency.
*/
# define GSS_VERSION "1.0.2"
/**
* GSS_VERSION_MAJOR
*
* Pre-processor symbol with a decimal value that describe the major
* level of the header file version number. For example, when the
* header version is 1.2.3 this symbol will be 1.
*/
# define GSS_VERSION_MAJOR 1
/**
* GSS_VERSION_MINOR
*
* Pre-processor symbol with a decimal value that describe the minor
* level of the header file version number. For example, when the
* header version is 1.2.3 this symbol will be 2.
*/
# define GSS_VERSION_MINOR 0
/**
* GSS_VERSION_PATCH
*
* Pre-processor symbol with a decimal value that describe the patch
* level of the header file version number. For example, when the
* header version is 1.2.3 this symbol will be 3.
*/
# define GSS_VERSION_PATCH 2
/**
* GSS_VERSION_NUMBER
*
* Pre-processor symbol with a hexadecimal value describing the
* header file version number. For example, when the header version
* is 1.2.3 this symbol will have the value 0x010203.
*/
# define GSS_VERSION_NUMBER 0x010002
# include
# include
/* *INDENT-OFF* */
# include
# include
/* *INDENT-ON* */
# ifdef __cplusplus
}
# endif
#endif /* _GSS_H */
gss-1.0.2/lib/headers/gss.h.in 0000644 0000000 0000000 00000004765 11546676457 012771 0000000 0000000 /* gss.h --- Header file for GSSLib. -*- c -*-
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef _GSS_H
#define _GSS_H
# ifdef __cplusplus
extern "C"
{
# endif
/**
* GSS_VERSION
*
* Pre-processor symbol with a string that describe the header file
* version number. Used together with gss_check_version() to verify
* header file and run-time library consistency.
*/
# define GSS_VERSION "@VERSION@"
/**
* GSS_VERSION_MAJOR
*
* Pre-processor symbol with a decimal value that describe the major
* level of the header file version number. For example, when the
* header version is 1.2.3 this symbol will be 1.
*/
# define GSS_VERSION_MAJOR @VERSION_MAJOR@
/**
* GSS_VERSION_MINOR
*
* Pre-processor symbol with a decimal value that describe the minor
* level of the header file version number. For example, when the
* header version is 1.2.3 this symbol will be 2.
*/
# define GSS_VERSION_MINOR @VERSION_MINOR@
/**
* GSS_VERSION_PATCH
*
* Pre-processor symbol with a decimal value that describe the patch
* level of the header file version number. For example, when the
* header version is 1.2.3 this symbol will be 3.
*/
# define GSS_VERSION_PATCH @VERSION_PATCH@
/**
* GSS_VERSION_NUMBER
*
* Pre-processor symbol with a hexadecimal value describing the
* header file version number. For example, when the header version
* is 1.2.3 this symbol will have the value 0x010203.
*/
# define GSS_VERSION_NUMBER @VERSION_NUMBER@
# include
# include
/* *INDENT-OFF* */
@INCLUDE_GSS_KRB5@
@INCLUDE_GSS_KRB5_EXT@
/* *INDENT-ON* */
# ifdef __cplusplus
}
# endif
#endif /* _GSS_H */
gss-1.0.2/lib/Makefile.am 0000644 0000000 0000000 00000004000 11546676326 012011 0000000 0000000 ## Process this file with automake to produce Makefile.in
# Copyright (C) 2003-2011 Simon Josefsson
#
# This file is part of the Generic Security Service (GSS).
#
# GSS 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.
#
# GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
SUBDIRS = gl
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/lib/gl \
-I$(top_builddir)/lib/headers -I$(top_srcdir)/lib/headers
lib_LTLIBRARIES = libgss.la
include_HEADERS = headers/gss.h
gssincludedir=$(includedir)/gss
gssinclude_HEADERS = headers/gss/api.h headers/gss/ext.h
libgss_la_SOURCES = libgss.map \
internal.h \
meta.h meta.c \
context.c cred.c error.c misc.c msg.c name.c obsolete.c oid.c \
asn1.c ext.c version.c \
saslname.c
libgss_la_LIBADD = @LTLIBINTL@ gl/libgnu.la
libgss_la_LDFLAGS = -no-undefined \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
if HAVE_LD_VERSION_SCRIPT
libgss_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libgss.map
else
libgss_la_LDFLAGS += -export-symbols-regex '^(gss|GSS).*'
endif
if HAVE_LD_OUTPUT_DEF
libgss_la_LDFLAGS += -Wl,--output-def,libgss-$(DLL_VERSION).def
defexecdir = $(bindir)
defexec_DATA = libgss-$(DLL_VERSION).def
DISTCLEANFILES = $(defexec_DATA)
endif
if KRB5
SUBDIRS += krb5
gssinclude_HEADERS += headers/gss/krb5.h headers/gss/krb5-ext.h
libgss_la_LIBADD += krb5/libgss-shishi.la
endif
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
gss-1.0.2/lib/internal.h 0000644 0000000 0000000 00000003611 11546676340 011745 0000000 0000000 /* internal.h --- Internal header file for GSS.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef _INTERNAL_H
#define _INTERNAL_H
#include "config.h"
#include
#include
#include
#include
#include
#include
#include
/* Get i18n. */
#include
#define _(String) dgettext (PACKAGE PO_SUFFIX, String)
#define gettext_noop(String) String
#define N_(String) gettext_noop (String)
/* Get specification. */
#include
typedef struct gss_name_struct
{
size_t length;
char *value;
gss_OID type;
} gss_name_desc;
typedef struct gss_cred_id_struct
{
gss_OID mech;
#ifdef USE_KERBEROS5
struct _gss_krb5_cred_struct *krb5;
#endif
} gss_cred_id_desc;
typedef struct gss_ctx_id_struct
{
gss_OID mech;
#ifdef USE_KERBEROS5
struct _gss_krb5_ctx_struct *krb5;
#endif
} gss_ctx_id_desc;
/* asn1.c */
extern OM_uint32
_gss_encapsulate_token_prefix (const char *prefix, size_t prefixlen,
const char *in, size_t inlen,
const char *oid, OM_uint32 oidlen,
void **out, size_t * outlen);
#endif /* _INTERNAL_H */
gss-1.0.2/lib/libgss.map 0000644 0000000 0000000 00000005523 11546676326 011752 0000000 0000000 # Copyright (C) 2009-2011 Simon Josefsson
#
# This file is part of the Generic Security Service (GSS).
#
# GSS 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.
#
# GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
GSS_1.0.0 {
global:
# Standard interfaces RFC 2744:
GSS_C_NT_ANONYMOUS;
GSS_C_NT_EXPORT_NAME;
GSS_C_NT_HOSTBASED_SERVICE;
GSS_C_NT_HOSTBASED_SERVICE_X;
GSS_C_NT_MACHINE_UID_NAME;
GSS_C_NT_STRING_UID_NAME;
GSS_C_NT_USER_NAME;
gss_accept_sec_context;
gss_acquire_cred;
gss_add_cred;
gss_add_oid_set_member;
gss_canonicalize_name;
gss_compare_name;
gss_context_time;
gss_create_empty_oid_set;
gss_delete_sec_context;
gss_display_name;
gss_display_status;
gss_duplicate_name;
gss_export_name;
gss_export_sec_context;
gss_get_mic;
gss_import_name;
gss_import_sec_context;
gss_indicate_mechs;
gss_init_sec_context;
gss_inquire_context;
gss_inquire_cred;
gss_inquire_cred_by_mech;
gss_inquire_mechs_for_name;
gss_inquire_names_for_mech;
gss_process_context_token;
gss_release_buffer;
gss_release_cred;
gss_release_name;
gss_release_oid_set;
gss_seal;
gss_sign;
gss_test_oid_set_member;
gss_unseal;
gss_unwrap;
gss_verify;
gss_verify_mic;
gss_wrap;
gss_wrap_size_limit;
# SASL GS2 interfaces RFC 5801:
gss_inquire_mech_for_saslname;
gss_inquire_saslname_for_mech;
# GNU GSS extensions:
GSS_C_NT_ANONYMOUS_static;
GSS_C_NT_EXPORT_NAME_static;
GSS_C_NT_HOSTBASED_SERVICE_X_static;
GSS_C_NT_HOSTBASED_SERVICE_static;
GSS_C_NT_MACHINE_UID_NAME_static;
GSS_C_NT_STRING_UID_NAME_static;
GSS_C_NT_USER_NAME_static;
gss_check_version;
gss_decapsulate_token;
gss_encapsulate_token;
gss_oid_equal;
gss_userok;
# Kerberos V5 standard interface:
GSS_KRB5_NT_HOSTBASED_SERVICE_NAME;
GSS_KRB5_NT_MACHINE_UID_NAME;
GSS_KRB5_NT_PRINCIPAL_NAME;
GSS_KRB5_NT_STRING_UID_NAME;
GSS_KRB5_NT_USER_NAME;
# GNU GSS Kerberos V5 extensions:
GSS_KRB5;
GSS_KRB5_NT_MACHINE_UID_NAME_static;
GSS_KRB5_NT_PRINCIPAL_NAME_static;
GSS_KRB5_NT_STRING_UID_NAME_static;
GSS_KRB5_NT_USER_NAME_static;
GSS_KRB5_static;
local:
*;
};
gss-1.0.2/lib/name.c 0000644 0000000 0000000 00000044616 11546676340 011056 0000000 0000000 /* name.c --- Implementation of GSS-API Name Manipulation functions.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
/* _gss_find_mech */
#include "meta.h"
/**
* gss_import_name:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @input_name_buffer: (buffer, octet-string, read) Buffer containing
* contiguous string name to convert.
* @input_name_type: (Object ID, read, optional) Object ID specifying
* type of printable name. Applications may specify either
* GSS_C_NO_OID to use a mechanism-specific default printable
* syntax, or an OID recognized by the GSS-API implementation to
* name a specific namespace.
* @output_name: (gss_name_t, modify) Returned name in internal form.
* Storage associated with this name must be freed by the
* application after use with a call to gss_release_name().
*
* Convert a contiguous string name to internal form. In general, the
* internal name returned (via the @output_name parameter) will not
* be an MN; the exception to this is if the @input_name_type
* indicates that the contiguous string provided via the
* @input_name_buffer parameter is of type GSS_C_NT_EXPORT_NAME, in
* which case the returned internal name will be an MN for the
* mechanism that exported the name.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_BAD_NAMETYPE`: The input_name_type was unrecognized.
*
* `GSS_S_BAD_NAME`: The input_name parameter could not be interpreted
* as a name of the specified type.
*
* `GSS_S_BAD_MECH`: The input name-type was GSS_C_NT_EXPORT_NAME, but
* the mechanism contained within the input-name is not supported.
**/
OM_uint32
gss_import_name (OM_uint32 * minor_status,
const gss_buffer_t input_name_buffer,
const gss_OID input_name_type, gss_name_t * output_name)
{
if (!output_name)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_NAME | GSS_S_CALL_INACCESSIBLE_WRITE;
}
*output_name = malloc (sizeof (**output_name));
if (!*output_name)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
(*output_name)->length = input_name_buffer->length;
(*output_name)->value = malloc (input_name_buffer->length);
if (!(*output_name)->value)
{
free (*output_name);
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
memcpy ((*output_name)->value,
input_name_buffer->value, input_name_buffer->length);
(*output_name)->type = input_name_type;
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
/**
* gss_display_name:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @input_name: (gss_name_t, read) Name to be displayed.
* @output_name_buffer: (buffer, character-string, modify) Buffer to
* receive textual name string. The application must free storage
* associated with this name after use with a call to
* gss_release_buffer().
* @output_name_type: (Object ID, modify, optional) The type of the
* returned name. The returned gss_OID will be a pointer into
* static storage, and should be treated as read-only by the caller
* (in particular, the application should not attempt to free
* it). Specify NULL if not required.
*
* Allows an application to obtain a textual representation of an
* opaque internal-form name for display purposes. The syntax of a
* printable name is defined by the GSS-API implementation.
*
* If input_name denotes an anonymous principal, the implementation
* should return the gss_OID value GSS_C_NT_ANONYMOUS as the
* output_name_type, and a textual name that is syntactically distinct
* from all valid supported printable names in output_name_buffer.
*
* If input_name was created by a call to gss_import_name, specifying
* GSS_C_NO_OID as the name-type, implementations that employ lazy
* conversion between name types may return GSS_C_NO_OID via the
* output_name_type parameter.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_BAD_NAME`: @input_name was ill-formed.
**/
OM_uint32
gss_display_name (OM_uint32 * minor_status,
const gss_name_t input_name,
gss_buffer_t output_name_buffer, gss_OID * output_name_type)
{
if (!input_name)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_NAME;
}
output_name_buffer->length = input_name->length;
output_name_buffer->value = malloc (input_name->length + 1);
if (!output_name_buffer->value)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
if (input_name->value)
memcpy (output_name_buffer->value, input_name->value, input_name->length);
if (output_name_type)
*output_name_type = input_name->type;
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
/**
* gss_compare_name:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @name1: (gss_name_t, read) Internal-form name.
* @name2: (gss_name_t, read) Internal-form name.
* @name_equal: (boolean, modify) Non-zero - names refer to same
* entity. Zero - names refer to different entities (strictly, the
* names are not known to refer to the same identity).
*
* Allows an application to compare two internal-form names to
* determine whether they refer to the same entity.
*
* If either name presented to gss_compare_name denotes an anonymous
* principal, the routines should indicate that the two names do not
* refer to the same identity.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_BAD_NAMETYPE`: The two names were of incomparable types.
*
* `GSS_S_BAD_NAME`: One or both of name1 or name2 was ill-formed.
**/
OM_uint32
gss_compare_name (OM_uint32 * minor_status,
const gss_name_t name1,
const gss_name_t name2, int *name_equal)
{
if (minor_status)
*minor_status = 0;
if (!name1 || !name2)
return GSS_S_BAD_NAME | GSS_S_CALL_INACCESSIBLE_READ;
if (!gss_oid_equal (name1->type, name2->type))
return GSS_S_BAD_NAMETYPE;
if (name_equal)
*name_equal = (name1->length == name2->length) &&
memcmp (name1->value, name2->value, name1->length) == 0;
return GSS_S_COMPLETE;
}
/**
* gss_release_name:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @name: (gss_name_t, modify) The name to be deleted.
*
* Free GSSAPI-allocated storage associated with an internal-form
* name. The name is set to GSS_C_NO_NAME on successful completion of
* this call.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_BAD_NAME`: The name parameter did not contain a valid name.
**/
OM_uint32
gss_release_name (OM_uint32 * minor_status, gss_name_t * name)
{
if (minor_status)
*minor_status = 0;
if (!name)
return GSS_S_BAD_NAME | GSS_S_CALL_INACCESSIBLE_READ;
if (*name != GSS_C_NO_NAME)
{
if ((*name)->value)
free ((*name)->value);
free (*name);
*name = GSS_C_NO_NAME;
}
return GSS_S_COMPLETE;
}
/**
* gss_inquire_names_for_mech:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @mechanism: (gss_OID, read) The mechanism to be interrogated.
* @name_types: (gss_OID_set, modify) Set of name-types supported by
* the specified mechanism. The returned OID set must be freed by
* the application after use with a call to gss_release_oid_set().
*
* Returns the set of nametypes supported by the specified mechanism.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
**/
OM_uint32
gss_inquire_names_for_mech (OM_uint32 * minor_status,
const gss_OID mechanism, gss_OID_set * name_types)
{
OM_uint32 maj_stat;
_gss_mech_api_t mech;
int i;
mech = _gss_find_mech (mechanism);
maj_stat = gss_create_empty_oid_set (minor_status, name_types);
if (maj_stat != GSS_S_COMPLETE)
return maj_stat;
for (i = 0; mech->name_types[i]; i++)
{
maj_stat = gss_add_oid_set_member (minor_status, mech->name_types[i],
name_types);
if (maj_stat != GSS_S_COMPLETE)
{
gss_release_oid_set (minor_status, name_types);
return maj_stat;
}
}
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
/* Add mechanism MECH to OID set MECH_TYPES if mechanism MECH support
the NAME_TYPE name type. */
static OM_uint32
_gss_inquire_mechs_for_name3 (OM_uint32 * minor_status,
gss_OID mech,
gss_OID name_type, gss_OID_set * mech_types)
{
gss_OID_set oids;
int supported;
OM_uint32 maj_stat;
maj_stat = gss_inquire_names_for_mech (minor_status, mech, &oids);
if (GSS_ERROR (maj_stat))
return maj_stat;
maj_stat = gss_test_oid_set_member (minor_status, name_type,
oids, &supported);
gss_release_oid_set (minor_status, &oids);
if (GSS_ERROR (maj_stat))
return maj_stat;
if (supported)
{
maj_stat = gss_add_oid_set_member (minor_status, mech, mech_types);
if (GSS_ERROR (maj_stat))
return maj_stat;
}
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
/* Iterate over SUPPORTED_MECH_TYPES and invoke
gss_inquire_mechs_for_name3 on each type, thus adding all mechanism
OIDs, that support the NAME_TYPE name type, to OUT_MECH_TYPES. */
static OM_uint32
_gss_inquire_mechs_for_name2 (OM_uint32 * minor_status,
gss_OID name_type,
gss_OID_set * out_mech_types,
gss_OID_set supported_mech_types)
{
OM_uint32 maj_stat;
size_t i;
for (i = 0; i < supported_mech_types->count; i++)
{
maj_stat = _gss_inquire_mechs_for_name3
(minor_status, &(supported_mech_types->elements)[i],
name_type, out_mech_types);
if (GSS_ERROR (maj_stat))
return maj_stat;
}
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
/* List all supported mechanisms, and invoke
gss_inquire_mechs_for_name2, thus adding all mechanism OIDs, that
support the NAME_TYPE name type, to OUT_MECH_TYPES. */
static OM_uint32
_gss_inquire_mechs_for_name1 (OM_uint32 * minor_status,
gss_OID name_type, gss_OID_set * out_mech_types)
{
OM_uint32 maj_stat;
gss_OID_set supported_mech_types;
maj_stat = gss_indicate_mechs (minor_status, &supported_mech_types);
if (GSS_ERROR (maj_stat))
return maj_stat;
maj_stat = _gss_inquire_mechs_for_name2 (minor_status, name_type,
out_mech_types,
supported_mech_types);
gss_release_oid_set (minor_status, &supported_mech_types);
if (GSS_ERROR (maj_stat))
return maj_stat;
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
/**
* gss_inquire_mechs_for_name:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @input_name: (gss_name_t, read) The name to which the inquiry
* relates.
* @mech_types: (gss_OID_set, modify) Set of mechanisms that may
* support the specified name. The returned OID set must be freed
* by the caller after use with a call to gss_release_oid_set().
*
* Returns the set of mechanisms supported by the GSS-API
* implementation that may be able to process the specified name.
*
* Each mechanism returned will recognize at least one element within
* the name. It is permissible for this routine to be implemented
* within a mechanism-independent GSS-API layer, using the type
* information contained within the presented name, and based on
* registration information provided by individual mechanism
* implementations. This means that the returned mech_types set may
* indicate that a particular mechanism will understand the name when
* in fact it would refuse to accept the name as input to
* gss_canonicalize_name, gss_init_sec_context, gss_acquire_cred or
* gss_add_cred (due to some property of the specific name, as opposed
* to the name type). Thus this routine should be used only as a
* prefilter for a call to a subsequent mechanism-specific routine.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_BAD_NAME`: The input_name parameter was ill-formed.
*
* `GSS_S_BAD_NAMETYPE`: The input_name parameter contained an invalid
* or unsupported type of name.
**/
OM_uint32
gss_inquire_mechs_for_name (OM_uint32 * minor_status,
const gss_name_t input_name,
gss_OID_set * mech_types)
{
OM_uint32 maj_stat;
if (input_name == GSS_C_NO_NAME)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_NAME | GSS_S_CALL_INACCESSIBLE_READ;
}
maj_stat = gss_create_empty_oid_set (minor_status, mech_types);
if (GSS_ERROR (maj_stat))
return maj_stat;
maj_stat = _gss_inquire_mechs_for_name1 (minor_status,
input_name->type, mech_types);
if (GSS_ERROR (maj_stat))
{
gss_release_oid_set (minor_status, mech_types);
return maj_stat;
}
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
/**
* gss_export_name:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @input_name: (gss_name_t, read) The MN to be exported.
* @exported_name: (gss_buffer_t, octet-string, modify) The canonical
* contiguous string form of @input_name. Storage associated with
* this string must freed by the application after use with
* gss_release_buffer().
*
* To produce a canonical contiguous string representation of a
* mechanism name (MN), suitable for direct comparison (e.g. with
* memcmp) for use in authorization functions (e.g. matching entries
* in an access-control list). The @input_name parameter must specify
* a valid MN (i.e. an internal name generated by
* gss_accept_sec_context() or by gss_canonicalize_name()).
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_NAME_NOT_MN`: The provided internal name was not a mechanism
* name.
*
* `GSS_S_BAD_NAME`: The provided internal name was ill-formed.
*
* `GSS_S_BAD_NAMETYPE`: The internal name was of a type not supported
* by the GSS-API implementation.
**/
OM_uint32
gss_export_name (OM_uint32 * minor_status,
const gss_name_t input_name, gss_buffer_t exported_name)
{
OM_uint32 maj_stat;
gss_OID_set mechs;
_gss_mech_api_t mech;
maj_stat = gss_inquire_mechs_for_name (minor_status, input_name, &mechs);
if (GSS_ERROR (maj_stat))
return maj_stat;
if (mechs->count == 0)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_NAMETYPE;
}
/* We just select a random mechanism that support this name-type.
I'm not sure how we can be more predicatable, given the
definition of this function. */
mech = _gss_find_mech (mechs->elements);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
return mech->export_name (minor_status, input_name, exported_name);
}
/**
* gss_canonicalize_name:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @input_name: (gss_name_t, read) The name for which a canonical form
* is desired.
* @mech_type: (Object ID, read) The authentication mechanism for
* which the canonical form of the name is desired. The desired
* mechanism must be specified explicitly; no default is provided.
* @output_name: (gss_name_t, modify) The resultant canonical name.
* Storage associated with this name must be freed by the
* application after use with a call to gss_release_name().
*
* Generate a canonical mechanism name (MN) from an arbitrary internal
* name. The mechanism name is the name that would be returned to a
* context acceptor on successful authentication of a context where
* the initiator used the input_name in a successful call to
* gss_acquire_cred, specifying an OID set containing @mech_type as
* its only member, followed by a call to gss_init_sec_context(),
* specifying @mech_type as the authentication mechanism.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
**/
OM_uint32
gss_canonicalize_name (OM_uint32 * minor_status,
const gss_name_t input_name,
const gss_OID mech_type, gss_name_t * output_name)
{
_gss_mech_api_t mech;
mech = _gss_find_mech (mech_type);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
return mech->canonicalize_name (minor_status, input_name,
mech_type, output_name);
}
/**
* gss_duplicate_name:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @src_name: (gss_name_t, read) Internal name to be duplicated.
* @dest_name: (gss_name_t, modify) The resultant copy of @src_name.
* Storage associated with this name must be freed by the application
* after use with a call to gss_release_name().
*
* Create an exact duplicate of the existing internal name @src_name.
* The new @dest_name will be independent of src_name (i.e. @src_name
* and @dest_name must both be released, and the release of one shall
* not affect the validity of the other).
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_BAD_NAME`: The src_name parameter was ill-formed.
**/
OM_uint32
gss_duplicate_name (OM_uint32 * minor_status,
const gss_name_t src_name, gss_name_t * dest_name)
{
if (src_name == GSS_C_NO_NAME)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_NAME;
}
if (!dest_name)
{
if (minor_status)
*minor_status = 0;
return GSS_S_FAILURE | GSS_S_CALL_INACCESSIBLE_WRITE;
}
*dest_name = malloc (sizeof (**dest_name));
if (!*dest_name)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
(*dest_name)->type = src_name->type;
(*dest_name)->length = src_name->length;
(*dest_name)->value = malloc (src_name->length + 1);
if (!(*dest_name)->value)
{
free (*dest_name);
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
memcpy ((*dest_name)->value, src_name->value, src_name->length);
(*dest_name)->value[src_name->length] = '\0';
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/asn1.c 0000644 0000000 0000000 00000016520 11662454434 010766 0000000 0000000 /* asn1.c --- Wrapper around pseudo-ASN.1 token format.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
/*
* The following two functions borrowed from libtasn.1, under LGPL.
* Copyright (C) 2002 Fabio Fiorina.
*/
static void
_gss_asn1_length_der (size_t len, unsigned char *ans, size_t * ans_len)
{
size_t k;
unsigned char temp[sizeof (len)];
if (len < 128)
{
if (ans != NULL)
ans[0] = (unsigned char) len;
*ans_len = 1;
}
else
{
k = 0;
while (len)
{
temp[k++] = len & 0xFF;
len = len >> 8;
}
*ans_len = k + 1;
if (ans != NULL)
{
ans[0] = ((unsigned char) k & 0x7F) + 128;
while (k--)
ans[*ans_len - 1 - k] = temp[k];
}
}
}
static size_t
_gss_asn1_get_length_der (const char *der, size_t der_len, size_t * len)
{
size_t ans;
size_t k, punt;
*len = 0;
if (der_len <= 0)
return 0;
if (!(der[0] & 128))
{
/* short form */
*len = 1;
return (unsigned char) der[0];
}
else
{
/* Long form */
k = (unsigned char) der[0] & 0x7F;
punt = 1;
if (k)
{ /* definite length method */
ans = 0;
while (punt <= k && punt < der_len)
{
size_t last = ans;
ans = ans * 256 + (unsigned char) der[punt++];
if (ans < last)
/* we wrapped around, no bignum support... */
return -2;
}
}
else
{ /* indefinite length method */
ans = -1;
}
*len = punt;
return ans;
}
}
OM_uint32
_gss_encapsulate_token_prefix (const char *prefix, size_t prefixlen,
const char *in, size_t inlen,
const char *oid, OM_uint32 oidlen,
void **out, size_t * outlen)
{
size_t oidlenlen;
size_t asn1len, asn1lenlen;
unsigned char *p;
if (prefix == NULL)
prefixlen = 0;
_gss_asn1_length_der (oidlen, NULL, &oidlenlen);
asn1len = 1 + oidlenlen + oidlen + prefixlen + inlen;
_gss_asn1_length_der (asn1len, NULL, &asn1lenlen);
*outlen = 1 + asn1lenlen + asn1len;
p = *out = malloc (*outlen);
if (!p)
return -1;
*p++ = '\x60';
_gss_asn1_length_der (asn1len, p, &asn1lenlen);
p += asn1lenlen;
*p++ = '\x06';
_gss_asn1_length_der (oidlen, p, &oidlenlen);
p += oidlenlen;
memcpy (p, oid, oidlen);
p += oidlen;
if (prefixlen > 0)
{
memcpy (p, prefix, prefixlen);
p += prefixlen;
}
memcpy (p, in, inlen);
return 0;
}
/**
* gss_encapsulate_token:
* @input_token: (buffer, opaque, read) Buffer with GSS-API context token data.
* @token_oid: (Object ID, read) Object identifier of token.
* @output_token: (buffer, opaque, modify) Encapsulated token data;
* caller must release with gss_release_buffer().
*
* Add the mechanism-independent token header to GSS-API context token
* data. This is used for the initial token of a GSS-API context
* establishment sequence. It incorporates an identifier of the
* mechanism type to be used on that context, and enables tokens to be
* interpreted unambiguously at GSS-API peers. See further section
* 3.1 of RFC 2743. This function is standardized in RFC 6339.
*
* Returns:
*
* `GSS_S_COMPLETE`: Indicates successful completion, and that output
* parameters holds correct information.
*
* `GSS_S_FAILURE`: Indicates that encapsulation failed for reasons
* unspecified at the GSS-API level.
**/
extern OM_uint32
gss_encapsulate_token (gss_const_buffer_t input_token,
gss_const_OID token_oid,
gss_buffer_t output_token)
{
int rc;
if (!input_token)
return GSS_S_CALL_INACCESSIBLE_READ;
if (!token_oid)
return GSS_S_CALL_INACCESSIBLE_READ;
if (!output_token)
return GSS_S_CALL_INACCESSIBLE_WRITE;
rc = _gss_encapsulate_token_prefix (NULL, 0,
input_token->value,
input_token->length,
token_oid->elements,
token_oid->length,
&output_token->value,
&output_token->length);
if (rc != 0)
return GSS_S_FAILURE;
return GSS_S_COMPLETE;
}
static int
_gss_decapsulate_token (const char *in, size_t inlen,
char **oid, size_t * oidlen,
char **out, size_t * outlen)
{
size_t i;
size_t asn1lenlen;
if (inlen-- == 0)
return -1;
if (*in++ != '\x60')
return -1;
i = inlen;
asn1lenlen = _gss_asn1_get_length_der (in, inlen, &i);
if (inlen < i)
return -1;
inlen -= i;
in += i;
if (inlen != asn1lenlen)
return -1;
if (inlen-- == 0)
return -1;
if (*in++ != '\x06')
return -1;
i = inlen;
asn1lenlen = _gss_asn1_get_length_der (in, inlen, &i);
if (inlen < i)
return -1;
inlen -= i;
in += i;
if (inlen < asn1lenlen)
return -1;
*oidlen = asn1lenlen;
*oid = (char *) in;
inlen -= asn1lenlen;
in += asn1lenlen;
*outlen = inlen;
*out = (char *) in;
return 0;
}
/**
* gss_decapsulate_token:
* @input_token: (buffer, opaque, read) Buffer with GSS-API context token.
* @token_oid: (Object ID, read) Expected object identifier of token.
* @output_token: (buffer, opaque, modify) Decapsulated token data;
* caller must release with gss_release_buffer().
*
* Remove the mechanism-independent token header from an initial
* GSS-API context token. Unwrap a buffer in the
* mechanism-independent token format. This is the reverse of
* gss_encapsulate_token(). The translation is loss-less, all data is
* preserved as is. This function is standardized in RFC 6339.
*
* Return value:
*
* `GSS_S_COMPLETE`: Indicates successful completion, and that output
* parameters holds correct information.
*
* `GSS_S_DEFECTIVE_TOKEN`: Means that the token failed consistency
* checks (e.g., OID mismatch or ASN.1 DER length errors).
*
* `GSS_S_FAILURE`: Indicates that decapsulation failed for reasons
* unspecified at the GSS-API level.
**/
OM_uint32
gss_decapsulate_token (gss_const_buffer_t input_token,
gss_const_OID token_oid,
gss_buffer_t output_token)
{
gss_OID_desc tmpoid;
char *oid = NULL, *out = NULL;
size_t oidlen = 0, outlen = 0;
if (!input_token)
return GSS_S_CALL_INACCESSIBLE_READ;
if (!token_oid)
return GSS_S_CALL_INACCESSIBLE_READ;
if (!output_token)
return GSS_S_CALL_INACCESSIBLE_WRITE;
if (_gss_decapsulate_token ((char *) input_token->value,
input_token->length,
&oid, &oidlen, &out, &outlen) != 0)
return GSS_S_DEFECTIVE_TOKEN;
tmpoid.length = oidlen;
tmpoid.elements = oid;
if (!gss_oid_equal (token_oid, &tmpoid))
return GSS_S_DEFECTIVE_TOKEN;
output_token->length = outlen;
output_token->value = malloc (outlen);
if (!output_token->value)
return GSS_S_FAILURE;
memcpy (output_token->value, out, outlen);
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/saslname.c 0000644 0000000 0000000 00000011373 11546676340 011733 0000000 0000000 /* saslname.c --- Implementation of the SASL GS2 interfaces.
* Copyright (C) 2010-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
/* _gss_find_mech* */
#include "meta.h"
static OM_uint32
dup_data (OM_uint32 * minor_status,
gss_buffer_t out, const char *str, int translate)
{
if (!out)
return GSS_S_COMPLETE;
if (translate)
out->value = strdup (_(str));
else
out->value = strdup (str);
if (!out->value)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
out->length = strlen (str);
return GSS_S_COMPLETE;
}
/**
* gss_inquire_saslname_for_mech:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @desired_mech: (OID, read) Identifies the GSS-API mechanism to query.
* @sasl_mech_name: (buffer, character-string, modify, optional)
* Buffer to receive SASL mechanism name. The application must free
* storage associated with this name after use with a call to
* gss_release_buffer().
* @mech_name: (buffer, character-string, modify, optional) Buffer to
* receive human readable mechanism name. The application must free
* storage associated with this name after use with a call to
* gss_release_buffer().
* @mech_description: (buffer, character-string, modify, optional)
* Buffer to receive description of mechanism. The application must
* free storage associated with this name after use with a call to
* gss_release_buffer().
*
* Output the SASL mechanism name of a GSS-API mechanism. It also
* returns a name and description of the mechanism in a user friendly
* form.
*
* Returns:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_BAD_MECH`: The @desired_mech OID is unsupported.
**/
OM_uint32
gss_inquire_saslname_for_mech (OM_uint32 * minor_status,
const gss_OID desired_mech,
gss_buffer_t sasl_mech_name,
gss_buffer_t mech_name,
gss_buffer_t mech_description)
{
_gss_mech_api_t m;
if (!desired_mech)
{
if (minor_status)
*minor_status = 0;
return GSS_S_CALL_INACCESSIBLE_READ;
}
m = _gss_find_mech_no_default (desired_mech);
if (!m)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
bindtextdomain (PACKAGE PO_SUFFIX, LOCALEDIR);
if (dup_data (minor_status, sasl_mech_name,
m->sasl_name, 0) != GSS_S_COMPLETE)
return GSS_S_FAILURE;
if (dup_data (minor_status, mech_name, m->mech_name, 0) != GSS_S_COMPLETE)
{
if (sasl_mech_name)
free (sasl_mech_name->value);
return GSS_S_FAILURE;
}
if (dup_data (minor_status, mech_description,
m->mech_description, 1) != GSS_S_COMPLETE)
{
if (sasl_mech_name)
free (sasl_mech_name->value);
if (mech_name)
free (mech_name->value);
return GSS_S_FAILURE;
}
return GSS_S_COMPLETE;
}
/**
* gss_inquire_mech_for_saslname:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @sasl_mech_name: (buffer, character-string, read) Buffer with SASL
* mechanism name.
* @mech_type: (OID, modify, optional) Actual mechanism used. The OID
* returned via this parameter will be a pointer to static storage
* that should be treated as read-only; In particular the
* application should not attempt to free it. Specify NULL if not
* required.
*
* Output GSS-API mechanism OID of mechanism associated with given
* @sasl_mech_name.
*
* Returns:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_BAD_MECH`: There is no GSS-API mechanism known as @sasl_mech_name.
**/
OM_uint32
gss_inquire_mech_for_saslname (OM_uint32 * minor_status,
const gss_buffer_t sasl_mech_name,
gss_OID * mech_type)
{
_gss_mech_api_t m;
if (!sasl_mech_name)
{
if (minor_status)
*minor_status = 0;
return GSS_S_CALL_INACCESSIBLE_READ;
}
m = _gss_find_mech_by_saslname (sasl_mech_name);
if (!m)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
if (mech_type)
*mech_type = m->mech;
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/misc.c 0000644 0000000 0000000 00000023645 11546676340 011070 0000000 0000000 /* misc.c --- Implementation of GSS-API Miscellaneous functions.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
/* _gss_indicate_mechs1 */
#include "meta.h"
/**
* gss_create_empty_oid_set:
* @minor_status: (integer, modify) Mechanism specific status code.
* @oid_set: (Set of Object IDs, modify) The empty object identifier
* set. The routine will allocate the gss_OID_set_desc object,
* which the application must free after use with a call to
* gss_release_oid_set().
*
* Create an object-identifier set containing no object identifiers,
* to which members may be subsequently added using the
* gss_add_oid_set_member() routine. These routines are intended to
* be used to construct sets of mechanism object identifiers, for
* input to gss_acquire_cred.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
**/
OM_uint32
gss_create_empty_oid_set (OM_uint32 * minor_status, gss_OID_set * oid_set)
{
if (minor_status)
*minor_status = 0;
*oid_set = malloc (sizeof (**oid_set));
if (!*oid_set)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
(*oid_set)->count = 0;
(*oid_set)->elements = NULL;
return GSS_S_COMPLETE;
}
/*
* gss_copy_oid:
* @minor_status: (integer, modify) Mechanism specific status code.
* @src_oid: (Object ID, read) The object identifier to copy.
* @dest_oid: (Object ID, modify) The resultant copy of @src_oid.
* Storage associated with this name must be freed by the
* application, but gss_release_oid() cannot be used generally as it
* deallocate the oid structure itself too.
*
* Make an exact copy of the given OID, that shares no memory areas
* with the original.
*
* WARNING: This function is a GNU GSS specific extension, and is not
* part of the official GSS API.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
**/
static OM_uint32
_gss_copy_oid (OM_uint32 * minor_status,
const gss_OID src_oid, gss_OID dest_oid)
{
if (minor_status)
*minor_status = 0;
if (!src_oid)
return GSS_S_FAILURE | GSS_S_CALL_INACCESSIBLE_READ;
if (src_oid->length == 0 || src_oid->elements == NULL)
return GSS_S_FAILURE | GSS_S_CALL_BAD_STRUCTURE;
dest_oid->length = src_oid->length;
dest_oid->elements = malloc (src_oid->length);
if (!dest_oid->elements)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
memcpy (dest_oid->elements, src_oid->elements, src_oid->length);
return GSS_S_COMPLETE;
}
/**
* gss_add_oid_set_member:
* @minor_status: (integer, modify) Mechanism specific status code.
* @member_oid: (Object ID, read) The object identifier to copied into
* the set.
* @oid_set: (Set of Object ID, modify) The set in which the object
* identifier should be inserted.
*
* Add an Object Identifier to an Object Identifier set. This routine
* is intended for use in conjunction with gss_create_empty_oid_set
* when constructing a set of mechanism OIDs for input to
* gss_acquire_cred. The oid_set parameter must refer to an OID-set
* that was created by GSS-API (e.g. a set returned by
* gss_create_empty_oid_set()). GSS-API creates a copy of the
* member_oid and inserts this copy into the set, expanding the
* storage allocated to the OID-set's elements array if necessary.
* The routine may add the new member OID anywhere within the elements
* array, and implementations should verify that the new member_oid is
* not already contained within the elements array; if the member_oid
* is already present, the oid_set should remain unchanged.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
**/
OM_uint32
gss_add_oid_set_member (OM_uint32 * minor_status,
const gss_OID member_oid, gss_OID_set * oid_set)
{
OM_uint32 major_stat;
int present;
if (!member_oid || member_oid->length == 0 || member_oid->elements == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_FAILURE;
}
major_stat = gss_test_oid_set_member (minor_status, member_oid,
*oid_set, &present);
if (GSS_ERROR (major_stat))
return major_stat;
if (present)
{
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
if ((*oid_set)->count + 1 == 0) /* integer overflow */
{
if (minor_status)
*minor_status = 0;
return GSS_S_FAILURE;
}
(*oid_set)->count++;
{
gss_OID tmp;
tmp = realloc ((*oid_set)->elements, (*oid_set)->count *
sizeof (*(*oid_set)->elements));
if (!tmp)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
(*oid_set)->elements = tmp;
}
major_stat = _gss_copy_oid (minor_status, member_oid,
(*oid_set)->elements + ((*oid_set)->count - 1));
if (GSS_ERROR (major_stat))
return major_stat;
return GSS_S_COMPLETE;
}
/**
* gss_test_oid_set_member:
* @minor_status: (integer, modify) Mechanism specific status code.
* @member: (Object ID, read) The object identifier whose presence is
* to be tested.
* @set: (Set of Object ID, read) The Object Identifier set.
* @present: (Boolean, modify) Non-zero if the specified OID is a
* member of the set, zero if not.
*
* Interrogate an Object Identifier set to determine whether a
* specified Object Identifier is a member. This routine is intended
* to be used with OID sets returned by gss_indicate_mechs(),
* gss_acquire_cred(), and gss_inquire_cred(), but will also work with
* user-generated sets.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
**/
OM_uint32
gss_test_oid_set_member (OM_uint32 * minor_status,
const gss_OID member,
const gss_OID_set set, int *present)
{
gss_OID cur;
size_t i;
if (minor_status)
*minor_status = 0;
*present = 0;
if (member == GSS_C_NO_OID)
return GSS_S_COMPLETE;
for (i = 0, cur = set->elements; i < set->count; i++, cur++)
{
if (cur->length == member->length &&
memcmp (cur->elements, member->elements, member->length) == 0)
{
*present = 1;
return GSS_S_COMPLETE;
}
}
return GSS_S_COMPLETE;
}
/**
* gss_release_oid_set:
* @minor_status: (integer, modify) Mechanism specific status code.
* @set: (Set of Object IDs, modify) The storage associated with the
* gss_OID_set will be deleted.
*
* Free storage associated with a GSSAPI-generated gss_OID_set object.
* The set parameter must refer to an OID-set that was returned from a
* GSS-API routine. gss_release_oid_set() will free the storage
* associated with each individual member OID, the OID set's elements
* array, and the gss_OID_set_desc.
*
* The gss_OID_set parameter is set to GSS_C_NO_OID_SET on successful
* completion of this routine.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
**/
OM_uint32
gss_release_oid_set (OM_uint32 * minor_status, gss_OID_set * set)
{
gss_OID cur;
size_t i;
if (minor_status)
*minor_status = 0;
if (!set || *set == GSS_C_NO_OID_SET)
return GSS_S_COMPLETE;
for (i = 0, cur = (*set)->elements; i < (*set)->count; i++, cur++)
free (cur->elements);
free ((*set)->elements);
free (*set);
*set = GSS_C_NO_OID_SET;
return GSS_S_COMPLETE;
}
/**
* gss_indicate_mechs:
* @minor_status: (integer, modify) Mechanism specific status code.
* @mech_set: (set of Object IDs, modify) Set of
* implementation-supported mechanisms. The returned gss_OID_set
* value will be a dynamically-allocated OID set, that should be
* released by the caller after use with a call to
* gss_release_oid_set().
*
* Allows an application to determine which underlying security
* mechanisms are available.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
**/
OM_uint32
gss_indicate_mechs (OM_uint32 * minor_status, gss_OID_set * mech_set)
{
OM_uint32 maj_stat;
maj_stat = gss_create_empty_oid_set (minor_status, mech_set);
if (GSS_ERROR (maj_stat))
return maj_stat;
maj_stat = _gss_indicate_mechs1 (minor_status, mech_set);
if (GSS_ERROR (maj_stat))
{
gss_release_oid_set (NULL, mech_set);
return maj_stat;
}
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
/**
* gss_release_buffer:
* @minor_status: (integer, modify) Mechanism specific status code.
* @buffer: (buffer, modify) The storage associated with the buffer
* will be deleted. The gss_buffer_desc object will not be freed,
* but its length field will be zeroed.
*
* Free storage associated with a buffer. The storage must have been
* allocated by a GSS-API routine. In addition to freeing the
* associated storage, the routine will zero the length field in the
* descriptor to which the buffer parameter refers, and
* implementations are encouraged to additionally set the pointer
* field in the descriptor to NULL. Any buffer object returned by a
* GSS-API routine may be passed to gss_release_buffer (even if there
* is no storage associated with the buffer).
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
**/
OM_uint32
gss_release_buffer (OM_uint32 * minor_status, gss_buffer_t buffer)
{
if (minor_status)
*minor_status = 0;
if (buffer != GSS_C_NO_BUFFER)
{
free (buffer->value);
buffer->value = NULL;
buffer->length = 0;
}
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/Makefile.in 0000644 0000000 0000000 00000116370 11663554705 012034 0000000 0000000 # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Copyright (C) 2003-2011 Simon Josefsson
#
# This file is part of the Generic Security Service (GSS).
#
# GSS 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.
#
# GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@HAVE_LD_VERSION_SCRIPT_TRUE@am__append_1 = -Wl,--version-script=$(srcdir)/libgss.map
@HAVE_LD_VERSION_SCRIPT_FALSE@am__append_2 = -export-symbols-regex '^(gss|GSS).*'
@HAVE_LD_OUTPUT_DEF_TRUE@am__append_3 = -Wl,--output-def,libgss-$(DLL_VERSION).def
@KRB5_TRUE@am__append_4 = krb5
@KRB5_TRUE@am__append_5 = headers/gss/krb5.h headers/gss/krb5-ext.h
@KRB5_TRUE@am__append_6 = krb5/libgss-shishi.la
subdir = lib
DIST_COMMON = $(am__gssinclude_HEADERS_DIST) $(include_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/src/gl/m4/errno_h.m4 \
$(top_srcdir)/src/gl/m4/error.m4 \
$(top_srcdir)/src/gl/m4/getopt.m4 \
$(top_srcdir)/src/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/src/gl/m4/msvc-inval.m4 \
$(top_srcdir)/src/gl/m4/msvc-nothrow.m4 \
$(top_srcdir)/src/gl/m4/nocrash.m4 \
$(top_srcdir)/src/gl/m4/ssize_t.m4 \
$(top_srcdir)/src/gl/m4/stdarg.m4 \
$(top_srcdir)/src/gl/m4/strerror.m4 \
$(top_srcdir)/src/gl/m4/sys_socket_h.m4 \
$(top_srcdir)/src/gl/m4/unistd_h.m4 \
$(top_srcdir)/src/gl/m4/version-etc.m4 \
$(top_srcdir)/lib/gl/m4/extensions.m4 \
$(top_srcdir)/lib/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/lib/gl/m4/include_next.m4 \
$(top_srcdir)/lib/gl/m4/ld-output-def.m4 \
$(top_srcdir)/lib/gl/m4/stddef_h.m4 \
$(top_srcdir)/lib/gl/m4/string_h.m4 \
$(top_srcdir)/lib/gl/m4/strverscmp.m4 \
$(top_srcdir)/lib/gl/m4/warn-on-use.m4 \
$(top_srcdir)/gl/m4/00gnulib.m4 \
$(top_srcdir)/gl/m4/autobuild.m4 \
$(top_srcdir)/gl/m4/gnulib-common.m4 \
$(top_srcdir)/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/gl/m4/ld-version-script.m4 \
$(top_srcdir)/gl/m4/manywarnings.m4 \
$(top_srcdir)/gl/m4/valgrind-tests.m4 \
$(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po-suffix.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(defexecdir)" \
"$(DESTDIR)$(gssincludedir)" "$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
libgss_la_DEPENDENCIES = gl/libgnu.la $(am__append_6)
am_libgss_la_OBJECTS = meta.lo context.lo cred.lo error.lo misc.lo \
msg.lo name.lo obsolete.lo oid.lo asn1.lo ext.lo version.lo \
saslname.lo
libgss_la_OBJECTS = $(am_libgss_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
libgss_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libgss_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libgss_la_SOURCES)
DIST_SOURCES = $(libgss_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
DATA = $(defexec_DATA)
am__gssinclude_HEADERS_DIST = headers/gss/api.h headers/gss/ext.h \
headers/gss/krb5.h headers/gss/krb5-ext.h
HEADERS = $(gssinclude_HEADERS) $(include_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = gl krb5
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ARFLAGS = @ARFLAGS@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFIG_INCLUDE = @CONFIG_INCLUDE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DLL_VERSION = @DLL_VERSION@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
ENOLINK_VALUE = @ENOLINK_VALUE@
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
GNULIB_FFSL = @GNULIB_FFSL@
GNULIB_FFSLL = @GNULIB_FFSLL@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
GNULIB_MBSCHR = @GNULIB_MBSCHR@
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
GNULIB_MBSLEN = @GNULIB_MBSLEN@
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
GNULIB_MBSSEP = @GNULIB_MBSSEP@
GNULIB_MBSSPN = @GNULIB_MBSSPN@
GNULIB_MBSSTR = @GNULIB_MBSSTR@
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
GNULIB_MEMCHR = @GNULIB_MEMCHR@
GNULIB_MEMMEM = @GNULIB_MEMMEM@
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PWRITE = @GNULIB_PWRITE@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
GNULIB_READ = @GNULIB_READ@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
GNULIB_STRPBRK = @GNULIB_STRPBRK@
GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
GNULIB_USLEEP = @GNULIB_USLEEP@
GNULIB_WRITE = @GNULIB_WRITE@
GREP = @GREP@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
HAVE_CHOWN = @HAVE_CHOWN@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FDATASYNC = @HAVE_FDATASYNC@
HAVE_FFSL = @HAVE_FFSL@
HAVE_FFSLL = @HAVE_FFSLL@
HAVE_FSYNC = @HAVE_FSYNC@
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
HAVE_GETGROUPS = @HAVE_GETGROUPS@
HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
HAVE_GETLOGIN = @HAVE_GETLOGIN@
HAVE_GETOPT_H = @HAVE_GETOPT_H@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
HAVE_LCHOWN = @HAVE_LCHOWN@
HAVE_LIBSHISHI = @HAVE_LIBSHISHI@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
HAVE_MBSLEN = @HAVE_MBSLEN@
HAVE_MEMCHR = @HAVE_MEMCHR@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_OS_H = @HAVE_OS_H@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
HAVE_PREAD = @HAVE_PREAD@
HAVE_PWRITE = @HAVE_PWRITE@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_STPCPY = @HAVE_STPCPY@
HAVE_STPNCPY = @HAVE_STPNCPY@
HAVE_STRCASESTR = @HAVE_STRCASESTR@
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
HAVE_STRPBRK = @HAVE_STRPBRK@
HAVE_STRSEP = @HAVE_STRSEP@
HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_USLEEP = @HAVE_USLEEP@
HAVE_WCHAR_T = @HAVE_WCHAR_T@
HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HELP2MAN = @HELP2MAN@
HTML_DIR = @HTML_DIR@
INCLUDE_GSS_KRB5 = @INCLUDE_GSS_KRB5@
INCLUDE_GSS_KRB5_EXT = @INCLUDE_GSS_KRB5_EXT@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBSHISHI = @LIBSHISHI@
LIBSHISHI_PREFIX = @LIBSHISHI_PREFIX@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
LTLIBSHISHI = @LTLIBSHISHI@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_STDARG_H = @NEXT_STDARG_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STRING_H = @NEXT_STRING_H@
NEXT_UNISTD_H = @NEXT_UNISTD_H@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PMCCABE = @PMCCABE@
POSUB = @POSUB@
PO_SUFFIX = @PO_SUFFIX@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
RANLIB = @RANLIB@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_MEMCHR = @REPLACE_MEMCHR@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
REPLACE_NULL = @REPLACE_NULL@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
REPLACE_UNLINK = @REPLACE_UNLINK@
REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_USLEEP = @REPLACE_USLEEP@
REPLACE_WRITE = @REPLACE_WRITE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STDARG_H = @STDARG_H@
STDDEF_H = @STDDEF_H@
STRIP = @STRIP@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
USE_NLS = @USE_NLS@
VALGRIND = @VALGRIND@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
VERSION_NUMBER = @VERSION_NUMBER@
VERSION_PATCH = @VERSION_PATCH@
WARN_CFLAGS = @WARN_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
gl_LIBOBJS = @gl_LIBOBJS@
gl_LTLIBOBJS = @gl_LTLIBOBJS@
gltests_LIBOBJS = @gltests_LIBOBJS@
gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
gltests_WITNESS = @gltests_WITNESS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libgl_LIBOBJS = @libgl_LIBOBJS@
libgl_LTLIBOBJS = @libgl_LTLIBOBJS@
libgltests_LIBOBJS = @libgltests_LIBOBJS@
libgltests_LTLIBOBJS = @libgltests_LTLIBOBJS@
libgltests_WITNESS = @libgltests_WITNESS@
localedir = $(datadir)/locale
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
srcgl_LIBOBJS = @srcgl_LIBOBJS@
srcgl_LTLIBOBJS = @srcgl_LTLIBOBJS@
srcgltests_LIBOBJS = @srcgltests_LIBOBJS@
srcgltests_LTLIBOBJS = @srcgltests_LTLIBOBJS@
srcgltests_WITNESS = @srcgltests_WITNESS@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = gl $(am__append_4)
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/lib/gl \
-I$(top_builddir)/lib/headers -I$(top_srcdir)/lib/headers
lib_LTLIBRARIES = libgss.la
include_HEADERS = headers/gss.h
gssincludedir = $(includedir)/gss
gssinclude_HEADERS = headers/gss/api.h headers/gss/ext.h \
$(am__append_5)
libgss_la_SOURCES = libgss.map \
internal.h \
meta.h meta.c \
context.c cred.c error.c misc.c msg.c name.c obsolete.c oid.c \
asn1.c ext.c version.c \
saslname.c
libgss_la_LIBADD = @LTLIBINTL@ gl/libgnu.la $(am__append_6)
libgss_la_LDFLAGS = -no-undefined -version-info \
$(LT_CURRENT):$(LT_REVISION):$(LT_AGE) $(am__append_1) \
$(am__append_2) $(am__append_3)
@HAVE_LD_OUTPUT_DEF_TRUE@defexecdir = $(bindir)
@HAVE_LD_OUTPUT_DEF_TRUE@defexec_DATA = libgss-$(DLL_VERSION).def
@HAVE_LD_OUTPUT_DEF_TRUE@DISTCLEANFILES = $(defexec_DATA)
all: all-recursive
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu lib/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libgss.la: $(libgss_la_OBJECTS) $(libgss_la_DEPENDENCIES)
$(AM_V_CCLD)$(libgss_la_LINK) -rpath $(libdir) $(libgss_la_OBJECTS) $(libgss_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/context.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cred.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ext.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meta.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/name.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obsolete.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saslname.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-defexecDATA: $(defexec_DATA)
@$(NORMAL_INSTALL)
test -z "$(defexecdir)" || $(MKDIR_P) "$(DESTDIR)$(defexecdir)"
@list='$(defexec_DATA)'; test -n "$(defexecdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(defexecdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(defexecdir)" || exit $$?; \
done
uninstall-defexecDATA:
@$(NORMAL_UNINSTALL)
@list='$(defexec_DATA)'; test -n "$(defexecdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(defexecdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(defexecdir)" && rm -f $$files
install-gssincludeHEADERS: $(gssinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(gssincludedir)" || $(MKDIR_P) "$(DESTDIR)$(gssincludedir)"
@list='$(gssinclude_HEADERS)'; test -n "$(gssincludedir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(gssincludedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(gssincludedir)" || exit $$?; \
done
uninstall-gssincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(gssinclude_HEADERS)'; test -n "$(gssincludedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(gssincludedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(gssincludedir)" && rm -f $$files
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
done
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(includedir)" && rm -f $$files
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(defexecdir)" "$(DESTDIR)$(gssincludedir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am: install-gssincludeHEADERS install-includeHEADERS
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-defexecDATA install-libLTLIBRARIES
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-defexecDATA uninstall-gssincludeHEADERS \
uninstall-includeHEADERS uninstall-libLTLIBRARIES
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \
distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-defexecDATA install-dvi install-dvi-am \
install-exec install-exec-am install-gssincludeHEADERS \
install-html install-html-am install-includeHEADERS \
install-info install-info-am install-libLTLIBRARIES \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am \
uninstall-defexecDATA uninstall-gssincludeHEADERS \
uninstall-includeHEADERS uninstall-libLTLIBRARIES
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gss-1.0.2/lib/meta.c 0000644 0000000 0000000 00000006462 11546676457 011072 0000000 0000000 /* meta.c --- Implementation of function selection depending on mechanism.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
#include "meta.h"
#ifdef USE_KERBEROS5
# include
# include "krb5/protos.h"
#endif
static _gss_mech_api_desc _gss_mech_apis[] = {
#ifdef USE_KERBEROS5
{
&GSS_KRB5_static,
"GS2-KRB5",
"Kerberos V5",
N_("Kerberos V5 GSS-API mechanism"),
{
/* Mandatory name-types. */
&GSS_KRB5_NT_PRINCIPAL_NAME_static,
&GSS_C_NT_HOSTBASED_SERVICE_static,
&GSS_C_NT_EXPORT_NAME_static},
gss_krb5_init_sec_context,
gss_krb5_canonicalize_name,
gss_krb5_export_name,
gss_krb5_wrap,
gss_krb5_unwrap,
gss_krb5_get_mic,
gss_krb5_verify_mic,
gss_krb5_display_status,
gss_krb5_acquire_cred,
gss_krb5_release_cred,
gss_krb5_accept_sec_context,
gss_krb5_delete_sec_context,
gss_krb5_context_time,
gss_krb5_inquire_cred,
gss_krb5_inquire_cred_by_mech},
#endif
{
NULL,
NULL,
NULL,
NULL,
{
NULL,
NULL,
NULL},
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL}
};
_gss_mech_api_t
_gss_find_mech_no_default (const gss_OID oid)
{
size_t i;
for (i = 0; _gss_mech_apis[i].mech; i++)
if (gss_oid_equal (oid, _gss_mech_apis[i].mech))
return &_gss_mech_apis[i];
return NULL;
}
_gss_mech_api_t
_gss_find_mech (const gss_OID oid)
{
_gss_mech_api_t p = _gss_find_mech_no_default (oid);
if (!p && _gss_mech_apis[0].mech)
/* FIXME. When we support more than one mechanism, make it possible
to configure the default mechanism. */
return &_gss_mech_apis[0];
return p;
}
_gss_mech_api_t
_gss_find_mech_by_saslname (const gss_buffer_t sasl_mech_name)
{
size_t i;
if (sasl_mech_name == NULL
|| sasl_mech_name->value == NULL || sasl_mech_name->length == 0)
return NULL;
for (i = 0; _gss_mech_apis[i].mech; i++)
if (strlen (_gss_mech_apis[i].sasl_name) == sasl_mech_name->length &&
memcmp (_gss_mech_apis[i].sasl_name, sasl_mech_name->value,
sasl_mech_name->length) == 0)
return &_gss_mech_apis[i];
return NULL;
}
OM_uint32
_gss_indicate_mechs1 (OM_uint32 * minor_status, gss_OID_set * mech_set)
{
OM_uint32 maj_stat;
int i;
for (i = 0; _gss_mech_apis[i].mech; i++)
{
maj_stat = gss_add_oid_set_member (minor_status,
_gss_mech_apis[i].mech, mech_set);
if (GSS_ERROR (maj_stat))
return maj_stat;
}
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/context.c 0000644 0000000 0000000 00000137044 11546676340 011620 0000000 0000000 /* context.c --- Implementation of GSS-API Context functions.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
/* _gss_find_mech */
#include "meta.h"
/**
* gss_init_sec_context:
* @minor_status: (integer, modify) Mechanism specific status code.
* @initiator_cred_handle: (gss_cred_id_t, read, optional) Handle for
* credentials claimed. Supply GSS_C_NO_CREDENTIAL to act as a
* default initiator principal. If no default initiator is defined,
* the function will return GSS_S_NO_CRED.
* @context_handle: (gss_ctx_id_t, read/modify) Context handle for new
* context. Supply GSS_C_NO_CONTEXT for first call; use value
* returned by first call in continuation calls. Resources
* associated with this context-handle must be released by the
* application after use with a call to gss_delete_sec_context().
* @target_name: (gss_name_t, read) Name of target.
* @mech_type: (OID, read, optional) Object ID of desired
* mechanism. Supply GSS_C_NO_OID to obtain an implementation
* specific default.
* @req_flags: (bit-mask, read) Contains various independent flags,
* each of which requests that the context support a specific
* service option. Symbolic names are provided for each flag, and
* the symbolic names corresponding to the required flags should be
* logically-ORed together to form the bit-mask value. See below
* for the flags.
* @time_req: (Integer, read, optional) Desired number of seconds for
* which context should remain valid. Supply 0 to request a default
* validity period.
* @input_chan_bindings: (channel bindings, read, optional)
* Application-specified bindings. Allows application to securely
* bind channel identification information to the security context.
* Specify GSS_C_NO_CHANNEL_BINDINGS if channel bindings are not
* used.
* @input_token: (buffer, opaque, read, optional) Token received from
* peer application. Supply GSS_C_NO_BUFFER, or a pointer to a
* buffer containing the value GSS_C_EMPTY_BUFFER on initial call.
* @actual_mech_type: (OID, modify, optional) Actual mechanism used.
* The OID returned via this parameter will be a pointer to static
* storage that should be treated as read-only; In particular the
* application should not attempt to free it. Specify NULL if not
* required.
* @output_token: (buffer, opaque, modify) Token to be sent to peer
* application. If the length field of the returned buffer is zero,
* no token need be sent to the peer application. Storage
* associated with this buffer must be freed by the application
* after use with a call to gss_release_buffer().
* @ret_flags: (bit-mask, modify, optional) Contains various
* independent flags, each of which indicates that the context
* supports a specific service option. Specify NULL if not
* required. Symbolic names are provided for each flag, and the
* symbolic names corresponding to the required flags should be
* logically-ANDed with the ret_flags value to test whether a given
* option is supported by the context. See below for the flags.
* @time_rec: (Integer, modify, optional) Number of seconds for which
* the context will remain valid. If the implementation does not
* support context expiration, the value GSS_C_INDEFINITE will be
* returned. Specify NULL if not required.
*
* Initiates the establishment of a security context between the
* application and a remote peer. Initially, the input_token
* parameter should be specified either as GSS_C_NO_BUFFER, or as a
* pointer to a gss_buffer_desc object whose length field contains the
* value zero. The routine may return a output_token which should be
* transferred to the peer application, where the peer application
* will present it to gss_accept_sec_context. If no token need be
* sent, gss_init_sec_context will indicate this by setting the length
* field of the output_token argument to zero. To complete the context
* establishment, one or more reply tokens may be required from the
* peer application; if so, gss_init_sec_context will return a status
* containing the supplementary information bit GSS_S_CONTINUE_NEEDED.
* In this case, gss_init_sec_context should be called again when the
* reply token is received from the peer application, passing the
* reply token to gss_init_sec_context via the input_token parameters.
*
* Portable applications should be constructed to use the token length
* and return status to determine whether a token needs to be sent or
* waited for. Thus a typical portable caller should always invoke
* gss_init_sec_context within a loop:
*
* ---------------------------------------------------
* int context_established = 0;
* gss_ctx_id_t context_hdl = GSS_C_NO_CONTEXT;
* ...
* input_token->length = 0;
*
* while (!context_established) {
* maj_stat = gss_init_sec_context(&min_stat,
* cred_hdl,
* &context_hdl,
* target_name,
* desired_mech,
* desired_services,
* desired_time,
* input_bindings,
* input_token,
* &actual_mech,
* output_token,
* &actual_services,
* &actual_time);
* if (GSS_ERROR(maj_stat)) {
* report_error(maj_stat, min_stat);
* };
*
* if (output_token->length != 0) {
* send_token_to_peer(output_token);
* gss_release_buffer(&min_stat, output_token)
* };
* if (GSS_ERROR(maj_stat)) {
*
* if (context_hdl != GSS_C_NO_CONTEXT)
* gss_delete_sec_context(&min_stat,
* &context_hdl,
* GSS_C_NO_BUFFER);
* break;
* };
*
* if (maj_stat & GSS_S_CONTINUE_NEEDED) {
* receive_token_from_peer(input_token);
* } else {
* context_established = 1;
* };
* };
* ---------------------------------------------------
*
* Whenever the routine returns a major status that includes the value
* GSS_S_CONTINUE_NEEDED, the context is not fully established and the
* following restrictions apply to the output parameters:
*
* - The value returned via the time_rec parameter is undefined unless
* the accompanying ret_flags parameter contains the bit
* GSS_C_PROT_READY_FLAG, indicating that per-message services may be
* applied in advance of a successful completion status, the value
* returned via the actual_mech_type parameter is undefined until the
* routine returns a major status value of GSS_S_COMPLETE.
*
* - The values of the GSS_C_DELEG_FLAG, GSS_C_MUTUAL_FLAG,
* GSS_C_REPLAY_FLAG, GSS_C_SEQUENCE_FLAG, GSS_C_CONF_FLAG,
* GSS_C_INTEG_FLAG and GSS_C_ANON_FLAG bits returned via the
* ret_flags parameter should contain the values that the
* implementation expects would be valid if context establishment were
* to succeed. In particular, if the application has requested a
* service such as delegation or anonymous authentication via the
* req_flags argument, and such a service is unavailable from the
* underlying mechanism, gss_init_sec_context should generate a token
* that will not provide the service, and indicate via the ret_flags
* argument that the service will not be supported. The application
* may choose to abort the context establishment by calling
* gss_delete_sec_context (if it cannot continue in the absence of the
* service), or it may choose to transmit the token and continue
* context establishment (if the service was merely desired but not
* mandatory).
*
* - The values of the GSS_C_PROT_READY_FLAG and GSS_C_TRANS_FLAG bits
* within ret_flags should indicate the actual state at the time
* gss_init_sec_context returns, whether or not the context is fully
* established.
*
* - GSS-API implementations that support per-message protection are
* encouraged to set the GSS_C_PROT_READY_FLAG in the final ret_flags
* returned to a caller (i.e. when accompanied by a GSS_S_COMPLETE
* status code). However, applications should not rely on this
* behavior as the flag was not defined in Version 1 of the GSS-API.
* Instead, applications should determine what per-message services
* are available after a successful context establishment according to
* the GSS_C_INTEG_FLAG and GSS_C_CONF_FLAG values.
*
* - All other bits within the ret_flags argument should be set to
* zero.
*
* If the initial call of gss_init_sec_context() fails, the
* implementation should not create a context object, and should leave
* the value of the context_handle parameter set to GSS_C_NO_CONTEXT
* to indicate this. In the event of a failure on a subsequent call,
* the implementation is permitted to delete the "half-built" security
* context (in which case it should set the context_handle parameter
* to GSS_C_NO_CONTEXT), but the preferred behavior is to leave the
* security context untouched for the application to delete (using
* gss_delete_sec_context).
*
* During context establishment, the informational status bits
* GSS_S_OLD_TOKEN and GSS_S_DUPLICATE_TOKEN indicate fatal errors,
* and GSS-API mechanisms should always return them in association
* with a routine error of GSS_S_FAILURE. This requirement for
* pairing did not exist in version 1 of the GSS-API specification, so
* applications that wish to run over version 1 implementations must
* special-case these codes.
*
* The `req_flags` values:
*
* `GSS_C_DELEG_FLAG`::
* - True - Delegate credentials to remote peer.
* - False - Don't delegate.
*
* `GSS_C_MUTUAL_FLAG`::
* - True - Request that remote peer authenticate itself.
* - False - Authenticate self to remote peer only.
*
* `GSS_C_REPLAY_FLAG`::
* - True - Enable replay detection for messages protected with
* gss_wrap or gss_get_mic.
* - False - Don't attempt to detect replayed messages.
*
* `GSS_C_SEQUENCE_FLAG`::
* - True - Enable detection of out-of-sequence protected messages.
* - False - Don't attempt to detect out-of-sequence messages.
*
* `GSS_C_CONF_FLAG`::
* - True - Request that confidentiality service be made available
* (via gss_wrap).
* - False - No per-message confidentiality service is required.
*
* `GSS_C_INTEG_FLAG`::
* - True - Request that integrity service be made available (via
* gss_wrap or gss_get_mic).
* - False - No per-message integrity service is required.
*
* `GSS_C_ANON_FLAG`::
* - True - Do not reveal the initiator's identity to the acceptor.
* - False - Authenticate normally.
*
* The `ret_flags` values:
*
* `GSS_C_DELEG_FLAG`::
* - True - Credentials were delegated to the remote peer.
* - False - No credentials were delegated.
*
* `GSS_C_MUTUAL_FLAG`::
* - True - The remote peer has authenticated itself.
* - False - Remote peer has not authenticated itself.
*
* `GSS_C_REPLAY_FLAG`::
* - True - replay of protected messages will be detected.
* - False - replayed messages will not be detected.
*
* `GSS_C_SEQUENCE_FLAG`::
* - True - out-of-sequence protected messages will be detected.
* - False - out-of-sequence messages will not be detected.
*
* `GSS_C_CONF_FLAG`::
* - True - Confidentiality service may be invoked by calling gss_wrap
* routine.
* - False - No confidentiality service (via gss_wrap)
* available. gss_wrap will provide message encapsulation, data-origin
* authentication and integrity services only.
*
* `GSS_C_INTEG_FLAG`::
* - True - Integrity service may be invoked by calling either
* gss_get_mic or gss_wrap routines.
* - False - Per-message integrity service unavailable.
*
* `GSS_C_ANON_FLAG`::
* - True - The initiator's identity has not been revealed, and will
* not be revealed if any emitted token is passed to the acceptor.
* - False - The initiator's identity has been or will be
* authenticated normally.
*
* `GSS_C_PROT_READY_FLAG`::
* - True - Protection services (as specified by the states of the
* GSS_C_CONF_FLAG and GSS_C_INTEG_FLAG) are available for use if the
* accompanying major status return value is either GSS_S_COMPLETE or
* GSS_S_CONTINUE_NEEDED.
* - False - Protection services (as specified by the states of the
* GSS_C_CONF_FLAG and GSS_C_INTEG_FLAG) are available only if the
* accompanying major status return value is GSS_S_COMPLETE.
*
* `GSS_C_TRANS_FLAG`::
* - True - The resultant security context may be transferred to other
* processes via a call to gss_export_sec_context().
* - False - The security context is not transferable.
*
* All other bits should be set to zero.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_CONTINUE_NEEDED`: Indicates that a token from the peer
* application is required to complete the context, and that
* gss_init_sec_context must be called again with that token.
*
* `GSS_S_DEFECTIVE_TOKEN`: Indicates that consistency checks
* performed on the input_token failed.
*
* `GSS_S_DEFECTIVE_CREDENTIAL`: Indicates that consistency checks
* performed on the credential failed.
*
* `GSS_S_NO_CRED`: The supplied credentials were not valid for
* context initiation, or the credential handle did not reference any
* credentials.
*
* `GSS_S_CREDENTIALS_EXPIRED`: The referenced credentials have
* expired.
*
* `GSS_S_BAD_BINDINGS`: The input_token contains different channel
* bindings to those specified via the input_chan_bindings parameter.
*
* `GSS_S_BAD_SIG`: The input_token contains an invalid MIC, or a MIC
* that could not be verified.
*
* `GSS_S_OLD_TOKEN`: The input_token was too old. This is a fatal
* error during context establishment.
*
* `GSS_S_DUPLICATE_TOKEN`: The input_token is valid, but is a
* duplicate of a token already processed. This is a fatal error
* during context establishment.
*
* `GSS_S_NO_CONTEXT`: Indicates that the supplied context handle did
* not refer to a valid context.
*
* `GSS_S_BAD_NAMETYPE`: The provided target_name parameter contained
* an invalid or unsupported type of name.
*
* `GSS_S_BAD_NAME`: The provided target_name parameter was
* ill-formed.
*
* `GSS_S_BAD_MECH`: The specified mechanism is not supported by the
* provided credential, or is unrecognized by the implementation.
**/
OM_uint32
gss_init_sec_context (OM_uint32 * minor_status,
const gss_cred_id_t initiator_cred_handle,
gss_ctx_id_t * context_handle,
const gss_name_t target_name,
const gss_OID mech_type,
OM_uint32 req_flags,
OM_uint32 time_req,
const gss_channel_bindings_t input_chan_bindings,
const gss_buffer_t input_token,
gss_OID * actual_mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags, OM_uint32 * time_rec)
{
OM_uint32 maj_stat;
_gss_mech_api_t mech;
int freecontext = 0;
if (output_token)
{
output_token->length = 0;
output_token->value = NULL;
}
if (ret_flags)
*ret_flags = 0;
if (!context_handle)
{
if (minor_status)
*minor_status = 0;
return GSS_S_NO_CONTEXT | GSS_S_CALL_INACCESSIBLE_READ;
}
if (output_token == GSS_C_NO_BUFFER)
{
if (minor_status)
*minor_status = 0;
return GSS_S_FAILURE | GSS_S_CALL_BAD_STRUCTURE;
}
if (*context_handle == GSS_C_NO_CONTEXT)
mech = _gss_find_mech (mech_type);
else
mech = _gss_find_mech ((*context_handle)->mech);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
if (actual_mech_type)
*actual_mech_type = mech->mech;
if (*context_handle == GSS_C_NO_CONTEXT)
{
*context_handle = calloc (sizeof (**context_handle), 1);
if (!*context_handle)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
(*context_handle)->mech = mech->mech;
freecontext = 1;
}
maj_stat = mech->init_sec_context (minor_status,
initiator_cred_handle,
context_handle,
target_name,
mech_type,
req_flags,
time_req,
input_chan_bindings,
input_token,
actual_mech_type,
output_token, ret_flags, time_rec);
if (GSS_ERROR (maj_stat) && freecontext)
{
free (*context_handle);
*context_handle = GSS_C_NO_CONTEXT;
}
return maj_stat;
}
/**
* gss_accept_sec_context:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @context_handle: (gss_ctx_id_t, read/modify) Context handle for new
* context. Supply GSS_C_NO_CONTEXT for first call; use value
* returned in subsequent calls. Once gss_accept_sec_context() has
* returned a value via this parameter, resources have been assigned
* to the corresponding context, and must be freed by the
* application after use with a call to gss_delete_sec_context().
* @acceptor_cred_handle: (gss_cred_id_t, read) Credential handle
* claimed by context acceptor. Specify GSS_C_NO_CREDENTIAL to
* accept the context as a default principal. If
* GSS_C_NO_CREDENTIAL is specified, but no default acceptor
* principal is defined, GSS_S_NO_CRED will be returned.
* @input_token_buffer: (buffer, opaque, read) Token obtained from
* remote application.
* @input_chan_bindings: (channel bindings, read, optional)
* Application- specified bindings. Allows application to securely
* bind channel identification information to the security context.
* If channel bindings are not used, specify
* GSS_C_NO_CHANNEL_BINDINGS.
* @src_name: (gss_name_t, modify, optional) Authenticated name of
* context initiator. After use, this name should be deallocated by
* passing it to gss_release_name(). If not required, specify NULL.
* @mech_type: (Object ID, modify, optional) Security mechanism used.
* The returned OID value will be a pointer into static storage, and
* should be treated as read-only by the caller (in particular, it
* does not need to be freed). If not required, specify NULL.
* @output_token: (buffer, opaque, modify) Token to be passed to peer
* application. If the length field of the returned token buffer is
* 0, then no token need be passed to the peer application. If a
* non- zero length field is returned, the associated storage must
* be freed after use by the application with a call to
* gss_release_buffer().
* @ret_flags: (bit-mask, modify, optional) Contains various
* independent flags, each of which indicates that the context
* supports a specific service option. If not needed, specify NULL.
* Symbolic names are provided for each flag, and the symbolic names
* corresponding to the required flags should be logically-ANDed
* with the ret_flags value to test whether a given option is
* supported by the context. See below for the flags.
* @time_rec: (Integer, modify, optional) Number of seconds for which
* the context will remain valid. Specify NULL if not required.
* @delegated_cred_handle: (gss_cred_id_t, modify, optional
* credential) Handle for credentials received from context
* initiator. Only valid if deleg_flag in ret_flags is true, in
* which case an explicit credential handle (i.e. not
* GSS_C_NO_CREDENTIAL) will be returned; if deleg_flag is false,
* gss_accept_sec_context() will set this parameter to
* GSS_C_NO_CREDENTIAL. If a credential handle is returned, the
* associated resources must be released by the application after
* use with a call to gss_release_cred(). Specify NULL if not
* required.
*
* Allows a remotely initiated security context between the
* application and a remote peer to be established. The routine may
* return a output_token which should be transferred to the peer
* application, where the peer application will present it to
* gss_init_sec_context. If no token need be sent,
* gss_accept_sec_context will indicate this by setting the length
* field of the output_token argument to zero. To complete the
* context establishment, one or more reply tokens may be required
* from the peer application; if so, gss_accept_sec_context will
* return a status flag of GSS_S_CONTINUE_NEEDED, in which case it
* should be called again when the reply token is received from the
* peer application, passing the token to gss_accept_sec_context via
* the input_token parameters.
*
* Portable applications should be constructed to use the token length
* and return status to determine whether a token needs to be sent or
* waited for. Thus a typical portable caller should always invoke
* gss_accept_sec_context within a loop:
*
* ---------------------------------------------------
* gss_ctx_id_t context_hdl = GSS_C_NO_CONTEXT;
*
* do {
* receive_token_from_peer(input_token);
* maj_stat = gss_accept_sec_context(&min_stat,
* &context_hdl,
* cred_hdl,
* input_token,
* input_bindings,
* &client_name,
* &mech_type,
* output_token,
* &ret_flags,
* &time_rec,
* &deleg_cred);
* if (GSS_ERROR(maj_stat)) {
* report_error(maj_stat, min_stat);
* };
* if (output_token->length != 0) {
* send_token_to_peer(output_token);
*
* gss_release_buffer(&min_stat, output_token);
* };
* if (GSS_ERROR(maj_stat)) {
* if (context_hdl != GSS_C_NO_CONTEXT)
* gss_delete_sec_context(&min_stat,
* &context_hdl,
* GSS_C_NO_BUFFER);
* break;
* };
* } while (maj_stat & GSS_S_CONTINUE_NEEDED);
* ---------------------------------------------------
*
*
* Whenever the routine returns a major status that includes the value
* GSS_S_CONTINUE_NEEDED, the context is not fully established and the
* following restrictions apply to the output parameters:
*
* The value returned via the time_rec parameter is undefined Unless the
* accompanying ret_flags parameter contains the bit
* GSS_C_PROT_READY_FLAG, indicating that per-message services may be
* applied in advance of a successful completion status, the value
* returned via the mech_type parameter may be undefined until the
* routine returns a major status value of GSS_S_COMPLETE.
*
* The values of the GSS_C_DELEG_FLAG,
* GSS_C_MUTUAL_FLAG,GSS_C_REPLAY_FLAG, GSS_C_SEQUENCE_FLAG,
* GSS_C_CONF_FLAG,GSS_C_INTEG_FLAG and GSS_C_ANON_FLAG bits returned
* via the ret_flags parameter should contain the values that the
* implementation expects would be valid if context establishment were
* to succeed.
*
* The values of the GSS_C_PROT_READY_FLAG and GSS_C_TRANS_FLAG bits
* within ret_flags should indicate the actual state at the time
* gss_accept_sec_context returns, whether or not the context is fully
* established.
*
* Although this requires that GSS-API implementations set the
* GSS_C_PROT_READY_FLAG in the final ret_flags returned to a caller
* (i.e. when accompanied by a GSS_S_COMPLETE status code), applications
* should not rely on this behavior as the flag was not defined in
* Version 1 of the GSS-API. Instead, applications should be prepared to
* use per-message services after a successful context establishment,
* according to the GSS_C_INTEG_FLAG and GSS_C_CONF_FLAG values.
*
* All other bits within the ret_flags argument should be set to zero.
* While the routine returns GSS_S_CONTINUE_NEEDED, the values returned
* via the ret_flags argument indicate the services that the
* implementation expects to be available from the established context.
*
* If the initial call of gss_accept_sec_context() fails, the
* implementation should not create a context object, and should leave
* the value of the context_handle parameter set to GSS_C_NO_CONTEXT to
* indicate this. In the event of a failure on a subsequent call, the
* implementation is permitted to delete the "half-built" security
* context (in which case it should set the context_handle parameter to
* GSS_C_NO_CONTEXT), but the preferred behavior is to leave the
* security context (and the context_handle parameter) untouched for the
* application to delete (using gss_delete_sec_context).
*
* During context establishment, the informational status bits
* GSS_S_OLD_TOKEN and GSS_S_DUPLICATE_TOKEN indicate fatal errors, and
* GSS-API mechanisms should always return them in association with a
* routine error of GSS_S_FAILURE. This requirement for pairing did not
* exist in version 1 of the GSS-API specification, so applications that
* wish to run over version 1 implementations must special-case these
* codes.
*
* The `ret_flags` values:
*
* `GSS_C_DELEG_FLAG`::
* - True - Delegated credentials are available via the
* delegated_cred_handle parameter.
* - False - No credentials were delegated.
*
* `GSS_C_MUTUAL_FLAG`::
* - True - Remote peer asked for mutual authentication.
* - False - Remote peer did not ask for mutual authentication.
*
* `GSS_C_REPLAY_FLAG`::
* - True - replay of protected messages will be detected.
* - False - replayed messages will not be detected.
*
* `GSS_C_SEQUENCE_FLAG`::
* - True - out-of-sequence protected messages will be detected.
* - False - out-of-sequence messages will not be detected.
*
* `GSS_C_CONF_FLAG`::
* - True - Confidentiality service may be invoked by calling the
* gss_wrap routine.
* - False - No confidentiality service (via gss_wrap)
* available. gss_wrap will provide message encapsulation, data-origin
* authentication and integrity services only.
*
* `GSS_C_INTEG_FLAG`::
* - True - Integrity service may be invoked by calling either
* gss_get_mic or gss_wrap routines.
* - False - Per-message integrity service unavailable.
*
* `GSS_C_ANON_FLAG`::
* - True - The initiator does not wish to be authenticated; the
* src_name parameter (if requested) contains an anonymous internal
* name.
* - False - The initiator has been authenticated normally.
*
* `GSS_C_PROT_READY_FLAG`::
* - True - Protection services (as specified by the states of the
* GSS_C_CONF_FLAG and GSS_C_INTEG_FLAG) are available if the
* accompanying major status return value is either GSS_S_COMPLETE or
* GSS_S_CONTINUE_NEEDED.
* - False - Protection services (as specified by the states of the
* GSS_C_CONF_FLAG and GSS_C_INTEG_FLAG) are available only if the
* accompanying major status return value is GSS_S_COMPLETE.
*
* `GSS_C_TRANS_FLAG`::
* - True - The resultant security context may be transferred to other
* processes via a call to gss_export_sec_context().
* - False - The security context is not transferable.
*
* All other bits should be set to zero.
*
* Return value:
*
* `GSS_S_CONTINUE_NEEDED`: Indicates that a token from the peer
* application is required to complete the context, and that
* gss_accept_sec_context must be called again with that token.
*
* `GSS_S_DEFECTIVE_TOKEN`: Indicates that consistency checks
* performed on the input_token failed.
*
* `GSS_S_DEFECTIVE_CREDENTIAL`: Indicates that consistency checks
* performed on the credential failed.
*
* `GSS_S_NO_CRED`: The supplied credentials were not valid for
* context acceptance, or the credential handle did not reference any
* credentials.
*
* `GSS_S_CREDENTIALS_EXPIRED`: The referenced credentials have
* expired.
*
* `GSS_S_BAD_BINDINGS`: The input_token contains different channel
* bindings to those specified via the input_chan_bindings parameter.
*
* `GSS_S_NO_CONTEXT`: Indicates that the supplied context handle did
* not refer to a valid context.
*
* `GSS_S_BAD_SIG`: The input_token contains an invalid MIC.
*
* `GSS_S_OLD_TOKEN`: The input_token was too old. This is a fatal
* error during context establishment.
*
* `GSS_S_DUPLICATE_TOKEN`: The input_token is valid, but is a
* duplicate of a token already processed. This is a fatal error
* during context establishment.
*
* `GSS_S_BAD_MECH`: The received token specified a mechanism that is
* not supported by the implementation or the provided credential.
**/
OM_uint32
gss_accept_sec_context (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
const gss_cred_id_t acceptor_cred_handle,
const gss_buffer_t input_token_buffer,
const gss_channel_bindings_t input_chan_bindings,
gss_name_t * src_name,
gss_OID * mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags,
OM_uint32 * time_rec,
gss_cred_id_t * delegated_cred_handle)
{
_gss_mech_api_t mech;
if (!context_handle)
{
if (minor_status)
*minor_status = 0;
return GSS_S_NO_CONTEXT | GSS_S_CALL_INACCESSIBLE_READ;
}
if (*context_handle == GSS_C_NO_CONTEXT)
{
/* FIXME: We should extract GSS-API mechanism OID from token
here, and use it to find the proper mechanism. */
mech = _gss_find_mech (GSS_C_NO_OID);
}
else
mech = _gss_find_mech ((*context_handle)->mech);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
if (mech_type)
*mech_type = mech->mech;
return mech->accept_sec_context (minor_status,
context_handle,
acceptor_cred_handle,
input_token_buffer,
input_chan_bindings,
src_name,
mech_type,
output_token,
ret_flags,
time_rec, delegated_cred_handle);
}
/**
* gss_delete_sec_context:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @context_handle: (gss_ctx_id_t, modify) Context handle identifying
* context to delete. After deleting the context, the GSS-API will
* set this context handle to GSS_C_NO_CONTEXT.
* @output_token: (buffer, opaque, modify, optional) Token to be sent
* to remote application to instruct it to also delete the context.
* It is recommended that applications specify GSS_C_NO_BUFFER for
* this parameter, requesting local deletion only. If a buffer
* parameter is provided by the application, the mechanism may
* return a token in it; mechanisms that implement only local
* deletion should set the length field of this token to zero to
* indicate to the application that no token is to be sent to the
* peer.
*
* Delete a security context. gss_delete_sec_context will delete the
* local data structures associated with the specified security
* context, and may generate an output_token, which when passed to the
* peer gss_process_context_token will instruct it to do likewise. If
* no token is required by the mechanism, the GSS-API should set the
* length field of the output_token (if provided) to zero. No further
* security services may be obtained using the context specified by
* context_handle.
*
* In addition to deleting established security contexts,
* gss_delete_sec_context must also be able to delete "half-built"
* security contexts resulting from an incomplete sequence of
* gss_init_sec_context()/gss_accept_sec_context() calls.
*
* The output_token parameter is retained for compatibility with
* version 1 of the GSS-API. It is recommended that both peer
* applications invoke gss_delete_sec_context passing the value
* GSS_C_NO_BUFFER for the output_token parameter, indicating that no
* token is required, and that gss_delete_sec_context should simply
* delete local context data structures. If the application does pass
* a valid buffer to gss_delete_sec_context, mechanisms are encouraged
* to return a zero-length token, indicating that no peer action is
* necessary, and that no token should be transferred by the
* application.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_NO_CONTEXT`: No valid context was supplied.
**/
OM_uint32
gss_delete_sec_context (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
gss_buffer_t output_token)
{
_gss_mech_api_t mech;
OM_uint32 ret;
if (!context_handle)
{
if (minor_status)
*minor_status = 0;
return GSS_S_NO_CONTEXT | GSS_S_CALL_INACCESSIBLE_READ;
}
if (*context_handle == GSS_C_NO_CONTEXT)
{
if (minor_status)
*minor_status = 0;
return GSS_S_NO_CONTEXT | GSS_S_CALL_BAD_STRUCTURE;
}
if (output_token != GSS_C_NO_BUFFER)
{
output_token->length = 0;
output_token->value = NULL;
}
mech = _gss_find_mech ((*context_handle)->mech);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
ret = mech->delete_sec_context (NULL, context_handle, output_token);
free (*context_handle);
*context_handle = GSS_C_NO_CONTEXT;
return ret;
}
/**
* gss_process_context_token:
* @minor_status: (Integer, modify) Implementation specific status code.
* @context_handle: (gss_ctx_id_t, read) Context handle of context on
* which token is to be processed
* @token_buffer: (buffer, opaque, read) Token to process.
*
* Provides a way to pass an asynchronous token to the security
* service. Most context-level tokens are emitted and processed
* synchronously by gss_init_sec_context and gss_accept_sec_context,
* and the application is informed as to whether further tokens are
* expected by the GSS_C_CONTINUE_NEEDED major status bit.
* Occasionally, a mechanism may need to emit a context-level token at
* a point when the peer entity is not expecting a token. For
* example, the initiator's final call to gss_init_sec_context may
* emit a token and return a status of GSS_S_COMPLETE, but the
* acceptor's call to gss_accept_sec_context may fail. The acceptor's
* mechanism may wish to send a token containing an error indication
* to the initiator, but the initiator is not expecting a token at
* this point, believing that the context is fully established.
* Gss_process_context_token provides a way to pass such a token to
* the mechanism at any time.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_DEFECTIVE_TOKEN`: Indicates that consistency checks
* performed on the token failed.
*
* `GSS_S_NO_CONTEXT`: The context_handle did not refer to a valid
* context.
**/
OM_uint32
gss_process_context_token (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t token_buffer)
{
return GSS_S_FAILURE;
}
/**
* gss_context_time:
* @minor_status: (Integer, modify) Implementation specific status
* code.
* @context_handle: (gss_ctx_id_t, read) Identifies the context to be
* interrogated.
* @time_rec: (Integer, modify) Number of seconds that the context
* will remain valid. If the context has already expired, zero will
* be returned.
*
* Determines the number of seconds for which the specified context
* will remain valid.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_CONTEXT_EXPIRED`: The context has already expired.
*
* `GSS_S_NO_CONTEXT`: The context_handle parameter did not identify a
* valid context
**/
OM_uint32
gss_context_time (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle, OM_uint32 * time_rec)
{
_gss_mech_api_t mech;
if (context_handle == GSS_C_NO_CONTEXT)
{
if (minor_status)
*minor_status = 0;
return GSS_S_NO_CONTEXT | GSS_S_CALL_BAD_STRUCTURE;
}
mech = _gss_find_mech (context_handle->mech);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
return mech->context_time (minor_status, context_handle, time_rec);
}
/**
* gss_inquire_context:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @context_handle: (gss_ctx_id_t, read) A handle that refers to the
* security context.
* @src_name: (gss_name_t, modify, optional) The name of the context
* initiator. If the context was established using anonymous
* authentication, and if the application invoking
* gss_inquire_context is the context acceptor, an anonymous name
* will be returned. Storage associated with this name must be
* freed by the application after use with a call to
* gss_release_name(). Specify NULL if not required.
* @targ_name: (gss_name_t, modify, optional) The name of the context
* acceptor. Storage associated with this name must be freed by the
* application after use with a call to gss_release_name(). If the
* context acceptor did not authenticate itself, and if the
* initiator did not specify a target name in its call to
* gss_init_sec_context(), the value GSS_C_NO_NAME will be returned.
* Specify NULL if not required.
* @lifetime_rec: (Integer, modify, optional) The number of seconds
* for which the context will remain valid. If the context has
* expired, this parameter will be set to zero. If the
* implementation does not support context expiration, the value
* GSS_C_INDEFINITE will be returned. Specify NULL if not required.
* @mech_type: (gss_OID, modify, optional) The security mechanism
* providing the context. The returned OID will be a pointer to
* static storage that should be treated as read-only by the
* application; in particular the application should not attempt to
* free it. Specify NULL if not required.
* @ctx_flags: (bit-mask, modify, optional) Contains various
* independent flags, each of which indicates that the context
* supports (or is expected to support, if ctx_open is false) a
* specific service option. If not needed, specify NULL. Symbolic
* names are provided for each flag, and the symbolic names
* corresponding to the required flags should be logically-ANDed
* with the ret_flags value to test whether a given option is
* supported by the context. See below for the flags.
* @locally_initiated: (Boolean, modify) Non-zero if the invoking
* application is the context initiator. Specify NULL if not
* required.
* @open: (Boolean, modify) Non-zero if the context is fully
* established; Zero if a context-establishment token is expected
* from the peer application. Specify NULL if not required.
*
* Obtains information about a security context. The caller must
* already have obtained a handle that refers to the context, although
* the context need not be fully established.
*
* The `ctx_flags` values:
*
* `GSS_C_DELEG_FLAG`::
* - True - Credentials were delegated from the initiator to the
* acceptor.
* - False - No credentials were delegated.
*
* `GSS_C_MUTUAL_FLAG`::
* - True - The acceptor was authenticated to the initiator.
* - False - The acceptor did not authenticate itself.
*
* `GSS_C_REPLAY_FLAG`::
* - True - replay of protected messages will be detected.
* - False - replayed messages will not be detected.
*
* `GSS_C_SEQUENCE_FLAG`::
* - True - out-of-sequence protected messages will be detected.
* - False - out-of-sequence messages will not be detected.
*
* `GSS_C_CONF_FLAG`::
* - True - Confidentiality service may be invoked by calling gss_wrap
* routine.
* - False - No confidentiality service (via gss_wrap)
* available. gss_wrap will provide message encapsulation, data-origin
* authentication and integrity services only.
*
* `GSS_C_INTEG_FLAG`::
* - True - Integrity service may be invoked by calling either
* gss_get_mic or gss_wrap routines.
* - False - Per-message integrity service unavailable.
*
* `GSS_C_ANON_FLAG`::
* - True - The initiator's identity will not be revealed to the
* acceptor. The src_name parameter (if requested) contains an
* anonymous internal name.
* - False - The initiator has been authenticated normally.
*
* `GSS_C_PROT_READY_FLAG`::
* - True - Protection services (as specified by the states of the
* GSS_C_CONF_FLAG and GSS_C_INTEG_FLAG) are available for use.
* - False - Protection services (as specified by the states of the
* GSS_C_CONF_FLAG and GSS_C_INTEG_FLAG) are available only if the
* context is fully established (i.e. if the open parameter is
* non-zero).
*
* `GSS_C_TRANS_FLAG`::
* - True - The resultant security context may be transferred to other
* processes via a call to gss_export_sec_context().
* - False - The security context is not transferable.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_NO_CONTEXT`: The referenced context could not be accessed.
**/
OM_uint32
gss_inquire_context (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
gss_name_t * src_name,
gss_name_t * targ_name,
OM_uint32 * lifetime_rec,
gss_OID * mech_type,
OM_uint32 * ctx_flags, int *locally_initiated, int *open)
{
return GSS_S_FAILURE;
}
/**
* gss_wrap_size_limit:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @context_handle: (gss_ctx_id_t, read) A handle that refers to the
* security over which the messages will be sent.
* @conf_req_flag: (Boolean, read) Indicates whether gss_wrap will be
* asked to apply confidentiality protection in addition to
* integrity protection. See the routine description for gss_wrap
* for more details.
* @qop_req: (gss_qop_t, read) Indicates the level of protection that
* gss_wrap will be asked to provide. See the routine description
* for gss_wrap for more details.
* @req_output_size: (Integer, read) The desired maximum size for
* tokens emitted by gss_wrap.
* @max_input_size: (Integer, modify) The maximum input message size
* that may be presented to gss_wrap in order to guarantee that the
* emitted token shall be no larger than req_output_size bytes.
*
* Allows an application to determine the maximum message size that,
* if presented to gss_wrap with the same conf_req_flag and qop_req
* parameters, will result in an output token containing no more than
* req_output_size bytes.
*
* This call is intended for use by applications that communicate over
* protocols that impose a maximum message size. It enables the
* application to fragment messages prior to applying protection.
*
* GSS-API implementations are recommended but not required to detect
* invalid QOP values when gss_wrap_size_limit() is called. This
* routine guarantees only a maximum message size, not the
* availability of specific QOP values for message protection.
*
* Successful completion of this call does not guarantee that gss_wrap
* will be able to protect a message of length max_input_size bytes,
* since this ability may depend on the availability of system
* resources at the time that gss_wrap is called. However, if the
* implementation itself imposes an upper limit on the length of
* messages that may be processed by gss_wrap, the implementation
* should not return a value via max_input_bytes that is greater than
* this length.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_NO_CONTEXT`: The referenced context could not be accessed.
*
* `GSS_S_CONTEXT_EXPIRED`: The context has expired.
*
* `GSS_S_BAD_QOP`: The specified QOP is not supported by the
* mechanism.
**/
OM_uint32
gss_wrap_size_limit (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
int conf_req_flag,
gss_qop_t qop_req,
OM_uint32 req_output_size, OM_uint32 * max_input_size)
{
return GSS_S_FAILURE;
}
/**
* gss_export_sec_context:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @context_handle: (gss_ctx_id_t, modify) Context handle identifying
* the context to transfer.
* @interprocess_token: (buffer, opaque, modify) Token to be
* transferred to target process. Storage associated with this
* token must be freed by the application after use with a call to
* gss_release_buffer().
*
* Provided to support the sharing of work between multiple processes.
* This routine will typically be used by the context-acceptor, in an
* application where a single process receives incoming connection
* requests and accepts security contexts over them, then passes the
* established context to one or more other processes for message
* exchange. gss_export_sec_context() deactivates the security context
* for the calling process and creates an interprocess token which,
* when passed to gss_import_sec_context in another process, will
* re-activate the context in the second process. Only a single
* instantiation of a given context may be active at any one time; a
* subsequent attempt by a context exporter to access the exported
* security context will fail.
*
* The implementation may constrain the set of processes by which the
* interprocess token may be imported, either as a function of local
* security policy, or as a result of implementation decisions. For
* example, some implementations may constrain contexts to be passed
* only between processes that run under the same account, or which
* are part of the same process group.
*
* The interprocess token may contain security-sensitive information
* (for example cryptographic keys). While mechanisms are encouraged
* to either avoid placing such sensitive information within
* interprocess tokens, or to encrypt the token before returning it to
* the application, in a typical object-library GSS-API implementation
* this may not be possible. Thus the application must take care to
* protect the interprocess token, and ensure that any process to
* which the token is transferred is trustworthy.
*
* If creation of the interprocess token is successful, the
* implementation shall deallocate all process-wide resources
* associated with the security context, and set the context_handle to
* GSS_C_NO_CONTEXT. In the event of an error that makes it
* impossible to complete the export of the security context, the
* implementation must not return an interprocess token, and should
* strive to leave the security context referenced by the
* context_handle parameter untouched. If this is impossible, it is
* permissible for the implementation to delete the security context,
* providing it also sets the context_handle parameter to
* GSS_C_NO_CONTEXT.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_CONTEXT_EXPIRED`: The context has expired.
*
* `GSS_S_NO_CONTEXT`: The context was invalid.
*
* `GSS_S_UNAVAILABLE`: The operation is not supported.
**/
OM_uint32
gss_export_sec_context (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
gss_buffer_t interprocess_token)
{
return GSS_S_UNAVAILABLE;
}
/**
* gss_import_sec_context:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @interprocess_token: (buffer, opaque, modify) Token received from
* exporting process
* @context_handle: (gss_ctx_id_t, modify) Context handle of newly
* reactivated context. Resources associated with this context
* handle must be released by the application after use with a call
* to gss_delete_sec_context().
*
* Allows a process to import a security context established by
* another process. A given interprocess token may be imported only
* once. See gss_export_sec_context.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_NO_CONTEXT`: The token did not contain a valid context
* reference.
*
* `GSS_S_DEFECTIVE_TOKEN`: The token was invalid.
*
* `GSS_S_UNAVAILABLE`: The operation is unavailable.
*
* `GSS_S_UNAUTHORIZED`: Local policy prevents the import of this
* context by the current process.
**/
OM_uint32
gss_import_sec_context (OM_uint32 * minor_status,
const gss_buffer_t interprocess_token,
gss_ctx_id_t * context_handle)
{
return GSS_S_UNAVAILABLE;
}
gss-1.0.2/lib/error.c 0000644 0000000 0000000 00000025265 11546676340 011266 0000000 0000000 /* error.c --- Error handling functionality.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
/* _gss_find_mech */
#include "meta.h"
struct gss_status_codes
{
gss_uint32 err;
const char *name;
const char *text;
};
static struct gss_status_codes gss_calling_errors[] = {
{GSS_S_CALL_INACCESSIBLE_READ, "GSS_S_CALL_INACCESSIBLE_READ",
N_("A required input parameter could not be read")},
{GSS_S_CALL_INACCESSIBLE_WRITE, "GSS_S_CALL_INACCESSIBLE_WRITE",
N_("A required output parameter could not be written")},
{GSS_S_CALL_BAD_STRUCTURE, "GSS_S_CALL_BAD_STRUCTURE",
N_("A parameter was malformed")}
};
static struct gss_status_codes gss_routine_errors[] = {
{GSS_S_BAD_MECH, "GSS_S_BAD_MECH",
N_("An unsupported mechanism was requested")},
{GSS_S_BAD_NAME, "GSS_S_BAD_NAME",
N_("An invalid name was supplied")},
{GSS_S_BAD_NAMETYPE, "GSS_S_BAD_NAMETYPE",
N_("A supplied name was of an unsupported type")},
{GSS_S_BAD_BINDINGS, "GSS_S_BAD_BINDINGS",
N_("Incorrect channel bindings were supplied")},
{GSS_S_BAD_STATUS, "GSS_S_BAD_STATUS",
N_("An invalid status code was supplied")},
{GSS_S_BAD_SIG, "GSS_S_BAD_SIG",
N_("A token had an invalid MIC")},
{GSS_S_NO_CRED, "GSS_S_NO_CRED",
N_("No credentials were supplied, or the credentials were unavailable "
"or inaccessible")},
{GSS_S_NO_CONTEXT, "GSS_S_NO_CONTEXT",
N_("No context has been established")},
{GSS_S_DEFECTIVE_TOKEN, "GSS_S_DEFECTIVE_TOKEN",
N_("A token was invalid")},
{GSS_S_DEFECTIVE_CREDENTIAL, "GSS_S_DEFECTIVE_CREDENTIAL",
N_("A credential was invalid")},
{GSS_S_CREDENTIALS_EXPIRED, "GSS_S_CREDENTIALS_EXPIRED",
N_("The referenced credentials have expired")},
{GSS_S_CONTEXT_EXPIRED, "GSS_S_CONTEXT_EXPIRED",
N_("The context has expired")},
{GSS_S_FAILURE, "GSS_S_FAILURE",
N_("Unspecified error in underlying mechanism")},
{GSS_S_BAD_QOP, "GSS_S_BAD_QOP",
N_("The quality-of-protection requested could not be provided")},
{GSS_S_UNAUTHORIZED, "GSS_S_UNAUTHORIZED",
N_("The operation is forbidden by local security policy")},
{GSS_S_UNAVAILABLE, "GSS_S_UNAVAILABLE",
N_("The operation or option is unavailable")},
{GSS_S_DUPLICATE_ELEMENT, "GSS_S_DUPLICATE_ELEMENT",
N_("The requested credential element already exists")},
{GSS_S_NAME_NOT_MN, "GSS_S_NAME_NOT_MN",
N_("The provided name was not a mechanism name")}
};
static struct gss_status_codes gss_supplementary_errors[] = {
{GSS_S_CONTINUE_NEEDED, "GSS_S_CONTINUE_NEEDED",
N_("The gss_init_sec_context() or gss_accept_sec_context() function "
"must be called again to complete its function")},
{GSS_S_DUPLICATE_TOKEN, "GSS_S_DUPLICATE_TOKEN",
N_("The token was a duplicate of an earlier token")},
{GSS_S_OLD_TOKEN, "GSS_S_OLD_TOKEN",
N_("The token's validity period has expired")},
{GSS_S_UNSEQ_TOKEN, "GSS_S_UNSEQ_TOKEN",
N_("A later token has already been processed")},
{GSS_S_GAP_TOKEN, "GSS_S_GAP_TOKEN",
N_("An expected per-message token was not received")}
};
/**
* gss_display_status:
* @minor_status: (integer, modify) Mechanism specific status code.
* @status_value: (Integer, read) Status value to be converted.
* @status_type: (Integer, read) GSS_C_GSS_CODE - status_value is a
* GSS status code. GSS_C_MECH_CODE - status_value is a mechanism
* status code.
* @mech_type: (Object ID, read, optional) Underlying mechanism (used
* to interpret a minor status value). Supply GSS_C_NO_OID to obtain
* the system default.
* @message_context: (Integer, read/modify) Should be initialized to
* zero by the application prior to the first call. On return from
* gss_display_status(), a non-zero status_value parameter indicates
* that additional messages may be extracted from the status code
* via subsequent calls to gss_display_status(), passing the same
* status_value, status_type, mech_type, and message_context
* parameters.
* @status_string: (buffer, character string, modify) Textual
* interpretation of the status_value. Storage associated with this
* parameter must be freed by the application after use with a call
* to gss_release_buffer().
*
* Allows an application to obtain a textual representation of a
* GSS-API status code, for display to the user or for logging
* purposes. Since some status values may indicate multiple
* conditions, applications may need to call gss_display_status
* multiple times, each call generating a single text string. The
* message_context parameter is used by gss_display_status to store
* state information about which error messages have already been
* extracted from a given status_value; message_context must be
* initialized to 0 by the application prior to the first call, and
* gss_display_status will return a non-zero value in this parameter
* if there are further messages to extract.
*
* The message_context parameter contains all state information
* required by gss_display_status in order to extract further messages
* from the status_value; even when a non-zero value is returned in
* this parameter, the application is not required to call
* gss_display_status again unless subsequent messages are desired.
* The following code extracts all messages from a given status code
* and prints them to stderr:
*
*
* ---------------------------------------------------
* OM_uint32 message_context;
* OM_uint32 status_code;
* OM_uint32 maj_status;
* OM_uint32 min_status;
* gss_buffer_desc status_string;
*
* ...
*
* message_context = 0;
*
* do {
* maj_status = gss_display_status (
* &min_status,
* status_code,
* GSS_C_GSS_CODE,
* GSS_C_NO_OID,
* &message_context,
* &status_string)
*
* fprintf(stderr,
* "%.*s\n",
* (int)status_string.length,
*
* (char *)status_string.value);
*
* gss_release_buffer(&min_status, &status_string);
*
* } while (message_context != 0);
* ---------------------------------------------------
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_BAD_MECH`: Indicates that translation in accordance with an
* unsupported mechanism type was requested.
*
* `GSS_S_BAD_STATUS`: The status value was not recognized, or the
* status type was neither GSS_C_GSS_CODE nor GSS_C_MECH_CODE.
**/
OM_uint32
gss_display_status (OM_uint32 * minor_status,
OM_uint32 status_value,
int status_type,
const gss_OID mech_type,
OM_uint32 * message_context, gss_buffer_t status_string)
{
size_t i;
bindtextdomain (PACKAGE PO_SUFFIX, LOCALEDIR);
if (minor_status)
*minor_status = 0;
if (message_context)
status_value &= ~*message_context;
switch (status_type)
{
case GSS_C_GSS_CODE:
if (message_context)
{
*message_context |=
GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET;
if ((status_value & ~*message_context) == 0)
*message_context = 0;
}
switch (GSS_ROUTINE_ERROR (status_value))
{
case 0:
break;
case GSS_S_BAD_MECH:
case GSS_S_BAD_NAME:
case GSS_S_BAD_NAMETYPE:
case GSS_S_BAD_BINDINGS:
case GSS_S_BAD_STATUS:
case GSS_S_BAD_SIG:
case GSS_S_NO_CRED:
case GSS_S_NO_CONTEXT:
case GSS_S_DEFECTIVE_TOKEN:
case GSS_S_DEFECTIVE_CREDENTIAL:
case GSS_S_CREDENTIALS_EXPIRED:
case GSS_S_CONTEXT_EXPIRED:
case GSS_S_FAILURE:
case GSS_S_BAD_QOP:
case GSS_S_UNAUTHORIZED:
case GSS_S_UNAVAILABLE:
case GSS_S_DUPLICATE_ELEMENT:
case GSS_S_NAME_NOT_MN:
status_string->value =
strdup (_(gss_routine_errors
[(GSS_ROUTINE_ERROR (status_value) >>
GSS_C_ROUTINE_ERROR_OFFSET) - 1].text));
if (!status_string->value)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
status_string->length = strlen (status_string->value);
return GSS_S_COMPLETE;
break;
default:
return GSS_S_BAD_STATUS;
break;
}
if (message_context)
{
*message_context |=
GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET;
if ((status_value & ~*message_context) == 0)
*message_context = 0;
}
switch (GSS_CALLING_ERROR (status_value))
{
case 0:
break;
case GSS_S_CALL_INACCESSIBLE_READ:
case GSS_S_CALL_INACCESSIBLE_WRITE:
case GSS_S_CALL_BAD_STRUCTURE:
status_string->value =
strdup (_(gss_calling_errors
[(GSS_CALLING_ERROR (status_value) >>
GSS_C_CALLING_ERROR_OFFSET) - 1].text));
if (!status_string->value)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
status_string->length = strlen (status_string->value);
return GSS_S_COMPLETE;
break;
default:
return GSS_S_BAD_STATUS;
break;
}
for (i = 0; i < sizeof (gss_supplementary_errors) /
sizeof (gss_supplementary_errors[0]); i++)
if (gss_supplementary_errors[i].err &
GSS_SUPPLEMENTARY_INFO (status_value))
{
status_string->value =
strdup (_(gss_supplementary_errors[i].text));
if (!status_string->value)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
status_string->length = strlen (status_string->value);
*message_context |= gss_supplementary_errors[i].err;
if ((status_value & ~*message_context) == 0)
*message_context = 0;
return GSS_S_COMPLETE;
}
if (GSS_SUPPLEMENTARY_INFO (status_value))
return GSS_S_BAD_STATUS;
if (message_context)
*message_context = 0;
status_string->value = strdup (_("No error"));
if (!status_string->value)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
status_string->length = strlen (status_string->value);
break;
case GSS_C_MECH_CODE:
{
_gss_mech_api_t mech;
mech = _gss_find_mech (mech_type);
return mech->display_status (minor_status, status_value, status_type,
mech_type, message_context,
status_string);
}
break;
default:
return GSS_S_BAD_STATUS;
}
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/cred.c 0000644 0000000 0000000 00000054557 11662446664 011063 0000000 0000000 /* cred.c --- Implementation of GSS-API Credential Management functions.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
/* _gss_find_mech */
#include "meta.h"
/**
* gss_acquire_cred:
* @minor_status: (integer, modify) Mechanism specific status code.
* @desired_name: (gss_name_t, read) Name of principal whose
* credential should be acquired.
* @time_req: (Integer, read, optional) Number of seconds that
* credentials should remain valid. Specify GSS_C_INDEFINITE to
* request that the credentials have the maximum permitted lifetime.
* @desired_mechs: (Set of Object IDs, read, optional) Set of
* underlying security mechanisms that may be used.
* GSS_C_NO_OID_SET may be used to obtain an implementation-specific
* default.
* @cred_usage: (gss_cred_usage_t, read) GSS_C_BOTH - Credentials may
* be used either to initiate or accept security contexts.
* GSS_C_INITIATE - Credentials will only be used to initiate
* security contexts. GSS_C_ACCEPT - Credentials will only be used
* to accept security contexts.
* @output_cred_handle: (gss_cred_id_t, modify) The returned
* credential handle. Resources associated with this credential
* handle must be released by the application after use with a call
* to gss_release_cred().
* @actual_mechs: (Set of Object IDs, modify, optional) The set of
* mechanisms for which the credential is valid. Storage associated
* with the returned OID-set must be released by the application
* after use with a call to gss_release_oid_set(). Specify NULL if
* not required.
* @time_rec: (Integer, modify, optional) Actual number of seconds for
* which the returned credentials will remain valid. If the
* implementation does not support expiration of credentials, the
* value GSS_C_INDEFINITE will be returned. Specify NULL if not
* required.
*
* Allows an application to acquire a handle for a pre-existing
* credential by name. GSS-API implementations must impose a local
* access-control policy on callers of this routine to prevent
* unauthorized callers from acquiring credentials to which they are
* not entitled. This routine is not intended to provide a "login to
* the network" function, as such a function would involve the
* creation of new credentials rather than merely acquiring a handle
* to existing credentials. Such functions, if required, should be
* defined in implementation-specific extensions to the API.
*
* If desired_name is GSS_C_NO_NAME, the call is interpreted as a
* request for a credential handle that will invoke default behavior
* when passed to gss_init_sec_context() (if cred_usage is
* GSS_C_INITIATE or GSS_C_BOTH) or gss_accept_sec_context() (if
* cred_usage is GSS_C_ACCEPT or GSS_C_BOTH).
*
* Mechanisms should honor the desired_mechs parameter, and return a
* credential that is suitable to use only with the requested
* mechanisms. An exception to this is the case where one underlying
* credential element can be shared by multiple mechanisms; in this
* case it is permissible for an implementation to indicate all
* mechanisms with which the credential element may be used. If
* desired_mechs is an empty set, behavior is undefined.
*
* This routine is expected to be used primarily by context acceptors,
* since implementations are likely to provide mechanism-specific ways
* of obtaining GSS-API initiator credentials from the system login
* process. Some implementations may therefore not support the
* acquisition of GSS_C_INITIATE or GSS_C_BOTH credentials via
* gss_acquire_cred for any name other than GSS_C_NO_NAME, or a name
* produced by applying either gss_inquire_cred to a valid credential,
* or gss_inquire_context to an active context.
*
* If credential acquisition is time-consuming for a mechanism, the
* mechanism may choose to delay the actual acquisition until the
* credential is required (e.g. by gss_init_sec_context or
* gss_accept_sec_context). Such mechanism-specific implementation
* decisions should be invisible to the calling application; thus a
* call of gss_inquire_cred immediately following the call of
* gss_acquire_cred must return valid credential data, and may
* therefore incur the overhead of a deferred credential acquisition.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_BAD_MECH`: Unavailable mechanism requested.
*
* `GSS_S_BAD_NAMETYPE`: Type contained within desired_name parameter
* is not supported.
*
* `GSS_S_BAD_NAME`: Value supplied for desired_name parameter is ill
* formed.
*
* `GSS_S_CREDENTIALS_EXPIRED`: The credentials could not be acquired
* Because they have expired.
*
* `GSS_S_NO_CRED`: No credentials were found for the specified name.
**/
OM_uint32
gss_acquire_cred (OM_uint32 * minor_status,
const gss_name_t desired_name,
OM_uint32 time_req,
const gss_OID_set desired_mechs,
gss_cred_usage_t cred_usage,
gss_cred_id_t * output_cred_handle,
gss_OID_set * actual_mechs, OM_uint32 * time_rec)
{
_gss_mech_api_t mech = NULL;
OM_uint32 maj_stat;
if (!output_cred_handle)
return GSS_S_NO_CRED | GSS_S_CALL_INACCESSIBLE_WRITE;
if (desired_mechs != GSS_C_NO_OID_SET)
{
size_t i;
/* Is the desired_mechs an "OR" or "AND" list? I.e., if the OID
set contain several OIDs, MUST the credential work with all
of them? Or just any of them? The specification isn't
entirely clear on this, to me. This implement an OR list,
chosing the first mechanism in the OID set we support. We
need more information in meta.c to implement AND lists. */
for (i = 0; mech == NULL && i < desired_mechs->count; i++)
mech = _gss_find_mech ((&desired_mechs->elements)[i]);
}
else
mech = _gss_find_mech (GSS_C_NO_OID);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
*output_cred_handle = calloc (sizeof (**output_cred_handle), 1);
if (!*output_cred_handle)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
(*output_cred_handle)->mech = mech->mech;
maj_stat = mech->acquire_cred (minor_status,
desired_name,
time_req,
desired_mechs,
cred_usage,
output_cred_handle, actual_mechs, time_rec);
if (GSS_ERROR (maj_stat))
{
free (*output_cred_handle);
*output_cred_handle = GSS_C_NO_CREDENTIAL;
return maj_stat;
}
return GSS_S_COMPLETE;
}
/**
* gss_add_cred:
* @minor_status: (integer, modify) Mechanism specific status code.
* @input_cred_handle: (gss_cred_id_t, read, optional) The credential
* to which a credential-element will be added. If
* GSS_C_NO_CREDENTIAL is specified, the routine will compose the
* new credential based on default behavior (see text).
* Note that, while the credential-handle is not modified by
* gss_add_cred(), the underlying credential will be modified if
* output_credential_handle is NULL.
* @desired_name: (gss_name_t, read.) Name of principal whose
* credential should be acquired.
* @desired_mech: (Object ID, read) Underlying security mechanism with
* which the credential may be used.
* @cred_usage: (gss_cred_usage_t, read) GSS_C_BOTH - Credential may
* be used either to initiate or accept security contexts.
* GSS_C_INITIATE - Credential will only be used to initiate
* security contexts. GSS_C_ACCEPT - Credential will only be used
* to accept security contexts.
* @initiator_time_req: (Integer, read, optional) number of seconds
* that the credential should remain valid for initiating security
* contexts. This argument is ignored if the composed credentials
* are of type GSS_C_ACCEPT. Specify GSS_C_INDEFINITE to request
* that the credentials have the maximum permitted initiator
* lifetime.
* @acceptor_time_req: (Integer, read, optional) number of seconds
* that the credential should remain valid for accepting security
* contexts. This argument is ignored if the composed credentials
* are of type GSS_C_INITIATE. Specify GSS_C_INDEFINITE to request
* that the credentials have the maximum permitted initiator
* lifetime.
* @output_cred_handle: (gss_cred_id_t, modify, optional) The returned
* credential handle, containing the new credential-element and all
* the credential-elements from input_cred_handle. If a valid
* pointer to a gss_cred_id_t is supplied for this parameter,
* gss_add_cred creates a new credential handle containing all
* credential-elements from the input_cred_handle and the newly
* acquired credential-element; if NULL is specified for this
* parameter, the newly acquired credential-element will be added to
* the credential identified by input_cred_handle. The resources
* associated with any credential handle returned via this parameter
* must be released by the application after use with a call to
* gss_release_cred().
* @actual_mechs: (Set of Object IDs, modify, optional) The complete
* set of mechanisms for which the new credential is valid. Storage
* for the returned OID-set must be freed by the application after
* use with a call to gss_release_oid_set(). Specify NULL if not
* required.
* @initiator_time_rec: (Integer, modify, optional) Actual number of
* seconds for which the returned credentials will remain valid for
* initiating contexts using the specified mechanism. If the
* implementation or mechanism does not support expiration of
* credentials, the value GSS_C_INDEFINITE will be returned. Specify
* NULL if not required
* @acceptor_time_rec: (Integer, modify, optional) Actual number of
* seconds for which the returned credentials will remain valid for
* accepting security contexts using the specified mechanism. If
* the implementation or mechanism does not support expiration of
* credentials, the value GSS_C_INDEFINITE will be returned. Specify
* NULL if not required
*
* Adds a credential-element to a credential. The credential-element is
* identified by the name of the principal to which it refers. GSS-API
* implementations must impose a local access-control policy on callers
* of this routine to prevent unauthorized callers from acquiring
* credential-elements to which they are not entitled. This routine is
* not intended to provide a "login to the network" function, as such a
* function would involve the creation of new mechanism-specific
* authentication data, rather than merely acquiring a GSS-API handle to
* existing data. Such functions, if required, should be defined in
* implementation-specific extensions to the API.
*
* If desired_name is GSS_C_NO_NAME, the call is interpreted as a
* request to add a credential element that will invoke default behavior
* when passed to gss_init_sec_context() (if cred_usage is
* GSS_C_INITIATE or GSS_C_BOTH) or gss_accept_sec_context() (if
* cred_usage is GSS_C_ACCEPT or GSS_C_BOTH).
*
* This routine is expected to be used primarily by context acceptors,
* since implementations are likely to provide mechanism-specific ways
* of obtaining GSS-API initiator credentials from the system login
* process. Some implementations may therefore not support the
* acquisition of GSS_C_INITIATE or GSS_C_BOTH credentials via
* gss_acquire_cred for any name other than GSS_C_NO_NAME, or a name
* produced by applying either gss_inquire_cred to a valid credential,
* or gss_inquire_context to an active context.
*
* If credential acquisition is time-consuming for a mechanism, the
* mechanism may choose to delay the actual acquisition until the
* credential is required (e.g. by gss_init_sec_context or
* gss_accept_sec_context). Such mechanism-specific implementation
* decisions should be invisible to the calling application; thus a call
* of gss_inquire_cred immediately following the call of gss_add_cred
* must return valid credential data, and may therefore incur the
* overhead of a deferred credential acquisition.
*
* This routine can be used to either compose a new credential
* containing all credential-elements of the original in addition to the
* newly-acquire credential-element, or to add the new credential-
* element to an existing credential. If NULL is specified for the
* output_cred_handle parameter argument, the new credential-element
* will be added to the credential identified by input_cred_handle; if a
* valid pointer is specified for the output_cred_handle parameter, a
* new credential handle will be created.
*
* If GSS_C_NO_CREDENTIAL is specified as the input_cred_handle,
* gss_add_cred will compose a credential (and set the
* output_cred_handle parameter accordingly) based on default behavior.
* That is, the call will have the same effect as if the application had
* first made a call to gss_acquire_cred(), specifying the same usage
* and passing GSS_C_NO_NAME as the desired_name parameter to obtain an
* explicit credential handle embodying default behavior, passed this
* credential handle to gss_add_cred(), and finally called
* gss_release_cred() on the first credential handle.
*
* If GSS_C_NO_CREDENTIAL is specified as the input_cred_handle
* parameter, a non-NULL output_cred_handle must be supplied.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_BAD_MECH`: Unavailable mechanism requested.
*
* `GSS_S_BAD_NAMETYPE`: Type contained within desired_name parameter
* is not supported.
*
* `GSS_S_BAD_NAME`: Value supplied for desired_name parameter is
* ill-formed.
*
* `GSS_S_DUPLICATE_ELEMENT`: The credential already contains an
* element for the requested mechanism with overlapping usage and
* validity period.
*
* `GSS_S_CREDENTIALS_EXPIRED`: The required credentials could not be
* added because they have expired.
*
* `GSS_S_NO_CRED`: No credentials were found for the specified name.
**/
OM_uint32
gss_add_cred (OM_uint32 * minor_status,
const gss_cred_id_t input_cred_handle,
const gss_name_t desired_name,
const gss_OID desired_mech,
gss_cred_usage_t cred_usage,
OM_uint32 initiator_time_req,
OM_uint32 acceptor_time_req,
gss_cred_id_t * output_cred_handle,
gss_OID_set * actual_mechs,
OM_uint32 * initiator_time_rec, OM_uint32 * acceptor_time_rec)
{
return GSS_S_UNAVAILABLE;
}
/**
* gss_inquire_cred:
* @minor_status: (integer, modify) Mechanism specific status code.
* @cred_handle: (gss_cred_id_t, read) A handle that refers to the
* target credential. Specify GSS_C_NO_CREDENTIAL to inquire about
* the default initiator principal.
* @name: (gss_name_t, modify, optional) The name whose identity the
* credential asserts. Storage associated with this name should be
* freed by the application after use with a call to
* gss_release_name(). Specify NULL if not required.
* @lifetime: (Integer, modify, optional) The number of seconds for
* which the credential will remain valid. If the credential has
* expired, this parameter will be set to zero. If the
* implementation does not support credential expiration, the value
* GSS_C_INDEFINITE will be returned. Specify NULL if not required.
* @cred_usage: (gss_cred_usage_t, modify, optional) How the
* credential may be used. One of the following: GSS_C_INITIATE,
* GSS_C_ACCEPT, GSS_C_BOTH. Specify NULL if not required.
* @mechanisms: (gss_OID_set, modify, optional) Set of mechanisms
* supported by the credential. Storage associated with this OID
* set must be freed by the application after use with a call to
* gss_release_oid_set(). Specify NULL if not required.
*
* Obtains information about a credential.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_NO_CRED`: The referenced credentials could not be accessed.
*
* `GSS_S_DEFECTIVE_CREDENTIAL`: The referenced credentials were invalid.
*
* `GSS_S_CREDENTIALS_EXPIRED`: The referenced credentials have
* expired. If the lifetime parameter was not passed as NULL, it will
* be set to 0.
**/
OM_uint32
gss_inquire_cred (OM_uint32 * minor_status,
const gss_cred_id_t cred_handle,
gss_name_t * name,
OM_uint32 * lifetime,
gss_cred_usage_t * cred_usage, gss_OID_set * mechanisms)
{
gss_cred_id_t credh = cred_handle;
_gss_mech_api_t mech;
OM_uint32 maj_stat;
if (cred_handle == GSS_C_NO_CREDENTIAL)
{
maj_stat = gss_acquire_cred (minor_status, GSS_C_NO_NAME,
GSS_C_INDEFINITE, GSS_C_NO_OID_SET,
GSS_C_INITIATE, &credh, NULL, NULL);
if (GSS_ERROR (maj_stat))
return maj_stat;
}
mech = _gss_find_mech (credh->mech);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
maj_stat = mech->inquire_cred (minor_status, credh, name, lifetime,
cred_usage, mechanisms);
if (cred_handle == GSS_C_NO_CREDENTIAL)
gss_release_cred (NULL, &credh);
return maj_stat;
}
/**
* gss_inquire_cred_by_mech:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @cred_handle: (gss_cred_id_t, read) A handle that refers to the
* target credential. Specify GSS_C_NO_CREDENTIAL to inquire about
* the default initiator principal.
* @mech_type: (gss_OID, read) The mechanism for which information
* should be returned.
* @name: (gss_name_t, modify, optional) The name whose identity the
* credential asserts. Storage associated with this name must be
* freed by the application after use with a call to
* gss_release_name(). Specify NULL if not required.
* @initiator_lifetime: (Integer, modify, optional) The number of
* seconds for which the credential will remain capable of
* initiating security contexts under the specified mechanism. If
* the credential can no longer be used to initiate contexts, or if
* the credential usage for this mechanism is GSS_C_ACCEPT, this
* parameter will be set to zero. If the implementation does not
* support expiration of initiator credentials, the value
* GSS_C_INDEFINITE will be returned. Specify NULL if not required.
* @acceptor_lifetime: (Integer, modify, optional) The number of
* seconds for which the credential will remain capable of accepting
* security contexts under the specified mechanism. If the
* credential can no longer be used to accept contexts, or if the
* credential usage for this mechanism is GSS_C_INITIATE, this
* parameter will be set to zero. If the implementation does not
* support expiration of acceptor credentials, the value
* GSS_C_INDEFINITE will be returned. Specify NULL if not required.
* @cred_usage: (gss_cred_usage_t, modify, optional) How the
* credential may be used with the specified mechanism. One of the
* following: GSS_C_INITIATE, GSS_C_ACCEPT, GSS_C_BOTH. Specify NULL
* if not required.
*
* Obtains per-mechanism information about a credential.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_NO_CRED`: The referenced credentials could not be accessed.
*
* `GSS_S_DEFECTIVE_CREDENTIAL`: The referenced credentials were invalid.
*
* `GSS_S_CREDENTIALS_EXPIRED`: The referenced credentials have
* expired. If the lifetime parameter was not passed as NULL, it will
* be set to 0.
**/
OM_uint32
gss_inquire_cred_by_mech (OM_uint32 * minor_status,
const gss_cred_id_t cred_handle,
const gss_OID mech_type,
gss_name_t * name,
OM_uint32 * initiator_lifetime,
OM_uint32 * acceptor_lifetime,
gss_cred_usage_t * cred_usage)
{
_gss_mech_api_t mech;
gss_cred_id_t credh = cred_handle;
OM_uint32 maj_stat;
if (mech_type == GSS_C_NO_OID)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
mech = _gss_find_mech (mech_type);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
if (cred_handle == GSS_C_NO_CREDENTIAL)
{
maj_stat = gss_acquire_cred (minor_status,
GSS_C_NO_NAME, GSS_C_INDEFINITE,
/* FIXME: We should create an OID
set with mech_type and pass it
as desired_mechs. Maybe even
check actual_mechs too. */
GSS_C_NO_OID_SET,
GSS_C_INITIATE, &credh, NULL, NULL);
if (GSS_ERROR (maj_stat))
return maj_stat;
}
maj_stat = mech->inquire_cred_by_mech (minor_status, credh, mech_type, name,
initiator_lifetime,
acceptor_lifetime, cred_usage);
if (cred_handle == GSS_C_NO_CREDENTIAL)
gss_release_cred (NULL, &credh);
return maj_stat;
}
/**
* gss_release_cred:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @cred_handle: (gss_cred_id_t, modify, optional) Opaque handle
* identifying credential to be released. If GSS_C_NO_CREDENTIAL is
* supplied, the routine will complete successfully, but will do
* nothing.
*
* Informs GSS-API that the specified credential handle is no longer
* required by the application, and frees associated resources. The
* cred_handle is set to GSS_C_NO_CREDENTIAL on successful completion
* of this call.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_NO_CRED`: Credentials could not be accessed.
**/
OM_uint32
gss_release_cred (OM_uint32 * minor_status, gss_cred_id_t * cred_handle)
{
_gss_mech_api_t mech;
OM_uint32 maj_stat;
if (!cred_handle)
{
if (minor_status)
*minor_status = 0;
return GSS_S_NO_CRED | GSS_S_CALL_INACCESSIBLE_READ;
}
if (*cred_handle == GSS_C_NO_CREDENTIAL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
mech = _gss_find_mech ((*cred_handle)->mech);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_DEFECTIVE_CREDENTIAL;
}
maj_stat = mech->release_cred (minor_status, cred_handle);
free (*cred_handle);
*cred_handle = GSS_C_NO_CREDENTIAL;
if (GSS_ERROR (maj_stat))
return maj_stat;
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/ext.c 0000644 0000000 0000000 00000003217 11662452036 010717 0000000 0000000 /* ext.c --- Implementation of GSS specific extensions.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
/**
* gss_userok:
* @name: (gss_name_t, read) Name to be compared.
* @username: Zero terminated string with username.
*
* Compare the username against the output from gss_export_name()
* invoked on @name, after removing the leading OID. This answers the
* question whether the particular mechanism would authenticate them
* as the same principal
*
* WARNING: This function is a GNU GSS specific extension, and is not
* part of the official GSS API.
*
* Return value: Returns 0 if the names match, non-0 otherwise.
**/
int
gss_userok (const gss_name_t name, const char *username)
{
/* FIXME: Call gss_export_name, then remove OID. */
return name->length == strlen (username) &&
memcmp (name->value, username, name->length) == 0;
}
gss-1.0.2/lib/krb5/ 0000755 0000000 0000000 00000000000 11663555055 010701 5 0000000 0000000 gss-1.0.2/lib/krb5/oid.c 0000644 0000000 0000000 00000007006 11546676340 011544 0000000 0000000 /* krb5/oid.c --- Definition of static Kerberos 5 GSS-API OIDs.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/* Get specification. */
#include "k5internal.h"
/*
* Upon advancement to the level of Proposed Standard RFC, the
* Kerberos V5 GSS-API mechanism will be identified by an Object
* Identifier having the value:
*
* {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
* gssapi(2) krb5(2)}
*/
gss_OID_desc GSS_KRB5_static = {
9, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02"
};
gss_OID GSS_KRB5 = &GSS_KRB5_static;
/*
* This name form shall be represented by the Object Identifier
* {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
* gssapi(2) generic(1) user_name(1)}. The recommended symbolic name
* for this type is "GSS_KRB5_NT_USER_NAME".
*/
gss_OID_desc GSS_KRB5_NT_USER_NAME_static = {
10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01"
};
gss_OID GSS_KRB5_NT_USER_NAME = &GSS_KRB5_NT_USER_NAME_static;
/*
* This name form shall be represented by the Object Identifier
* {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
* gssapi(2) generic(1) service_name(4)}. The previously recommended
* symbolic name for this type is
* "GSS_KRB5_NT_HOSTBASED_SERVICE_NAME". The currently preferred
* symbolic name for this type is "GSS_C_NT_HOSTBASED_SERVICE".
*/
gss_OID GSS_KRB5_NT_HOSTBASED_SERVICE_NAME =
&GSS_C_NT_HOSTBASED_SERVICE_static;
/*
* This name form shall be represented by the Object Identifier
* {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
* gssapi(2) krb5(2) krb5_name(1)}. The recommended symbolic name for
* this type is "GSS_KRB5_NT_PRINCIPAL_NAME".
*/
gss_OID_desc GSS_KRB5_NT_PRINCIPAL_NAME_static = {
10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"
};
gss_OID GSS_KRB5_NT_PRINCIPAL_NAME = &GSS_KRB5_NT_PRINCIPAL_NAME_static;
/*
* This name form shall be represented by the Object Identifier
* {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
* gssapi(2) generic(1) machine_uid_name(2)}. The recommended
* symbolic name for this type is "GSS_KRB5_NT_MACHINE_UID_NAME".
*/
gss_OID_desc GSS_KRB5_NT_MACHINE_UID_NAME_static = {
10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x02"
};
gss_OID GSS_KRB5_NT_MACHINE_UID_NAME = &GSS_KRB5_NT_MACHINE_UID_NAME_static;
/*
* This name form shall be represented by the Object Identifier
* {iso(1) member-body(2) United States(840) mit(113554) infosys(1)
* gssapi(2) generic(1) string_uid_name(3)}. The recommended symbolic
* name for this type is "GSS_KRB5_NT_STRING_UID_NAME".
*/
gss_OID_desc GSS_KRB5_NT_STRING_UID_NAME_static = {
10, (void *) "\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03"
};
gss_OID GSS_KRB5_NT_STRING_UID_NAME = &GSS_KRB5_NT_STRING_UID_NAME_static;
gss-1.0.2/lib/krb5/utils.c 0000644 0000000 0000000 00000002454 11546676340 012133 0000000 0000000 /* krb5/utils.c --- Kerberos 5 GSS-API helper functions.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/* Get specification. */
#include "k5internal.h"
/* Return number of seconds left of ticket lifetime, or 0 if ticket
has expired, or GSS_C_INDEFINITE if ticket is NULL. */
OM_uint32
gss_krb5_tktlifetime (Shishi_tkt * tkt)
{
time_t now, end;
if (!tkt)
return GSS_C_INDEFINITE;
if (!shishi_tkt_valid_now_p (tkt))
return 0;
now = time (NULL);
end = shishi_tkt_endctime (tkt);
return end - now;
}
gss-1.0.2/lib/krb5/Makefile.am 0000644 0000000 0000000 00000002473 11546676326 012670 0000000 0000000 ## Process this file with automake to produce Makefile.in
# Copyright (C) 2003-2011 Simon Josefsson
#
# This file is part of the Generic Security Service (GSS).
#
# GSS 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.
#
# GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/lib/gl \
-I$(top_srcdir)/lib \
-I$(top_builddir)/lib/headers -I$(top_srcdir)/lib/headers
noinst_LTLIBRARIES = libgss-shishi.la
libgss_shishi_la_SOURCES = k5internal.h protos.h \
context.c checksum.c checksum.h error.c name.c cred.c msg.c oid.c \
utils.c
libgss_shishi_la_LIBADD = @LTLIBINTL@ @LTLIBSHISHI@
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
gss-1.0.2/lib/krb5/name.c 0000644 0000000 0000000 00000010127 11546676340 011707 0000000 0000000 /* krb5/name.c --- Implementation of Kerberos 5 GSS-API Name functions.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/* Get specification. */
#include "k5internal.h"
OM_uint32
gss_krb5_canonicalize_name (OM_uint32 * minor_status,
const gss_name_t input_name,
const gss_OID mech_type, gss_name_t * output_name)
{
OM_uint32 maj_stat;
if (minor_status)
*minor_status = 0;
/* We consider (a zero terminated) GSS_KRB5_NT_PRINCIPAL_NAME the
canonical mechanism name type. Convert everything into it. */
if (gss_oid_equal (input_name->type, GSS_C_NT_EXPORT_NAME))
{
if (input_name->length > 15)
{
*output_name = malloc (sizeof (**output_name));
if (!*output_name)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
(*output_name)->type = GSS_KRB5_NT_PRINCIPAL_NAME;
(*output_name)->length = input_name->length - 15;
(*output_name)->value = malloc ((*output_name)->length + 1);
if (!(*output_name)->value)
{
free (*output_name);
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
memcpy ((*output_name)->value, input_name->value + 15,
(*output_name)->length);
(*output_name)->value[(*output_name)->length] = '\0';
}
else
{
return GSS_S_BAD_NAME;
}
}
else if (gss_oid_equal (input_name->type, GSS_C_NT_HOSTBASED_SERVICE))
{
char *p;
/* We don't support service-names without hostname part because
we can't compute a canonicalized name of the local host.
Calling gethostname does not give a canonicalized name. */
if (!memchr (input_name->value, '@', input_name->length))
{
*minor_status = GSS_KRB5_S_G_BAD_SERVICE_NAME;
return GSS_S_COMPLETE;
}
/* We don't do DNS name canoncalization since that is
insecure. */
maj_stat = gss_duplicate_name (minor_status, input_name, output_name);
if (GSS_ERROR (maj_stat))
return maj_stat;
(*output_name)->type = GSS_KRB5_NT_PRINCIPAL_NAME;
p = memchr ((*output_name)->value, '@', (*output_name)->length);
if (p)
*p = '/';
}
else if (gss_oid_equal (input_name->type, GSS_KRB5_NT_PRINCIPAL_NAME))
{
maj_stat = gss_duplicate_name (minor_status, input_name, output_name);
if (GSS_ERROR (maj_stat))
return maj_stat;
}
else
{
*output_name = GSS_C_NO_NAME;
return GSS_S_BAD_NAMETYPE;
}
return GSS_S_COMPLETE;
}
#define TOK_LEN 2
#define MECH_OID_LEN_LEN 2
#define MECH_OID_ASN1_LEN_LEN 2
#define NAME_LEN_LEN 4
OM_uint32
gss_krb5_export_name (OM_uint32 * minor_status,
const gss_name_t input_name, gss_buffer_t exported_name)
{
size_t msglen = input_name->length & 0xFFFFFFFF;
size_t len = TOK_LEN +
MECH_OID_LEN_LEN + MECH_OID_ASN1_LEN_LEN + GSS_KRB5->length +
NAME_LEN_LEN + msglen;
char *p;
exported_name->length = len;
p = exported_name->value = malloc (len);
if (!p)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
sprintf (p, "\x04\x01\x01\x0B\x06\x09%s", (char *) GSS_KRB5->elements);
p[2] = '\0';
p += 15;
*p++ = (msglen >> 24) & 0xFF;
*p++ = (msglen >> 16) & 0xFF;
*p++ = (msglen >> 8) & 0xFF;
*p++ = msglen & 0xFF;
memcpy (p, input_name->value, msglen);
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/krb5/checksum.h 0000644 0000000 0000000 00000002455 11546676340 012603 0000000 0000000 /* krb5/checksum.h --- (Un)pack checksum fields in Krb5 GSS contexts.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
OM_uint32
_gss_krb5_checksum_pack (OM_uint32 * minor_status,
const gss_cred_id_t initiator_cred_handle,
gss_ctx_id_t * context_handle,
const gss_channel_bindings_t input_chan_bindings,
OM_uint32 req_flags, char **data, size_t * datalen);
OM_uint32
_gss_krb5_checksum_parse (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
const gss_channel_bindings_t input_chan_bindings);
gss-1.0.2/lib/krb5/Makefile.in 0000644 0000000 0000000 00000066441 11663554705 012702 0000000 0000000 # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Copyright (C) 2003-2011 Simon Josefsson
#
# This file is part of the Generic Security Service (GSS).
#
# GSS 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.
#
# GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = lib/krb5
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/src/gl/m4/errno_h.m4 \
$(top_srcdir)/src/gl/m4/error.m4 \
$(top_srcdir)/src/gl/m4/getopt.m4 \
$(top_srcdir)/src/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/src/gl/m4/msvc-inval.m4 \
$(top_srcdir)/src/gl/m4/msvc-nothrow.m4 \
$(top_srcdir)/src/gl/m4/nocrash.m4 \
$(top_srcdir)/src/gl/m4/ssize_t.m4 \
$(top_srcdir)/src/gl/m4/stdarg.m4 \
$(top_srcdir)/src/gl/m4/strerror.m4 \
$(top_srcdir)/src/gl/m4/sys_socket_h.m4 \
$(top_srcdir)/src/gl/m4/unistd_h.m4 \
$(top_srcdir)/src/gl/m4/version-etc.m4 \
$(top_srcdir)/lib/gl/m4/extensions.m4 \
$(top_srcdir)/lib/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/lib/gl/m4/include_next.m4 \
$(top_srcdir)/lib/gl/m4/ld-output-def.m4 \
$(top_srcdir)/lib/gl/m4/stddef_h.m4 \
$(top_srcdir)/lib/gl/m4/string_h.m4 \
$(top_srcdir)/lib/gl/m4/strverscmp.m4 \
$(top_srcdir)/lib/gl/m4/warn-on-use.m4 \
$(top_srcdir)/gl/m4/00gnulib.m4 \
$(top_srcdir)/gl/m4/autobuild.m4 \
$(top_srcdir)/gl/m4/gnulib-common.m4 \
$(top_srcdir)/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/gl/m4/ld-version-script.m4 \
$(top_srcdir)/gl/m4/manywarnings.m4 \
$(top_srcdir)/gl/m4/valgrind-tests.m4 \
$(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po-suffix.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libgss_shishi_la_DEPENDENCIES =
am_libgss_shishi_la_OBJECTS = context.lo checksum.lo error.lo name.lo \
cred.lo msg.lo oid.lo utils.lo
libgss_shishi_la_OBJECTS = $(am_libgss_shishi_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libgss_shishi_la_SOURCES)
DIST_SOURCES = $(libgss_shishi_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ARFLAGS = @ARFLAGS@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFIG_INCLUDE = @CONFIG_INCLUDE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DLL_VERSION = @DLL_VERSION@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
ENOLINK_VALUE = @ENOLINK_VALUE@
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
GNULIB_FFSL = @GNULIB_FFSL@
GNULIB_FFSLL = @GNULIB_FFSLL@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
GNULIB_MBSCHR = @GNULIB_MBSCHR@
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
GNULIB_MBSLEN = @GNULIB_MBSLEN@
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
GNULIB_MBSSEP = @GNULIB_MBSSEP@
GNULIB_MBSSPN = @GNULIB_MBSSPN@
GNULIB_MBSSTR = @GNULIB_MBSSTR@
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
GNULIB_MEMCHR = @GNULIB_MEMCHR@
GNULIB_MEMMEM = @GNULIB_MEMMEM@
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PWRITE = @GNULIB_PWRITE@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
GNULIB_READ = @GNULIB_READ@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
GNULIB_STRPBRK = @GNULIB_STRPBRK@
GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
GNULIB_USLEEP = @GNULIB_USLEEP@
GNULIB_WRITE = @GNULIB_WRITE@
GREP = @GREP@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
HAVE_CHOWN = @HAVE_CHOWN@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FDATASYNC = @HAVE_FDATASYNC@
HAVE_FFSL = @HAVE_FFSL@
HAVE_FFSLL = @HAVE_FFSLL@
HAVE_FSYNC = @HAVE_FSYNC@
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
HAVE_GETGROUPS = @HAVE_GETGROUPS@
HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
HAVE_GETLOGIN = @HAVE_GETLOGIN@
HAVE_GETOPT_H = @HAVE_GETOPT_H@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
HAVE_LCHOWN = @HAVE_LCHOWN@
HAVE_LIBSHISHI = @HAVE_LIBSHISHI@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
HAVE_MBSLEN = @HAVE_MBSLEN@
HAVE_MEMCHR = @HAVE_MEMCHR@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_OS_H = @HAVE_OS_H@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
HAVE_PREAD = @HAVE_PREAD@
HAVE_PWRITE = @HAVE_PWRITE@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_STPCPY = @HAVE_STPCPY@
HAVE_STPNCPY = @HAVE_STPNCPY@
HAVE_STRCASESTR = @HAVE_STRCASESTR@
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
HAVE_STRPBRK = @HAVE_STRPBRK@
HAVE_STRSEP = @HAVE_STRSEP@
HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_USLEEP = @HAVE_USLEEP@
HAVE_WCHAR_T = @HAVE_WCHAR_T@
HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HELP2MAN = @HELP2MAN@
HTML_DIR = @HTML_DIR@
INCLUDE_GSS_KRB5 = @INCLUDE_GSS_KRB5@
INCLUDE_GSS_KRB5_EXT = @INCLUDE_GSS_KRB5_EXT@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBSHISHI = @LIBSHISHI@
LIBSHISHI_PREFIX = @LIBSHISHI_PREFIX@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
LTLIBSHISHI = @LTLIBSHISHI@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_STDARG_H = @NEXT_STDARG_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STRING_H = @NEXT_STRING_H@
NEXT_UNISTD_H = @NEXT_UNISTD_H@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PMCCABE = @PMCCABE@
POSUB = @POSUB@
PO_SUFFIX = @PO_SUFFIX@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
RANLIB = @RANLIB@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_MEMCHR = @REPLACE_MEMCHR@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
REPLACE_NULL = @REPLACE_NULL@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
REPLACE_UNLINK = @REPLACE_UNLINK@
REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_USLEEP = @REPLACE_USLEEP@
REPLACE_WRITE = @REPLACE_WRITE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STDARG_H = @STDARG_H@
STDDEF_H = @STDDEF_H@
STRIP = @STRIP@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
USE_NLS = @USE_NLS@
VALGRIND = @VALGRIND@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
VERSION_NUMBER = @VERSION_NUMBER@
VERSION_PATCH = @VERSION_PATCH@
WARN_CFLAGS = @WARN_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
gl_LIBOBJS = @gl_LIBOBJS@
gl_LTLIBOBJS = @gl_LTLIBOBJS@
gltests_LIBOBJS = @gltests_LIBOBJS@
gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
gltests_WITNESS = @gltests_WITNESS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libgl_LIBOBJS = @libgl_LIBOBJS@
libgl_LTLIBOBJS = @libgl_LTLIBOBJS@
libgltests_LIBOBJS = @libgltests_LIBOBJS@
libgltests_LTLIBOBJS = @libgltests_LTLIBOBJS@
libgltests_WITNESS = @libgltests_WITNESS@
localedir = $(datadir)/locale
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
srcgl_LIBOBJS = @srcgl_LIBOBJS@
srcgl_LTLIBOBJS = @srcgl_LTLIBOBJS@
srcgltests_LIBOBJS = @srcgltests_LIBOBJS@
srcgltests_LTLIBOBJS = @srcgltests_LTLIBOBJS@
srcgltests_WITNESS = @srcgltests_WITNESS@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/lib/gl \
-I$(top_srcdir)/lib \
-I$(top_builddir)/lib/headers -I$(top_srcdir)/lib/headers
noinst_LTLIBRARIES = libgss-shishi.la
libgss_shishi_la_SOURCES = k5internal.h protos.h \
context.c checksum.c checksum.h error.c name.c cred.c msg.c oid.c \
utils.c
libgss_shishi_la_LIBADD = @LTLIBINTL@ @LTLIBSHISHI@
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/krb5/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu lib/krb5/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libgss-shishi.la: $(libgss_shishi_la_OBJECTS) $(libgss_shishi_la_DEPENDENCIES)
$(AM_V_CCLD)$(LINK) $(libgss_shishi_la_OBJECTS) $(libgss_shishi_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checksum.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/context.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cred.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/name.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gss-1.0.2/lib/krb5/context.c 0000644 0000000 0000000 00000033450 11546676340 012457 0000000 0000000 /* krb5/context.c --- Implementation of Kerberos 5 GSS Context functions.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/* Get specification. */
#include "k5internal.h"
/* Get checksum (un)packers. */
#include "checksum.h"
#define TOK_LEN 2
#define TOK_AP_REQ "\x01\x00"
#define TOK_AP_REP "\x02\x00"
/* Request part of gss_krb5_init_sec_context. Assumes that
context_handle is valid, and has krb5 specific structure, and that
output_token is valid and cleared. */
static OM_uint32
init_request (OM_uint32 * minor_status,
const gss_cred_id_t initiator_cred_handle,
gss_ctx_id_t * context_handle,
const gss_name_t target_name,
const gss_OID mech_type,
OM_uint32 req_flags,
OM_uint32 time_req,
const gss_channel_bindings_t input_chan_bindings,
const gss_buffer_t input_token,
gss_OID * actual_mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags, OM_uint32 * time_rec)
{
gss_ctx_id_t ctx = *context_handle;
_gss_krb5_ctx_t k5 = ctx->krb5;
char *cksum, *der;
size_t cksumlen, derlen;
int rc;
OM_uint32 maj_stat;
Shishi_tkts_hint hint;
/* Get service ticket. */
maj_stat = gss_krb5_canonicalize_name (minor_status, target_name,
GSS_C_NO_OID, &k5->peerptr);
if (GSS_ERROR (maj_stat))
return maj_stat;
memset (&hint, 0, sizeof (hint));
hint.server = k5->peerptr->value;
hint.endtime = time_req;
k5->tkt = shishi_tkts_get (shishi_tkts_default (k5->sh), &hint);
if (!k5->tkt)
{
if (minor_status)
*minor_status = GSS_KRB5_S_KG_CCACHE_NOMATCH;
return GSS_S_NO_CRED;
}
/* Create Authenticator checksum field. */
maj_stat = _gss_krb5_checksum_pack (minor_status, initiator_cred_handle,
context_handle,
input_chan_bindings, req_flags,
&cksum, &cksumlen);
if (GSS_ERROR (maj_stat))
return maj_stat;
/* Create AP-REQ in output_token. */
rc = shishi_ap_tktoptionsraw (k5->sh, &k5->ap, k5->tkt,
SHISHI_APOPTIONS_MUTUAL_REQUIRED,
0x8003, cksum, cksumlen);
free (cksum);
if (rc != SHISHI_OK)
return GSS_S_FAILURE;
rc = shishi_authenticator_seqnumber_get (k5->sh,
shishi_ap_authenticator (k5->ap),
&k5->initseqnr);
if (rc != SHISHI_OK)
return GSS_S_FAILURE;
rc = shishi_ap_req_der (k5->ap, &der, &derlen);
if (rc != SHISHI_OK)
return GSS_S_FAILURE;
rc = _gss_encapsulate_token_prefix (TOK_AP_REQ, TOK_LEN,
der, derlen,
GSS_KRB5->elements,
GSS_KRB5->length,
&output_token->value,
&output_token->length);
free (der);
if (rc != 0)
return GSS_S_FAILURE;
if (req_flags & GSS_C_MUTUAL_FLAG)
return GSS_S_CONTINUE_NEEDED;
return GSS_S_COMPLETE;
}
/* Reply part of gss_krb5_init_sec_context. Assumes that
context_handle is valid, and has krb5 specific structure, and that
output_token is valid and cleared. */
static OM_uint32
init_reply (OM_uint32 * minor_status,
const gss_cred_id_t initiator_cred_handle,
gss_ctx_id_t * context_handle,
const gss_name_t target_name,
const gss_OID mech_type,
OM_uint32 req_flags,
OM_uint32 time_req,
const gss_channel_bindings_t input_chan_bindings,
const gss_buffer_t input_token,
gss_OID * actual_mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags, OM_uint32 * time_rec)
{
gss_ctx_id_t ctx = *context_handle;
_gss_krb5_ctx_t k5 = ctx->krb5;
OM_uint32 tmp_min_stat;
gss_buffer_desc data;
int rc;
if (gss_decapsulate_token (input_token, GSS_KRB5, &data) != GSS_S_COMPLETE)
return GSS_S_DEFECTIVE_TOKEN;
if (data.length < TOK_LEN)
{
gss_release_buffer (&tmp_min_stat, &data);
return GSS_S_DEFECTIVE_TOKEN;
}
if (memcmp (data.value, TOK_AP_REP, TOK_LEN) != 0)
{
gss_release_buffer (&tmp_min_stat, &data);
return GSS_S_DEFECTIVE_TOKEN;
}
rc = shishi_ap_rep_der_set (k5->ap, (char *) data.value + TOK_LEN,
data.length - TOK_LEN);
gss_release_buffer (&tmp_min_stat, &data);
if (rc != SHISHI_OK)
return GSS_S_DEFECTIVE_TOKEN;
rc = shishi_ap_rep_verify (k5->ap);
if (rc != SHISHI_OK)
return GSS_S_DEFECTIVE_TOKEN;
rc = shishi_encapreppart_seqnumber_get (k5->sh,
shishi_ap_encapreppart (k5->ap),
&k5->acceptseqnr);
if (rc != SHISHI_OK)
{
/* A strict 1964 implementation would return
GSS_S_DEFECTIVE_TOKEN here. gssapi-cfx permit absent
sequence number, though. */
k5->acceptseqnr = 0;
}
return GSS_S_COMPLETE;
}
/* Initiates the establishment of a krb5 security context between the
application and a remote peer. Assumes that context_handle and
output_token are valid and cleared. */
OM_uint32
gss_krb5_init_sec_context (OM_uint32 * minor_status,
const gss_cred_id_t initiator_cred_handle,
gss_ctx_id_t * context_handle,
const gss_name_t target_name,
const gss_OID mech_type,
OM_uint32 req_flags,
OM_uint32 time_req,
const gss_channel_bindings_t input_chan_bindings,
const gss_buffer_t input_token,
gss_OID * actual_mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags, OM_uint32 * time_rec)
{
gss_ctx_id_t ctx = *context_handle;
_gss_krb5_ctx_t k5 = ctx->krb5;
OM_uint32 maj_stat;
int rc;
if (minor_status)
*minor_status = 0;
if (initiator_cred_handle)
{
/* We only support the default initiator. See k5internal.h for
adding a Shishi_tkt to the credential structure. I'm not sure
what the use would be -- user-to-user authentication perhaps?
Later: if you have tickets for foo@BAR and bar@FOO, it may be
useful to call gss_acquire_cred first to chose which one to
initiate the context with. Not many applications need this. */
return GSS_S_NO_CRED;
}
if (k5 == NULL)
{
k5 = ctx->krb5 = calloc (sizeof (*k5), 1);
if (!k5)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
rc = shishi_init (&k5->sh);
if (rc != SHISHI_OK)
return GSS_S_FAILURE;
}
if (!k5->reqdone)
{
maj_stat = init_request (minor_status,
initiator_cred_handle,
context_handle,
target_name,
mech_type,
req_flags,
time_req,
input_chan_bindings,
input_token,
actual_mech_type,
output_token, ret_flags, time_rec);
if (GSS_ERROR (maj_stat))
return maj_stat;
k5->flags = req_flags & ( /* GSS_C_DELEG_FLAG | */
GSS_C_MUTUAL_FLAG |
GSS_C_REPLAY_FLAG | GSS_C_SEQUENCE_FLAG |
GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG);
/* PROT_READY is not mentioned in 1964/gssapi-cfx but we support
it anyway. */
k5->flags |= GSS_C_PROT_READY_FLAG;
if (ret_flags)
*ret_flags = k5->flags;
k5->key = shishi_ap_key (k5->ap);
k5->reqdone = 1;
}
else if (k5->reqdone && k5->flags & GSS_C_MUTUAL_FLAG && !k5->repdone)
{
maj_stat = init_reply (minor_status,
initiator_cred_handle,
context_handle,
target_name,
mech_type,
req_flags,
time_req,
input_chan_bindings,
input_token,
actual_mech_type,
output_token, ret_flags, time_rec);
if (GSS_ERROR (maj_stat))
return maj_stat;
if (ret_flags)
*ret_flags = k5->flags;
k5->repdone = 1;
}
else
maj_stat = GSS_S_FAILURE;
if (time_rec)
*time_rec = gss_krb5_tktlifetime (k5->tkt);
return maj_stat;
}
/* Allows a remotely initiated security context between the
application and a remote peer to be established, using krb5.
Assumes context_handle is valid. */
OM_uint32
gss_krb5_accept_sec_context (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
const gss_cred_id_t acceptor_cred_handle,
const gss_buffer_t input_token_buffer,
const gss_channel_bindings_t input_chan_bindings,
gss_name_t * src_name,
gss_OID * mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags,
OM_uint32 * time_rec,
gss_cred_id_t * delegated_cred_handle)
{
gss_buffer_desc in;
gss_ctx_id_t cx;
_gss_krb5_ctx_t cxk5;
_gss_krb5_cred_t crk5;
OM_uint32 tmp_min_stat;
int rc;
if (minor_status)
*minor_status = 0;
if (ret_flags)
*ret_flags = 0;
if (!acceptor_cred_handle)
/* XXX support GSS_C_NO_CREDENTIAL: acquire_cred() default server */
return GSS_S_NO_CRED;
if (*context_handle)
return GSS_S_FAILURE;
crk5 = acceptor_cred_handle->krb5;
cx = calloc (sizeof (*cx), 1);
if (!cx)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
cxk5 = calloc (sizeof (*cxk5), 1);
if (!cxk5)
{
free (cx);
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
cx->mech = GSS_KRB5;
cx->krb5 = cxk5;
/* XXX cx->peer?? */
*context_handle = cx;
cxk5->sh = crk5->sh;
cxk5->key = crk5->key;
cxk5->acceptor = 1;
rc = shishi_ap (cxk5->sh, &cxk5->ap);
if (rc != SHISHI_OK)
return GSS_S_FAILURE;
rc = gss_decapsulate_token (input_token_buffer, GSS_KRB5, &in);
if (rc != GSS_S_COMPLETE)
return GSS_S_BAD_MIC;
if (in.length < TOK_LEN)
{
gss_release_buffer (&tmp_min_stat, &in);
return GSS_S_BAD_MIC;
}
if (memcmp (in.value, TOK_AP_REQ, TOK_LEN) != 0)
{
gss_release_buffer (&tmp_min_stat, &in);
return GSS_S_BAD_MIC;
}
rc = shishi_ap_req_der_set (cxk5->ap, (char *) in.value + TOK_LEN,
in.length - TOK_LEN);
gss_release_buffer (&tmp_min_stat, &in);
if (rc != SHISHI_OK)
return GSS_S_FAILURE;
rc = shishi_ap_req_process (cxk5->ap, crk5->key);
if (rc != SHISHI_OK)
{
if (minor_status)
*minor_status = GSS_KRB5_S_G_VALIDATE_FAILED;
return GSS_S_FAILURE;
}
rc = shishi_authenticator_seqnumber_get (cxk5->sh,
shishi_ap_authenticator (cxk5->ap),
&cxk5->initseqnr);
if (rc != SHISHI_OK)
return GSS_S_FAILURE;
rc = _gss_krb5_checksum_parse (minor_status,
context_handle, input_chan_bindings);
if (rc != GSS_S_COMPLETE)
return GSS_S_FAILURE;
cxk5->tkt = shishi_ap_tkt (cxk5->ap);
cxk5->key = shishi_ap_key (cxk5->ap);
if (shishi_apreq_mutual_required_p (crk5->sh, shishi_ap_req (cxk5->ap)))
{
Shishi_asn1 aprep;
char *der;
size_t len;
rc = shishi_ap_rep_asn1 (cxk5->ap, &aprep);
if (rc != SHISHI_OK)
{
printf ("Error creating AP-REP: %s\n", shishi_strerror (rc));
return GSS_S_FAILURE;
}
rc = shishi_encapreppart_seqnumber_get (cxk5->sh,
shishi_ap_encapreppart
(cxk5->ap), &cxk5->acceptseqnr);
if (rc != SHISHI_OK)
{
/* A strict 1964 implementation would return
GSS_S_DEFECTIVE_TOKEN here. gssapi-cfx permit absent
sequence number, though. */
cxk5->acceptseqnr = 0;
}
rc = shishi_asn1_to_der (crk5->sh, aprep, &der, &len);
if (rc != SHISHI_OK)
{
printf ("Error der encoding aprep: %s\n", shishi_strerror (rc));
return GSS_S_FAILURE;
}
rc = _gss_encapsulate_token_prefix (TOK_AP_REP, TOK_LEN,
der, len,
GSS_KRB5->elements,
GSS_KRB5->length,
&output_token->value,
&output_token->length);
if (rc != 0)
return GSS_S_FAILURE;
if (ret_flags)
*ret_flags = GSS_C_MUTUAL_FLAG;
}
else
{
output_token->value = NULL;
output_token->length = 0;
}
if (src_name)
{
gss_name_t p;
p = malloc (sizeof (*p));
if (!p)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
rc = shishi_encticketpart_client (cxk5->sh,
shishi_tkt_encticketpart (cxk5->tkt),
&p->value, &p->length);
if (rc != SHISHI_OK)
return GSS_S_FAILURE;
p->type = GSS_KRB5_NT_PRINCIPAL_NAME;
*src_name = p;
}
/* PROT_READY is not mentioned in 1964/gssapi-cfx but we support
it anyway. */
if (ret_flags)
*ret_flags |= GSS_C_PROT_READY_FLAG;
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
/* Delete a krb5 security context. Assumes context_handle is valid.
Should only delete krb5 specific part of context. */
OM_uint32
gss_krb5_delete_sec_context (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
gss_buffer_t output_token)
{
_gss_krb5_ctx_t k5 = (*context_handle)->krb5;
if (k5->peerptr != GSS_C_NO_NAME)
gss_release_name (NULL, &k5->peerptr);
if (k5->ap)
shishi_ap_done (k5->ap);
if (!k5->acceptor)
shishi_done (k5->sh);
free (k5);
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
/* Determines the number of seconds for which the specified krb5
context will remain valid. Assumes context_handle is valid. */
OM_uint32
gss_krb5_context_time (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
OM_uint32 * time_rec)
{
_gss_krb5_ctx_t k5 = context_handle->krb5;
if (time_rec)
{
*time_rec = gss_krb5_tktlifetime (k5->tkt);
if (*time_rec == 0)
{
if (minor_status)
*minor_status = 0;
return GSS_S_CONTEXT_EXPIRED;
}
}
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/krb5/error.c 0000644 0000000 0000000 00000011303 11546676340 012115 0000000 0000000 /* krb5/error.c --- Kerberos 5 GSS-API error handling functionality.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/* Get specification. */
#include "k5internal.h"
struct gss_status_codes
{
gss_uint32 err;
const char *name;
const char *text;
};
static struct gss_status_codes gss_krb5_errors[] = {
/* 4.1.1. Non-Kerberos-specific codes */
{GSS_KRB5_S_G_BAD_SERVICE_NAME, "GSS_KRB5_S_G_BAD_SERVICE_NAME",
N_("No @ in SERVICE-NAME name string")},
{GSS_KRB5_S_G_BAD_STRING_UID, "GSS_KRB5_S_G_BAD_STRING_UID",
N_("STRING-UID-NAME contains nondigits")},
{GSS_KRB5_S_G_NOUSER, "GSS_KRB5_S_G_NOUSER",
N_("UID does not resolve to username")},
{GSS_KRB5_S_G_VALIDATE_FAILED, "GSS_KRB5_S_G_VALIDATE_FAILED",
N_("Validation error")},
{GSS_KRB5_S_G_BUFFER_ALLOC, "GSS_KRB5_S_G_BUFFER_ALLOC",
N_("Couldn't allocate gss_buffer_t data")},
{GSS_KRB5_S_G_BAD_MSG_CTX, "GSS_KRB5_S_G_BAD_MSG_CTX",
N_("Message context invalid")},
{GSS_KRB5_S_G_WRONG_SIZE, "GSS_KRB5_S_G_WRONG_SIZE",
N_("Buffer is the wrong size")},
{GSS_KRB5_S_G_BAD_USAGE, "GSS_KRB5_S_G_BAD_USAGE",
N_("Credential usage type is unknown")},
{GSS_KRB5_S_G_UNKNOWN_QOP, "GSS_KRB5_S_G_UNKNOWN_QOP",
N_("Unknown quality of protection specified")},
/* 4.1.2. Kerberos-specific-codes */
{GSS_KRB5_S_KG_CCACHE_NOMATCH, "GSS_KRB5_S_KG_CCACHE_NOMATCH",
N_("Principal in credential cache does not match desired name")},
{GSS_KRB5_S_KG_KEYTAB_NOMATCH, "GSS_KRB5_S_KG_KEYTAB_NOMATCH",
N_("No principal in keytab matches desired name")},
{GSS_KRB5_S_KG_TGT_MISSING, "GSS_KRB5_S_KG_TGT_MISSING",
N_("Credential cache has no TGT")},
{GSS_KRB5_S_KG_NO_SUBKEY, "GSS_KRB5_S_KG_NO_SUBKEY",
N_("Authenticator has no subkey")},
{GSS_KRB5_S_KG_CONTEXT_ESTABLISHED, "GSS_KRB5_S_KG_CONTEXT_ESTABLISHED",
N_("Context is already fully established")},
{GSS_KRB5_S_KG_BAD_SIGN_TYPE, "GSS_KRB5_S_KG_BAD_SIGN_TYPE",
N_("Unknown signature type in token")},
{GSS_KRB5_S_KG_BAD_LENGTH, "GSS_KRB5_S_KG_BAD_LENGTH",
N_("Invalid field length in token")},
{GSS_KRB5_S_KG_CTX_INCOMPLETE, "GSS_KRB5_S_KG_CTX_INCOMPLETE",
N_("Attempt to use incomplete security context")}
};
OM_uint32
gss_krb5_display_status (OM_uint32 * minor_status,
OM_uint32 status_value,
int status_type,
const gss_OID mech_type,
OM_uint32 * message_context,
gss_buffer_t status_string)
{
if (minor_status)
*minor_status = 0;
switch (status_value)
{
case 0:
status_string->value = strdup (_("No krb5 error"));
if (!status_string->value)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
status_string->length = strlen (status_string->value);
break;
/* 4.1.1. Non-Kerberos-specific codes */
case GSS_KRB5_S_G_BAD_SERVICE_NAME:
case GSS_KRB5_S_G_BAD_STRING_UID:
case GSS_KRB5_S_G_NOUSER:
case GSS_KRB5_S_G_VALIDATE_FAILED:
case GSS_KRB5_S_G_BUFFER_ALLOC:
case GSS_KRB5_S_G_BAD_MSG_CTX:
case GSS_KRB5_S_G_WRONG_SIZE:
case GSS_KRB5_S_G_BAD_USAGE:
case GSS_KRB5_S_G_UNKNOWN_QOP:
/* 4.1.2. Kerberos-specific-codes */
case GSS_KRB5_S_KG_CCACHE_NOMATCH:
case GSS_KRB5_S_KG_KEYTAB_NOMATCH:
case GSS_KRB5_S_KG_TGT_MISSING:
case GSS_KRB5_S_KG_NO_SUBKEY:
case GSS_KRB5_S_KG_CONTEXT_ESTABLISHED:
case GSS_KRB5_S_KG_BAD_SIGN_TYPE:
case GSS_KRB5_S_KG_BAD_LENGTH:
case GSS_KRB5_S_KG_CTX_INCOMPLETE:
status_string->value =
strdup (_(gss_krb5_errors[status_value - 1].text));
if (!status_string->value)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
status_string->length = strlen (status_string->value);
break;
default:
status_string->value = strdup (_("Unknown krb5 error"));
if (!status_string->value)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
status_string->length = strlen (status_string->value);
break;
}
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/krb5/cred.c 0000644 0000000 0000000 00000013447 11546676340 011714 0000000 0000000 /* krb5/cred.c --- Kerberos 5 GSS-API credential management functions.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/* Get specification. */
#include "k5internal.h"
static OM_uint32
acquire_cred1 (OM_uint32 * minor_status,
const gss_name_t desired_name,
OM_uint32 time_req,
const gss_OID_set desired_mechs,
gss_cred_usage_t cred_usage,
gss_cred_id_t * output_cred_handle,
gss_OID_set * actual_mechs, OM_uint32 * time_rec)
{
gss_name_t name = desired_name;
_gss_krb5_cred_t k5 = (*output_cred_handle)->krb5;
OM_uint32 maj_stat;
if (desired_name == GSS_C_NO_NAME)
{
gss_buffer_desc buf = { 4, (char *) "host" };
maj_stat = gss_import_name (minor_status, &buf,
GSS_C_NT_HOSTBASED_SERVICE, &name);
if (GSS_ERROR (maj_stat))
return maj_stat;
}
maj_stat = gss_krb5_canonicalize_name (minor_status, name,
GSS_KRB5, &k5->peerptr);
if (GSS_ERROR (maj_stat))
return maj_stat;
if (desired_name == GSS_C_NO_NAME)
{
maj_stat = gss_release_name (minor_status, &name);
if (GSS_ERROR (maj_stat))
return maj_stat;
}
if (shishi_init_server (&k5->sh) != SHISHI_OK)
return GSS_S_FAILURE;
{
char *p;
p = malloc (k5->peerptr->length + 1);
if (!p)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
memcpy (p, k5->peerptr->value, k5->peerptr->length);
p[k5->peerptr->length] = 0;
k5->key = shishi_hostkeys_for_serverrealm (k5->sh, p, NULL);
free (p);
}
if (!k5->key)
{
if (minor_status)
*minor_status = GSS_KRB5_S_KG_KEYTAB_NOMATCH;
return GSS_S_NO_CRED;
}
if (time_rec)
*time_rec = GSS_C_INDEFINITE;
return GSS_S_COMPLETE;
}
OM_uint32
gss_krb5_acquire_cred (OM_uint32 * minor_status,
const gss_name_t desired_name,
OM_uint32 time_req,
const gss_OID_set desired_mechs,
gss_cred_usage_t cred_usage,
gss_cred_id_t * output_cred_handle,
gss_OID_set * actual_mechs, OM_uint32 * time_rec)
{
OM_uint32 maj_stat;
gss_cred_id_t p = *output_cred_handle;
p->krb5 = calloc (sizeof (*p->krb5), 1);
if (!p->krb5)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
if (actual_mechs)
{
maj_stat = gss_create_empty_oid_set (minor_status, actual_mechs);
if (GSS_ERROR (maj_stat))
{
free (p->krb5);
return maj_stat;
}
maj_stat = gss_add_oid_set_member (minor_status, GSS_KRB5,
actual_mechs);
if (GSS_ERROR (maj_stat))
{
free (p->krb5);
return maj_stat;
}
}
maj_stat = acquire_cred1 (minor_status, desired_name, time_req,
desired_mechs, cred_usage,
&p, actual_mechs, time_rec);
if (GSS_ERROR (maj_stat))
{
if (actual_mechs)
gss_release_oid_set (NULL, actual_mechs);
free (p->krb5);
return maj_stat;
}
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
static OM_uint32
inquire_cred (OM_uint32 * minor_status,
const gss_cred_id_t cred_handle,
gss_name_t * name,
OM_uint32 * lifetime,
gss_cred_usage_t * cred_usage, gss_OID_set * mechanisms)
{
OM_uint32 maj_stat;
if (cred_handle == GSS_C_NO_CREDENTIAL)
return GSS_S_NO_CRED;
if (mechanisms)
{
maj_stat = gss_create_empty_oid_set (minor_status, mechanisms);
if (GSS_ERROR (maj_stat))
return maj_stat;
maj_stat = gss_add_oid_set_member (minor_status, GSS_KRB5, mechanisms);
if (GSS_ERROR (maj_stat))
return maj_stat;
}
if (name)
{
maj_stat = gss_duplicate_name (minor_status, cred_handle->krb5->peerptr,
name);
if (GSS_ERROR (maj_stat))
return maj_stat;
}
if (cred_usage)
*cred_usage = GSS_C_BOTH;
if (lifetime)
*lifetime = GSS_C_INDEFINITE;
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
OM_uint32
gss_krb5_inquire_cred (OM_uint32 * minor_status,
const gss_cred_id_t cred_handle,
gss_name_t * name,
OM_uint32 * lifetime,
gss_cred_usage_t * cred_usage,
gss_OID_set * mechanisms)
{
return inquire_cred (minor_status, cred_handle, name, lifetime,
cred_usage, mechanisms);
}
OM_uint32
gss_krb5_inquire_cred_by_mech (OM_uint32 * minor_status,
const gss_cred_id_t cred_handle,
const gss_OID mech_type,
gss_name_t * name,
OM_uint32 * initiator_lifetime,
OM_uint32 * acceptor_lifetime,
gss_cred_usage_t * cred_usage)
{
OM_uint32 maj_stat;
maj_stat = inquire_cred (minor_status, cred_handle, name,
initiator_lifetime, cred_usage, NULL);
if (acceptor_lifetime)
*acceptor_lifetime = *initiator_lifetime;
return maj_stat;
}
OM_uint32
gss_krb5_release_cred (OM_uint32 * minor_status, gss_cred_id_t * cred_handle)
{
_gss_krb5_cred_t k5 = (*cred_handle)->krb5;
if (k5->peerptr != GSS_C_NO_NAME)
gss_release_name (NULL, &k5->peerptr);
shishi_key_done (k5->key);
shishi_done (k5->sh);
free (k5);
if (minor_status)
*minor_status = 0;
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/krb5/protos.h 0000644 0000000 0000000 00000011047 11546676340 012324 0000000 0000000 /* protos.h --- Export Kerberos 5 GSS functions to core GSS library.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/* See context.c. */
extern OM_uint32
gss_krb5_init_sec_context (OM_uint32 * minor_status,
const gss_cred_id_t initiator_cred_handle,
gss_ctx_id_t * context_handle,
const gss_name_t target_name,
const gss_OID mech_type,
OM_uint32 req_flags,
OM_uint32 time_req,
const gss_channel_bindings_t input_chan_bindings,
const gss_buffer_t input_token,
gss_OID * actual_mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags, OM_uint32 * time_rec);
extern OM_uint32
gss_krb5_accept_sec_context (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
const gss_cred_id_t acceptor_cred_handle,
const gss_buffer_t input_token_buffer,
const gss_channel_bindings_t input_chan_bindings,
gss_name_t * src_name,
gss_OID * mech_type,
gss_buffer_t output_token,
OM_uint32 * ret_flags,
OM_uint32 * time_rec,
gss_cred_id_t * delegated_cred_handle);
extern OM_uint32
gss_krb5_delete_sec_context (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
gss_buffer_t output_token);
extern OM_uint32
gss_krb5_context_time (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
OM_uint32 * time_rec);
/* See cred.c. */
extern OM_uint32
gss_krb5_acquire_cred (OM_uint32 * minor_status,
const gss_name_t desired_name,
OM_uint32 time_req,
const gss_OID_set desired_mechs,
gss_cred_usage_t cred_usage,
gss_cred_id_t * output_cred_handle,
gss_OID_set * actual_mechs, OM_uint32 * time_rec);
extern OM_uint32
gss_krb5_inquire_cred (OM_uint32 * minor_status,
const gss_cred_id_t cred_handle,
gss_name_t * name,
OM_uint32 * lifetime,
gss_cred_usage_t * cred_usage,
gss_OID_set * mechanisms);
extern OM_uint32
gss_krb5_inquire_cred_by_mech (OM_uint32 * minor_status,
const gss_cred_id_t cred_handle,
const gss_OID mech_type,
gss_name_t * name,
OM_uint32 * initiator_lifetime,
OM_uint32 * acceptor_lifetime,
gss_cred_usage_t * cred_usage);
extern OM_uint32
gss_krb5_release_cred (OM_uint32 * minor_status, gss_cred_id_t * cred_handle);
/* See error.c. */
extern OM_uint32
gss_krb5_display_status (OM_uint32 * minor_status,
OM_uint32 status_value,
int status_type,
const gss_OID mech_type,
OM_uint32 * message_context,
gss_buffer_t status_string);
/* See msg.c. */
extern OM_uint32
gss_krb5_get_mic (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
gss_qop_t qop_req,
const gss_buffer_t message_buffer,
gss_buffer_t message_token);
extern OM_uint32
gss_krb5_verify_mic (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t message_buffer,
const gss_buffer_t token_buffer, gss_qop_t * qop_state);
extern OM_uint32
gss_krb5_unwrap (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t input_message_buffer,
gss_buffer_t output_message_buffer,
int *conf_state, gss_qop_t * qop_state);
extern OM_uint32
gss_krb5_wrap (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
int conf_req_flag,
gss_qop_t qop_req,
const gss_buffer_t input_message_buffer,
int *conf_state, gss_buffer_t output_message_buffer);
/* See name.c. */
extern OM_uint32
gss_krb5_canonicalize_name (OM_uint32 * minor_status,
const gss_name_t input_name,
const gss_OID mech_type,
gss_name_t * output_name);
extern OM_uint32
gss_krb5_export_name (OM_uint32 * minor_status,
const gss_name_t input_name,
gss_buffer_t exported_name);
gss-1.0.2/lib/krb5/k5internal.h 0000644 0000000 0000000 00000002737 11546676340 013060 0000000 0000000 /* k5internal.h --- Internal header file for Kerberos 5 GSS.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
#include "protos.h"
#include
typedef struct _gss_krb5_cred_struct
{
Shishi *sh;
gss_name_t peerptr;
/* For user-to-user, we could have a Shishi_tkt here too. */
Shishi_key *key;
} _gss_krb5_cred_desc, *_gss_krb5_cred_t;
typedef struct _gss_krb5_ctx_struct
{
Shishi *sh;
Shishi_ap *ap;
Shishi_tkt *tkt;
Shishi_key *key;
gss_name_t peerptr;
int acceptor;
uint32_t acceptseqnr;
uint32_t initseqnr;
OM_uint32 flags;
int reqdone;
int repdone;
} _gss_krb5_ctx_desc, *_gss_krb5_ctx_t;
OM_uint32 gss_krb5_tktlifetime (Shishi_tkt * tkt);
gss-1.0.2/lib/krb5/checksum.c 0000644 0000000 0000000 00000021227 11546676340 012574 0000000 0000000 /* krb5/checksum.c --- (Un)pack checksum fields in Krb5 GSS contexts.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/* Get GSS API. */
#include "k5internal.h"
/* Get specification. */
#include "checksum.h"
static void
pack_uint32 (OM_uint32 i, char *buf)
{
buf[0] = i & 0xFF;
buf[1] = (i >> 8) & 0xFF;
buf[2] = (i >> 16) & 0xFF;
buf[3] = (i >> 24) & 0xFF;
}
static int
hash_cb (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
const gss_channel_bindings_t input_chan_bindings, char **out)
{
gss_ctx_id_t ctx = *context_handle;
_gss_krb5_ctx_t k5 = ctx->krb5;
char *buf, *p;
size_t len;
int res;
if (input_chan_bindings->initiator_address.length > UINT32_MAX ||
input_chan_bindings->acceptor_address.length > UINT32_MAX ||
input_chan_bindings->application_data.length > UINT32_MAX)
return GSS_S_BAD_BINDINGS;
len = sizeof (OM_uint32) * 5
+ input_chan_bindings->initiator_address.length
+ input_chan_bindings->acceptor_address.length
+ input_chan_bindings->application_data.length;
p = buf = malloc (len);
if (!buf)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
pack_uint32 (input_chan_bindings->initiator_addrtype, p);
p += sizeof (OM_uint32);
pack_uint32 (input_chan_bindings->initiator_address.length, p);
p += sizeof (OM_uint32);
if (input_chan_bindings->initiator_address.length > 0)
{
memcpy (p, input_chan_bindings->initiator_address.value,
input_chan_bindings->initiator_address.length);
p += input_chan_bindings->initiator_address.length;
}
pack_uint32 (input_chan_bindings->acceptor_addrtype, p);
p += sizeof (OM_uint32);
pack_uint32 (input_chan_bindings->acceptor_address.length, p);
p += sizeof (OM_uint32);
if (input_chan_bindings->acceptor_address.length > 0)
{
memcpy (p, input_chan_bindings->acceptor_address.value,
input_chan_bindings->acceptor_address.length);
p += input_chan_bindings->acceptor_address.length;
}
pack_uint32 (input_chan_bindings->application_data.length, p);
p += sizeof (OM_uint32);
if (input_chan_bindings->application_data.length > 0)
memcpy (p, input_chan_bindings->application_data.value,
input_chan_bindings->application_data.length);
res = shishi_md5 (k5->sh, buf, len, out);
free (buf);
if (res != SHISHI_OK)
return GSS_S_FAILURE;
return GSS_S_COMPLETE;
}
/* Create the checksum value field from input parameters. */
OM_uint32
_gss_krb5_checksum_pack (OM_uint32 * minor_status,
const gss_cred_id_t initiator_cred_handle,
gss_ctx_id_t * context_handle,
const gss_channel_bindings_t input_chan_bindings,
OM_uint32 req_flags, char **data, size_t * datalen)
{
char *p;
*datalen = 24;
p = *data = malloc (*datalen);
if (!p)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
/*
* RFC 1964 / gssapi-cfx:
*
* The checksum value field's format is as follows:
*
* Byte Name Description
* 0..3 Lgth Number of bytes in Bnd field;
* Currently contains hex 10 00 00 00
* (16, represented in little-endian form)
*/
memcpy (&p[0], "\x10\x00\x00\x00", 4); /* length of Bnd */
/*
* 4..19 Bnd MD5 hash of channel bindings, taken over all non-null
* components of bindings, in order of declaration.
* Integer fields within channel bindings are represented
* in little-endian order for the purposes of the MD5
* calculation.
*
* In computing the contents of the "Bnd" field, the following detailed
* points apply:
*
* (1) Each integer field shall be formatted into four bytes, using
* little-endian byte ordering, for purposes of MD5 hash
* computation.
*
* (2) All input length fields within gss_buffer_desc elements of a
* gss_channel_bindings_struct, even those which are zero-valued,
* shall be included in the hash calculation; the value elements of
* gss_buffer_desc elements shall be dereferenced, and the
* resulting data shall be included within the hash computation,
* only for the case of gss_buffer_desc elements having non-zero
* length specifiers.
*
* (3) If the caller passes the value GSS_C_NO_BINDINGS instead of
* a valid channel bindings structure, the Bnd field shall be set
* to 16 zero-valued bytes.
*
*/
if (input_chan_bindings != GSS_C_NO_CHANNEL_BINDINGS)
{
char *md5hash;
int res;
res = hash_cb (minor_status, context_handle,
input_chan_bindings, &md5hash);
if (res != GSS_S_COMPLETE)
{
free (p);
return res;
}
memcpy (&p[4], md5hash, 16);
free (md5hash);
}
else
memset (&p[4], 0, 16);
/*
* 20..23 Flags Bit vector of context-establishment flags,
* with values consistent with RFC-1509, p. 41:
* GSS_C_DELEG_FLAG: 1
* GSS_C_MUTUAL_FLAG: 2
* GSS_C_REPLAY_FLAG: 4
* GSS_C_SEQUENCE_FLAG: 8
* GSS_C_CONF_FLAG: 16
* GSS_C_INTEG_FLAG: 32
* The resulting bit vector is encoded into bytes 20..23
* in little-endian form.
*/
req_flags &= /* GSS_C_DELEG_FLAG | */
GSS_C_MUTUAL_FLAG |
GSS_C_REPLAY_FLAG | GSS_C_SEQUENCE_FLAG |
GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG;
p[20] = req_flags & 0xFF;
p[21] = (req_flags >> 8) & 0xFF;
p[22] = (req_flags >> 16) & 0xFF;
p[23] = (req_flags >> 24) & 0xFF;
/*
* 24..25 DlgOpt The delegation option identifier (=1) in
* little-endian order [optional]. This field
* and the next two fields are present if and
* only if GSS_C_DELEG_FLAG is set as described
* in section 4.1.1.1.
* 26..27 Dlgth The length of the Deleg field in little-
* endian order [optional].
* 28..(n-1) Deleg A KRB_CRED message (n = Dlgth + 28)
* [optional].
* n..last Exts Extensions [optional].
*
*/
if (req_flags & GSS_C_DELEG_FLAG)
{
/* XXX We don't support credential delegation yet. We should
not fail here, as GSS_C_DELEG_FLAG is masked out above, and
in context.c. */
}
return GSS_S_COMPLETE;
}
OM_uint32
_gss_krb5_checksum_parse (OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
const gss_channel_bindings_t input_chan_bindings)
{
gss_ctx_id_t ctx = *context_handle;
_gss_krb5_ctx_t k5 = ctx->krb5;
char *out = NULL;
size_t len = 0;
int rc;
char *md5hash;
if (shishi_ap_authenticator_cksumtype (k5->ap) != 0x8003)
{
if (minor_status)
*minor_status = GSS_KRB5_S_G_VALIDATE_FAILED;
return GSS_S_FAILURE;
}
rc = shishi_ap_authenticator_cksumdata (k5->ap, out, &len);
if (rc != SHISHI_TOO_SMALL_BUFFER)
return GSS_S_FAILURE;
out = malloc (len);
if (!out)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
rc = shishi_ap_authenticator_cksumdata (k5->ap, out, &len);
if (rc != SHISHI_OK)
{
free (out);
return GSS_S_FAILURE;
}
if (memcmp (out, "\x10\x00\x00\x00", 4) != 0)
{
free (out);
return GSS_S_DEFECTIVE_TOKEN;
}
if (input_chan_bindings != GSS_C_NO_CHANNEL_BINDINGS)
{
rc = hash_cb (minor_status, context_handle,
input_chan_bindings, &md5hash);
if (rc != GSS_S_COMPLETE)
{
free (out);
return GSS_S_DEFECTIVE_TOKEN;
}
rc = memcmp (&out[4], md5hash, 16);
free (md5hash);
}
else
{
char zeros[16];
memset (&zeros[0], 0, sizeof zeros);
rc = memcmp (&out[4], zeros, 16);
}
free (out);
if (rc != 0)
return GSS_S_DEFECTIVE_TOKEN;
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/krb5/msg.c 0000644 0000000 0000000 00000030727 11546676340 011565 0000000 0000000 /* krb5/msg.c --- Implementation of Kerberos 5 GSS-API Per-Message functions.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
/* Get specification. */
#include "k5internal.h"
#define TOK_LEN 2
#define TOK_WRAP "\x02\x01"
#define C2I(buf) ((buf[0] & 0xFF) | \
((buf[1] & 0xFF) << 8) | \
((buf[2] & 0xFF) << 16) | \
((buf[3] & 0xFF) << 24))
OM_uint32
gss_krb5_get_mic (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
gss_qop_t qop_req,
const gss_buffer_t message_buffer,
gss_buffer_t message_token)
{
return GSS_S_UNAVAILABLE;
}
OM_uint32
gss_krb5_verify_mic (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t message_buffer,
const gss_buffer_t token_buffer, gss_qop_t * qop_state)
{
return GSS_S_UNAVAILABLE;
}
OM_uint32
gss_krb5_wrap (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
int conf_req_flag,
gss_qop_t qop_req,
const gss_buffer_t input_message_buffer,
int *conf_state, gss_buffer_t output_message_buffer)
{
_gss_krb5_ctx_t k5 = context_handle->krb5;
size_t padlength;
gss_buffer_desc data;
char *p;
size_t tmplen;
int rc;
switch (shishi_key_type (k5->key))
{
/* XXX implement other checksums */
case SHISHI_DES_CBC_MD5:
{
char header[8];
char seqno[8];
char *eseqno;
char *cksum;
char confounder[8];
/* Typical data:
;; 02 01 00 00 ff ff ff ff 0c 22 1f 79 59 3d 00 cb
;; d5 78 2f fb 50 d2 b8 59 fb b4 e0 9b d0 a2 fa dc
;; 01 00 20 00 04 04 04 04
Translates into:
;; HEADER ENCRYPTED SEQ.NUMBER
;; DES-MAC-MD5 CKSUM CONFOUNDER
;; PADDED DATA
*/
padlength = 8 - input_message_buffer->length % 8;
data.length = 4 * 8 + input_message_buffer->length + padlength;
p = malloc (data.length);
if (!p)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
/* XXX encrypt data iff confidential option chosen */
/* Setup header and confounder */
memcpy (header, TOK_WRAP, 2); /* TOK_ID: Wrap 0201 */
memcpy (header + 2, "\x00\x00", 2); /* SGN_ALG: DES-MAC-MD5 */
memcpy (header + 4, "\xFF\xFF", 2); /* SEAL_ALG: none */
memcpy (header + 6, "\xFF\xFF", 2); /* filler */
rc = shishi_randomize (k5->sh, 0, confounder, 8);
if (rc != SHISHI_OK)
return GSS_S_FAILURE;
/* Compute checksum over header, confounder, input string, and pad */
memcpy (p, header, 8);
memcpy (p + 8, confounder, 8);
memcpy (p + 16, input_message_buffer->value,
input_message_buffer->length);
memset (p + 16 + input_message_buffer->length,
(int) padlength, padlength);
rc = shishi_checksum (k5->sh,
k5->key,
0, SHISHI_RSA_MD5_DES_GSS,
p,
16 + input_message_buffer->length + padlength,
&cksum, &tmplen);
if (rc != SHISHI_OK || tmplen != 8)
return GSS_S_FAILURE;
/* seq_nr */
if (k5->acceptor)
{
seqno[0] = k5->acceptseqnr & 0xFF;
seqno[1] = k5->acceptseqnr >> 8 & 0xFF;
seqno[2] = k5->acceptseqnr >> 16 & 0xFF;
seqno[3] = k5->acceptseqnr >> 24 & 0xFF;
memset (seqno + 4, 0xFF, 4);
}
else
{
seqno[0] = k5->initseqnr & 0xFF;
seqno[1] = k5->initseqnr >> 8 & 0xFF;
seqno[2] = k5->initseqnr >> 16 & 0xFF;
seqno[3] = k5->initseqnr >> 24 & 0xFF;
memset (seqno + 4, 0, 4);
}
rc = shishi_encrypt_iv_etype (k5->sh, k5->key, 0,
SHISHI_DES_CBC_NONE, cksum, 8,
seqno, 8, &eseqno, &tmplen);
if (rc != SHISHI_OK || tmplen != 8)
return GSS_S_FAILURE;
/* put things in place */
memcpy (p, header, 8);
memcpy (p + 8, eseqno, 8);
free (eseqno);
memcpy (p + 16, cksum, 8);
free (cksum);
memcpy (p + 24, confounder, 8);
memcpy (p + 32, input_message_buffer->value,
input_message_buffer->length);
memset (p + 32 + input_message_buffer->length,
(int) padlength, padlength);
data.value = p;
rc = gss_encapsulate_token (&data, GSS_KRB5, output_message_buffer);
if (rc != GSS_S_COMPLETE)
return GSS_S_FAILURE;
if (k5->acceptor)
k5->acceptseqnr++;
else
k5->initseqnr++;
}
break;
case SHISHI_DES3_CBC_HMAC_SHA1_KD:
{
char *tmp;
padlength = 8 - input_message_buffer->length % 8;
data.length = 8 + 8 + 20 + 8 + input_message_buffer->length
+ padlength;
p = malloc (data.length);
if (!p)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
/* XXX encrypt data iff confidential option chosen */
/* Compute checksum over header, confounder, input string, and pad */
memcpy (p, TOK_WRAP, 2); /* TOK_ID: Wrap */
memcpy (p + 2, "\x04\x00", 2); /* SGN_ALG: 3DES */
memcpy (p + 4, "\xFF\xFF", 2); /* SEAL_ALG: none */
memcpy (p + 6, "\xFF\xFF", 2); /* filler */
rc = shishi_randomize (k5->sh, 0, p + 8, 8);
if (rc != SHISHI_OK)
return GSS_S_FAILURE;
memcpy (p + 16, input_message_buffer->value,
input_message_buffer->length);
memset (p + 16 + input_message_buffer->length,
(int) padlength, padlength);
rc = shishi_checksum (k5->sh,
k5->key,
SHISHI_KEYUSAGE_GSS_R2,
SHISHI_HMAC_SHA1_DES3_KD, p,
16 + input_message_buffer->length + padlength,
&tmp, &tmplen);
if (rc != SHISHI_OK || tmplen != 20)
return GSS_S_FAILURE;
memcpy (p + 16, tmp, tmplen);
memcpy (p + 36, p + 8, 8);
/* seq_nr */
if (k5->acceptor)
{
(p + 8)[0] = k5->acceptseqnr & 0xFF;
(p + 8)[1] = k5->acceptseqnr >> 8 & 0xFF;
(p + 8)[2] = k5->acceptseqnr >> 16 & 0xFF;
(p + 8)[3] = k5->acceptseqnr >> 24 & 0xFF;
memset (p + 8 + 4, 0xFF, 4);
}
else
{
(p + 8)[0] = k5->initseqnr & 0xFF;
(p + 8)[1] = k5->initseqnr >> 8 & 0xFF;
(p + 8)[2] = k5->initseqnr >> 16 & 0xFF;
(p + 8)[3] = k5->initseqnr >> 24 & 0xFF;
memset (p + 8 + 4, 0, 4);
}
rc = shishi_encrypt_iv_etype (k5->sh, k5->key, 0, SHISHI_DES3_CBC_NONE, p + 16, 8, /* cksum */
p + 8, 8, &tmp, &tmplen);
if (rc != SHISHI_OK || tmplen != 8)
return GSS_S_FAILURE;
memcpy (p + 8, tmp, tmplen);
free (tmp);
memcpy (p + 8 + 8 + 20 + 8, input_message_buffer->value,
input_message_buffer->length);
memset (p + 8 + 8 + 20 + 8 + input_message_buffer->length,
(int) padlength, padlength);
data.value = p;
rc = gss_encapsulate_token (&data, GSS_KRB5, output_message_buffer);
if (rc != GSS_S_COMPLETE)
return GSS_S_FAILURE;
if (k5->acceptor)
k5->acceptseqnr++;
else
k5->initseqnr++;
break;
}
default:
return GSS_S_FAILURE;
}
return GSS_S_COMPLETE;
}
OM_uint32
gss_krb5_unwrap (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t input_message_buffer,
gss_buffer_t output_message_buffer,
int *conf_state, gss_qop_t * qop_state)
{
_gss_krb5_ctx_t k5 = context_handle->krb5;
gss_buffer_desc tok;
char *data;
OM_uint32 sgn_alg, seal_alg;
size_t tmplen;
int rc;
rc = gss_decapsulate_token (input_message_buffer, GSS_KRB5, &tok);
if (rc != GSS_S_COMPLETE)
return GSS_S_BAD_MIC;
if (tok.length < 8)
return GSS_S_BAD_MIC;
if (memcmp (tok.value, TOK_WRAP, TOK_LEN) != 0)
return GSS_S_BAD_MIC;
data = tok.value;
sgn_alg = data[2] & 0xFF;
sgn_alg |= data[3] << 8 & 0xFF00;
seal_alg = data[4] & 0xFF;
seal_alg |= data[5] << 8 & 0xFF00;
if (conf_state != NULL)
*conf_state = seal_alg == 0xFFFF;
if (memcmp (data + 6, "\xFF\xFF", 2) != 0)
return GSS_S_BAD_MIC;
switch (sgn_alg)
{
/* XXX implement other checksums */
case 0: /* DES-MD5 */
{
size_t padlen;
char *pt;
char header[8];
char encseqno[8];
char seqno[8];
char cksum[8];
char confounder[8];
char *tmp;
uint32_t seqnr;
size_t outlen, i;
/* Typical data:
;; 02 01 00 00 ff ff ff ff 0c 22 1f 79 59 3d 00 cb
;; d5 78 2f fb 50 d2 b8 59 fb b4 e0 9b d0 a2 fa dc
;; 01 00 20 00 04 04 04 04
Translates into:
;; HEADER ENCRYPTED SEQ.NUMBER
;; DES-MAC-MD5 CKSUM CONFOUNDER
;; PADDED DATA
*/
if (tok.length < 5 * 8)
return GSS_S_BAD_MIC;
memcpy (header, data, 8);
memcpy (encseqno, data + 8, 8);
memcpy (cksum, data + 16, 8);
memcpy (confounder, data + 24, 8);
pt = data + 32;
/* XXX decrypt data iff confidential option chosen */
rc = shishi_decrypt_iv_etype (k5->sh,
k5->key,
0, SHISHI_DES_CBC_NONE,
cksum, 8, encseqno, 8, &tmp, &outlen);
if (rc != SHISHI_OK)
return GSS_S_FAILURE;
if (outlen != 8)
return GSS_S_BAD_MIC;
memcpy (seqno, tmp, 8);
free (tmp);
if (memcmp (seqno + 4, k5->acceptor ? "\x00\x00\x00\x00" :
"\xFF\xFF\xFF\xFF", 4) != 0)
return GSS_S_BAD_MIC;
seqnr = C2I (seqno);
if (seqnr != (k5->acceptor ? k5->initseqnr : k5->acceptseqnr))
return GSS_S_BAD_MIC;
if (k5->acceptor)
k5->initseqnr++;
else
k5->acceptseqnr++;
/* Check pad */
padlen = data[tok.length - 1];
if (padlen > 8)
return GSS_S_BAD_MIC;
for (i = 1; i <= padlen; i++)
if (data[tok.length - i] != (int) padlen)
return GSS_S_BAD_MIC;
/* Write header and confounder next to data */
memcpy (data + 16, header, 8);
memcpy (data + 24, confounder, 8);
/* Checksum header + confounder + data + pad */
rc = shishi_checksum (k5->sh,
k5->key,
0, SHISHI_RSA_MD5_DES_GSS,
data + 16, tok.length - 16, &tmp, &tmplen);
if (rc != SHISHI_OK || tmplen != 8)
return GSS_S_FAILURE;
memcpy (data + 8, tmp, tmplen);
/* Compare checksum */
if (tmplen != 8 || memcmp (cksum, data + 8, 8) != 0)
return GSS_S_BAD_MIC;
/* Copy output data */
output_message_buffer->length = tok.length - 8 - 8 - 8 - 8 - padlen;
output_message_buffer->value = malloc (output_message_buffer->length);
if (!output_message_buffer->value)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
memcpy (output_message_buffer->value, pt,
tok.length - 4 * 8 - padlen);
}
break;
case 4: /* 3DES */
{
size_t padlen;
char *p;
char *t;
char cksum[20];
size_t outlen, i;
uint32_t seqnr;
if (tok.length < 8 + 8 + 20 + 8 + 8)
return GSS_S_BAD_MIC;
memcpy (cksum, data + 8 + 8, 20);
/* XXX decrypt data iff confidential option chosen */
p = data + 8;
rc = shishi_decrypt_iv_etype (k5->sh,
k5->key,
0, SHISHI_DES3_CBC_NONE,
cksum, 8, p, 8, &t, &outlen);
if (rc != SHISHI_OK || outlen != 8)
return GSS_S_FAILURE;
memcpy (p, t, 8);
free (t);
if (memcmp (p + 4, k5->acceptor ? "\x00\x00\x00\x00" :
"\xFF\xFF\xFF\xFF", 4) != 0)
return GSS_S_BAD_MIC;
seqnr = C2I (p);
if (seqnr != (k5->acceptor ? k5->initseqnr : k5->acceptseqnr))
return GSS_S_BAD_MIC;
if (k5->acceptor)
k5->initseqnr++;
else
k5->acceptseqnr++;
/* Check pad */
padlen = data[tok.length - 1];
if (padlen > 8)
return GSS_S_BAD_MIC;
for (i = 1; i <= padlen; i++)
if (data[tok.length - i] != (int) padlen)
return GSS_S_BAD_MIC;
/* Write header next to confounder */
memcpy (data + 8 + 20, data, 8);
/* Checksum header + confounder + data + pad */
rc = shishi_checksum (k5->sh,
k5->key,
SHISHI_KEYUSAGE_GSS_R2,
SHISHI_HMAC_SHA1_DES3_KD, data + 20 + 8,
tok.length - 20 - 8, &t, &tmplen);
if (rc != SHISHI_OK || tmplen != 20)
return GSS_S_FAILURE;
memcpy (data + 8 + 8, t, tmplen);
free (t);
/* Compare checksum */
if (tmplen != 20 || memcmp (cksum, data + 8 + 8, 20) != 0)
return GSS_S_BAD_MIC;
/* Copy output data */
output_message_buffer->length = tok.length - 8 - 20 - 8 - 8 - padlen;
output_message_buffer->value = malloc (output_message_buffer->length);
if (!output_message_buffer->value)
{
if (minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
memcpy (output_message_buffer->value, data + 20 + 8 + 8 + 8,
tok.length - 20 - 8 - 8 - 8 - padlen);
}
break;
default:
return GSS_S_FAILURE;
}
return GSS_S_COMPLETE;
}
gss-1.0.2/lib/version.c 0000644 0000000 0000000 00000003124 11546676340 011610 0000000 0000000 /* version.c --- Version handling.
* Copyright (C) 2002-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
#include /* for strverscmp */
/**
* gss_check_version:
* @req_version: version string to compare with, or NULL
*
* Check that the version of the library is at minimum the one
* given as a string in @req_version.
*
* WARNING: This function is a GNU GSS specific extension, and is not
* part of the official GSS API.
*
* Return value: The actual version string of the library; NULL if the
* condition is not met. If NULL is passed to this function no
* check is done and only the version string is returned.
**/
const char *
gss_check_version (const char *req_version)
{
if (!req_version || strverscmp (req_version, PACKAGE_VERSION) <= 0)
return PACKAGE_VERSION;
return NULL;
}
gss-1.0.2/lib/obsolete.c 0000644 0000000 0000000 00000004242 11546676340 011741 0000000 0000000 /* obsolete.c --- Obsolete GSS-API v1 compatibility mappings.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
OM_uint32
gss_sign (OM_uint32 * minor_status,
gss_ctx_id_t context_handle,
int qop_req,
gss_buffer_t message_buffer, gss_buffer_t message_token)
{
return gss_get_mic (minor_status, context_handle,
(gss_qop_t) qop_req, message_buffer, message_token);
}
OM_uint32
gss_verify (OM_uint32 * minor_status,
gss_ctx_id_t context_handle,
gss_buffer_t message_buffer,
gss_buffer_t token_buffer, int *qop_state)
{
return gss_verify_mic (minor_status, context_handle, message_buffer,
token_buffer, (gss_qop_t *) qop_state);
}
OM_uint32
gss_seal (OM_uint32 * minor_status,
gss_ctx_id_t context_handle,
int conf_req_flag,
int qop_req,
gss_buffer_t input_message_buffer,
int *conf_state, gss_buffer_t output_message_buffer)
{
return gss_wrap (minor_status, context_handle, conf_req_flag,
(gss_qop_t) qop_req,
input_message_buffer, conf_state, output_message_buffer);
}
OM_uint32
gss_unseal (OM_uint32 * minor_status,
gss_ctx_id_t context_handle,
gss_buffer_t input_message_buffer,
gss_buffer_t output_message_buffer,
int *conf_state, int *qop_state)
{
return gss_unwrap (minor_status, context_handle, input_message_buffer,
output_message_buffer, conf_state,
(gss_qop_t *) qop_state);
}
gss-1.0.2/lib/msg.c 0000644 0000000 0000000 00000025751 11546676340 010723 0000000 0000000 /* msg.c --- Implementation of GSS-API Per-Message functions.
* Copyright (C) 2003-2011 Simon Josefsson
*
* This file is part of the Generic Security Service (GSS).
*
* GSS 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.
*
* GSS 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 GSS; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
*/
#include "internal.h"
/* _gss_find_mech */
#include "meta.h"
/**
* gss_get_mic:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @context_handle: (gss_ctx_id_t, read) Identifies the context on
* which the message will be sent.
* @qop_req: (gss_qop_t, read, optional) Specifies requested quality
* of protection. Callers are encouraged, on portability grounds,
* to accept the default quality of protection offered by the chosen
* mechanism, which may be requested by specifying GSS_C_QOP_DEFAULT
* for this parameter. If an unsupported protection strength is
* requested, gss_get_mic will return a major_status of
* GSS_S_BAD_QOP.
* @message_buffer: (buffer, opaque, read) Message to be protected.
* @message_token: (buffer, opaque, modify) Buffer to receive token. The
* application must free storage associated with this buffer after
* use with a call to gss_release_buffer().
*
* Generates a cryptographic MIC for the supplied message, and places
* the MIC in a token for transfer to the peer application. The
* qop_req parameter allows a choice between several cryptographic
* algorithms, if supported by the chosen mechanism.
*
* Since some application-level protocols may wish to use tokens
* emitted by gss_wrap() to provide "secure framing", implementations
* must support derivation of MICs from zero-length messages.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_CONTEXT_EXPIRED`: The context has already expired.
*
* `GSS_S_NO_CONTEXT`: The context_handle parameter did not identify a
* valid context.
*
* `GSS_S_BAD_QOP`: The specified QOP is not supported by the
* mechanism.
**/
OM_uint32
gss_get_mic (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
gss_qop_t qop_req,
const gss_buffer_t message_buffer, gss_buffer_t message_token)
{
_gss_mech_api_t mech;
if (!context_handle)
{
if (minor_status)
*minor_status = 0;
return GSS_S_NO_CONTEXT;
}
mech = _gss_find_mech (context_handle->mech);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
return mech->get_mic (minor_status, context_handle, qop_req,
message_buffer, message_token);
}
/**
* gss_verify_mic:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @context_handle: (gss_ctx_id_t, read) Identifies the context on
* which the message arrived.
* @message_buffer: (buffer, opaque, read) Message to be verified.
* @token_buffer: (buffer, opaque, read) Token associated with
* message.
* @qop_state: (gss_qop_t, modify, optional) Quality of protection
* gained from MIC Specify NULL if not required.
*
* Verifies that a cryptographic MIC, contained in the token
* parameter, fits the supplied message. The qop_state parameter
* allows a message recipient to determine the strength of protection
* that was applied to the message.
*
* Since some application-level protocols may wish to use tokens
* emitted by gss_wrap() to provide "secure framing", implementations
* must support the calculation and verification of MICs over
* zero-length messages.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_DEFECTIVE_TOKEN`: The token failed consistency checks.
*
* `GSS_S_BAD_SIG`: The MIC was incorrect.
*
* `GSS_S_DUPLICATE_TOKEN`: The token was valid, and contained a
* correct MIC for the message, but it had already been processed.
*
* `GSS_S_OLD_TOKEN`: The token was valid, and contained a correct MIC
* for the message, but it is too old to check for duplication.
*
* `GSS_S_UNSEQ_TOKEN`: The token was valid, and contained a correct
* MIC for the message, but has been verified out of sequence; a later
* token has already been received.
*
* `GSS_S_GAP_TOKEN`: The token was valid, and contained a correct MIC
* for the message, but has been verified out of sequence; an earlier
* expected token has not yet been received.
*
* `GSS_S_CONTEXT_EXPIRED`: The context has already expired.
*
* `GSS_S_NO_CONTEXT`: The context_handle parameter did not identify a
* valid context.
**/
OM_uint32
gss_verify_mic (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t message_buffer,
const gss_buffer_t token_buffer, gss_qop_t * qop_state)
{
_gss_mech_api_t mech;
if (!context_handle)
{
if (minor_status)
*minor_status = 0;
return GSS_S_NO_CONTEXT;
}
mech = _gss_find_mech (context_handle->mech);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
return mech->verify_mic (minor_status, context_handle,
message_buffer, token_buffer, qop_state);
}
/**
* gss_wrap:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @context_handle: (gss_ctx_id_t, read) Identifies the context on
* which the message will be sent.
* @conf_req_flag: (boolean, read) Non-zero - Both confidentiality and
* integrity services are requested. Zero - Only integrity service is
* requested.
* @qop_req: (gss_qop_t, read, optional) Specifies required quality of
* protection. A mechanism-specific default may be requested by
* setting qop_req to GSS_C_QOP_DEFAULT. If an unsupported
* protection strength is requested, gss_wrap will return a
* major_status of GSS_S_BAD_QOP.
* @input_message_buffer: (buffer, opaque, read) Message to be
* protected.
* @conf_state: (boolean, modify, optional) Non-zero -
* Confidentiality, data origin authentication and integrity
* services have been applied. Zero - Integrity and data origin
* services only has been applied. Specify NULL if not required.
* @output_message_buffer: (buffer, opaque, modify) Buffer to receive
* protected message. Storage associated with this message must be
* freed by the application after use with a call to
* gss_release_buffer().
*
* Attaches a cryptographic MIC and optionally encrypts the specified
* input_message. The output_message contains both the MIC and the
* message. The qop_req parameter allows a choice between several
* cryptographic algorithms, if supported by the chosen mechanism.
*
* Since some application-level protocols may wish to use tokens
* emitted by gss_wrap() to provide "secure framing", implementations
* must support the wrapping of zero-length messages.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_CONTEXT_EXPIRED`: The context has already expired.
*
* `GSS_S_NO_CONTEXT`: The context_handle parameter did not identify a
* valid context.
*
* `GSS_S_BAD_QOP`: The specified QOP is not supported by the
* mechanism.
**/
OM_uint32
gss_wrap (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
int conf_req_flag,
gss_qop_t qop_req,
const gss_buffer_t input_message_buffer,
int *conf_state, gss_buffer_t output_message_buffer)
{
_gss_mech_api_t mech;
if (!context_handle)
{
if (minor_status)
*minor_status = 0;
return GSS_S_NO_CONTEXT;
}
mech = _gss_find_mech (context_handle->mech);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
return mech->wrap (minor_status, context_handle, conf_req_flag, qop_req,
input_message_buffer, conf_state, output_message_buffer);
}
/**
* gss_unwrap:
* @minor_status: (Integer, modify) Mechanism specific status code.
* @context_handle: (gss_ctx_id_t, read) Identifies the context on
* which the message arrived.
* @input_message_buffer: (buffer, opaque, read) Protected message.
* @output_message_buffer: (buffer, opaque, modify) Buffer to receive
* unwrapped message. Storage associated with this buffer must be
* freed by the application after use use with a call to
* gss_release_buffer().
* @conf_state: (boolean, modify, optional) Non-zero - Confidentiality
* and integrity protection were used. Zero - Integrity service only
* was used. Specify NULL if not required.
* @qop_state: (gss_qop_t, modify, optional) Quality of protection
* provided. Specify NULL if not required.
*
* Converts a message previously protected by gss_wrap back to a
* usable form, verifying the embedded MIC. The conf_state parameter
* indicates whether the message was encrypted; the qop_state
* parameter indicates the strength of protection that was used to
* provide the confidentiality and integrity services.
*
* Since some application-level protocols may wish to use tokens
* emitted by gss_wrap() to provide "secure framing", implementations
* must support the wrapping and unwrapping of zero-length messages.
*
* Return value:
*
* `GSS_S_COMPLETE`: Successful completion.
*
* `GSS_S_DEFECTIVE_TOKEN`: The token failed consistency checks.
*
* `GSS_S_BAD_SIG`: The MIC was incorrect.
*
* `GSS_S_DUPLICATE_TOKEN`: The token was valid, and contained a
* correct MIC for the message, but it had already been processed.
*
* `GSS_S_OLD_TOKEN`: The token was valid, and contained a correct MIC
* for the message, but it is too old to check for duplication.
*
* `GSS_S_UNSEQ_TOKEN`: The token was valid, and contained a correct
* MIC for the message, but has been verified out of sequence; a later
* token has already been received.
*
* `GSS_S_GAP_TOKEN`: The token was valid, and contained a correct MIC
* for the message, but has been verified out of sequence; an earlier
* expected token has not yet been received.
*
* `GSS_S_CONTEXT_EXPIRED`: The context has already expired.
*
* `GSS_S_NO_CONTEXT`: The context_handle parameter did not identify a
* valid context.
**/
OM_uint32
gss_unwrap (OM_uint32 * minor_status,
const gss_ctx_id_t context_handle,
const gss_buffer_t input_message_buffer,
gss_buffer_t output_message_buffer,
int *conf_state, gss_qop_t * qop_state)
{
_gss_mech_api_t mech;
if (!context_handle)
{
if (minor_status)
*minor_status = 0;
return GSS_S_NO_CONTEXT;
}
mech = _gss_find_mech (context_handle->mech);
if (mech == NULL)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_MECH;
}
return mech->unwrap (minor_status, context_handle, input_message_buffer,
output_message_buffer, conf_state, qop_state);
}
gss-1.0.2/src/ 0000755 0000000 0000000 00000000000 11663555055 010057 5 0000000 0000000 gss-1.0.2/src/gss_cmd.h 0000644 0000000 0000000 00000015243 11663554727 011601 0000000 0000000 /** @file gss_cmd.h
* @brief The header file for the command line option parser
* generated by GNU Gengetopt version 2.22.4
* http://www.gnu.org/software/gengetopt.
* DO NOT modify this file, since it can be overwritten
* @author GNU Gengetopt by Lorenzo Bettini */
#ifndef GSS_CMD_H
#define GSS_CMD_H
/* If we use autoconf. */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include /* for FILE */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifndef CMDLINE_PARSER_PACKAGE
/** @brief the program name (used for printing errors) */
#define CMDLINE_PARSER_PACKAGE PACKAGE
#endif
#ifndef CMDLINE_PARSER_PACKAGE_NAME
/** @brief the complete program name (used for help and version) */
#ifdef PACKAGE_NAME
#define CMDLINE_PARSER_PACKAGE_NAME PACKAGE_NAME
#else
#define CMDLINE_PARSER_PACKAGE_NAME PACKAGE
#endif
#endif
#ifndef CMDLINE_PARSER_VERSION
/** @brief the program version */
#define CMDLINE_PARSER_VERSION VERSION
#endif
/** @brief Where the command line options are stored */
struct gengetopt_args_info
{
const char *help_help; /**< @brief Print help and exit help description. */
const char *version_help; /**< @brief Print version and exit help description. */
long major_arg; /**< @brief See gss.c for doc string. */
char * major_orig; /**< @brief See gss.c for doc string original value given at command line. */
const char *major_help; /**< @brief See gss.c for doc string help description. */
const char *list_mechanisms_help; /**< @brief See gss.c for doc string help description. */
int quiet_flag; /**< @brief Silent operation (default=off). */
const char *quiet_help; /**< @brief Silent operation help description. */
unsigned int help_given ; /**< @brief Whether help was given. */
unsigned int version_given ; /**< @brief Whether version was given. */
unsigned int major_given ; /**< @brief Whether major was given. */
unsigned int list_mechanisms_given ; /**< @brief Whether list-mechanisms was given. */
unsigned int quiet_given ; /**< @brief Whether quiet was given. */
} ;
/** @brief The additional parameters to pass to parser functions */
struct cmdline_parser_params
{
int override; /**< @brief whether to override possibly already present options (default 0) */
int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
int check_required; /**< @brief whether to check that all required options were provided (default 1) */
int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
} ;
/** @brief the purpose string of the program */
extern const char *gengetopt_args_info_purpose;
/** @brief the usage string of the program */
extern const char *gengetopt_args_info_usage;
/** @brief all the lines making the help output */
extern const char *gengetopt_args_info_help[];
/**
* The command line parser
* @param argc the number of command line options
* @param argv the command line options
* @param args_info the structure where option information will be stored
* @return 0 if everything went fine, NON 0 if an error took place
*/
int cmdline_parser (int argc, char **argv,
struct gengetopt_args_info *args_info);
/**
* The command line parser (version with additional parameters - deprecated)
* @param argc the number of command line options
* @param argv the command line options
* @param args_info the structure where option information will be stored
* @param override whether to override possibly already present options
* @param initialize whether to initialize the option structure my_args_info
* @param check_required whether to check that all required options were provided
* @return 0 if everything went fine, NON 0 if an error took place
* @deprecated use cmdline_parser_ext() instead
*/
int cmdline_parser2 (int argc, char **argv,
struct gengetopt_args_info *args_info,
int override, int initialize, int check_required);
/**
* The command line parser (version with additional parameters)
* @param argc the number of command line options
* @param argv the command line options
* @param args_info the structure where option information will be stored
* @param params additional parameters for the parser
* @return 0 if everything went fine, NON 0 if an error took place
*/
int cmdline_parser_ext (int argc, char **argv,
struct gengetopt_args_info *args_info,
struct cmdline_parser_params *params);
/**
* Save the contents of the option struct into an already open FILE stream.
* @param outfile the stream where to dump options
* @param args_info the option struct to dump
* @return 0 if everything went fine, NON 0 if an error took place
*/
int cmdline_parser_dump(FILE *outfile,
struct gengetopt_args_info *args_info);
/**
* Save the contents of the option struct into a (text) file.
* This file can be read by the config file parser (if generated by gengetopt)
* @param filename the file where to save
* @param args_info the option struct to save
* @return 0 if everything went fine, NON 0 if an error took place
*/
int cmdline_parser_file_save(const char *filename,
struct gengetopt_args_info *args_info);
/**
* Print the help
*/
void cmdline_parser_print_help(void);
/**
* Print the version
*/
void cmdline_parser_print_version(void);
/**
* Initializes all the fields a cmdline_parser_params structure
* to their default values
* @param params the structure to initialize
*/
void cmdline_parser_params_init(struct cmdline_parser_params *params);
/**
* Allocates dynamically a cmdline_parser_params structure and initializes
* all its fields to their default values
* @return the created and initialized cmdline_parser_params structure
*/
struct cmdline_parser_params *cmdline_parser_params_create(void);
/**
* Initializes the passed gengetopt_args_info structure's fields
* (also set default values for options that have a default)
* @param args_info the structure to initialize
*/
void cmdline_parser_init (struct gengetopt_args_info *args_info);
/**
* Deallocates the string fields of the gengetopt_args_info structure
* (but does not deallocate the structure itself)
* @param args_info the structure to deallocate
*/
void cmdline_parser_free (struct gengetopt_args_info *args_info);
/**
* Checks that all the required options were specified
* @param args_info the structure to check
* @param prog_name the name of the program that will be used to print
* possible errors
* @return
*/
int cmdline_parser_required (struct gengetopt_args_info *args_info,
const char *prog_name);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* GSS_CMD_H */
gss-1.0.2/src/gl/ 0000755 0000000 0000000 00000000000 11663555055 010461 5 0000000 0000000 gss-1.0.2/src/gl/progname.h 0000644 0000000 0000000 00000003776 11662447025 012373 0000000 0000000 /* Program name management.
Copyright (C) 2001-2004, 2006, 2009-2011 Free Software Foundation, Inc.
Written by Bruno Haible , 2001.
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 . */
#ifndef _PROGNAME_H
#define _PROGNAME_H
/* Programs using this file should do the following in main():
set_program_name (argv[0]);
*/
#ifdef __cplusplus
extern "C" {
#endif
/* String containing name the program is called with. */
extern const char *program_name;
/* Set program_name, based on argv[0].
argv0 must be a string allocated with indefinite extent, and must not be
modified after this call. */
extern void set_program_name (const char *argv0);
#if defined(ENABLE_RELOCATABLE) && ENABLE_RELOCATABLE
/* Set program_name, based on argv[0], and original installation prefix and
directory, for relocatability. */
extern void set_program_name_and_installdir (const char *argv0,
const char *orig_installprefix,
const char *orig_installdir);
#undef set_program_name
#define set_program_name(ARG0) \
set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR)
/* Return the full pathname of the current executable, based on the earlier
call to set_program_name_and_installdir. Return NULL if unknown. */
extern char *get_full_program_name (void);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _PROGNAME_H */
gss-1.0.2/src/gl/progname.c 0000644 0000000 0000000 00000006150 11662447025 012353 0000000 0000000 /* Program name management.
Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc.
Written by Bruno Haible , 2001.
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 . */
#include
/* Specification. */
#undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */
#include "progname.h"
#include /* get program_invocation_name declaration */
#include
#include
#include
/* String containing name the program is called with.
To be initialized by main(). */
const char *program_name = NULL;
/* Set program_name, based on argv[0].
argv0 must be a string allocated with indefinite extent, and must not be
modified after this call. */
void
set_program_name (const char *argv0)
{
/* libtool creates a temporary executable whose name is sometimes prefixed
with "lt-" (depends on the platform). It also makes argv[0] absolute.
But the name of the temporary executable is a detail that should not be
visible to the end user and to the test suite.
Remove this "/.libs/" or "/.libs/lt-" prefix here. */
const char *slash;
const char *base;
/* Sanity check. POSIX requires the invoking process to pass a non-NULL
argv[0]. */
if (argv0 == NULL)
{
/* It's a bug in the invoking program. Help diagnosing it. */
fputs ("A NULL argv[0] was passed through an exec system call.\n",
stderr);
abort ();
}
slash = strrchr (argv0, '/');
base = (slash != NULL ? slash + 1 : argv0);
if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0)
{
argv0 = base;
if (strncmp (base, "lt-", 3) == 0)
{
argv0 = base + 3;
/* On glibc systems, remove the "lt-" prefix from the variable
program_invocation_short_name. */
#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
program_invocation_short_name = (char *) argv0;
#endif
}
}
/* But don't strip off a leading / in general, because when the user
runs
/some/hidden/place/bin/cp foo foo
he should get the error message
/some/hidden/place/bin/cp: `foo' and `foo' are the same file
not
cp: `foo' and `foo' are the same file
*/
program_name = argv0;
/* On glibc systems, the error() function comes from libc and uses the
variable program_invocation_name, not program_name. So set this variable
as well. */
#if HAVE_DECL_PROGRAM_INVOCATION_NAME
program_invocation_name = (char *) argv0;
#endif
}
gss-1.0.2/src/gl/msvc-nothrow.h 0000644 0000000 0000000 00000003114 11662447025 013213 0000000 0000000 /* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
Copyright (C) 2011 Free Software Foundation, Inc.
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, 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. */
#ifndef _MSVC_NOTHROW_H
#define _MSVC_NOTHROW_H
/* With MSVC runtime libraries with the "invalid parameter handler" concept,
functions like fprintf(), dup2(), or close() crash when the caller passes
an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF)
instead.
This file defines wrappers that turn such an invalid parameter notification
into an error code. */
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Get original declaration of _get_osfhandle. */
# include
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
/* Override _get_osfhandle. */
extern intptr_t _gl_nothrow_get_osfhandle (int fd);
# define _get_osfhandle _gl_nothrow_get_osfhandle
# endif
#endif
#endif /* _MSVC_NOTHROW_H */
gss-1.0.2/src/gl/strerror-override.c 0000644 0000000 0000000 00000021030 11662447025 014234 0000000 0000000 /* strerror-override.c --- POSIX compatible system error routine
Copyright (C) 2010-2011 Free Software Foundation, Inc.
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 . */
/* Written by Bruno Haible , 2010. */
#include
#include "strerror-override.h"
#include
#if GNULIB_defined_EWINSOCK /* native Windows platforms */
# if HAVE_WINSOCK2_H
# include
# endif
#endif
/* If ERRNUM maps to an errno value defined by gnulib, return a string
describing the error. Otherwise return NULL. */
const char *
strerror_override (int errnum)
{
/* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
switch (errnum)
{
#if REPLACE_STRERROR_0
case 0:
return "Success";
#endif
#if GNULIB_defined_ESOCK /* native Windows platforms with older */
case EINPROGRESS:
return "Operation now in progress";
case EALREADY:
return "Operation already in progress";
case ENOTSOCK:
return "Socket operation on non-socket";
case EDESTADDRREQ:
return "Destination address required";
case EMSGSIZE:
return "Message too long";
case EPROTOTYPE:
return "Protocol wrong type for socket";
case ENOPROTOOPT:
return "Protocol not available";
case EPROTONOSUPPORT:
return "Protocol not supported";
case EOPNOTSUPP:
return "Operation not supported";
case EAFNOSUPPORT:
return "Address family not supported by protocol";
case EADDRINUSE:
return "Address already in use";
case EADDRNOTAVAIL:
return "Cannot assign requested address";
case ENETDOWN:
return "Network is down";
case ENETUNREACH:
return "Network is unreachable";
case ECONNRESET:
return "Connection reset by peer";
case ENOBUFS:
return "No buffer space available";
case EISCONN:
return "Transport endpoint is already connected";
case ENOTCONN:
return "Transport endpoint is not connected";
case ETIMEDOUT:
return "Connection timed out";
case ECONNREFUSED:
return "Connection refused";
case ELOOP:
return "Too many levels of symbolic links";
case EHOSTUNREACH:
return "No route to host";
case EWOULDBLOCK:
return "Operation would block";
case ETXTBSY:
return "Text file busy";
case ENODATA:
return "No data available";
case ENOSR:
return "Out of streams resources";
case ENOSTR:
return "Device not a stream";
case ENOTRECOVERABLE:
return "State not recoverable";
case EOWNERDEAD:
return "Owner died";
case ETIME:
return "Timer expired";
case EOTHER:
return "Other error";
#endif
#if GNULIB_defined_EWINSOCK /* native Windows platforms */
case ESOCKTNOSUPPORT:
return "Socket type not supported";
case EPFNOSUPPORT:
return "Protocol family not supported";
case ESHUTDOWN:
return "Cannot send after transport endpoint shutdown";
case ETOOMANYREFS:
return "Too many references: cannot splice";
case EHOSTDOWN:
return "Host is down";
case EPROCLIM:
return "Too many processes";
case EUSERS:
return "Too many users";
case EDQUOT:
return "Disk quota exceeded";
case ESTALE:
return "Stale NFS file handle";
case EREMOTE:
return "Object is remote";
# if HAVE_WINSOCK2_H
/* WSA_INVALID_HANDLE maps to EBADF */
/* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
/* WSA_INVALID_PARAMETER maps to EINVAL */
case WSA_OPERATION_ABORTED:
return "Overlapped operation aborted";
case WSA_IO_INCOMPLETE:
return "Overlapped I/O event object not in signaled state";
case WSA_IO_PENDING:
return "Overlapped operations will complete later";
/* WSAEINTR maps to EINTR */
/* WSAEBADF maps to EBADF */
/* WSAEACCES maps to EACCES */
/* WSAEFAULT maps to EFAULT */
/* WSAEINVAL maps to EINVAL */
/* WSAEMFILE maps to EMFILE */
/* WSAEWOULDBLOCK maps to EWOULDBLOCK */
/* WSAEINPROGRESS maps to EINPROGRESS */
/* WSAEALREADY maps to EALREADY */
/* WSAENOTSOCK maps to ENOTSOCK */
/* WSAEDESTADDRREQ maps to EDESTADDRREQ */
/* WSAEMSGSIZE maps to EMSGSIZE */
/* WSAEPROTOTYPE maps to EPROTOTYPE */
/* WSAENOPROTOOPT maps to ENOPROTOOPT */
/* WSAEPROTONOSUPPORT maps to EPROTONOSUPPORT */
/* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
/* WSAEOPNOTSUPP maps to EOPNOTSUPP */
/* WSAEPFNOSUPPORT is EPFNOSUPPORT */
/* WSAEAFNOSUPPORT maps to EAFNOSUPPORT */
/* WSAEADDRINUSE maps to EADDRINUSE */
/* WSAEADDRNOTAVAIL maps to EADDRNOTAVAIL */
/* WSAENETDOWN maps to ENETDOWN */
/* WSAENETUNREACH maps to ENETUNREACH */
/* WSAENETRESET maps to ENETRESET */
/* WSAECONNABORTED maps to ECONNABORTED */
/* WSAECONNRESET maps to ECONNRESET */
/* WSAENOBUFS maps to ENOBUFS */
/* WSAEISCONN maps to EISCONN */
/* WSAENOTCONN maps to ENOTCONN */
/* WSAESHUTDOWN is ESHUTDOWN */
/* WSAETOOMANYREFS is ETOOMANYREFS */
/* WSAETIMEDOUT maps to ETIMEDOUT */
/* WSAECONNREFUSED maps to ECONNREFUSED */
/* WSAELOOP maps to ELOOP */
/* WSAENAMETOOLONG maps to ENAMETOOLONG */
/* WSAEHOSTDOWN is EHOSTDOWN */
/* WSAEHOSTUNREACH maps to EHOSTUNREACH */
/* WSAENOTEMPTY maps to ENOTEMPTY */
/* WSAEPROCLIM is EPROCLIM */
/* WSAEUSERS is EUSERS */
/* WSAEDQUOT is EDQUOT */
/* WSAESTALE is ESTALE */
/* WSAEREMOTE is EREMOTE */
case WSASYSNOTREADY:
return "Network subsystem is unavailable";
case WSAVERNOTSUPPORTED:
return "Winsock.dll version out of range";
case WSANOTINITIALISED:
return "Successful WSAStartup not yet performed";
case WSAEDISCON:
return "Graceful shutdown in progress";
case WSAENOMORE: case WSA_E_NO_MORE:
return "No more results";
case WSAECANCELLED: case WSA_E_CANCELLED:
return "Call was canceled";
case WSAEINVALIDPROCTABLE:
return "Procedure call table is invalid";
case WSAEINVALIDPROVIDER:
return "Service provider is invalid";
case WSAEPROVIDERFAILEDINIT:
return "Service provider failed to initialize";
case WSASYSCALLFAILURE:
return "System call failure";
case WSASERVICE_NOT_FOUND:
return "Service not found";
case WSATYPE_NOT_FOUND:
return "Class type not found";
case WSAEREFUSED:
return "Database query was refused";
case WSAHOST_NOT_FOUND:
return "Host not found";
case WSATRY_AGAIN:
return "Nonauthoritative host not found";
case WSANO_RECOVERY:
return "Nonrecoverable error";
case WSANO_DATA:
return "Valid name, no data record of requested type";
/* WSA_QOS_* omitted */
# endif
#endif
#if GNULIB_defined_ENOMSG
case ENOMSG:
return "No message of desired type";
#endif
#if GNULIB_defined_EIDRM
case EIDRM:
return "Identifier removed";
#endif
#if GNULIB_defined_ENOLINK
case ENOLINK:
return "Link has been severed";
#endif
#if GNULIB_defined_EPROTO
case EPROTO:
return "Protocol error";
#endif
#if GNULIB_defined_EMULTIHOP
case EMULTIHOP:
return "Multihop attempted";
#endif
#if GNULIB_defined_EBADMSG
case EBADMSG:
return "Bad message";
#endif
#if GNULIB_defined_EOVERFLOW
case EOVERFLOW:
return "Value too large for defined data type";
#endif
#if GNULIB_defined_ENOTSUP
case ENOTSUP:
return "Not supported";
#endif
#if GNULIB_defined_ENETRESET
case ENETRESET:
return "Network dropped connection on reset";
#endif
#if GNULIB_defined_ECONNABORTED
case ECONNABORTED:
return "Software caused connection abort";
#endif
#if GNULIB_defined_ESTALE
case ESTALE:
return "Stale NFS file handle";
#endif
#if GNULIB_defined_EDQUOT
case EDQUOT:
return "Disk quota exceeded";
#endif
#if GNULIB_defined_ECANCELED
case ECANCELED:
return "Operation canceled";
#endif
default:
return NULL;
}
}
gss-1.0.2/src/gl/msvc-nothrow.c 0000644 0000000 0000000 00000002527 11662447025 013215 0000000 0000000 /* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
Copyright (C) 2011 Free Software Foundation, Inc.
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, 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. */
#include
/* Specification. */
#include "msvc-nothrow.h"
/* Get declarations of the Win32 API functions. */
#define WIN32_LEAN_AND_MEAN
#include
#include "msvc-inval.h"
#undef _get_osfhandle
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
intptr_t
_gl_nothrow_get_osfhandle (int fd)
{
intptr_t result;
TRY_MSVC_INVAL
{
result = _get_osfhandle (fd);
}
CATCH_MSVC_INVAL
{
result = (intptr_t) INVALID_HANDLE_VALUE;
}
DONE_MSVC_INVAL;
return result;
}
#endif
gss-1.0.2/src/gl/intprops.h 0000644 0000000 0000000 00000035006 11662447025 012430 0000000 0000000 /* intprops.h -- properties of integer types
Copyright (C) 2001-2005, 2009-2011 Free Software Foundation, Inc.
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 . */
/* Written by Paul Eggert. */
#ifndef _GL_INTPROPS_H
#define _GL_INTPROPS_H
#include
/* Return an integer value, converted to the same type as the integer
expression E after integer type promotion. V is the unconverted value. */
#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
. */
#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
/* The extra casts in the following macros work around compiler bugs,
e.g., in Cray C 5.0.3.0. */
/* True if the arithmetic type T is an integer type. bool counts as
an integer. */
#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
/* True if negative values of the signed integer type T use two's
complement, ones' complement, or signed magnitude representation,
respectively. Much GNU code assumes two's complement, but some
people like to be portable to all possible C hosts. */
#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
/* True if the signed integer expression E uses two's complement. */
#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
/* True if the arithmetic type T is signed. */
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
/* Return 1 if the integer expression E, after integer promotion, has
a signed type. */
#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
/* Minimum and maximum values for integer types and expressions. These
macros have undefined behavior if T is signed and has padding bits.
If this is a problem for you, please let us know how to fix it for
your host. */
/* The maximum and minimum values for the integer type T. */
#define TYPE_MINIMUM(t) \
((t) (! TYPE_SIGNED (t) \
? (t) 0 \
: TYPE_SIGNED_MAGNITUDE (t) \
? ~ (t) 0 \
: ~ TYPE_MAXIMUM (t)))
#define TYPE_MAXIMUM(t) \
((t) (! TYPE_SIGNED (t) \
? (t) -1 \
: ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
/* The maximum and minimum values for the type of the expression E,
after integer promotion. E should not have side effects. */
#define _GL_INT_MINIMUM(e) \
(_GL_INT_SIGNED (e) \
? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \
: _GL_INT_CONVERT (e, 0))
#define _GL_INT_MAXIMUM(e) \
(_GL_INT_SIGNED (e) \
? _GL_SIGNED_INT_MAXIMUM (e) \
: _GL_INT_NEGATE_CONVERT (e, 1))
#define _GL_SIGNED_INT_MAXIMUM(e) \
(((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
/* Return 1 if the __typeof__ keyword works. This could be done by
'configure', but for now it's easier to do it by hand. */
#if 2 <= __GNUC__ || 0x5110 <= __SUNPRO_C
# define _GL_HAVE___TYPEOF__ 1
#else
# define _GL_HAVE___TYPEOF__ 0
#endif
/* Return 1 if the integer type or expression T might be signed. Return 0
if it is definitely unsigned. This macro does not evaluate its argument,
and expands to an integer constant expression. */
#if _GL_HAVE___TYPEOF__
# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
#else
# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
#endif
/* Bound on length of the string representing an unsigned integer
value representable in B bits. log10 (2.0) < 146/485. The
smallest value of B where this bound is not tight is 2621. */
#define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
/* Bound on length of the string representing an integer type or expression T.
Subtract 1 for the sign bit if T is signed, and then add 1 more for
a minus sign if needed.
Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is
signed, this macro may overestimate the true bound by one byte when
applied to unsigned types of size 2, 4, 16, ... bytes. */
#define INT_STRLEN_BOUND(t) \
(INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \
- _GL_SIGNED_TYPE_OR_EXPR (t)) \
+ _GL_SIGNED_TYPE_OR_EXPR (t))
/* Bound on buffer size needed to represent an integer type or expression T,
including the terminating null. */
#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
/* Range overflow checks.
The INT__RANGE_OVERFLOW macros return 1 if the corresponding C
operators might not yield numerically correct answers due to
arithmetic overflow. They do not rely on undefined or
implementation-defined behavior. Their implementations are simple
and straightforward, but they are a bit harder to use than the
INT__OVERFLOW macros described below.
Example usage:
long int i = ...;
long int j = ...;
if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX))
printf ("multiply would overflow");
else
printf ("product is %ld", i * j);
Restrictions on *_RANGE_OVERFLOW macros:
These macros do not check for all possible numerical problems or
undefined or unspecified behavior: they do not check for division
by zero, for bad shift counts, or for shifting negative numbers.
These macros may evaluate their arguments zero or multiple times,
so the arguments should not have side effects. The arithmetic
arguments (including the MIN and MAX arguments) must be of the same
integer type after the usual arithmetic conversions, and the type
must have minimum value MIN and maximum MAX. Unsigned types should
use a zero MIN of the proper type.
These macros are tuned for constant MIN and MAX. For commutative
operations such as A + B, they are also tuned for constant B. */
/* Return 1 if A + B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. */
#define INT_ADD_RANGE_OVERFLOW(a, b, min, max) \
((b) < 0 \
? (a) < (min) - (b) \
: (max) - (b) < (a))
/* Return 1 if A - B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. */
#define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max) \
((b) < 0 \
? (max) + (b) < (a) \
: (a) < (min) + (b))
/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
See above for restrictions. */
#define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \
((min) < 0 \
? (a) < - (max) \
: 0 < (a))
/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. Avoid && and || as they tickle
bugs in Sun C 5.11 2010/08/13 and other compilers; see
. */
#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \
((b) < 0 \
? ((a) < 0 \
? (a) < (max) / (b) \
: (b) == -1 \
? 0 \
: (min) / (b) < (a)) \
: (b) == 0 \
? 0 \
: ((a) < 0 \
? (a) < (min) / (b) \
: (max) / (b) < (a)))
/* Return 1 if A / B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. Do not check for division by zero. */
#define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max) \
((min) < 0 && (b) == -1 && (a) < - (max))
/* Return 1 if A % B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. Do not check for division by zero.
Mathematically, % should never overflow, but on x86-like hosts
INT_MIN % -1 traps, and the C standard permits this, so treat this
as an overflow too. */
#define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max) \
INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max)
/* Return 1 if A << B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. Here, MIN and MAX are for A only, and B need
not be of the same type as the other arguments. The C standard says that
behavior is undefined for shifts unless 0 <= B < wordwidth, and that when
A is negative then A << B has undefined behavior and A >> B has
implementation-defined behavior, but do not check these other
restrictions. */
#define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max) \
((a) < 0 \
? (a) < (min) >> (b) \
: (max) >> (b) < (a))
/* The _GL*_OVERFLOW macros have the same restrictions as the
*_RANGE_OVERFLOW macros, except that they do not assume that operands
(e.g., A and B) have the same type as MIN and MAX. Instead, they assume
that the result (e.g., A + B) has that type. */
#define _GL_ADD_OVERFLOW(a, b, min, max) \
((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
: (a) < 0 ? (b) <= (a) + (b) \
: (b) < 0 ? (a) <= (a) + (b) \
: (a) + (b) < (b))
#define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \
: (a) < 0 ? 1 \
: (b) < 0 ? (a) - (b) <= (a) \
: (a) < (b))
#define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
(((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \
|| INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
#define _GL_DIVIDE_OVERFLOW(a, b, min, max) \
((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
: (a) < 0 ? (b) <= (a) + (b) - 1 \
: (b) < 0 && (a) + (b) <= (a))
#define _GL_REMAINDER_OVERFLOW(a, b, min, max) \
((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
: (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \
: (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max))
/* Return a nonzero value if A is a mathematical multiple of B, where
A is unsigned, B is negative, and MAX is the maximum value of A's
type. A's type must be the same as (A % B)'s type. Normally (A %
-B == 0) suffices, but things get tricky if -B would overflow. */
#define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max) \
(((b) < -_GL_SIGNED_INT_MAXIMUM (b) \
? (_GL_SIGNED_INT_MAXIMUM (b) == (max) \
? (a) \
: (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1)) \
: (a) % - (b)) \
== 0)
/* Integer overflow checks.
The INT__OVERFLOW macros return 1 if the corresponding C operators
might not yield numerically correct answers due to arithmetic overflow.
They work correctly on all known practical hosts, and do not rely
on undefined behavior due to signed arithmetic overflow.
Example usage:
long int i = ...;
long int j = ...;
if (INT_MULTIPLY_OVERFLOW (i, j))
printf ("multiply would overflow");
else
printf ("product is %ld", i * j);
These macros do not check for all possible numerical problems or
undefined or unspecified behavior: they do not check for division
by zero, for bad shift counts, or for shifting negative numbers.
These macros may evaluate their arguments zero or multiple times, so the
arguments should not have side effects.
These macros are tuned for their last argument being a constant.
Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
A % B, and A << B would overflow, respectively. */
#define INT_ADD_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
#define INT_SUBTRACT_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
#define INT_NEGATE_OVERFLOW(a) \
INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
#define INT_MULTIPLY_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
#define INT_DIVIDE_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW)
#define INT_REMAINDER_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW)
#define INT_LEFT_SHIFT_OVERFLOW(a, b) \
INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \
_GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
/* Return 1 if the expression A B would overflow,
where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test,
assuming MIN and MAX are the minimum and maximum for the result type.
Arguments should be free of side effects. */
#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \
op_result_overflow (a, b, \
_GL_INT_MINIMUM (0 * (b) + (a)), \
_GL_INT_MAXIMUM (0 * (b) + (a)))
#endif /* _GL_INTPROPS_H */
gss-1.0.2/src/gl/Makefile.am 0000644 0000000 0000000 00000054401 11662447025 012435 0000000 0000000 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
#
# This file 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 file 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 file. If not, see .
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --local-dir=src/gl/override --lib=libgnu --source-base=src/gl --m4-base=src/gl/m4 --doc-base=doc --tests-base=src/gl/tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=srcgl --no-vc-files error getopt-gnu progname version-etc
AUTOMAKE_OPTIONS = 1.5 gnits
SUBDIRS =
noinst_HEADERS =
noinst_LIBRARIES =
noinst_LTLIBRARIES =
EXTRA_DIST =
BUILT_SOURCES =
SUFFIXES =
MOSTLYCLEANFILES = core *.stackdump
MOSTLYCLEANDIRS =
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
EXTRA_DIST += m4/gnulib-cache.m4
AM_CPPFLAGS =
AM_CFLAGS =
noinst_LTLIBRARIES += libgnu.la
libgnu_la_SOURCES =
libgnu_la_LIBADD = $(srcgl_LTLIBOBJS)
libgnu_la_DEPENDENCIES = $(srcgl_LTLIBOBJS)
EXTRA_libgnu_la_SOURCES =
libgnu_la_LDFLAGS = $(AM_LDFLAGS)
libgnu_la_LDFLAGS += -no-undefined
libgnu_la_LDFLAGS += $(LTLIBINTL)
## begin gnulib module errno
BUILT_SOURCES += $(ERRNO_H)
# We need the following in order to create when the system
# doesn't have one that is POSIX compliant.
if GL_GENERATE_ERRNO_H
errno.h: errno.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
-e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
-e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
-e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
-e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
-e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
-e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
< $(srcdir)/errno.in.h; \
} > $@-t && \
mv $@-t $@
else
errno.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += errno.h errno.h-t
EXTRA_DIST += errno.in.h
## end gnulib module errno
## begin gnulib module error
EXTRA_DIST += error.c error.h
EXTRA_libgnu_la_SOURCES += error.c
## end gnulib module error
## begin gnulib module getopt-posix
BUILT_SOURCES += $(GETOPT_H)
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
-e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/getopt.in.h; \
} > $@-t && \
mv -f $@-t $@
MOSTLYCLEANFILES += getopt.h getopt.h-t
EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h
EXTRA_libgnu_la_SOURCES += getopt.c getopt1.c
## end gnulib module getopt-posix
## begin gnulib module gettext-h
libgnu_la_SOURCES += gettext.h
## end gnulib module gettext-h
## begin gnulib module intprops
EXTRA_DIST += intprops.h
## end gnulib module intprops
## begin gnulib module msvc-inval
EXTRA_DIST += msvc-inval.c msvc-inval.h
EXTRA_libgnu_la_SOURCES += msvc-inval.c
## end gnulib module msvc-inval
## begin gnulib module msvc-nothrow
EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h
EXTRA_libgnu_la_SOURCES += msvc-nothrow.c
## end gnulib module msvc-nothrow
## begin gnulib module progname
libgnu_la_SOURCES += progname.h progname.c
## end gnulib module progname
## begin gnulib module snippet/arg-nonnull
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
BUILT_SOURCES += arg-nonnull.h
# The arg-nonnull.h that gets inserted into generated .h files is the same as
# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
# off.
arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/GL_ARG_NONNULL/,$$p' \
< $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
ARG_NONNULL_H=arg-nonnull.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
## end gnulib module snippet/arg-nonnull
## begin gnulib module snippet/c++defs
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
BUILT_SOURCES += c++defs.h
# The c++defs.h that gets inserted into generated .h files is the same as
# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/_GL_CXXDEFS/,$$p' \
< $(top_srcdir)/build-aux/snippet/c++defs.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += c++defs.h c++defs.h-t
CXXDEFS_H=c++defs.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
## end gnulib module snippet/c++defs
## begin gnulib module snippet/warn-on-use
BUILT_SOURCES += warn-on-use.h
# The warn-on-use.h that gets inserted into generated .h files is the same as
# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
# off.
warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/^.ifndef/,$$p' \
< $(top_srcdir)/build-aux/snippet/warn-on-use.h \
> $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
WARN_ON_USE_H=warn-on-use.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
## end gnulib module snippet/warn-on-use
## begin gnulib module stdarg
BUILT_SOURCES += $(STDARG_H)
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_STDARG_H
stdarg.h: stdarg.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
< $(srcdir)/stdarg.in.h; \
} > $@-t && \
mv $@-t $@
else
stdarg.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += stdarg.h stdarg.h-t
EXTRA_DIST += stdarg.in.h
## end gnulib module stdarg
## begin gnulib module stddef
BUILT_SOURCES += $(STDDEF_H)
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_STDDEF_H
stddef.h: stddef.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
-e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
-e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
< $(srcdir)/stddef.in.h; \
} > $@-t && \
mv $@-t $@
else
stddef.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += stddef.h stddef.h-t
EXTRA_DIST += stddef.in.h
## end gnulib module stddef
## begin gnulib module strerror
EXTRA_DIST += strerror.c
EXTRA_libgnu_la_SOURCES += strerror.c
## end gnulib module strerror
## begin gnulib module strerror-override
EXTRA_DIST += strerror-override.c strerror-override.h
EXTRA_libgnu_la_SOURCES += strerror-override.c
## end gnulib module strerror-override
## begin gnulib module string
BUILT_SOURCES += string.h
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
-e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
-e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
-e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
-e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
-e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
-e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
-e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
-e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
-e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
-e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
-e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
-e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
-e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
-e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
-e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
-e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
-e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
-e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
-e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
-e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
-e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
-e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
-e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
-e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
-e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
-e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
-e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
-e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
-e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
-e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
-e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
-e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
-e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
-e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
< $(srcdir)/string.in.h | \
sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
-e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
-e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
-e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
-e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
-e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
-e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
-e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
-e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
< $(srcdir)/string.in.h; \
} > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += string.h string.h-t
EXTRA_DIST += string.in.h
## end gnulib module string
## begin gnulib module unistd
BUILT_SOURCES += unistd.h
# We need the following in order to create an empty placeholder for
# when the system doesn't have one.
unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
-e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
-e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
-e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
-e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
-e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
-e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
-e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
-e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
-e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
-e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
-e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
-e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
-e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
-e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
-e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
-e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
-e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
-e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
-e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
-e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
-e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
-e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
-e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
-e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
-e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
-e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
-e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
-e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
-e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
-e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
-e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
-e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
-e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
-e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
-e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
-e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
-e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
-e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
-e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
-e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
-e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
-e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \
-e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
-e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
-e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
-e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
-e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
-e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
< $(srcdir)/unistd.in.h | \
sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
-e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
-e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
-e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
-e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
-e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
-e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
-e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
-e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
-e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
-e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
-e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
-e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \
-e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
-e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
-e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
-e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
-e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
-e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
-e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
-e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
-e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
-e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
-e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
-e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
-e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
-e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
-e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
-e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
| \
sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
-e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
-e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
-e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
-e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
-e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
-e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
-e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
-e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
-e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
-e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
-e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
-e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += unistd.h unistd.h-t
EXTRA_DIST += unistd.in.h
## end gnulib module unistd
## begin gnulib module verify
EXTRA_DIST += verify.h
## end gnulib module verify
## begin gnulib module version-etc
libgnu_la_SOURCES += version-etc.h version-etc.c
## end gnulib module version-etc
mostlyclean-local: mostlyclean-generic
@for dir in '' $(MOSTLYCLEANDIRS); do \
if test -n "$$dir" && test -d $$dir; then \
echo "rmdir $$dir"; rmdir $$dir; \
fi; \
done; \
:
gss-1.0.2/src/gl/unistd.in.h 0000644 0000000 0000000 00000141532 11662447025 012467 0000000 0000000 /* Substitute for and wrapper around .
Copyright (C) 2003-2011 Free Software Foundation, Inc.
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, 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. */
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* Special invocation convention:
- On mingw, several headers, including , include ,
but we need to ensure that both the system and
are completely included before we replace gethostname. */
#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
&& !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H
/* is being indirectly included for the first time from
; avoid declaring any overrides. */
# if @HAVE_UNISTD_H@
# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
# else
# error unexpected; report this to bug-gnulib@gnu.org
# endif
# define _GL_WINSOCK2_H_WITNESS
/* Normal invocation. */
#elif !defined _@GUARD_PREFIX@_UNISTD_H
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_UNISTD_H@
# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
#endif
/* Get all possible declarations of gethostname(). */
#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
&& !defined _GL_INCLUDING_WINSOCK2_H
# define _GL_INCLUDING_WINSOCK2_H
# include
# undef _GL_INCLUDING_WINSOCK2_H
#endif
#if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
#define _@GUARD_PREFIX@_UNISTD_H
/* NetBSD 5.0 mis-defines NULL. Also get size_t. */
#include
/* mingw doesn't define the SEEK_* or *_FILENO macros in . */
/* Cygwin 1.7.1 declares symlinkat in , not in . */
/* But avoid namespace pollution on glibc systems. */
#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
|| ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
&& defined __CYGWIN__)) \
&& ! defined __GLIBC__
# include
#endif
/* Cygwin 1.7.1 declares unlinkat in , not in . */
/* But avoid namespace pollution on glibc systems. */
#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \
&& ! defined __GLIBC__
# include
#endif
/* mingw fails to declare _exit in . */
/* mingw, MSVC, BeOS, Haiku declare environ in , not in
. */
/* Solaris declares getcwd not only in but also in . */
/* But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
# include
#endif
/* Native Windows platforms declare chdir, getcwd, rmdir in
and/or , not in . */
#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \
|| defined GNULIB_POSIXCHECK) \
&& ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
# include /* mingw32, mingw64 */
# include /* mingw64, MSVC 9 */
#endif
/* AIX and OSF/1 5.1 declare getdomainname in , not in .
NonStop Kernel declares gethostname in , not in . */
/* But avoid namespace pollution on glibc systems. */
#if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \
|| (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \
&& !defined __GLIBC__
# include
#endif
/* MSVC defines off_t in . */
#if !@HAVE_UNISTD_H@
/* Get off_t. */
# include
#endif
#if (@GNULIB_READ@ || @GNULIB_WRITE@ \
|| @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
|| @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
/* Get ssize_t. */
# include
#endif
/* Get getopt(), optarg, optind, opterr, optopt.
But avoid namespace pollution on glibc systems. */
#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
# include
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Hide some function declarations from . */
#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@
# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef socket
# define socket socket_used_without_including_sys_socket_h
# undef connect
# define connect connect_used_without_including_sys_socket_h
# undef accept
# define accept accept_used_without_including_sys_socket_h
# undef bind
# define bind bind_used_without_including_sys_socket_h
# undef getpeername
# define getpeername getpeername_used_without_including_sys_socket_h
# undef getsockname
# define getsockname getsockname_used_without_including_sys_socket_h
# undef getsockopt
# define getsockopt getsockopt_used_without_including_sys_socket_h
# undef listen
# define listen listen_used_without_including_sys_socket_h
# undef recv
# define recv recv_used_without_including_sys_socket_h
# undef send
# define send send_used_without_including_sys_socket_h
# undef recvfrom
# define recvfrom recvfrom_used_without_including_sys_socket_h
# undef sendto
# define sendto sendto_used_without_including_sys_socket_h
# undef setsockopt
# define setsockopt setsockopt_used_without_including_sys_socket_h
# undef shutdown
# define shutdown shutdown_used_without_including_sys_socket_h
# else
_GL_WARN_ON_USE (socket,
"socket() used without including ");
_GL_WARN_ON_USE (connect,
"connect() used without including ");
_GL_WARN_ON_USE (accept,
"accept() used without including ");
_GL_WARN_ON_USE (bind,
"bind() used without including ");
_GL_WARN_ON_USE (getpeername,
"getpeername() used without including ");
_GL_WARN_ON_USE (getsockname,
"getsockname() used without including ");
_GL_WARN_ON_USE (getsockopt,
"getsockopt() used without including ");
_GL_WARN_ON_USE (listen,
"listen() used without including ");
_GL_WARN_ON_USE (recv,
"recv() used without including ");
_GL_WARN_ON_USE (send,
"send() used without including ");
_GL_WARN_ON_USE (recvfrom,
"recvfrom() used without including ");
_GL_WARN_ON_USE (sendto,
"sendto() used without including ");
_GL_WARN_ON_USE (setsockopt,
"setsockopt() used without including ");
_GL_WARN_ON_USE (shutdown,
"shutdown() used without including ");
# endif
# endif
# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef select
# define select select_used_without_including_sys_select_h
# else
_GL_WARN_ON_USE (select,
"select() used without including ");
# endif
# endif
#endif
/* OS/2 EMX lacks these macros. */
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
#endif
#ifndef STDOUT_FILENO
# define STDOUT_FILENO 1
#endif
#ifndef STDERR_FILENO
# define STDERR_FILENO 2
#endif
/* Ensure *_OK macros exist. */
#ifndef F_OK
# define F_OK 0
# define X_OK 1
# define W_OK 2
# define R_OK 4
#endif
/* Declare overridden functions. */
#if defined GNULIB_POSIXCHECK
/* The access() function is a security risk. */
_GL_WARN_ON_USE (access, "the access function is a security risk - "
"use the gnulib module faccessat instead");
#endif
#if @GNULIB_CHDIR@
_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
_GL_CXXALIASWARN (chdir);
#elif defined GNULIB_POSIXCHECK
# undef chdir
# if HAVE_RAW_DECL_CHDIR
_GL_WARN_ON_USE (chown, "chdir is not always in - "
"use gnulib module chdir for portability");
# endif
#endif
#if @GNULIB_CHOWN@
/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
to GID (if GID is not -1). Follow symbolic links.
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2008 specification
. */
# if @REPLACE_DUP2@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define dup2 rpl_dup2
# endif
_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd));
_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd));
# else
# if !@HAVE_DUP2@
_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd));
# endif
_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
# endif
_GL_CXXALIASWARN (dup2);
#elif defined GNULIB_POSIXCHECK
# undef dup2
# if HAVE_RAW_DECL_DUP2
_GL_WARN_ON_USE (dup2, "dup2 is unportable - "
"use gnulib module dup2 for portability");
# endif
#endif
#if @GNULIB_DUP3@
/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the
specified flags.
The flags are a bitmask, possibly including O_CLOEXEC (defined in )
and O_TEXT, O_BINARY (defined in "binary-io.h").
Close NEWFD first if it is open.
Return newfd if successful, otherwise -1 and errno set.
See the Linux man page at
. */
# if @HAVE_DUP3@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define dup3 rpl_dup3
# endif
_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags));
_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags));
# else
_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags));
_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags));
# endif
_GL_CXXALIASWARN (dup3);
#elif defined GNULIB_POSIXCHECK
# undef dup3
# if HAVE_RAW_DECL_DUP3
_GL_WARN_ON_USE (dup3, "dup3 is unportable - "
"use gnulib module dup3 for portability");
# endif
#endif
#if @GNULIB_ENVIRON@
# if !@HAVE_DECL_ENVIRON@
/* Set of environment variables and values. An array of strings of the form
"VARIABLE=VALUE", terminated with a NULL. */
# if defined __APPLE__ && defined __MACH__
# include
# define environ (*_NSGetEnviron ())
# else
# ifdef __cplusplus
extern "C" {
# endif
extern char **environ;
# ifdef __cplusplus
}
# endif
# endif
# endif
#elif defined GNULIB_POSIXCHECK
# if HAVE_RAW_DECL_ENVIRON
static inline char ***
rpl_environ (void)
{
return &environ;
}
_GL_WARN_ON_USE (rpl_environ, "environ is unportable - "
"use gnulib module environ for portability");
# undef environ
# define environ (*rpl_environ ())
# endif
#endif
#if @GNULIB_EUIDACCESS@
/* Like access(), except that it uses the effective user id and group id of
the current process. */
# if !@HAVE_EUIDACCESS@
_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode)
_GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode));
_GL_CXXALIASWARN (euidaccess);
# if defined GNULIB_POSIXCHECK
/* Like access(), this function is a security risk. */
_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - "
"use the gnulib module faccessat instead");
# endif
#elif defined GNULIB_POSIXCHECK
# undef euidaccess
# if HAVE_RAW_DECL_EUIDACCESS
_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
"use gnulib module euidaccess for portability");
# endif
#endif
#if @GNULIB_FACCESSAT@
# if !@HAVE_FACCESSAT@
_GL_FUNCDECL_SYS (faccessat, int,
(int fd, char const *file, int mode, int flag)
_GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (faccessat, int,
(int fd, char const *file, int mode, int flag));
_GL_CXXALIASWARN (faccessat);
#elif defined GNULIB_POSIXCHECK
# undef faccessat
# if HAVE_RAW_DECL_FACCESSAT
_GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
"use gnulib module faccessat for portability");
# endif
#endif
#if @GNULIB_FCHDIR@
/* Change the process' current working directory to the directory on which
the given file descriptor is open.
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2008 specification
. */
# if ! @HAVE_FCHDIR@
_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
/* Gnulib internal hooks needed to maintain the fchdir metadata. */
_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename)
_GL_ARG_NONNULL ((2));
_GL_EXTERN_C void _gl_unregister_fd (int fd);
_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd);
_GL_EXTERN_C const char *_gl_directory_name (int fd);
# else
# if !@HAVE_DECL_FCHDIR@
_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
# endif
# endif
_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/));
_GL_CXXALIASWARN (fchdir);
#elif defined GNULIB_POSIXCHECK
# undef fchdir
# if HAVE_RAW_DECL_FCHDIR
_GL_WARN_ON_USE (fchdir, "fchdir is unportable - "
"use gnulib module fchdir for portability");
# endif
#endif
#if @GNULIB_FCHOWNAT@
# if @REPLACE_FCHOWNAT@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef fchownat
# define fchownat rpl_fchownat
# endif
_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file,
uid_t owner, gid_t group, int flag)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file,
uid_t owner, gid_t group, int flag));
# else
# if !@HAVE_FCHOWNAT@
_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file,
uid_t owner, gid_t group, int flag)
_GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file,
uid_t owner, gid_t group, int flag));
# endif
_GL_CXXALIASWARN (fchownat);
#elif defined GNULIB_POSIXCHECK
# undef fchownat
# if HAVE_RAW_DECL_FCHOWNAT
_GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
"use gnulib module openat for portability");
# endif
#endif
#if @GNULIB_FDATASYNC@
/* Synchronize changes to a file.
Return 0 if successful, otherwise -1 and errno set.
See POSIX:2008 specification
. */
# if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@
_GL_FUNCDECL_SYS (fdatasync, int, (int fd));
# endif
_GL_CXXALIAS_SYS (fdatasync, int, (int fd));
_GL_CXXALIASWARN (fdatasync);
#elif defined GNULIB_POSIXCHECK
# undef fdatasync
# if HAVE_RAW_DECL_FDATASYNC
_GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - "
"use gnulib module fdatasync for portability");
# endif
#endif
#if @GNULIB_FSYNC@
/* Synchronize changes, including metadata, to a file.
Return 0 if successful, otherwise -1 and errno set.
See POSIX:2008 specification
. */
# if !@HAVE_FSYNC@
_GL_FUNCDECL_SYS (fsync, int, (int fd));
# endif
_GL_CXXALIAS_SYS (fsync, int, (int fd));
_GL_CXXALIASWARN (fsync);
#elif defined GNULIB_POSIXCHECK
# undef fsync
# if HAVE_RAW_DECL_FSYNC
_GL_WARN_ON_USE (fsync, "fsync is unportable - "
"use gnulib module fsync for portability");
# endif
#endif
#if @GNULIB_FTRUNCATE@
/* Change the size of the file to which FD is opened to become equal to LENGTH.
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2008 specification
. */
# if !@HAVE_FTRUNCATE@
_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
# endif
_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
_GL_CXXALIASWARN (ftruncate);
#elif defined GNULIB_POSIXCHECK
# undef ftruncate
# if HAVE_RAW_DECL_FTRUNCATE
_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
"use gnulib module ftruncate for portability");
# endif
#endif
#if @GNULIB_GETCWD@
/* Get the name of the current working directory, and put it in SIZE bytes
of BUF.
Return BUF if successful, or NULL if the directory couldn't be determined
or SIZE was too small.
See the POSIX:2008 specification
.
Additionally, the gnulib module 'getcwd' guarantees the following GNU
extension: If BUF is NULL, an array is allocated with 'malloc'; the array
is SIZE bytes long, unless SIZE == 0, in which case it is as big as
necessary. */
# if @REPLACE_GETCWD@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define getcwd rpl_getcwd
# endif
_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size));
_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size));
# else
/* Need to cast, because on mingw, the second parameter is
int size. */
_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size));
# endif
_GL_CXXALIASWARN (getcwd);
#elif defined GNULIB_POSIXCHECK
# undef getcwd
# if HAVE_RAW_DECL_GETCWD
_GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
"use gnulib module getcwd for portability");
# endif
#endif
#if @GNULIB_GETDOMAINNAME@
/* Return the NIS domain name of the machine.
WARNING! The NIS domain name is unrelated to the fully qualified host name
of the machine. It is also unrelated to email addresses.
WARNING! The NIS domain name is usually the empty string or "(none)" when
not using NIS.
Put up to LEN bytes of the NIS domain name into NAME.
Null terminate it if the name is shorter than LEN.
If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
Return 0 if successful, otherwise set errno and return -1. */
# if @REPLACE_GETDOMAINNAME@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef getdomainname
# define getdomainname rpl_getdomainname
# endif
_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len));
# else
# if !@HAVE_DECL_GETDOMAINNAME@
_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len)
_GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len));
# endif
_GL_CXXALIASWARN (getdomainname);
#elif defined GNULIB_POSIXCHECK
# undef getdomainname
# if HAVE_RAW_DECL_GETDOMAINNAME
_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - "
"use gnulib module getdomainname for portability");
# endif
#endif
#if @GNULIB_GETDTABLESIZE@
/* Return the maximum number of file descriptors in the current process.
In POSIX, this is same as sysconf (_SC_OPEN_MAX). */
# if !@HAVE_GETDTABLESIZE@
_GL_FUNCDECL_SYS (getdtablesize, int, (void));
# endif
_GL_CXXALIAS_SYS (getdtablesize, int, (void));
_GL_CXXALIASWARN (getdtablesize);
#elif defined GNULIB_POSIXCHECK
# undef getdtablesize
# if HAVE_RAW_DECL_GETDTABLESIZE
_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
"use gnulib module getdtablesize for portability");
# endif
#endif
#if @GNULIB_GETGROUPS@
/* Return the supplemental groups that the current process belongs to.
It is unspecified whether the effective group id is in the list.
If N is 0, return the group count; otherwise, N describes how many
entries are available in GROUPS. Return -1 and set errno if N is
not 0 and not large enough. Fails with ENOSYS on some systems. */
# if @REPLACE_GETGROUPS@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef getgroups
# define getgroups rpl_getgroups
# endif
_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups));
_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups));
# else
# if !@HAVE_GETGROUPS@
_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups));
# endif
_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups));
# endif
_GL_CXXALIASWARN (getgroups);
#elif defined GNULIB_POSIXCHECK
# undef getgroups
# if HAVE_RAW_DECL_GETGROUPS
_GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
"use gnulib module getgroups for portability");
# endif
#endif
#if @GNULIB_GETHOSTNAME@
/* Return the standard host name of the machine.
WARNING! The host name may or may not be fully qualified.
Put up to LEN bytes of the host name into NAME.
Null terminate it if the name is shorter than LEN.
If the host name is longer than LEN, set errno = EINVAL and return -1.
Return 0 if successful, otherwise set errno and return -1. */
# if @UNISTD_H_HAVE_WINSOCK2_H@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef gethostname
# define gethostname rpl_gethostname
# endif
_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len));
# else
# if !@HAVE_GETHOSTNAME@
_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len)
_GL_ARG_NONNULL ((1)));
# endif
/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second
parameter is
int len. */
_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len));
# endif
_GL_CXXALIASWARN (gethostname);
#elif @UNISTD_H_HAVE_WINSOCK2_H@
# undef gethostname
# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
#elif defined GNULIB_POSIXCHECK
# undef gethostname
# if HAVE_RAW_DECL_GETHOSTNAME
_GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
"use gnulib module gethostname for portability");
# endif
#endif
#if @GNULIB_GETLOGIN@
/* Returns the user's login name, or NULL if it cannot be found. Upon error,
returns NULL with errno set.
See .
Most programs don't need to use this function, because the information is
available through environment variables:
${LOGNAME-$USER} on Unix platforms,
$USERNAME on native Windows platforms.
*/
# if !@HAVE_GETLOGIN@
_GL_FUNCDECL_SYS (getlogin, char *, (void));
# endif
_GL_CXXALIAS_SYS (getlogin, char *, (void));
_GL_CXXALIASWARN (getlogin);
#elif defined GNULIB_POSIXCHECK
# undef getlogin
# if HAVE_RAW_DECL_GETLOGIN
_GL_WARN_ON_USE (getlogin, "getlogin is unportable - "
"use gnulib module getlogin for portability");
# endif
#endif
#if @GNULIB_GETLOGIN_R@
/* Copies the user's login name to NAME.
The array pointed to by NAME has room for SIZE bytes.
Returns 0 if successful. Upon error, an error number is returned, or -1 in
the case that the login name cannot be found but no specific error is
provided (this case is hopefully rare but is left open by the POSIX spec).
See .
Most programs don't need to use this function, because the information is
available through environment variables:
${LOGNAME-$USER} on Unix platforms,
$USERNAME on native Windows platforms.
*/
# if @REPLACE_GETLOGIN_R@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define getlogin_r rpl_getlogin_r
# endif
_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size));
# else
# if !@HAVE_DECL_GETLOGIN_R@
_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size)
_GL_ARG_NONNULL ((1)));
# endif
/* Need to cast, because on Solaris 10 systems, the second argument is
int size. */
_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size));
# endif
_GL_CXXALIASWARN (getlogin_r);
#elif defined GNULIB_POSIXCHECK
# undef getlogin_r
# if HAVE_RAW_DECL_GETLOGIN_R
_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - "
"use gnulib module getlogin_r for portability");
# endif
#endif
#if @GNULIB_GETPAGESIZE@
# if @REPLACE_GETPAGESIZE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define getpagesize rpl_getpagesize
# endif
_GL_FUNCDECL_RPL (getpagesize, int, (void));
_GL_CXXALIAS_RPL (getpagesize, int, (void));
# else
# if !@HAVE_GETPAGESIZE@
# if !defined getpagesize
/* This is for POSIX systems. */
# if !defined _gl_getpagesize && defined _SC_PAGESIZE
# if ! (defined __VMS && __VMS_VER < 70000000)
# define _gl_getpagesize() sysconf (_SC_PAGESIZE)
# endif
# endif
/* This is for older VMS. */
# if !defined _gl_getpagesize && defined __VMS
# ifdef __ALPHA
# define _gl_getpagesize() 8192
# else
# define _gl_getpagesize() 512
# endif
# endif
/* This is for BeOS. */
# if !defined _gl_getpagesize && @HAVE_OS_H@
# include
# if defined B_PAGE_SIZE
# define _gl_getpagesize() B_PAGE_SIZE
# endif
# endif
/* This is for AmigaOS4.0. */
# if !defined _gl_getpagesize && defined __amigaos4__
# define _gl_getpagesize() 2048
# endif
/* This is for older Unix systems. */
# if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@
# include
# ifdef EXEC_PAGESIZE
# define _gl_getpagesize() EXEC_PAGESIZE
# else
# ifdef NBPG
# ifndef CLSIZE
# define CLSIZE 1
# endif
# define _gl_getpagesize() (NBPG * CLSIZE)
# else
# ifdef NBPC
# define _gl_getpagesize() NBPC
# endif
# endif
# endif
# endif
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define getpagesize() _gl_getpagesize ()
# else
# if !GNULIB_defined_getpagesize_function
static inline int
getpagesize ()
{
return _gl_getpagesize ();
}
# define GNULIB_defined_getpagesize_function 1
# endif
# endif
# endif
# endif
/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */
_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void));
# endif
# if @HAVE_DECL_GETPAGESIZE@
_GL_CXXALIASWARN (getpagesize);
# endif
#elif defined GNULIB_POSIXCHECK
# undef getpagesize
# if HAVE_RAW_DECL_GETPAGESIZE
_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
"use gnulib module getpagesize for portability");
# endif
#endif
#if @GNULIB_GETUSERSHELL@
/* Return the next valid login shell on the system, or NULL when the end of
the list has been reached. */
# if !@HAVE_DECL_GETUSERSHELL@
_GL_FUNCDECL_SYS (getusershell, char *, (void));
# endif
_GL_CXXALIAS_SYS (getusershell, char *, (void));
_GL_CXXALIASWARN (getusershell);
#elif defined GNULIB_POSIXCHECK
# undef getusershell
# if HAVE_RAW_DECL_GETUSERSHELL
_GL_WARN_ON_USE (getusershell, "getusershell is unportable - "
"use gnulib module getusershell for portability");
# endif
#endif
#if @GNULIB_GETUSERSHELL@
/* Rewind to pointer that is advanced at each getusershell() call. */
# if !@HAVE_DECL_GETUSERSHELL@
_GL_FUNCDECL_SYS (setusershell, void, (void));
# endif
_GL_CXXALIAS_SYS (setusershell, void, (void));
_GL_CXXALIASWARN (setusershell);
#elif defined GNULIB_POSIXCHECK
# undef setusershell
# if HAVE_RAW_DECL_SETUSERSHELL
_GL_WARN_ON_USE (setusershell, "setusershell is unportable - "
"use gnulib module getusershell for portability");
# endif
#endif
#if @GNULIB_GETUSERSHELL@
/* Free the pointer that is advanced at each getusershell() call and
associated resources. */
# if !@HAVE_DECL_GETUSERSHELL@
_GL_FUNCDECL_SYS (endusershell, void, (void));
# endif
_GL_CXXALIAS_SYS (endusershell, void, (void));
_GL_CXXALIASWARN (endusershell);
#elif defined GNULIB_POSIXCHECK
# undef endusershell
# if HAVE_RAW_DECL_ENDUSERSHELL
_GL_WARN_ON_USE (endusershell, "endusershell is unportable - "
"use gnulib module getusershell for portability");
# endif
#endif
#if @GNULIB_GROUP_MEMBER@
/* Determine whether group id is in calling user's group list. */
# if !@HAVE_GROUP_MEMBER@
_GL_FUNCDECL_SYS (group_member, int, (gid_t gid));
# endif
_GL_CXXALIAS_SYS (group_member, int, (gid_t gid));
_GL_CXXALIASWARN (group_member);
#elif defined GNULIB_POSIXCHECK
# undef group_member
# if HAVE_RAW_DECL_GROUP_MEMBER
_GL_WARN_ON_USE (group_member, "group_member is unportable - "
"use gnulib module group-member for portability");
# endif
#endif
#if @GNULIB_LCHOWN@
/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
to GID (if GID is not -1). Do not follow symbolic links.
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2008 specification
. */
# if @REPLACE_LCHOWN@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef lchown
# define lchown rpl_lchown
# endif
_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group));
# else
# if !@HAVE_LCHOWN@
_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)
_GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group));
# endif
_GL_CXXALIASWARN (lchown);
#elif defined GNULIB_POSIXCHECK
# undef lchown
# if HAVE_RAW_DECL_LCHOWN
_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
"use gnulib module lchown for portability");
# endif
#endif
#if @GNULIB_LINK@
/* Create a new hard link for an existing file.
Return 0 if successful, otherwise -1 and errno set.
See POSIX:2008 specification
. */
# if @REPLACE_LINK@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define link rpl_link
# endif
_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2)
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2));
# else
# if !@HAVE_LINK@
_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2)
_GL_ARG_NONNULL ((1, 2)));
# endif
_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2));
# endif
_GL_CXXALIASWARN (link);
#elif defined GNULIB_POSIXCHECK
# undef link
# if HAVE_RAW_DECL_LINK
_GL_WARN_ON_USE (link, "link is unportable - "
"use gnulib module link for portability");
# endif
#endif
#if @GNULIB_LINKAT@
/* Create a new hard link for an existing file, relative to two
directories. FLAG controls whether symlinks are followed.
Return 0 if successful, otherwise -1 and errno set. */
# if @REPLACE_LINKAT@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef linkat
# define linkat rpl_linkat
# endif
_GL_FUNCDECL_RPL (linkat, int,
(int fd1, const char *path1, int fd2, const char *path2,
int flag)
_GL_ARG_NONNULL ((2, 4)));
_GL_CXXALIAS_RPL (linkat, int,
(int fd1, const char *path1, int fd2, const char *path2,
int flag));
# else
# if !@HAVE_LINKAT@
_GL_FUNCDECL_SYS (linkat, int,
(int fd1, const char *path1, int fd2, const char *path2,
int flag)
_GL_ARG_NONNULL ((2, 4)));
# endif
_GL_CXXALIAS_SYS (linkat, int,
(int fd1, const char *path1, int fd2, const char *path2,
int flag));
# endif
_GL_CXXALIASWARN (linkat);
#elif defined GNULIB_POSIXCHECK
# undef linkat
# if HAVE_RAW_DECL_LINKAT
_GL_WARN_ON_USE (linkat, "linkat is unportable - "
"use gnulib module linkat for portability");
# endif
#endif
#if @GNULIB_LSEEK@
/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
Return the new offset if successful, otherwise -1 and errno set.
See the POSIX:2008 specification
. */
# if @REPLACE_LSEEK@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define lseek rpl_lseek
# endif
_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence));
_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence));
# else
_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
# endif
_GL_CXXALIASWARN (lseek);
#elif defined GNULIB_POSIXCHECK
# undef lseek
# if HAVE_RAW_DECL_LSEEK
_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
"systems - use gnulib module lseek for portability");
# endif
#endif
#if @GNULIB_PIPE@
/* Create a pipe, defaulting to O_BINARY mode.
Store the read-end as fd[0] and the write-end as fd[1].
Return 0 upon success, or -1 with errno set upon failure. */
# if !@HAVE_PIPE@
_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (pipe, int, (int fd[2]));
_GL_CXXALIASWARN (pipe);
#elif defined GNULIB_POSIXCHECK
# undef pipe
# if HAVE_RAW_DECL_PIPE
_GL_WARN_ON_USE (pipe, "pipe is unportable - "
"use gnulib module pipe-posix for portability");
# endif
#endif
#if @GNULIB_PIPE2@
/* Create a pipe, applying the given flags when opening the read-end of the
pipe and the write-end of the pipe.
The flags are a bitmask, possibly including O_CLOEXEC (defined in )
and O_TEXT, O_BINARY (defined in "binary-io.h").
Store the read-end as fd[0] and the write-end as fd[1].
Return 0 upon success, or -1 with errno set upon failure.
See also the Linux man page at
. */
# if @HAVE_PIPE2@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define pipe2 rpl_pipe2
# endif
_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags));
# else
_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags));
# endif
_GL_CXXALIASWARN (pipe2);
#elif defined GNULIB_POSIXCHECK
# undef pipe2
# if HAVE_RAW_DECL_PIPE2
_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
"use gnulib module pipe2 for portability");
# endif
#endif
#if @GNULIB_PREAD@
/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET.
Return the number of bytes placed into BUF if successful, otherwise
set errno and return -1. 0 indicates EOF.
See the POSIX:2008 specification
. */
# if @REPLACE_PREAD@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef pread
# define pread rpl_pread
# endif
_GL_FUNCDECL_RPL (pread, ssize_t,
(int fd, void *buf, size_t bufsize, off_t offset)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (pread, ssize_t,
(int fd, void *buf, size_t bufsize, off_t offset));
# else
# if !@HAVE_PREAD@
_GL_FUNCDECL_SYS (pread, ssize_t,
(int fd, void *buf, size_t bufsize, off_t offset)
_GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (pread, ssize_t,
(int fd, void *buf, size_t bufsize, off_t offset));
# endif
_GL_CXXALIASWARN (pread);
#elif defined GNULIB_POSIXCHECK
# undef pread
# if HAVE_RAW_DECL_PREAD
_GL_WARN_ON_USE (pread, "pread is unportable - "
"use gnulib module pread for portability");
# endif
#endif
#if @GNULIB_PWRITE@
/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET.
Return the number of bytes written if successful, otherwise
set errno and return -1. 0 indicates nothing written. See the
POSIX:2008 specification
. */
# if @REPLACE_PWRITE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef pwrite
# define pwrite rpl_pwrite
# endif
_GL_FUNCDECL_RPL (pwrite, ssize_t,
(int fd, const void *buf, size_t bufsize, off_t offset)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (pwrite, ssize_t,
(int fd, const void *buf, size_t bufsize, off_t offset));
# else
# if !@HAVE_PWRITE@
_GL_FUNCDECL_SYS (pwrite, ssize_t,
(int fd, const void *buf, size_t bufsize, off_t offset)
_GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (pwrite, ssize_t,
(int fd, const void *buf, size_t bufsize, off_t offset));
# endif
_GL_CXXALIASWARN (pwrite);
#elif defined GNULIB_POSIXCHECK
# undef pwrite
# if HAVE_RAW_DECL_PWRITE
_GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
"use gnulib module pwrite for portability");
# endif
#endif
#if @GNULIB_READ@
/* Read up to COUNT bytes from file descriptor FD into the buffer starting
at BUF. See the POSIX:2008 specification
. */
# if @REPLACE_READ@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef read
# define read rpl_read
# endif
_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count));
# else
/* Need to cast, because on mingw, the third parameter is
unsigned int count
and the return type is 'int'. */
_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count));
# endif
_GL_CXXALIASWARN (read);
#endif
#if @GNULIB_READLINK@
/* Read the contents of the symbolic link FILE and place the first BUFSIZE
bytes of it into BUF. Return the number of bytes placed into BUF if
successful, otherwise -1 and errno set.
See the POSIX:2008 specification
. */
# if @REPLACE_READLINK@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define readlink rpl_readlink
# endif
_GL_FUNCDECL_RPL (readlink, ssize_t,
(const char *file, char *buf, size_t bufsize)
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (readlink, ssize_t,
(const char *file, char *buf, size_t bufsize));
# else
# if !@HAVE_READLINK@
_GL_FUNCDECL_SYS (readlink, ssize_t,
(const char *file, char *buf, size_t bufsize)
_GL_ARG_NONNULL ((1, 2)));
# endif
_GL_CXXALIAS_SYS (readlink, ssize_t,
(const char *file, char *buf, size_t bufsize));
# endif
_GL_CXXALIASWARN (readlink);
#elif defined GNULIB_POSIXCHECK
# undef readlink
# if HAVE_RAW_DECL_READLINK
_GL_WARN_ON_USE (readlink, "readlink is unportable - "
"use gnulib module readlink for portability");
# endif
#endif
#if @GNULIB_READLINKAT@
# if !@HAVE_READLINKAT@
_GL_FUNCDECL_SYS (readlinkat, ssize_t,
(int fd, char const *file, char *buf, size_t len)
_GL_ARG_NONNULL ((2, 3)));
# endif
_GL_CXXALIAS_SYS (readlinkat, ssize_t,
(int fd, char const *file, char *buf, size_t len));
_GL_CXXALIASWARN (readlinkat);
#elif defined GNULIB_POSIXCHECK
# undef readlinkat
# if HAVE_RAW_DECL_READLINKAT
_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
"use gnulib module readlinkat for portability");
# endif
#endif
#if @GNULIB_RMDIR@
/* Remove the directory DIR. */
# if @REPLACE_RMDIR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define rmdir rpl_rmdir
# endif
_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (rmdir, int, (char const *name));
# else
_GL_CXXALIAS_SYS (rmdir, int, (char const *name));
# endif
_GL_CXXALIASWARN (rmdir);
#elif defined GNULIB_POSIXCHECK
# undef rmdir
# if HAVE_RAW_DECL_RMDIR
_GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
"use gnulib module rmdir for portability");
# endif
#endif
#if @GNULIB_SLEEP@
/* Pause the execution of the current thread for N seconds.
Returns the number of seconds left to sleep.
See the POSIX:2008 specification
. */
# if @REPLACE_SLEEP@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef sleep
# define sleep rpl_sleep
# endif
_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n));
_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n));
# else
# if !@HAVE_SLEEP@
_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n));
# endif
_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n));
# endif
_GL_CXXALIASWARN (sleep);
#elif defined GNULIB_POSIXCHECK
# undef sleep
# if HAVE_RAW_DECL_SLEEP
_GL_WARN_ON_USE (sleep, "sleep is unportable - "
"use gnulib module sleep for portability");
# endif
#endif
#if @GNULIB_SYMLINK@
# if @REPLACE_SYMLINK@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef symlink
# define symlink rpl_symlink
# endif
_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file)
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file));
# else
# if !@HAVE_SYMLINK@
_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file)
_GL_ARG_NONNULL ((1, 2)));
# endif
_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file));
# endif
_GL_CXXALIASWARN (symlink);
#elif defined GNULIB_POSIXCHECK
# undef symlink
# if HAVE_RAW_DECL_SYMLINK
_GL_WARN_ON_USE (symlink, "symlink is not portable - "
"use gnulib module symlink for portability");
# endif
#endif
#if @GNULIB_SYMLINKAT@
# if !@HAVE_SYMLINKAT@
_GL_FUNCDECL_SYS (symlinkat, int,
(char const *contents, int fd, char const *file)
_GL_ARG_NONNULL ((1, 3)));
# endif
_GL_CXXALIAS_SYS (symlinkat, int,
(char const *contents, int fd, char const *file));
_GL_CXXALIASWARN (symlinkat);
#elif defined GNULIB_POSIXCHECK
# undef symlinkat
# if HAVE_RAW_DECL_SYMLINKAT
_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
"use gnulib module symlinkat for portability");
# endif
#endif
#if @GNULIB_TTYNAME_R@
/* Store at most BUFLEN characters of the pathname of the terminal FD is
open on in BUF. Return 0 on success, otherwise an error number. */
# if @REPLACE_TTYNAME_R@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef ttyname_r
# define ttyname_r rpl_ttyname_r
# endif
_GL_FUNCDECL_RPL (ttyname_r, int,
(int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (ttyname_r, int,
(int fd, char *buf, size_t buflen));
# else
# if !@HAVE_DECL_TTYNAME_R@
_GL_FUNCDECL_SYS (ttyname_r, int,
(int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (ttyname_r, int,
(int fd, char *buf, size_t buflen));
# endif
_GL_CXXALIASWARN (ttyname_r);
#elif defined GNULIB_POSIXCHECK
# undef ttyname_r
# if HAVE_RAW_DECL_TTYNAME_R
_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - "
"use gnulib module ttyname_r for portability");
# endif
#endif
#if @GNULIB_UNLINK@
# if @REPLACE_UNLINK@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef unlink
# define unlink rpl_unlink
# endif
_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (unlink, int, (char const *file));
# else
_GL_CXXALIAS_SYS (unlink, int, (char const *file));
# endif
_GL_CXXALIASWARN (unlink);
#elif defined GNULIB_POSIXCHECK
# undef unlink
# if HAVE_RAW_DECL_UNLINK
_GL_WARN_ON_USE (unlink, "unlink is not portable - "
"use gnulib module unlink for portability");
# endif
#endif
#if @GNULIB_UNLINKAT@
# if @REPLACE_UNLINKAT@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef unlinkat
# define unlinkat rpl_unlinkat
# endif
_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag));
# else
# if !@HAVE_UNLINKAT@
_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag)
_GL_ARG_NONNULL ((2)));
# endif
_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag));
# endif
_GL_CXXALIASWARN (unlinkat);
#elif defined GNULIB_POSIXCHECK
# undef unlinkat
# if HAVE_RAW_DECL_UNLINKAT
_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
"use gnulib module openat for portability");
# endif
#endif
#if @GNULIB_USLEEP@
/* Pause the execution of the current thread for N microseconds.
Returns 0 on completion, or -1 on range error.
See the POSIX:2001 specification
. */
# if @REPLACE_USLEEP@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef usleep
# define usleep rpl_usleep
# endif
_GL_FUNCDECL_RPL (usleep, int, (useconds_t n));
_GL_CXXALIAS_RPL (usleep, int, (useconds_t n));
# else
# if !@HAVE_USLEEP@
_GL_FUNCDECL_SYS (usleep, int, (useconds_t n));
# endif
_GL_CXXALIAS_SYS (usleep, int, (useconds_t n));
# endif
_GL_CXXALIASWARN (usleep);
#elif defined GNULIB_POSIXCHECK
# undef usleep
# if HAVE_RAW_DECL_USLEEP
_GL_WARN_ON_USE (usleep, "usleep is unportable - "
"use gnulib module usleep for portability");
# endif
#endif
#if @GNULIB_WRITE@
/* Write up to COUNT bytes starting at BUF to file descriptor FD.
See the POSIX:2008 specification
. */
# if @REPLACE_WRITE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef write
# define write rpl_write
# endif
_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count));
# else
/* Need to cast, because on mingw, the third parameter is
unsigned int count
and the return type is 'int'. */
_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
# endif
_GL_CXXALIASWARN (write);
#endif
#endif /* _@GUARD_PREFIX@_UNISTD_H */
#endif /* _@GUARD_PREFIX@_UNISTD_H */
gss-1.0.2/src/gl/msvc-inval.h 0000644 0000000 0000000 00000021241 11662447025 012625 0000000 0000000 /* Invalid parameter handler for MSVC runtime libraries.
Copyright (C) 2011 Free Software Foundation, Inc.
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, 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. */
#ifndef _MSVC_INVAL_H
#define _MSVC_INVAL_H
/* With MSVC runtime libraries with the "invalid parameter handler" concept,
functions like fprintf(), dup2(), or close() crash when the caller passes
an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF)
instead.
This file defines macros that turn such an invalid parameter notification
into a non-local exit. An error code can then be produced at the target
of this exit. You can thus write code like
TRY_MSVC_INVAL
{
}
CATCH_MSVC_INVAL
{
}
DONE_MSVC_INVAL;
This entire block expands to a single statement.
The handling of invalid parameters can be done in three ways:
* The default way, which is reasonable for programs (not libraries):
AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [DEFAULT_HANDLING])
* The way for libraries that make "hairy" calls (like close(-1), or
fclose(fp) where fileno(fp) is closed, or simply getdtablesize()):
AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [HAIRY_LIBRARY_HANDLING])
* The way for libraries that make no "hairy" calls:
AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [SANE_LIBRARY_HANDLING])
*/
#define DEFAULT_HANDLING 0
#define HAIRY_LIBRARY_HANDLING 1
#define SANE_LIBRARY_HANDLING 2
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
&& !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING)
/* A native Windows platform with the "invalid parameter handler" concept,
and either DEFAULT_HANDLING or HAIRY_LIBRARY_HANDLING. */
# if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
/* Default handling. */
# ifdef __cplusplus
extern "C" {
# endif
/* Ensure that the invalid parameter handler in installed that just returns.
Because we assume no other part of the program installs a different
invalid parameter handler, this solution is multithread-safe. */
extern void gl_msvc_inval_ensure_handler (void);
# ifdef __cplusplus
}
# endif
# define TRY_MSVC_INVAL \
do \
{ \
gl_msvc_inval_ensure_handler (); \
if (1)
# define CATCH_MSVC_INVAL \
else
# define DONE_MSVC_INVAL \
} \
while (0)
# else
/* Handling for hairy libraries. */
# include
/* Gnulib can define its own status codes, as described in the page
"Raising Software Exceptions" on microsoft.com
.
Our status codes are composed of
- 0xE0000000, mandatory for all user-defined status codes,
- 0x474E550, a API identifier ("GNU"),
- 0, 1, 2, ..., used to distinguish different status codes from the
same API. */
# define STATUS_GNULIB_INVALID_PARAMETER (0xE0000000 + 0x474E550 + 0)
# if defined _MSC_VER
/* A compiler that supports __try/__except, as described in the page
"try-except statement" on microsoft.com
.
With __try/__except, we can use the multithread-safe exception handling. */
# ifdef __cplusplus
extern "C" {
# endif
/* Ensure that the invalid parameter handler in installed that raises a
software exception with code STATUS_GNULIB_INVALID_PARAMETER.
Because we assume no other part of the program installs a different
invalid parameter handler, this solution is multithread-safe. */
extern void gl_msvc_inval_ensure_handler (void);
# ifdef __cplusplus
}
# endif
# define TRY_MSVC_INVAL \
do \
{ \
gl_msvc_inval_ensure_handler (); \
__try
# define CATCH_MSVC_INVAL \
__except (GetExceptionCode () == STATUS_GNULIB_INVALID_PARAMETER \
? EXCEPTION_EXECUTE_HANDLER \
: EXCEPTION_CONTINUE_SEARCH)
# define DONE_MSVC_INVAL \
} \
while (0)
# else
/* Any compiler.
We can only use setjmp/longjmp. */
# include
# ifdef __cplusplus
extern "C" {
# endif
struct gl_msvc_inval_per_thread
{
/* The restart that will resume execution at the code between
CATCH_MSVC_INVAL and DONE_MSVC_INVAL. It is enabled only between
TRY_MSVC_INVAL and CATCH_MSVC_INVAL. */
jmp_buf restart;
/* Tells whether the contents of restart is valid. */
int restart_valid;
};
/* Ensure that the invalid parameter handler in installed that passes
control to the gl_msvc_inval_restart if it is valid, or raises a
software exception with code STATUS_GNULIB_INVALID_PARAMETER otherwise.
Because we assume no other part of the program installs a different
invalid parameter handler, this solution is multithread-safe. */
extern void gl_msvc_inval_ensure_handler (void);
/* Return a pointer to the per-thread data for the current thread. */
extern struct gl_msvc_inval_per_thread *gl_msvc_inval_current (void);
# ifdef __cplusplus
}
# endif
# define TRY_MSVC_INVAL \
do \
{ \
struct gl_msvc_inval_per_thread *msvc_inval_current; \
gl_msvc_inval_ensure_handler (); \
msvc_inval_current = gl_msvc_inval_current (); \
/* First, initialize gl_msvc_inval_restart. */ \
if (setjmp (msvc_inval_current->restart) == 0) \
{ \
/* Then, mark it as valid. */ \
msvc_inval_current->restart_valid = 1;
# define CATCH_MSVC_INVAL \
/* Execution completed. \
Mark gl_msvc_inval_restart as invalid. */ \
msvc_inval_current->restart_valid = 0; \
} \
else \
{ \
/* Execution triggered an invalid parameter notification. \
Mark gl_msvc_inval_restart as invalid. */ \
msvc_inval_current->restart_valid = 0;
# define DONE_MSVC_INVAL \
} \
} \
while (0)
# endif
# endif
#else
/* A platform that does not need to the invalid parameter handler,
or when SANE_LIBRARY_HANDLING is desired. */
/* The braces here avoid GCC warnings like
"warning: suggest explicit braces to avoid ambiguous `else'". */
# define TRY_MSVC_INVAL \
do \
{ \
if (1)
# define CATCH_MSVC_INVAL \
else
# define DONE_MSVC_INVAL \
} \
while (0)
#endif
#endif /* _MSVC_INVAL_H */
gss-1.0.2/src/gl/stdarg.in.h 0000644 0000000 0000000 00000002273 11662447025 012443 0000000 0000000 /* Substitute for and wrapper around .
Copyright (C) 2008-2011 Free Software Foundation, Inc.
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, 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. */
#ifndef _@GUARD_PREFIX@_STDARG_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STDARG_H@
#ifndef _@GUARD_PREFIX@_STDARG_H
#define _@GUARD_PREFIX@_STDARG_H
#ifndef va_copy
# define va_copy(a,b) ((a) = (b))
#endif
#endif /* _@GUARD_PREFIX@_STDARG_H */
#endif /* _@GUARD_PREFIX@_STDARG_H */
gss-1.0.2/src/gl/getopt.in.h 0000644 0000000 0000000 00000021520 11662447025 012455 0000000 0000000 /* Declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 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 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 . */
#ifndef _@GUARD_PREFIX@_GETOPT_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. We must
also inform the replacement unistd.h to not recursively use
; our definitions will be present soon enough. */
#if @HAVE_GETOPT_H@
# define _GL_SYSTEM_GETOPT
# @INCLUDE_NEXT@ @NEXT_GETOPT_H@
# undef _GL_SYSTEM_GETOPT
#endif
#ifndef _@GUARD_PREFIX@_GETOPT_H
#ifndef __need_getopt
# define _@GUARD_PREFIX@_GETOPT_H 1
#endif
/* Standalone applications should #define __GETOPT_PREFIX to an
identifier that prefixes the external functions and variables
defined in this header. When this happens, include the
headers that might declare getopt so that they will not cause
confusion if included after this file (if the system had ,
we have already included it). Then systematically rename
identifiers so that they do not collide with the system functions
and variables. Renaming avoids problems with some compilers and
linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt
# if !@HAVE_GETOPT_H@
# include
# include
# include
# endif
# undef __need_getopt
# undef getopt
# undef getopt_long
# undef getopt_long_only
# undef optarg
# undef opterr
# undef optind
# undef optopt
# undef option
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
# define getopt __GETOPT_ID (getopt)
# define getopt_long __GETOPT_ID (getopt_long)
# define getopt_long_only __GETOPT_ID (getopt_long_only)
# define optarg __GETOPT_ID (optarg)
# define opterr __GETOPT_ID (opterr)
# define optind __GETOPT_ID (optind)
# define optopt __GETOPT_ID (optopt)
# define option __GETOPT_ID (option)
# define _getopt_internal __GETOPT_ID (getopt_internal)
#endif
/* Standalone applications get correct prototypes for getopt_long and
getopt_long_only; they declare "char **argv". libc uses prototypes
with "char *const *argv" that are incorrect because getopt_long and
getopt_long_only can permute argv; this is required for backward
compatibility (e.g., for LSB 2.0.1).
This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
but it caused redefinition warnings if both unistd.h and getopt.h were
included, since unistd.h includes getopt.h having previously defined
__need_getopt.
The only place where __getopt_argv_const is used is in definitions
of getopt_long and getopt_long_only below, but these are visible
only if __need_getopt is not defined, so it is quite safe to rewrite
the conditional as follows:
*/
#if !defined __need_getopt
# if defined __GETOPT_PREFIX
# define __getopt_argv_const /* empty */
# else
# define __getopt_argv_const const
# endif
#endif
/* If __GNU_LIBRARY__ is not already defined, either we are being used
standalone, or this is the first header included in the source file.
If we are being used with glibc, we need to include , but
that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
not defined, include , which will pull in for us
if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
doesn't flood the namespace with stuff the way some other headers do.) */
#if !defined __GNU_LIBRARY__
# include
#endif
#ifndef __THROW
# ifndef __GNUC_PREREQ
# define __GNUC_PREREQ(maj, min) (0)
# endif
# if defined __cplusplus && __GNUC_PREREQ (2,8)
# define __THROW throw ()
# else
# define __THROW
# endif
#endif
/* The definition of _GL_ARG_NONNULL is copied here. */
#ifdef __cplusplus
extern "C" {
#endif
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
extern char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to `getopt'.
On entry to `getopt', zero means this is the first call; initialize.
When `getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
extern int optind;
/* Callers store zero here to inhibit the error message `getopt' prints
for unrecognized options. */
extern int opterr;
/* Set to an option character which was unrecognized. */
extern int optopt;
#ifndef __need_getopt
/* Describe the long-named options requested by the application.
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
of `struct option' terminated by an element containing a name which is
zero.
The field `has_arg' is:
no_argument (or 0) if the option does not take an argument,
required_argument (or 1) if the option requires an argument,
optional_argument (or 2) if the option takes an optional argument.
If the field `flag' is not NULL, it points to a variable that is set
to the value given in the field `val' when the option is found, but
left unchanged if the option is not found.
To have a long-named option do something other than set an `int' to
a compiled-in constant, such as set a value from `optarg', set the
option's `flag' field to zero and its `val' field to a nonzero
value (the equivalent single-letter option character, if there is
one). For long options that have a zero `flag' field, `getopt'
returns the contents of the `val' field. */
# if !GNULIB_defined_struct_option
struct option
{
const char *name;
/* has_arg can't be an enum because some compilers complain about
type mismatches in all the code that assumes it is an int. */
int has_arg;
int *flag;
int val;
};
# define GNULIB_defined_struct_option 1
# endif
/* Names for the values of the `has_arg' field of `struct option'. */
# define no_argument 0
# define required_argument 1
# define optional_argument 2
#endif /* need getopt */
/* Get definitions and prototypes for functions to process the
arguments in ARGV (ARGC of them, minus the program name) for
options given in OPTS.
Return the option character from OPTS just read. Return -1 when
there are no more options. For unrecognized options, or options
missing arguments, `optopt' is set to the option letter, and '?' is
returned.
The OPTS string is a list of characters which are recognized option
letters, optionally followed by colons, specifying that that letter
takes an argument, to be placed in `optarg'.
If a letter in OPTS is followed by two colons, its argument is
optional. This behavior is specific to the GNU `getopt'.
The argument `--' causes premature termination of argument
scanning, explicitly telling `getopt' that there are no more
options.
If OPTS begins with `-', then non-option arguments are treated as
arguments to the option '\1'. This behavior is specific to the GNU
`getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in
the environment, then do not permute arguments. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
__THROW _GL_ARG_NONNULL ((2, 3));
#ifndef __need_getopt
extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
__THROW _GL_ARG_NONNULL ((2, 3));
extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
__THROW _GL_ARG_NONNULL ((2, 3));
#endif
#ifdef __cplusplus
}
#endif
/* Make sure we later can get all the definitions and declarations. */
#undef __need_getopt
#endif /* _@GUARD_PREFIX@_GETOPT_H */
#endif /* _@GUARD_PREFIX@_GETOPT_H */
gss-1.0.2/src/gl/version-etc.h 0000644 0000000 0000000 00000005552 11662447025 013013 0000000 0000000 /* Print --version and bug-reporting information in a consistent format.
Copyright (C) 1999, 2003, 2005, 2009-2011 Free Software Foundation, Inc.
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 . */
/* Written by Jim Meyering. */
#ifndef VERSION_ETC_H
# define VERSION_ETC_H 1
# include
# include
/* The `sentinel' attribute was added in gcc 4.0. */
#ifndef _GL_ATTRIBUTE_SENTINEL
# if 4 <= __GNUC__
# define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
# else
# define _GL_ATTRIBUTE_SENTINEL /* empty */
# endif
#endif
extern const char version_etc_copyright[];
/* The three functions below display the --version information in the
standard way: command and package names, package version, followed
by a short GPLv3+ notice and a list of up to 10 author names.
If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of
the program. The formats are therefore:
PACKAGE VERSION
or
COMMAND_NAME (PACKAGE) VERSION.
The functions differ in the way they are passed author names: */
/* N_AUTHORS names are supplied in array AUTHORS. */
extern void version_etc_arn (FILE *stream,
const char *command_name, const char *package,
const char *version,
const char * const * authors, size_t n_authors);
/* Names are passed in the NULL-terminated array AUTHORS. */
extern void version_etc_ar (FILE *stream,
const char *command_name, const char *package,
const char *version, const char * const * authors);
/* Names are passed in the NULL-terminated va_list. */
extern void version_etc_va (FILE *stream,
const char *command_name, const char *package,
const char *version, va_list authors);
/* Names are passed as separate arguments, with an additional
NULL argument at the end. */
extern void version_etc (FILE *stream,
const char *command_name, const char *package,
const char *version,
/* const char *author1, ..., NULL */ ...)
_GL_ATTRIBUTE_SENTINEL;
/* Display the usual `Report bugs to' stanza */
extern void emit_bug_reporting_address (void);
#endif /* VERSION_ETC_H */
gss-1.0.2/src/gl/getopt_int.h 0000644 0000000 0000000 00000011742 11662447025 012727 0000000 0000000 /* Internal declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 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 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 . */
#ifndef _GETOPT_INT_H
#define _GETOPT_INT_H 1
#include
extern int _getopt_internal (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
int __long_only, int __posixly_correct);
/* Reentrant versions which can handle parsing multiple argument
vectors at the same time. */
/* Describe how to deal with options that follow non-option ARGV-elements.
If the caller did not specify anything,
the default is REQUIRE_ORDER if the environment variable
POSIXLY_CORRECT is defined, PERMUTE otherwise.
REQUIRE_ORDER means don't recognize them as options;
stop option processing when the first non-option is seen.
This is what Unix does.
This mode of operation is selected by either setting the environment
variable POSIXLY_CORRECT, or using `+' as the first character
of the list of option characters, or by calling getopt.
PERMUTE is the default. We permute the contents of ARGV as we
scan, so that eventually all the non-options are at the end.
This allows options to be given in any order, even with programs
that were not written to expect this.
RETURN_IN_ORDER is an option available to programs that were
written to expect options and other ARGV-elements in any order
and that care about the ordering of the two. We describe each
non-option ARGV-element as if it were the argument of an option
with character code 1. Using `-' as the first character of the
list of option characters selects this mode of operation.
The special argument `--' forces an end of option-scanning regardless
of the value of `ordering'. In the case of RETURN_IN_ORDER, only
`--' can cause `getopt' to return -1 with `optind' != ARGC. */
enum __ord
{
REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
};
/* Data type for reentrant functions. */
struct _getopt_data
{
/* These have exactly the same meaning as the corresponding global
variables, except that they are used for the reentrant
versions of getopt. */
int optind;
int opterr;
int optopt;
char *optarg;
/* Internal members. */
/* True if the internal members have been initialized. */
int __initialized;
/* The next char to be scanned in the option-element
in which the last option character we returned was found.
This allows us to pick up the scan where we left off.
If this is zero, or a null string, it means resume the scan
by advancing to the next ARGV-element. */
char *__nextchar;
/* See __ord above. */
enum __ord __ordering;
/* If the POSIXLY_CORRECT environment variable is set
or getopt was called. */
int __posixly_correct;
/* Handle permutation of arguments. */
/* Describe the part of ARGV that contains non-options that have
been skipped. `first_nonopt' is the index in ARGV of the first
of them; `last_nonopt' is the index after the last of them. */
int __first_nonopt;
int __last_nonopt;
#if defined _LIBC && defined USE_NONOPTION_FLAGS
int __nonoption_flags_max_len;
int __nonoption_flags_len;
#endif
};
/* The initializer is necessary to set OPTIND and OPTERR to their
default values and to clear the initialization flag. */
#define _GETOPT_DATA_INITIALIZER { 1, 1 }
extern int _getopt_internal_r (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
int __long_only, struct _getopt_data *__data,
int __posixly_correct);
extern int _getopt_long_r (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
struct _getopt_data *__data);
extern int _getopt_long_only_r (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts,
int *__longind,
struct _getopt_data *__data);
#endif /* getopt_int.h */
gss-1.0.2/src/gl/msvc-inval.c 0000644 0000000 0000000 00000007576 11662447025 012637 0000000 0000000 /* Invalid parameter handler for MSVC runtime libraries.
Copyright (C) 2011 Free Software Foundation, Inc.
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, 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. */
#include
/* Specification. */
#include "msvc-inval.h"
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
&& !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING)
/* Get _invalid_parameter_handler type and _set_invalid_parameter_handler
declaration. */
# include
# if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
static void cdecl
gl_msvc_invalid_parameter_handler (const wchar_t *expression,
const wchar_t *function,
const wchar_t *file,
unsigned int line,
uintptr_t dummy)
{
}
# else
/* Get declarations of the Win32 API functions. */
# define WIN32_LEAN_AND_MEAN
# include
# if defined _MSC_VER
static void cdecl
gl_msvc_invalid_parameter_handler (const wchar_t *expression,
const wchar_t *function,
const wchar_t *file,
unsigned int line,
uintptr_t dummy)
{
RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL);
}
# else
/* An index to thread-local storage. */
static DWORD tls_index;
static int tls_initialized /* = 0 */;
/* Used as a fallback only. */
static struct gl_msvc_inval_per_thread not_per_thread;
struct gl_msvc_inval_per_thread *
gl_msvc_inval_current (void)
{
if (!tls_initialized)
{
tls_index = TlsAlloc ();
tls_initialized = 1;
}
if (tls_index == TLS_OUT_OF_INDEXES)
/* TlsAlloc had failed. */
return ¬_per_thread;
else
{
struct gl_msvc_inval_per_thread *pointer =
(struct gl_msvc_inval_per_thread *) TlsGetValue (tls_index);
if (pointer == NULL)
{
/* First call. Allocate a new 'struct gl_msvc_inval_per_thread'. */
pointer =
(struct gl_msvc_inval_per_thread *)
malloc (sizeof (struct gl_msvc_inval_per_thread));
if (pointer == NULL)
/* Could not allocate memory. Use the global storage. */
pointer = ¬_per_thread;
TlsSetValue (tls_index, pointer);
}
return pointer;
}
}
static void cdecl
gl_msvc_invalid_parameter_handler (const wchar_t *expression,
const wchar_t *function,
const wchar_t *file,
unsigned int line,
uintptr_t dummy)
{
struct gl_msvc_inval_per_thread *current = gl_msvc_inval_current ();
if (current->restart_valid)
longjmp (current->restart, 1);
else
/* An invalid parameter notification from outside the gnulib code.
Give the caller a chance to intervene. */
RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL);
}
# endif
# endif
static int gl_msvc_inval_initialized /* = 0 */;
void
gl_msvc_inval_ensure_handler (void)
{
if (gl_msvc_inval_initialized == 0)
{
_set_invalid_parameter_handler (gl_msvc_invalid_parameter_handler);
gl_msvc_inval_initialized = 1;
}
}
#endif
gss-1.0.2/src/gl/stddef.in.h 0000644 0000000 0000000 00000005343 11662447025 012431 0000000 0000000 /* A substitute for POSIX 2008 , for platforms that have issues.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
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, 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. */
/* Written by Eric Blake. */
/*
* POSIX 2008 for platforms that have issues.
*
*/
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
#if defined __need_wchar_t || defined __need_size_t \
|| defined __need_ptrdiff_t || defined __need_NULL \
|| defined __need_wint_t
/* Special invocation convention inside gcc header files. In
particular, gcc provides a version of that blindly
redefines NULL even when __need_wint_t was defined, even though
wint_t is not normally provided by . Hence, we must
remember if special invocation has ever been used to obtain wint_t,
in which case we need to clean up NULL yet again. */
# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
# ifdef __need_wint_t
# undef _@GUARD_PREFIX@_STDDEF_H
# define _GL_STDDEF_WINT_T
# endif
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
# endif
#else
/* Normal invocation convention. */
# ifndef _@GUARD_PREFIX@_STDDEF_H
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
# ifndef _@GUARD_PREFIX@_STDDEF_H
# define _@GUARD_PREFIX@_STDDEF_H
/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
#if @REPLACE_NULL@
# undef NULL
# ifdef __cplusplus
/* ISO C++ says that the macro NULL must expand to an integer constant
expression, hence '((void *) 0)' is not allowed in C++. */
# if __GNUG__ >= 3
/* GNU C++ has a __null macro that behaves like an integer ('int' or
'long') but has the same size as a pointer. Use that, to avoid
warnings. */
# define NULL __null
# else
# define NULL 0L
# endif
# else
# define NULL ((void *) 0)
# endif
#endif
/* Some platforms lack wchar_t. */
#if !@HAVE_WCHAR_T@
# define wchar_t int
#endif
# endif /* _@GUARD_PREFIX@_STDDEF_H */
# endif /* _@GUARD_PREFIX@_STDDEF_H */
#endif /* __need_XXX */
gss-1.0.2/src/gl/Makefile.in 0000644 0000000 0000000 00000152722 11663554705 012460 0000000 0000000 # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
#
# This file 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 file 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 file. If not, see .
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --local-dir=src/gl/override --lib=libgnu --source-base=src/gl --m4-base=src/gl/m4 --doc-base=doc --tests-base=src/gl/tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=srcgl --no-vc-files error getopt-gnu progname version-etc
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gl
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/src/gl/m4/errno_h.m4 \
$(top_srcdir)/src/gl/m4/error.m4 \
$(top_srcdir)/src/gl/m4/getopt.m4 \
$(top_srcdir)/src/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/src/gl/m4/msvc-inval.m4 \
$(top_srcdir)/src/gl/m4/msvc-nothrow.m4 \
$(top_srcdir)/src/gl/m4/nocrash.m4 \
$(top_srcdir)/src/gl/m4/ssize_t.m4 \
$(top_srcdir)/src/gl/m4/stdarg.m4 \
$(top_srcdir)/src/gl/m4/strerror.m4 \
$(top_srcdir)/src/gl/m4/sys_socket_h.m4 \
$(top_srcdir)/src/gl/m4/unistd_h.m4 \
$(top_srcdir)/src/gl/m4/version-etc.m4 \
$(top_srcdir)/lib/gl/m4/extensions.m4 \
$(top_srcdir)/lib/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/lib/gl/m4/include_next.m4 \
$(top_srcdir)/lib/gl/m4/ld-output-def.m4 \
$(top_srcdir)/lib/gl/m4/stddef_h.m4 \
$(top_srcdir)/lib/gl/m4/string_h.m4 \
$(top_srcdir)/lib/gl/m4/strverscmp.m4 \
$(top_srcdir)/lib/gl/m4/warn-on-use.m4 \
$(top_srcdir)/gl/m4/00gnulib.m4 \
$(top_srcdir)/gl/m4/autobuild.m4 \
$(top_srcdir)/gl/m4/gnulib-common.m4 \
$(top_srcdir)/gl/m4/gnulib-comp.m4 \
$(top_srcdir)/gl/m4/ld-version-script.m4 \
$(top_srcdir)/gl/m4/manywarnings.m4 \
$(top_srcdir)/gl/m4/valgrind-tests.m4 \
$(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po-suffix.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
LTLIBRARIES = $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
am_libgnu_la_OBJECTS = progname.lo version-etc.lo
libgnu_la_OBJECTS = $(am_libgnu_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
libgnu_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libgnu_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES)
DIST_SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
HEADERS = $(noinst_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ARFLAGS = @ARFLAGS@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFIG_INCLUDE = @CONFIG_INCLUDE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DLL_VERSION = @DLL_VERSION@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
ENOLINK_VALUE = @ENOLINK_VALUE@
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GETOPT_H = @GETOPT_H@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
GNULIB_FFSL = @GNULIB_FFSL@
GNULIB_FFSLL = @GNULIB_FFSLL@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
GNULIB_MBSCHR = @GNULIB_MBSCHR@
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
GNULIB_MBSLEN = @GNULIB_MBSLEN@
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
GNULIB_MBSSEP = @GNULIB_MBSSEP@
GNULIB_MBSSPN = @GNULIB_MBSSPN@
GNULIB_MBSSTR = @GNULIB_MBSSTR@
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
GNULIB_MEMCHR = @GNULIB_MEMCHR@
GNULIB_MEMMEM = @GNULIB_MEMMEM@
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PWRITE = @GNULIB_PWRITE@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
GNULIB_READ = @GNULIB_READ@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
GNULIB_STRPBRK = @GNULIB_STRPBRK@
GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
GNULIB_USLEEP = @GNULIB_USLEEP@
GNULIB_WRITE = @GNULIB_WRITE@
GREP = @GREP@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
HAVE_CHOWN = @HAVE_CHOWN@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FDATASYNC = @HAVE_FDATASYNC@
HAVE_FFSL = @HAVE_FFSL@
HAVE_FFSLL = @HAVE_FFSLL@
HAVE_FSYNC = @HAVE_FSYNC@
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
HAVE_GETGROUPS = @HAVE_GETGROUPS@
HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
HAVE_GETLOGIN = @HAVE_GETLOGIN@
HAVE_GETOPT_H = @HAVE_GETOPT_H@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
HAVE_LCHOWN = @HAVE_LCHOWN@
HAVE_LIBSHISHI = @HAVE_LIBSHISHI@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
HAVE_MBSLEN = @HAVE_MBSLEN@
HAVE_MEMCHR = @HAVE_MEMCHR@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_OS_H = @HAVE_OS_H@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
HAVE_PREAD = @HAVE_PREAD@
HAVE_PWRITE = @HAVE_PWRITE@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_STPCPY = @HAVE_STPCPY@
HAVE_STPNCPY = @HAVE_STPNCPY@
HAVE_STRCASESTR = @HAVE_STRCASESTR@
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
HAVE_STRPBRK = @HAVE_STRPBRK@
HAVE_STRSEP = @HAVE_STRSEP@
HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_USLEEP = @HAVE_USLEEP@
HAVE_WCHAR_T = @HAVE_WCHAR_T@
HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HELP2MAN = @HELP2MAN@
HTML_DIR = @HTML_DIR@
INCLUDE_GSS_KRB5 = @INCLUDE_GSS_KRB5@
INCLUDE_GSS_KRB5_EXT = @INCLUDE_GSS_KRB5_EXT@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBSHISHI = @LIBSHISHI@
LIBSHISHI_PREFIX = @LIBSHISHI_PREFIX@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
LTLIBSHISHI = @LTLIBSHISHI@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_STDARG_H = @NEXT_STDARG_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STRING_H = @NEXT_STRING_H@
NEXT_UNISTD_H = @NEXT_UNISTD_H@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PMCCABE = @PMCCABE@
POSUB = @POSUB@
PO_SUFFIX = @PO_SUFFIX@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
RANLIB = @RANLIB@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_MEMCHR = @REPLACE_MEMCHR@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
REPLACE_NULL = @REPLACE_NULL@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
REPLACE_UNLINK = @REPLACE_UNLINK@
REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_USLEEP = @REPLACE_USLEEP@
REPLACE_WRITE = @REPLACE_WRITE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STDARG_H = @STDARG_H@
STDDEF_H = @STDDEF_H@
STRIP = @STRIP@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
USE_NLS = @USE_NLS@
VALGRIND = @VALGRIND@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
VERSION_NUMBER = @VERSION_NUMBER@
VERSION_PATCH = @VERSION_PATCH@
WARN_CFLAGS = @WARN_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
gl_LIBOBJS = @gl_LIBOBJS@
gl_LTLIBOBJS = @gl_LTLIBOBJS@
gltests_LIBOBJS = @gltests_LIBOBJS@
gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
gltests_WITNESS = @gltests_WITNESS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libgl_LIBOBJS = @libgl_LIBOBJS@
libgl_LTLIBOBJS = @libgl_LTLIBOBJS@
libgltests_LIBOBJS = @libgltests_LIBOBJS@
libgltests_LTLIBOBJS = @libgltests_LTLIBOBJS@
libgltests_WITNESS = @libgltests_WITNESS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
srcgl_LIBOBJS = @srcgl_LIBOBJS@
srcgl_LTLIBOBJS = @srcgl_LTLIBOBJS@
srcgltests_LIBOBJS = @srcgltests_LIBOBJS@
srcgltests_LTLIBOBJS = @srcgltests_LTLIBOBJS@
srcgltests_WITNESS = @srcgltests_WITNESS@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.5 gnits
SUBDIRS =
noinst_HEADERS =
noinst_LIBRARIES =
noinst_LTLIBRARIES = libgnu.la
EXTRA_DIST = m4/gnulib-cache.m4 errno.in.h error.c error.h getopt.c \
getopt.in.h getopt1.c getopt_int.h intprops.h msvc-inval.c \
msvc-inval.h msvc-nothrow.c msvc-nothrow.h \
$(top_srcdir)/build-aux/snippet/arg-nonnull.h \
$(top_srcdir)/build-aux/snippet/c++defs.h \
$(top_srcdir)/build-aux/snippet/warn-on-use.h stdarg.in.h \
stddef.in.h strerror.c strerror-override.c strerror-override.h \
string.in.h unistd.in.h verify.h
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
BUILT_SOURCES = $(ERRNO_H) $(GETOPT_H) arg-nonnull.h c++defs.h \
warn-on-use.h $(STDARG_H) $(STDDEF_H) string.h unistd.h
SUFFIXES =
MOSTLYCLEANFILES = core *.stackdump errno.h errno.h-t getopt.h \
getopt.h-t arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \
warn-on-use.h warn-on-use.h-t stdarg.h stdarg.h-t stddef.h \
stddef.h-t string.h string.h-t unistd.h unistd.h-t
MOSTLYCLEANDIRS =
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
AM_CPPFLAGS =
AM_CFLAGS =
libgnu_la_SOURCES = gettext.h progname.h progname.c version-etc.h \
version-etc.c
libgnu_la_LIBADD = $(srcgl_LTLIBOBJS)
libgnu_la_DEPENDENCIES = $(srcgl_LTLIBOBJS)
EXTRA_libgnu_la_SOURCES = error.c getopt.c getopt1.c msvc-inval.c \
msvc-nothrow.c strerror.c strerror-override.c
libgnu_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(LTLIBINTL)
ARG_NONNULL_H = arg-nonnull.h
CXXDEFS_H = c++defs.h
WARN_ON_USE_H = warn-on-use.h
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits src/gl/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnits src/gl/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES)
$(AM_V_CCLD)$(libgnu_la_LINK) $(libgnu_la_OBJECTS) $(libgnu_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS)
installdirs: installdirs-recursive
installdirs-am:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-recursive
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool mostlyclean-local
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
ctags-recursive install install-am install-strip \
tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic clean-libtool \
clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \
ctags-recursive distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# We need the following in order to create when the system
# doesn't have one that is POSIX compliant.
@GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status
@GL_GENERATE_ERRNO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
@GL_GENERATE_ERRNO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
@GL_GENERATE_ERRNO_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
@GL_GENERATE_ERRNO_H_TRUE@ < $(srcdir)/errno.in.h; \
@GL_GENERATE_ERRNO_H_TRUE@ } > $@-t && \
@GL_GENERATE_ERRNO_H_TRUE@ mv $@-t $@
@GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status
@GL_GENERATE_ERRNO_H_FALSE@ rm -f $@
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
-e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/getopt.in.h; \
} > $@-t && \
mv -f $@-t $@
# The arg-nonnull.h that gets inserted into generated .h files is the same as
# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
# off.
arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/GL_ARG_NONNULL/,$$p' \
< $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
> $@-t && \
mv $@-t $@
# The c++defs.h that gets inserted into generated .h files is the same as
# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/_GL_CXXDEFS/,$$p' \
< $(top_srcdir)/build-aux/snippet/c++defs.h \
> $@-t && \
mv $@-t $@
# The warn-on-use.h that gets inserted into generated .h files is the same as
# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
# off.
warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/^.ifndef/,$$p' \
< $(top_srcdir)/build-aux/snippet/warn-on-use.h \
> $@-t && \
mv $@-t $@
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
@GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status
@GL_GENERATE_STDARG_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
@GL_GENERATE_STDARG_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
@GL_GENERATE_STDARG_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
@GL_GENERATE_STDARG_H_TRUE@ < $(srcdir)/stdarg.in.h; \
@GL_GENERATE_STDARG_H_TRUE@ } > $@-t && \
@GL_GENERATE_STDARG_H_TRUE@ mv $@-t $@
@GL_GENERATE_STDARG_H_FALSE@stdarg.h: $(top_builddir)/config.status
@GL_GENERATE_STDARG_H_FALSE@ rm -f $@
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
@GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status
@GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
@GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
@GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
@GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \
@GL_GENERATE_STDDEF_H_TRUE@ } > $@-t && \
@GL_GENERATE_STDDEF_H_TRUE@ mv $@-t $@
@GL_GENERATE_STDDEF_H_FALSE@stddef.h: $(top_builddir)/config.status
@GL_GENERATE_STDDEF_H_FALSE@ rm -f $@
# We need the following in order to create when the system
# doesn't have one that works with the given compiler.
string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
-e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
-e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
-e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
-e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
-e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
-e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
-e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
-e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
-e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
-e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
-e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
-e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
-e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
-e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
-e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
-e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
-e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
-e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
-e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
-e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
-e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
-e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
-e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
-e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
-e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
-e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
-e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
-e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
-e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
-e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
-e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
-e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
-e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
-e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
< $(srcdir)/string.in.h | \
sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
-e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
-e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
-e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
-e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
-e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
-e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
-e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
-e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
< $(srcdir)/string.in.h; \
} > $@-t && \
mv $@-t $@
# We need the following in order to create an empty placeholder for
# when the system doesn't have one.
unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL_SRCGL|g' \
-e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
-e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
-e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
-e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
-e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
-e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
-e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
-e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
-e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
-e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
-e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
-e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
-e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
-e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
-e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
-e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
-e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
-e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
-e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
-e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
-e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
-e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
-e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
-e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
-e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
-e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
-e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
-e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
-e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
-e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
-e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
-e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
-e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
-e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
-e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
-e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
-e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
-e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
-e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
-e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
-e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
-e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \
-e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
-e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
-e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
-e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
-e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
-e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
< $(srcdir)/unistd.in.h | \
sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
-e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
-e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
-e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
-e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
-e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
-e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
-e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
-e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
-e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
-e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
-e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
-e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \
-e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
-e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
-e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
-e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
-e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
-e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
-e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
-e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
-e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
-e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
-e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
-e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
-e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
-e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
-e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
-e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
| \
sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
-e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
-e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
-e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
-e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
-e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
-e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
-e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
-e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
-e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
-e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
-e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
-e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \
mv $@-t $@
mostlyclean-local: mostlyclean-generic
@for dir in '' $(MOSTLYCLEANDIRS); do \
if test -n "$$dir" && test -d $$dir; then \
echo "rmdir $$dir"; rmdir $$dir; \
fi; \
done; \
:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gss-1.0.2/src/gl/getopt.c 0000644 0000000 0000000 00000117504 11662447025 012053 0000000 0000000 /* Getopt for GNU.
NOTE: getopt is part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 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 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 . */
#ifndef _LIBC
# include
#endif
#include "getopt.h"
#include
#include
#include
#include
#ifdef _LIBC
# include
#else
# include "gettext.h"
# define _(msgid) gettext (msgid)
#endif
#if defined _LIBC && defined USE_IN_LIBIO
# include
#endif
/* This version of `getopt' appears to the caller like standard Unix `getopt'
but it behaves differently for the user, since it allows the user
to intersperse the options with the other arguments.
As `getopt_long' works, it permutes the elements of ARGV so that,
when it is done, all the options precede everything else. Thus
all application programs are extended to handle flexible argument order.
Using `getopt' or setting the environment variable POSIXLY_CORRECT
disables permutation.
Then the behavior is completely standard.
GNU application programs can use a third alternative mode in which
they can distinguish the relative order of options and other arguments. */
#include "getopt_int.h"
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to `getopt'.
On entry to `getopt', zero means this is the first call; initialize.
When `getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
/* 1003.2 says this must be 1 before any call. */
int optind = 1;
/* Callers store zero here to inhibit the error message
for unrecognized options. */
int opterr = 1;
/* Set to an option character which was unrecognized.
This must be initialized on some systems to avoid linking in the
system's own getopt implementation. */
int optopt = '?';
/* Keep a global copy of all internal members of getopt_data. */
static struct _getopt_data getopt_data;
#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV
extern char *getenv ();
#endif
#ifdef _LIBC
/* Stored original parameters.
XXX This is no good solution. We should rather copy the args so
that we can compare them later. But we must not use malloc(3). */
extern int __libc_argc;
extern char **__libc_argv;
/* Bash 2.0 gives us an environment variable containing flags
indicating ARGV elements that should not be considered arguments. */
# ifdef USE_NONOPTION_FLAGS
/* Defined in getopt_init.c */
extern char *__getopt_nonoption_flags;
# endif
# ifdef USE_NONOPTION_FLAGS
# define SWAP_FLAGS(ch1, ch2) \
if (d->__nonoption_flags_len > 0) \
{ \
char __tmp = __getopt_nonoption_flags[ch1]; \
__getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
__getopt_nonoption_flags[ch2] = __tmp; \
}
# else
# define SWAP_FLAGS(ch1, ch2)
# endif
#else /* !_LIBC */
# define SWAP_FLAGS(ch1, ch2)
#endif /* _LIBC */
/* Exchange two adjacent subsequences of ARGV.
One subsequence is elements [first_nonopt,last_nonopt)
which contains all the non-options that have been skipped so far.
The other is elements [last_nonopt,optind), which contains all
the options processed since those non-options were skipped.
`first_nonopt' and `last_nonopt' are relocated so that they describe
the new indices of the non-options in ARGV after they are moved. */
static void
exchange (char **argv, struct _getopt_data *d)
{
int bottom = d->__first_nonopt;
int middle = d->__last_nonopt;
int top = d->optind;
char *tem;
/* Exchange the shorter segment with the far end of the longer segment.
That puts the shorter segment into the right place.
It leaves the longer segment in the right place overall,
but it consists of two parts that need to be swapped next. */
#if defined _LIBC && defined USE_NONOPTION_FLAGS
/* First make sure the handling of the `__getopt_nonoption_flags'
string can work normally. Our top argument must be in the range
of the string. */
if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
{
/* We must extend the array. The user plays games with us and
presents new arguments. */
char *new_str = malloc (top + 1);
if (new_str == NULL)
d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
else
{
memset (__mempcpy (new_str, __getopt_nonoption_flags,
d->__nonoption_flags_max_len),
'\0', top + 1 - d->__nonoption_flags_max_len);
d->__nonoption_flags_max_len = top + 1;
__getopt_nonoption_flags = new_str;
}
}
#endif
while (top > middle && middle > bottom)
{
if (top - middle > middle - bottom)
{
/* Bottom segment is the short one. */
int len = middle - bottom;
register int i;
/* Swap it with the top part of the top segment. */
for (i = 0; i < len; i++)
{
tem = argv[bottom + i];
argv[bottom + i] = argv[top - (middle - bottom) + i];
argv[top - (middle - bottom) + i] = tem;
SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
}
/* Exclude the moved bottom segment from further swapping. */
top -= len;
}
else
{
/* Top segment is the short one. */
int len = top - middle;
register int i;
/* Swap it with the bottom part of the bottom segment. */
for (i = 0; i < len; i++)
{
tem = argv[bottom + i];
argv[bottom + i] = argv[middle + i];
argv[middle + i] = tem;
SWAP_FLAGS (bottom + i, middle + i);
}
/* Exclude the moved top segment from further swapping. */
bottom += len;
}
}
/* Update records for the slots the non-options now occupy. */
d->__first_nonopt += (d->optind - d->__last_nonopt);
d->__last_nonopt = d->optind;
}
/* Initialize the internal data when the first call is made. */
static const char *
_getopt_initialize (int argc _GL_UNUSED,
char **argv _GL_UNUSED, const char *optstring,
struct _getopt_data *d, int posixly_correct)
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped
non-option ARGV-elements is empty. */
d->__first_nonopt = d->__last_nonopt = d->optind;
d->__nextchar = NULL;
d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT");
/* Determine how to handle the ordering of options and nonoptions. */
if (optstring[0] == '-')
{
d->__ordering = RETURN_IN_ORDER;
++optstring;
}
else if (optstring[0] == '+')
{
d->__ordering = REQUIRE_ORDER;
++optstring;
}
else if (d->__posixly_correct)
d->__ordering = REQUIRE_ORDER;
else
d->__ordering = PERMUTE;
#if defined _LIBC && defined USE_NONOPTION_FLAGS
if (!d->__posixly_correct
&& argc == __libc_argc && argv == __libc_argv)
{
if (d->__nonoption_flags_max_len == 0)
{
if (__getopt_nonoption_flags == NULL
|| __getopt_nonoption_flags[0] == '\0')
d->__nonoption_flags_max_len = -1;
else
{
const char *orig_str = __getopt_nonoption_flags;
int len = d->__nonoption_flags_max_len = strlen (orig_str);
if (d->__nonoption_flags_max_len < argc)
d->__nonoption_flags_max_len = argc;
__getopt_nonoption_flags =
(char *) malloc (d->__nonoption_flags_max_len);
if (__getopt_nonoption_flags == NULL)
d->__nonoption_flags_max_len = -1;
else
memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
'\0', d->__nonoption_flags_max_len - len);
}
}
d->__nonoption_flags_len = d->__nonoption_flags_max_len;
}
else
d->__nonoption_flags_len = 0;
#endif
return optstring;
}
/* Scan elements of ARGV (whose length is ARGC) for option characters
given in OPTSTRING.
If an element of ARGV starts with '-', and is not exactly "-" or "--",
then it is an option element. The characters of this element
(aside from the initial '-') are option characters. If `getopt'
is called repeatedly, it returns successively each of the option characters
from each of the option elements.
If `getopt' finds another option character, it returns that character,
updating `optind' and `nextchar' so that the next call to `getopt' can
resume the scan with the following option character or ARGV-element.
If there are no more option characters, `getopt' returns -1.
Then `optind' is the index in ARGV of the first ARGV-element
that is not an option. (The ARGV-elements have been permuted
so that those that are not options now come last.)
OPTSTRING is a string containing the legitimate option characters.
If an option character is seen that is not listed in OPTSTRING,
return '?' after printing an error message. If you set `opterr' to
zero, the error message is suppressed but we still return '?'.
If a char in OPTSTRING is followed by a colon, that means it wants an arg,
so the following text in the same ARGV-element, or the text of the following
ARGV-element, is returned in `optarg'. Two colons mean an option that
wants an optional arg; if there is text in the current ARGV-element,
it is returned in `optarg', otherwise `optarg' is set to zero.
If OPTSTRING starts with `-' or `+', it requests different methods of
handling the non-option ARGV-elements.
See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
Long-named options begin with `--' instead of `-'.
Their names may be abbreviated as long as the abbreviation is unique
or is an exact match for some defined option. If they have an
argument, it follows the option name in the same ARGV-element, separated
from the option name by a `=', or else the in next ARGV-element.
When `getopt' finds a long-named option, it returns 0 if that option's
`flag' field is nonzero, the value of the option's `val' field
if the `flag' field is zero.
The elements of ARGV aren't really const, because we permute them.
But we pretend they're const in the prototype to be compatible
with other systems.
LONGOPTS is a vector of `struct option' terminated by an
element containing a name which is zero.
LONGIND returns the index in LONGOPT of the long-named option found.
It is only valid when a long-named option has been found by the most
recent call.
If LONG_ONLY is nonzero, '-' as well as '--' can introduce
long-named options. */
int
_getopt_internal_r (int argc, char **argv, const char *optstring,
const struct option *longopts, int *longind,
int long_only, struct _getopt_data *d, int posixly_correct)
{
int print_errors = d->opterr;
if (argc < 1)
return -1;
d->optarg = NULL;
if (d->optind == 0 || !d->__initialized)
{
if (d->optind == 0)
d->optind = 1; /* Don't scan ARGV[0], the program name. */
optstring = _getopt_initialize (argc, argv, optstring, d,
posixly_correct);
d->__initialized = 1;
}
else if (optstring[0] == '-' || optstring[0] == '+')
optstring++;
if (optstring[0] == ':')
print_errors = 0;
/* Test whether ARGV[optind] points to a non-option argument.
Either it does not have option syntax, or there is an environment flag
from the shell indicating it is not an option. The later information
is only used when the used in the GNU libc. */
#if defined _LIBC && defined USE_NONOPTION_FLAGS
# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
|| (d->optind < d->__nonoption_flags_len \
&& __getopt_nonoption_flags[d->optind] == '1'))
#else
# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
#endif
if (d->__nextchar == NULL || *d->__nextchar == '\0')
{
/* Advance to the next ARGV-element. */
/* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
moved back by the user (who may also have changed the arguments). */
if (d->__last_nonopt > d->optind)
d->__last_nonopt = d->optind;
if (d->__first_nonopt > d->optind)
d->__first_nonopt = d->optind;
if (d->__ordering == PERMUTE)
{
/* If we have just processed some options following some non-options,
exchange them so that the options come first. */
if (d->__first_nonopt != d->__last_nonopt
&& d->__last_nonopt != d->optind)
exchange ((char **) argv, d);
else if (d->__last_nonopt != d->optind)
d->__first_nonopt = d->optind;
/* Skip any additional non-options
and extend the range of non-options previously skipped. */
while (d->optind < argc && NONOPTION_P)
d->optind++;
d->__last_nonopt = d->optind;
}
/* The special ARGV-element `--' means premature end of options.
Skip it like a null option,
then exchange with previous non-options as if it were an option,
then skip everything else like a non-option. */
if (d->optind != argc && !strcmp (argv[d->optind], "--"))
{
d->optind++;
if (d->__first_nonopt != d->__last_nonopt
&& d->__last_nonopt != d->optind)
exchange ((char **) argv, d);
else if (d->__first_nonopt == d->__last_nonopt)
d->__first_nonopt = d->optind;
d->__last_nonopt = argc;
d->optind = argc;
}
/* If we have done all the ARGV-elements, stop the scan
and back over any non-options that we skipped and permuted. */
if (d->optind == argc)
{
/* Set the next-arg-index to point at the non-options
that we previously skipped, so the caller will digest them. */
if (d->__first_nonopt != d->__last_nonopt)
d->optind = d->__first_nonopt;
return -1;
}
/* If we have come to a non-option and did not permute it,
either stop the scan or describe it to the caller and pass it by. */
if (NONOPTION_P)
{
if (d->__ordering == REQUIRE_ORDER)
return -1;
d->optarg = argv[d->optind++];
return 1;
}
/* We have found another option-ARGV-element.
Skip the initial punctuation. */
d->__nextchar = (argv[d->optind] + 1
+ (longopts != NULL && argv[d->optind][1] == '-'));
}
/* Decode the current option-ARGV-element. */
/* Check whether the ARGV-element is a long option.
If long_only and the ARGV-element has the form "-f", where f is
a valid short option, don't consider it an abbreviated form of
a long option that starts with f. Otherwise there would be no
way to give the -f short option.
On the other hand, if there's a long option "fubar" and
the ARGV-element is "-fu", do consider that an abbreviation of
the long option, just like "--fu", and not "-f" with arg "u".
This distinction seems to be the most useful approach. */
if (longopts != NULL
&& (argv[d->optind][1] == '-'
|| (long_only && (argv[d->optind][2]
|| !strchr (optstring, argv[d->optind][1])))))
{
char *nameend;
unsigned int namelen;
const struct option *p;
const struct option *pfound = NULL;
struct option_list
{
const struct option *p;
struct option_list *next;
} *ambig_list = NULL;
int exact = 0;
int indfound = -1;
int option_index;
for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
/* Do nothing. */ ;
namelen = nameend - d->__nextchar;
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
if (!strncmp (p->name, d->__nextchar, namelen))
{
if (namelen == (unsigned int) strlen (p->name))
{
/* Exact match found. */
pfound = p;
indfound = option_index;
exact = 1;
break;
}
else if (pfound == NULL)
{
/* First nonexact match found. */
pfound = p;
indfound = option_index;
}
else if (long_only
|| pfound->has_arg != p->has_arg
|| pfound->flag != p->flag
|| pfound->val != p->val)
{
/* Second or later nonexact match found. */
struct option_list *newp = malloc (sizeof (*newp));
newp->p = p;
newp->next = ambig_list;
ambig_list = newp;
}
}
if (ambig_list != NULL && !exact)
{
if (print_errors)
{
struct option_list first;
first.p = pfound;
first.next = ambig_list;
ambig_list = &first;
#if defined _LIBC && defined USE_IN_LIBIO
char *buf = NULL;
size_t buflen = 0;
FILE *fp = open_memstream (&buf, &buflen);
if (fp != NULL)
{
fprintf (fp,
_("%s: option '%s' is ambiguous; possibilities:"),
argv[0], argv[d->optind]);
do
{
fprintf (fp, " '--%s'", ambig_list->p->name);
ambig_list = ambig_list->next;
}
while (ambig_list != NULL);
fputc_unlocked ('\n', fp);
if (__builtin_expect (fclose (fp) != EOF, 1))
{
_IO_flockfile (stderr);
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
__fxprintf (NULL, "%s", buf);
((_IO_FILE *) stderr)->_flags2 = old_flags2;
_IO_funlockfile (stderr);
free (buf);
}
}
#else
fprintf (stderr,
_("%s: option '%s' is ambiguous; possibilities:"),
argv[0], argv[d->optind]);
do
{
fprintf (stderr, " '--%s'", ambig_list->p->name);
ambig_list = ambig_list->next;
}
while (ambig_list != NULL);
fputc ('\n', stderr);
#endif
}
d->__nextchar += strlen (d->__nextchar);
d->optind++;
d->optopt = 0;
return '?';
}
while (ambig_list != NULL)
{
struct option_list *pn = ambig_list->next;
free (ambig_list);
ambig_list = pn;
}
if (pfound != NULL)
{
option_index = indfound;
d->optind++;
if (*nameend)
{
/* Don't test has_arg with >, because some C compilers don't
allow it to be used on enums. */
if (pfound->has_arg)
d->optarg = nameend + 1;
else
{
if (print_errors)
{
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
int n;
#endif
if (argv[d->optind - 1][1] == '-')
{
/* --option */
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("\
%s: option '--%s' doesn't allow an argument\n"),
argv[0], pfound->name);
#else
fprintf (stderr, _("\
%s: option '--%s' doesn't allow an argument\n"),
argv[0], pfound->name);
#endif
}
else
{
/* +option or -option */
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("\
%s: option '%c%s' doesn't allow an argument\n"),
argv[0], argv[d->optind - 1][0],
pfound->name);
#else
fprintf (stderr, _("\
%s: option '%c%s' doesn't allow an argument\n"),
argv[0], argv[d->optind - 1][0],
pfound->name);
#endif
}
#if defined _LIBC && defined USE_IN_LIBIO
if (n >= 0)
{
_IO_flockfile (stderr);
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
((_IO_FILE *) stderr)->_flags2
|= _IO_FLAGS2_NOTCANCEL;
__fxprintf (NULL, "%s", buf);
((_IO_FILE *) stderr)->_flags2 = old_flags2;
_IO_funlockfile (stderr);
free (buf);
}
#endif
}
d->__nextchar += strlen (d->__nextchar);
d->optopt = pfound->val;
return '?';
}
}
else if (pfound->has_arg == 1)
{
if (d->optind < argc)
d->optarg = argv[d->optind++];
else
{
if (print_errors)
{
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf, _("\
%s: option '--%s' requires an argument\n"),
argv[0], pfound->name) >= 0)
{
_IO_flockfile (stderr);
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
((_IO_FILE *) stderr)->_flags2
|= _IO_FLAGS2_NOTCANCEL;
__fxprintf (NULL, "%s", buf);
((_IO_FILE *) stderr)->_flags2 = old_flags2;
_IO_funlockfile (stderr);
free (buf);
}
#else
fprintf (stderr,
_("%s: option '--%s' requires an argument\n"),
argv[0], pfound->name);
#endif
}
d->__nextchar += strlen (d->__nextchar);
d->optopt = pfound->val;
return optstring[0] == ':' ? ':' : '?';
}
}
d->__nextchar += strlen (d->__nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)
{
*(pfound->flag) = pfound->val;
return 0;
}
return pfound->val;
}
/* Can't find it as a long option. If this is not getopt_long_only,
or the option starts with '--' or is not a valid short
option, then it's an error.
Otherwise interpret it as a short option. */
if (!long_only || argv[d->optind][1] == '-'
|| strchr (optstring, *d->__nextchar) == NULL)
{
if (print_errors)
{
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
int n;
#endif
if (argv[d->optind][1] == '-')
{
/* --option */
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"),
argv[0], d->__nextchar);
#else
fprintf (stderr, _("%s: unrecognized option '--%s'\n"),
argv[0], d->__nextchar);
#endif
}
else
{
/* +option or -option */
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"),
argv[0], argv[d->optind][0], d->__nextchar);
#else
fprintf (stderr, _("%s: unrecognized option '%c%s'\n"),
argv[0], argv[d->optind][0], d->__nextchar);
#endif
}
#if defined _LIBC && defined USE_IN_LIBIO
if (n >= 0)
{
_IO_flockfile (stderr);
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
__fxprintf (NULL, "%s", buf);
((_IO_FILE *) stderr)->_flags2 = old_flags2;
_IO_funlockfile (stderr);
free (buf);
}
#endif
}
d->__nextchar = (char *) "";
d->optind++;
d->optopt = 0;
return '?';
}
}
/* Look at and handle the next short option-character. */
{
char c = *d->__nextchar++;
const char *temp = strchr (optstring, c);
/* Increment `optind' when we start to process its last character. */
if (*d->__nextchar == '\0')
++d->optind;
if (temp == NULL || c == ':' || c == ';')
{
if (print_errors)
{
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
int n;
#endif
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
argv[0], c);
#else
fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
#endif
#if defined _LIBC && defined USE_IN_LIBIO
if (n >= 0)
{
_IO_flockfile (stderr);
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
__fxprintf (NULL, "%s", buf);
((_IO_FILE *) stderr)->_flags2 = old_flags2;
_IO_funlockfile (stderr);
free (buf);
}
#endif
}
d->optopt = c;
return '?';
}
/* Convenience. Treat POSIX -W foo same as long option --foo */
if (temp[0] == 'W' && temp[1] == ';')
{
char *nameend;
const struct option *p;
const struct option *pfound = NULL;
int exact = 0;
int ambig = 0;
int indfound = 0;
int option_index;
if (longopts == NULL)
goto no_longs;
/* This is an option that requires an argument. */
if (*d->__nextchar != '\0')
{
d->optarg = d->__nextchar;
/* If we end this ARGV-element by taking the rest as an arg,
we must advance to the next element now. */
d->optind++;
}
else if (d->optind == argc)
{
if (print_errors)
{
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf,
_("%s: option requires an argument -- '%c'\n"),
argv[0], c) >= 0)
{
_IO_flockfile (stderr);
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
__fxprintf (NULL, "%s", buf);
((_IO_FILE *) stderr)->_flags2 = old_flags2;
_IO_funlockfile (stderr);
free (buf);
}
#else
fprintf (stderr,
_("%s: option requires an argument -- '%c'\n"),
argv[0], c);
#endif
}
d->optopt = c;
if (optstring[0] == ':')
c = ':';
else
c = '?';
return c;
}
else
/* We already incremented `d->optind' once;
increment it again when taking next ARGV-elt as argument. */
d->optarg = argv[d->optind++];
/* optarg is now the argument, see if it's in the
table of longopts. */
for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
nameend++)
/* Do nothing. */ ;
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
{
if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name))
{
/* Exact match found. */
pfound = p;
indfound = option_index;
exact = 1;
break;
}
else if (pfound == NULL)
{
/* First nonexact match found. */
pfound = p;
indfound = option_index;
}
else if (long_only
|| pfound->has_arg != p->has_arg
|| pfound->flag != p->flag
|| pfound->val != p->val)
/* Second or later nonexact match found. */
ambig = 1;
}
if (ambig && !exact)
{
if (print_errors)
{
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"),
argv[0], d->optarg) >= 0)
{
_IO_flockfile (stderr);
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
__fxprintf (NULL, "%s", buf);
((_IO_FILE *) stderr)->_flags2 = old_flags2;
_IO_funlockfile (stderr);
free (buf);
}
#else
fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
argv[0], d->optarg);
#endif
}
d->__nextchar += strlen (d->__nextchar);
d->optind++;
return '?';
}
if (pfound != NULL)
{
option_index = indfound;
if (*nameend)
{
/* Don't test has_arg with >, because some C compilers don't
allow it to be used on enums. */
if (pfound->has_arg)
d->optarg = nameend + 1;
else
{
if (print_errors)
{
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf, _("\
%s: option '-W %s' doesn't allow an argument\n"),
argv[0], pfound->name) >= 0)
{
_IO_flockfile (stderr);
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
((_IO_FILE *) stderr)->_flags2
|= _IO_FLAGS2_NOTCANCEL;
__fxprintf (NULL, "%s", buf);
((_IO_FILE *) stderr)->_flags2 = old_flags2;
_IO_funlockfile (stderr);
free (buf);
}
#else
fprintf (stderr, _("\
%s: option '-W %s' doesn't allow an argument\n"),
argv[0], pfound->name);
#endif
}
d->__nextchar += strlen (d->__nextchar);
return '?';
}
}
else if (pfound->has_arg == 1)
{
if (d->optind < argc)
d->optarg = argv[d->optind++];
else
{
if (print_errors)
{
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf, _("\
%s: option '-W %s' requires an argument\n"),
argv[0], pfound->name) >= 0)
{
_IO_flockfile (stderr);
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
((_IO_FILE *) stderr)->_flags2
|= _IO_FLAGS2_NOTCANCEL;
__fxprintf (NULL, "%s", buf);
((_IO_FILE *) stderr)->_flags2 = old_flags2;
_IO_funlockfile (stderr);
free (buf);
}
#else
fprintf (stderr, _("\
%s: option '-W %s' requires an argument\n"),
argv[0], pfound->name);
#endif
}
d->__nextchar += strlen (d->__nextchar);
return optstring[0] == ':' ? ':' : '?';
}
}
else
d->optarg = NULL;
d->__nextchar += strlen (d->__nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)
{
*(pfound->flag) = pfound->val;
return 0;
}
return pfound->val;
}
no_longs:
d->__nextchar = NULL;
return 'W'; /* Let the application handle it. */
}
if (temp[1] == ':')
{
if (temp[2] == ':')
{
/* This is an option that accepts an argument optionally. */
if (*d->__nextchar != '\0')
{
d->optarg = d->__nextchar;
d->optind++;
}
else
d->optarg = NULL;
d->__nextchar = NULL;
}
else
{
/* This is an option that requires an argument. */
if (*d->__nextchar != '\0')
{
d->optarg = d->__nextchar;
/* If we end this ARGV-element by taking the rest as an arg,
we must advance to the next element now. */
d->optind++;
}
else if (d->optind == argc)
{
if (print_errors)
{
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf, _("\
%s: option requires an argument -- '%c'\n"),
argv[0], c) >= 0)
{
_IO_flockfile (stderr);
int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
__fxprintf (NULL, "%s", buf);
((_IO_FILE *) stderr)->_flags2 = old_flags2;
_IO_funlockfile (stderr);
free (buf);
}
#else
fprintf (stderr,
_("%s: option requires an argument -- '%c'\n"),
argv[0], c);
#endif
}
d->optopt = c;
if (optstring[0] == ':')
c = ':';
else
c = '?';
}
else
/* We already incremented `optind' once;
increment it again when taking next ARGV-elt as argument. */
d->optarg = argv[d->optind++];
d->__nextchar = NULL;
}
}
return c;
}
}
int
_getopt_internal (int argc, char **argv, const char *optstring,
const struct option *longopts, int *longind, int long_only,
int posixly_correct)
{
int result;
getopt_data.optind = optind;
getopt_data.opterr = opterr;
result = _getopt_internal_r (argc, argv, optstring, longopts,
longind, long_only, &getopt_data,
posixly_correct);
optind = getopt_data.optind;
optarg = getopt_data.optarg;
optopt = getopt_data.optopt;
return result;
}
/* glibc gets a LSB-compliant getopt.
Standalone applications get a POSIX-compliant getopt. */
#if _LIBC
enum { POSIXLY_CORRECT = 0 };
#else
enum { POSIXLY_CORRECT = 1 };
#endif
int
getopt (int argc, char *const *argv, const char *optstring)
{
return _getopt_internal (argc, (char **) argv, optstring,
(const struct option *) 0,
(int *) 0,
0, POSIXLY_CORRECT);
}
#ifdef _LIBC
int
__posix_getopt (int argc, char *const *argv, const char *optstring)
{
return _getopt_internal (argc, argv, optstring,
(const struct option *) 0,
(int *) 0,
0, 1);
}
#endif
#ifdef TEST
/* Compile with -DTEST to make an executable for use in testing
the above definition of `getopt'. */
int
main (int argc, char **argv)
{
int c;
int digit_optind = 0;
while (1)
{
int this_option_optind = optind ? optind : 1;
c = getopt (argc, argv, "abc:d:0123456789");
if (c == -1)
break;
switch (c)
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
if (digit_optind != 0 && digit_optind != this_option_optind)
printf ("digits occur in two different argv-elements.\n");
digit_optind = this_option_optind;
printf ("option %c\n", c);
break;
case 'a':
printf ("option a\n");
break;
case 'b':
printf ("option b\n");
break;
case 'c':
printf ("option c with value '%s'\n", optarg);
break;
case '?':
break;
default:
printf ("?? getopt returned character code 0%o ??\n", c);
}
}
if (optind < argc)
{
printf ("non-option ARGV-elements: ");
while (optind < argc)
printf ("%s ", argv[optind++]);
printf ("\n");
}
exit (0);
}
#endif /* TEST */
gss-1.0.2/src/gl/gettext.h 0000644 0000000 0000000 00000010444 11662447025 012235 0000000 0000000 /* Convenience header for conditional use of GNU .
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software
Foundation, Inc.
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, 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. */
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */
#if ENABLE_NLS
/* Get declarations of GNU message catalog functions. */
# include
/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
the gettext() and ngettext() macros. This is an alternative to calling
textdomain(), and is useful for libraries. */
# ifdef DEFAULT_TEXT_DOMAIN
# undef gettext
# define gettext(Msgid) \
dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
# undef ngettext
# define ngettext(Msgid1, Msgid2, N) \
dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
# endif
#else
/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
chokes if dcgettext is defined as a macro. So include it now, to make
later inclusions of a NOP. We don't include
as well because people using "gettext.h" will not include ,
and also including would fail on SunOS 4, whereas
is OK. */
#if defined(__sun)
# include
#endif
/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
, which chokes if dcgettext is defined as a macro. So include
it now, to make later inclusions of a NOP. */
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
# include
# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
# include
# endif
#endif
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions.
On pre-ANSI systems without 'const', the config.h file is supposed to
contain "#define const". */
# undef gettext
# define gettext(Msgid) ((const char *) (Msgid))
# undef dgettext
# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
# undef dcgettext
# define dcgettext(Domainname, Msgid, Category) \
((void) (Category), dgettext (Domainname, Msgid))
# undef ngettext
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 \
? ((void) (Msgid2), (const char *) (Msgid1)) \
: ((void) (Msgid1), (const char *) (Msgid2)))
# undef dngettext
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((void) (Domainname), ngettext (Msgid1, Msgid2, N))
# undef dcngettext
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
# undef textdomain
# define textdomain(Domainname) ((const char *) (Domainname))
# undef bindtextdomain
# define bindtextdomain(Domainname, Dirname) \
((void) (Domainname), (const char *) (Dirname))
# undef bind_textdomain_codeset
# define bind_textdomain_codeset(Domainname, Codeset) \
((void) (Domainname), (const char *) (Codeset))
#endif
/* Prefer gnulib's setlocale override over libintl's setlocale override. */
#ifdef GNULIB_defined_setlocale
# undef setlocale
# define setlocale rpl_setlocale
#endif
/* A pseudo function call that serves as a marker for the automated
extraction of messages, but does not call gettext(). The run-time
translation is done at a different place in the code.
The argument, String, should be a literal string. Concatenated strings
and other string expressions won't work.
The macro's expansion is not parenthesized, so that it is suitable as
initializer for static 'char[]' or 'const char[]' variables. */
#define gettext_noop(String) String
#endif /* _LIBGETTEXT_H */
gss-1.0.2/src/gl/verify.h 0000644 0000000 0000000 00000022762 11662447025 012063 0000000 0000000 /* Compile-time assert-like macros.
Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
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 . */
/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
#ifndef _GL_VERIFY_H
# define _GL_VERIFY_H
/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per the
C1X draft N1548 section 6.7.10. This is supported by GCC 4.6.0 and
later, in C mode, and its use here generates easier-to-read diagnostics
when verify (R) fails.
Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per the
C++0X draft N3242 section 7.(4).
This will likely be supported by future GCC versions, in C++ mode.
Use this only with GCC. If we were willing to slow 'configure'
down we could also use it with other compilers, but since this
affects only the quality of diagnostics, why bother? */
# if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined __cplusplus
# define _GL_HAVE__STATIC_ASSERT 1
# endif
/* The condition (99 < __GNUC__) is temporary, until we know about the
first G++ release that supports static_assert. */
# if (99 < __GNUC__) && defined __cplusplus
# define _GL_HAVE_STATIC_ASSERT 1
# endif
/* Each of these macros verifies that its argument R is nonzero. To
be portable, R should be an integer constant expression. Unlike
assert (R), there is no run-time overhead.
If _Static_assert works, verify (R) uses it directly. Similarly,
_GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct
that is an operand of sizeof.
The code below uses several ideas for C++ compilers, and for C
compilers that do not support _Static_assert:
* The first step is ((R) ? 1 : -1). Given an expression R, of
integral or boolean or floating-point type, this yields an
expression of integral type, whose value is later verified to be
constant and nonnegative.
* Next this expression W is wrapped in a type
struct _gl_verify_type {
unsigned int _gl_verify_error_if_negative: W;
}.
If W is negative, this yields a compile-time error. No compiler can
deal with a bit-field of negative size.
One might think that an array size check would have the same
effect, that is, that the type struct { unsigned int dummy[W]; }
would work as well. However, inside a function, some compilers
(such as C++ compilers and GNU C) allow local parameters and
variables inside array size expressions. With these compilers,
an array size check would not properly diagnose this misuse of
the verify macro:
void function (int n) { verify (n < 0); }
* For the verify macro, the struct _gl_verify_type will need to
somehow be embedded into a declaration. To be portable, this
declaration must declare an object, a constant, a function, or a
typedef name. If the declared entity uses the type directly,
such as in
struct dummy {...};
typedef struct {...} dummy;
extern struct {...} *dummy;
extern void dummy (struct {...} *);
extern struct {...} *dummy (void);
two uses of the verify macro would yield colliding declarations
if the entity names are not disambiguated. A workaround is to
attach the current line number to the entity name:
#define _GL_CONCAT0(x, y) x##y
#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
extern struct {...} * _GL_CONCAT (dummy, __LINE__);
But this has the problem that two invocations of verify from
within the same macro would collide, since the __LINE__ value
would be the same for both invocations. (The GCC __COUNTER__
macro solves this problem, but is not portable.)
A solution is to use the sizeof operator. It yields a number,
getting rid of the identity of the type. Declarations like
extern int dummy [sizeof (struct {...})];
extern void dummy (int [sizeof (struct {...})]);
extern int (*dummy (void)) [sizeof (struct {...})];
can be repeated.
* Should the implementation use a named struct or an unnamed struct?
Which of the following alternatives can be used?
extern int dummy [sizeof (struct {...})];
extern int dummy [sizeof (struct _gl_verify_type {...})];
extern void dummy (int [sizeof (struct {...})]);
extern void dummy (int [sizeof (struct _gl_verify_type {...})]);
extern int (*dummy (void)) [sizeof (struct {...})];
extern int (*dummy (void)) [sizeof (struct _gl_verify_type {...})];
In the second and sixth case, the struct type is exported to the
outer scope; two such declarations therefore collide. GCC warns
about the first, third, and fourth cases. So the only remaining
possibility is the fifth case:
extern int (*dummy (void)) [sizeof (struct {...})];
* GCC warns about duplicate declarations of the dummy function if
-Wredundant_decls is used. GCC 4.3 and later have a builtin
__COUNTER__ macro that can let us generate unique identifiers for
each dummy function, to suppress this warning.
* This implementation exploits the fact that older versions of GCC,
which do not support _Static_assert, also do not warn about the
last declaration mentioned above.
* In C++, any struct definition inside sizeof is invalid.
Use a template type to work around the problem. */
/* Concatenate two preprocessor tokens. */
# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
# define _GL_CONCAT0(x, y) x##y
/* _GL_COUNTER is an integer, preferably one that changes each time we
use it. Use __COUNTER__ if it works, falling back on __LINE__
otherwise. __LINE__ isn't perfect, but it's better than a
constant. */
# if defined __COUNTER__ && __COUNTER__ != __COUNTER__
# define _GL_COUNTER __COUNTER__
# else
# define _GL_COUNTER __LINE__
# endif
/* Generate a symbol with the given prefix, making it unique if
possible. */
# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
/* Verify requirement R at compile-time, as an integer constant expression
that returns 1. If R is false, fail at compile-time, preferably
with a diagnostic that includes the string-literal DIAGNOSTIC. */
# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
(!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
# ifdef __cplusplus
# if !GNULIB_defined_struct__gl_verify_type
template
struct _gl_verify_type {
unsigned int _gl_verify_error_if_negative: w;
};
# define GNULIB_defined_struct__gl_verify_type 1
# endif
# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
_gl_verify_type<(R) ? 1 : -1>
# elif defined _GL_HAVE__STATIC_ASSERT
# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
struct { \
_Static_assert (R, DIAGNOSTIC); \
int _gl_dummy; \
}
# else
# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
# endif
/* Verify requirement R at compile-time, as a declaration without a
trailing ';'. If R is false, fail at compile-time, preferably
with a diagnostic that includes the string-literal DIAGNOSTIC.
Unfortunately, unlike C1X, this implementation must appear as an
ordinary declaration, and cannot appear inside struct { ... }. */
# ifdef _GL_HAVE__STATIC_ASSERT
# define _GL_VERIFY _Static_assert
# else
# define _GL_VERIFY(R, DIAGNOSTIC) \
extern int (*_GL_GENSYM (_gl_verify_function) (void)) \
[_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
# endif
/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */
# ifdef _GL_STATIC_ASSERT_H
# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
# endif
# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
# define static_assert _Static_assert /* Draft C1X requires this #define. */
# endif
# endif
/* @assert.h omit start@ */
/* Each of these macros verifies that its argument R is nonzero. To
be portable, R should be an integer constant expression. Unlike
assert (R), there is no run-time overhead.
There are two macros, since no single macro can be used in all
contexts in C. verify_true (R) is for scalar contexts, including
integer constant expression contexts. verify (R) is for declaration
contexts, e.g., the top level. */
/* Verify requirement R at compile-time, as an integer constant expression.
Return 1. This is equivalent to verify_expr (R, 1).
verify_true is obsolescent; please use verify_expr instead. */
# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
/* Verify requirement R at compile-time. Return the value of the
expression E. */
# define verify_expr(R, E) \
(_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
/* Verify requirement R at compile-time, as a declaration without a
trailing ';'. */
# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
/* @assert.h omit end@ */
#endif
gss-1.0.2/src/gl/m4/ 0000755 0000000 0000000 00000000000 11663555055 011001 5 0000000 0000000 gss-1.0.2/src/gl/m4/gnulib-cache.m4 0000644 0000000 0000000 00000003733 11662447025 013506 0000000 0000000 # Copyright (C) 2002-2011 Free Software Foundation, Inc.
#
# This file 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 file 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 file. If not, see .
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
#
# This file represents the specification of how gnulib-tool is used.
# It acts as a cache: It is written and read by gnulib-tool.
# In projects that use version control, this file is meant to be put under
# version control, like the configure.ac and various Makefile.am files.
# Specification in the form of a command-line invocation:
# gnulib-tool --import --dir=. --local-dir=src/gl/override --lib=libgnu --source-base=src/gl --m4-base=src/gl/m4 --doc-base=doc --tests-base=src/gl/tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=srcgl --no-vc-files error getopt-gnu progname version-etc
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([src/gl/override])
gl_MODULES([
error
getopt-gnu
progname
version-etc
])
gl_AVOID([])
gl_SOURCE_BASE([src/gl])
gl_M4_BASE([src/gl/m4])
gl_PO_BASE([])
gl_DOC_BASE([doc])
gl_TESTS_BASE([src/gl/tests])
gl_LIB([libgnu])
gl_MAKEFILE_NAME([])
gl_LIBTOOL
gl_MACRO_PREFIX([srcgl])
gl_PO_DOMAIN([])
gl_WITNESS_C_DOMAIN([])
gl_VC_FILES([false])
gss-1.0.2/src/gl/m4/stdarg.m4 0000644 0000000 0000000 00000005404 11662447025 012446 0000000 0000000 # stdarg.m4 serial 6
dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
dnl Provide a working va_copy in combination with .
AC_DEFUN([gl_STDARG_H],
[
STDARG_H=''
NEXT_STDARG_H=''
AC_MSG_CHECKING([for va_copy])
AC_CACHE_VAL([gl_cv_func_va_copy], [
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include ]],
[[
#ifndef va_copy
void (*func) (va_list, va_list) = va_copy;
#endif
]])],
[gl_cv_func_va_copy=yes],
[gl_cv_func_va_copy=no])])
AC_MSG_RESULT([$gl_cv_func_va_copy])
if test $gl_cv_func_va_copy = no; then
dnl Provide a substitute.
dnl Usually a simple definition in is enough. Not so on AIX 5
dnl with some versions of the /usr/vac/bin/cc compiler. It has an
dnl which does '#undef va_copy', leading to a missing va_copy symbol. For
dnl this platform, we use an substitute. But we cannot use this
dnl approach on other platforms, because often defines only
dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do
dnl not work in this situation.
AC_EGREP_CPP([vaccine],
[#if defined _AIX && !defined __GNUC__
AIX vaccine
#endif
], [gl_aixcc=yes], [gl_aixcc=no])
if test $gl_aixcc = yes; then
dnl Provide a substitute file.
STDARG_H=stdarg.h
gl_NEXT_HEADERS([stdarg.h])
dnl Fallback for the case when contains only macro definitions.
if test "$gl_cv_next_stdarg_h" = '""'; then
gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
NEXT_STDARG_H="$gl_cv_next_stdarg_h"
fi
else
dnl Provide a substitute in , either __va_copy or as a simple
dnl assignment.
gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include ]],
[[
#ifndef __va_copy
error, bail out
#endif
]])],
[gl_cv_func___va_copy=yes],
[gl_cv_func___va_copy=no])])
if test $gl_cv_func___va_copy = yes; then
AC_DEFINE([va_copy], [__va_copy],
[Define as a macro for copying va_list variables.])
else
AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */
#define gl_va_copy(a,b) ((a) = (b))])
AC_DEFINE([va_copy], [gl_va_copy],
[Define as a macro for copying va_list variables.])
fi
fi
fi
AC_SUBST([STDARG_H])
AM_CONDITIONAL([GL_GENERATE_STDARG_H], [test -n "$STDARG_H"])
AC_SUBST([NEXT_STDARG_H])
])
gss-1.0.2/src/gl/m4/version-etc.m4 0000644 0000000 0000000 00000002226 11662447025 013417 0000000 0000000 # version-etc.m4 serial 1
# Copyright (C) 2009-2011 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
dnl $1 - configure flag and define name
dnl $2 - human readable description
m4_define([gl_VERSION_ETC_FLAG],
[dnl
AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])],
[dnl
case $withval in
yes|no) ;;
*) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;;
esac
])
])
AC_DEFUN([gl_VERSION_ETC],
[dnl
gl_VERSION_ETC_FLAG([packager],
[String identifying the packager of this software])
gl_VERSION_ETC_FLAG([packager-version],
[Packager-specific version information])
gl_VERSION_ETC_FLAG([packager-bug-reports],
[Packager info for bug reports (URL/e-mail/...)])
if test "X$with_packager" = "X" && \
test "X$with_packager_version$with_packager_bug_reports" != "X"
then
AC_MSG_ERROR([The --with-packager-{bug-reports,version} options require --with-packager])
fi
])
gss-1.0.2/src/gl/m4/sys_socket_h.m4 0000644 0000000 0000000 00000014217 11662447025 013661 0000000 0000000 # sys_socket_h.m4 serial 22
dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Simon Josefsson.
AC_DEFUN([gl_HEADER_SYS_SOCKET],
[
AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_C_INLINE])
dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
dnl old-style declarations (with return type 'int' instead of 'ssize_t')
dnl unless _POSIX_PII_SOCKET is defined.
case "$host_os" in
osf*)
AC_DEFINE([_POSIX_PII_SOCKET], [1],
[Define to 1 in order to get the POSIX compatible declarations
of socket functions.])
;;
esac
AC_CACHE_CHECK([whether is self-contained],
[gl_cv_header_sys_socket_h_selfcontained],
[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])],
[gl_cv_header_sys_socket_h_selfcontained=yes],
[gl_cv_header_sys_socket_h_selfcontained=no])
])
if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
dnl If the shutdown function exists, should define
dnl SHUT_RD, SHUT_WR, SHUT_RDWR.
AC_CHECK_FUNCS([shutdown])
if test $ac_cv_func_shutdown = yes; then
AC_CACHE_CHECK([whether defines the SHUT_* macros],
[gl_cv_header_sys_socket_h_shut],
[
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include ]],
[[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])],
[gl_cv_header_sys_socket_h_shut=yes],
[gl_cv_header_sys_socket_h_shut=no])
])
if test $gl_cv_header_sys_socket_h_shut = no; then
SYS_SOCKET_H='sys/socket.h'
fi
fi
fi
# We need to check for ws2tcpip.h now.
gl_PREREQ_SYS_H_SOCKET
AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[
/* sys/types.h is not needed according to POSIX, but the
sys/socket.h in i386-unknown-freebsd4.10 and
powerpc-apple-darwin5.5 required it. */
#include