Import Upstream version 1.0.3
This commit is contained in:
parent
ed8d36a434
commit
c12028eeaa
196 changed files with 43077 additions and 32886 deletions
547
ABOUT-NLS
547
ABOUT-NLS
|
@ -113,6 +113,13 @@ But in fact, some languages have dialects in different countries. For
|
||||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||||
country code serves to distinguish the dialects.
|
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 country by running the command
|
||||||
|
`locale -a | grep '^LL''.
|
||||||
|
|
||||||
Not all programs have translations for all languages. By default, an
|
Not all programs have translations for all languages. By default, an
|
||||||
English message is shown in place of a nonexistent translation. If you
|
English message is shown in place of a nonexistent translation. If you
|
||||||
understand other languages, you can set up a priority list of languages.
|
understand other languages, you can set up a priority list of languages.
|
||||||
|
@ -164,128 +171,422 @@ Available Packages
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Languages are not equally supported in all packages. The following
|
Languages are not equally supported in all packages. The following
|
||||||
matrix shows the current state of internationalization, as of September
|
matrix shows the current state of internationalization, as of May 2003.
|
||||||
2001. The matrix shows, in regard of each package, for which languages
|
The matrix shows, in regard of each package, for which languages PO
|
||||||
PO files have been submitted to translation coordination, with a
|
files have been submitted to translation coordination, with a
|
||||||
translation percentage of at least 50%.
|
translation percentage of at least 50%.
|
||||||
|
|
||||||
Ready PO files bg cs da de el en eo es et fi fr gl he hr id it ja
|
Ready PO files am az be bg ca cs da de el en en_GB eo es
|
||||||
+----------------------------------------------------+
|
+-------------------------------------------+
|
||||||
a2ps | [] [] [] |
|
a2ps | [] [] [] [] |
|
||||||
bash | [] [] [] [] |
|
aegis | () |
|
||||||
bfd | |
|
anubis | |
|
||||||
binutils | [] |
|
ap-utils | |
|
||||||
bison | [] [] [] [] [] |
|
bash | [] [] [] |
|
||||||
clisp | [] [] [] [] |
|
batchelor | |
|
||||||
cpio | [] [] [] [] [] |
|
bfd | [] [] |
|
||||||
diffutils | [] [] [] [] [] [] [] |
|
binutils | [] [] |
|
||||||
enscript | [] [] |
|
bison | [] [] [] |
|
||||||
error | [] [] |
|
bluez-pin | [] [] |
|
||||||
fetchmail | |
|
clisp | |
|
||||||
fileutils | [] [] [] [] [] [] [] [] |
|
clisp | [] [] [] |
|
||||||
findutils | [] [] [] [] [] [] [] [] |
|
coreutils | [] [] [] [] |
|
||||||
flex | [] [] [] |
|
cpio | [] [] [] |
|
||||||
freetype | |
|
darkstat | () [] |
|
||||||
gas | |
|
diffutils | [] [] [] [] [] [] [] |
|
||||||
gawk | [] [] |
|
e2fsprogs | [] [] |
|
||||||
gcal | |
|
enscript | [] [] [] [] |
|
||||||
gcc | |
|
error | [] [] [] [] [] |
|
||||||
gettext | [] [] [] [] [] [] [] [] [] [] |
|
fetchmail | [] () [] [] [] [] |
|
||||||
gnupg | [] [] [] [] [] [] [] |
|
fileutils | [] [] [] |
|
||||||
gprof | |
|
findutils | [] [] [] [] [] [] |
|
||||||
grep | [] [] [] [] [] [] [] [] |
|
flex | [] [] [] [] |
|
||||||
hello | [] [] [] [] [] [] [] [] [] [] [] |
|
gas | [] |
|
||||||
id-utils | [] [] [] |
|
gawk | [] [] [] [] |
|
||||||
indent | [] [] [] [] [] |
|
gcal | [] |
|
||||||
jpilot | [] |
|
gcc | [] [] |
|
||||||
kbd | |
|
gettext | [] [] [] [] [] |
|
||||||
ld | [] |
|
gettext-runtime | [] [] [] [] [] |
|
||||||
libc | [] [] [] [] [] [] [] [] |
|
gettext-tools | [] [] |
|
||||||
lilypond | [] |
|
gimp-print | [] [] [] [] [] |
|
||||||
lynx | [] [] [] [] |
|
gliv | |
|
||||||
m4 | [] [] [] [] [] [] [] [] |
|
glunarclock | [] [] [] |
|
||||||
make | [] [] [] [] [] [] |
|
gnucash | () [] |
|
||||||
mysecretdiary | [] |
|
gnucash-glossary | [] () [] |
|
||||||
nano | [] [] [] |
|
gnupg | [] () [] [] [] [] |
|
||||||
opcodes | |
|
gpe-calendar | [] |
|
||||||
parted | [] [] [] |
|
gpe-conf | [] |
|
||||||
ptx | [] [] [] [] [] [] [] |
|
gpe-contacts | [] |
|
||||||
python | |
|
gpe-edit | |
|
||||||
recode | [] [] [] [] [] [] [] [] [] |
|
gpe-login | [] |
|
||||||
sed | [] [] [] [] [] [] [] [] [] [] [] [] |
|
gpe-ownerinfo | [] |
|
||||||
sh-utils | [] [] [] [] [] [] [] [] [] [] |
|
gpe-sketchbook | [] |
|
||||||
sharutils | [] [] [] [] [] [] [] [] |
|
gpe-timesheet | |
|
||||||
sketch | |
|
gpe-today | [] |
|
||||||
soundtracker | [] [] [] |
|
gpe-todo | [] |
|
||||||
sp | |
|
gphoto2 | [] [] [] [] |
|
||||||
tar | [] [] [] [] [] [] [] [] |
|
gprof | [] [] |
|
||||||
texinfo | [] [] [] [] [] [] |
|
gpsdrive | () () () |
|
||||||
textutils | [] [] [] [] [] [] [] [] |
|
grep | [] [] [] [] [] |
|
||||||
util-linux | [] [] |
|
gretl | [] |
|
||||||
wdiff | [] [] [] |
|
hello | [] [] [] [] [] [] |
|
||||||
wget | [] [] [] [] [] [] [] [] [] [] |
|
id-utils | [] [] |
|
||||||
+----------------------------------------------------+
|
indent | [] [] [] [] |
|
||||||
bg cs da de el en eo es et fi fr gl he hr id it ja
|
jpilot | [] [] [] [] |
|
||||||
0 14 24 32 11 1 8 23 13 1 33 22 4 0 7 9 18
|
jwhois | [] |
|
||||||
|
kbd | [] [] [] [] [] |
|
||||||
|
ld | [] [] |
|
||||||
|
libc | [] [] [] [] [] [] |
|
||||||
|
libgpewidget | [] |
|
||||||
|
libiconv | [] [] [] [] [] |
|
||||||
|
lifelines | [] () |
|
||||||
|
lilypond | [] |
|
||||||
|
lingoteach | |
|
||||||
|
lingoteach_lessons | () () |
|
||||||
|
lynx | [] [] [] [] |
|
||||||
|
m4 | [] [] [] [] |
|
||||||
|
mailutils | [] [] |
|
||||||
|
make | [] [] [] |
|
||||||
|
man-db | [] () [] [] () |
|
||||||
|
mysecretdiary | [] [] [] |
|
||||||
|
nano | [] () [] [] [] |
|
||||||
|
nano_1_0 | [] () [] [] [] |
|
||||||
|
opcodes | [] [] |
|
||||||
|
parted | [] [] [] [] [] |
|
||||||
|
ptx | [] [] [] [] [] |
|
||||||
|
python | |
|
||||||
|
radius | |
|
||||||
|
recode | [] [] [] [] [] [] |
|
||||||
|
screem | |
|
||||||
|
sed | [] [] [] [] [] |
|
||||||
|
sh-utils | [] [] [] |
|
||||||
|
sharutils | [] [] [] [] [] [] |
|
||||||
|
sketch | [] () [] |
|
||||||
|
soundtracker | [] [] [] |
|
||||||
|
sp | [] |
|
||||||
|
tar | [] [] [] [] |
|
||||||
|
texinfo | [] [] [] [] |
|
||||||
|
textutils | [] [] [] [] |
|
||||||
|
tin | () () |
|
||||||
|
util-linux | [] [] [] [] [] |
|
||||||
|
vorbis-tools | [] [] [] |
|
||||||
|
wastesedge | () |
|
||||||
|
wdiff | [] [] [] [] |
|
||||||
|
wget | [] [] [] [] [] [] [] |
|
||||||
|
xchat | [] [] [] |
|
||||||
|
xpad | |
|
||||||
|
+-------------------------------------------+
|
||||||
|
am az be bg ca cs da de el en en_GB eo es
|
||||||
|
0 1 4 2 31 17 54 60 14 1 4 12 56
|
||||||
|
|
||||||
ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
|
et fa fi fr ga gl he hr hu id it ja ko
|
||||||
+----------------------------------------------------+
|
+----------------------------------------+
|
||||||
a2ps | [] [] [] | 6
|
a2ps | [] [] [] () () |
|
||||||
bash | | 4
|
aegis | |
|
||||||
bfd | | 0
|
anubis | [] |
|
||||||
binutils | | 1
|
ap-utils | [] |
|
||||||
bison | [] | 6
|
bash | [] [] |
|
||||||
clisp | [] | 5
|
batchelor | [] |
|
||||||
cpio | [] [] [] [] [] | 10
|
bfd | [] [] |
|
||||||
diffutils | [] [] [] [] | 11
|
binutils | [] [] |
|
||||||
enscript | [] [] [] | 5
|
bison | [] [] [] [] |
|
||||||
error | [] [] | 4
|
bluez-pin | [] [] [] [] |
|
||||||
fetchmail | | 0
|
clisp | |
|
||||||
fileutils | [] [] [] [] [] [] [] [] [] | 17
|
clisp | [] |
|
||||||
findutils | [] [] [] [] [] [] [] [] | 16
|
coreutils | [] [] [] [] |
|
||||||
flex | [] [] [] | 6
|
cpio | [] [] [] [] |
|
||||||
freetype | | 0
|
darkstat | () [] [] [] |
|
||||||
gas | | 0
|
diffutils | [] [] [] [] [] [] [] |
|
||||||
gawk | [] | 3
|
e2fsprogs | |
|
||||||
gcal | | 0
|
enscript | [] [] |
|
||||||
gcc | | 0
|
error | [] [] [] [] |
|
||||||
gettext | [] [] [] [] [] [] [] [] | 18
|
fetchmail | [] |
|
||||||
gnupg | [] [] [] | 10
|
fileutils | [] [] [] [] [] |
|
||||||
gprof | | 0
|
findutils | [] [] [] [] [] [] [] [] [] [] [] |
|
||||||
grep | [] [] [] [] | 12
|
flex | [] [] |
|
||||||
hello | [] [] [] [] [] [] [] [] [] [] [] | 22
|
gas | [] |
|
||||||
id-utils | [] [] [] | 6
|
gawk | [] [] |
|
||||||
indent | [] [] [] [] [] [] [] | 12
|
gcal | [] |
|
||||||
jpilot | | 1
|
gcc | [] |
|
||||||
kbd | [] | 1
|
gettext | [] [] [] |
|
||||||
ld | | 1
|
gettext-runtime | [] [] [] [] |
|
||||||
libc | [] [] [] [] [] [] [] [] | 16
|
gettext-tools | [] |
|
||||||
lilypond | [] [] | 3
|
gimp-print | [] [] |
|
||||||
lynx | [] [] [] [] | 8
|
gliv | () |
|
||||||
m4 | [] [] [] [] | 12
|
glunarclock | [] [] [] [] |
|
||||||
make | [] [] [] [] [] [] | 12
|
gnucash | [] |
|
||||||
mysecretdiary | | 1
|
gnucash-glossary | [] |
|
||||||
nano | [] | 4
|
gnupg | [] [] [] [] [] [] [] |
|
||||||
opcodes | [] | 1
|
gpe-calendar | [] |
|
||||||
parted | [] [] | 5
|
gpe-conf | |
|
||||||
ptx | [] [] [] [] [] [] [] [] | 15
|
gpe-contacts | [] |
|
||||||
python | | 0
|
gpe-edit | [] [] |
|
||||||
recode | [] [] [] [] | 13
|
gpe-login | [] |
|
||||||
sed | [] [] [] [] [] [] [] | 19
|
gpe-ownerinfo | [] [] [] |
|
||||||
sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 21
|
gpe-sketchbook | [] |
|
||||||
sharutils | [] [] [] | 11
|
gpe-timesheet | [] [] [] |
|
||||||
sketch | | 0
|
gpe-today | [] [] |
|
||||||
soundtracker | | 3
|
gpe-todo | [] [] |
|
||||||
sp | | 0
|
gphoto2 | [] [] [] |
|
||||||
tar | [] [] [] [] [] [] [] | 15
|
gprof | [] [] |
|
||||||
texinfo | [] | 7
|
gpsdrive | () [] () () |
|
||||||
textutils | [] [] [] [] [] [] [] [] | 16
|
grep | [] [] [] [] [] [] [] [] [] [] [] |
|
||||||
util-linux | [] [] | 4
|
gretl | [] |
|
||||||
wdiff | [] [] [] [] | 7
|
hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||||
wget | [] [] [] [] [] [] [] | 17
|
id-utils | [] [] [] |
|
||||||
+----------------------------------------------------+
|
indent | [] [] [] [] [] [] [] [] |
|
||||||
33 teams ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
|
jpilot | [] () |
|
||||||
53 domains 9 1 6 20 0 6 17 1 13 25 10 11 23 21 2 2 387
|
jwhois | [] [] [] [] |
|
||||||
|
kbd | [] |
|
||||||
|
ld | [] |
|
||||||
|
libc | [] [] [] [] [] [] |
|
||||||
|
libgpewidget | [] [] [] |
|
||||||
|
libiconv | [] [] [] [] [] [] [] [] |
|
||||||
|
lifelines | () |
|
||||||
|
lilypond | [] |
|
||||||
|
lingoteach | [] [] |
|
||||||
|
lingoteach_lessons | |
|
||||||
|
lynx | [] [] [] [] |
|
||||||
|
m4 | [] [] [] [] |
|
||||||
|
mailutils | |
|
||||||
|
make | [] [] [] [] [] [] |
|
||||||
|
man-db | [] () () |
|
||||||
|
mysecretdiary | [] [] |
|
||||||
|
nano | [] [] [] [] |
|
||||||
|
nano_1_0 | [] [] [] [] |
|
||||||
|
opcodes | [] [] |
|
||||||
|
parted | [] [] [] |
|
||||||
|
ptx | [] [] [] [] [] [] [] |
|
||||||
|
python | |
|
||||||
|
radius | |
|
||||||
|
recode | [] [] [] [] [] [] |
|
||||||
|
screem | |
|
||||||
|
sed | [] [] [] [] [] [] [] [] |
|
||||||
|
sh-utils | [] [] [] [] [] [] |
|
||||||
|
sharutils | [] [] [] [] [] |
|
||||||
|
sketch | [] |
|
||||||
|
soundtracker | [] [] [] |
|
||||||
|
sp | [] () |
|
||||||
|
tar | [] [] [] [] [] [] [] [] [] |
|
||||||
|
texinfo | [] [] [] [] |
|
||||||
|
textutils | [] [] [] [] [] |
|
||||||
|
tin | [] () |
|
||||||
|
util-linux | [] [] [] [] () [] |
|
||||||
|
vorbis-tools | [] |
|
||||||
|
wastesedge | () |
|
||||||
|
wdiff | [] [] [] [] [] |
|
||||||
|
wget | [] [] [] [] [] [] [] [] |
|
||||||
|
xchat | [] [] [] |
|
||||||
|
xpad | |
|
||||||
|
+----------------------------------------+
|
||||||
|
et fa fi fr ga gl he hr hu id it ja ko
|
||||||
|
20 1 15 73 14 24 8 10 30 31 19 31 9
|
||||||
|
|
||||||
|
lg lt lv ms nb nl nn no pl pt pt_BR ro
|
||||||
|
+----------------------------------------+
|
||||||
|
a2ps | [] [] () () () [] [] |
|
||||||
|
aegis | () |
|
||||||
|
anubis | [] [] |
|
||||||
|
ap-utils | () |
|
||||||
|
bash | [] |
|
||||||
|
batchelor | |
|
||||||
|
bfd | |
|
||||||
|
binutils | |
|
||||||
|
bison | [] [] [] [] |
|
||||||
|
bluez-pin | [] |
|
||||||
|
clisp | |
|
||||||
|
clisp | [] |
|
||||||
|
coreutils | [] |
|
||||||
|
cpio | [] [] [] |
|
||||||
|
darkstat | [] [] [] [] |
|
||||||
|
diffutils | [] [] [] |
|
||||||
|
e2fsprogs | |
|
||||||
|
enscript | [] [] |
|
||||||
|
error | [] [] |
|
||||||
|
fetchmail | () () |
|
||||||
|
fileutils | [] |
|
||||||
|
findutils | [] [] [] [] |
|
||||||
|
flex | [] |
|
||||||
|
gas | |
|
||||||
|
gawk | [] |
|
||||||
|
gcal | |
|
||||||
|
gcc | |
|
||||||
|
gettext | [] |
|
||||||
|
gettext-runtime | [] |
|
||||||
|
gettext-tools | |
|
||||||
|
gimp-print | [] |
|
||||||
|
gliv | [] |
|
||||||
|
glunarclock | [] |
|
||||||
|
gnucash | |
|
||||||
|
gnucash-glossary | [] [] |
|
||||||
|
gnupg | |
|
||||||
|
gpe-calendar | [] [] |
|
||||||
|
gpe-conf | [] [] |
|
||||||
|
gpe-contacts | [] |
|
||||||
|
gpe-edit | [] [] |
|
||||||
|
gpe-login | [] [] |
|
||||||
|
gpe-ownerinfo | [] [] |
|
||||||
|
gpe-sketchbook | [] [] |
|
||||||
|
gpe-timesheet | [] [] |
|
||||||
|
gpe-today | [] [] |
|
||||||
|
gpe-todo | [] [] |
|
||||||
|
gphoto2 | |
|
||||||
|
gprof | [] |
|
||||||
|
gpsdrive | () () () |
|
||||||
|
grep | [] [] [] [] |
|
||||||
|
gretl | |
|
||||||
|
hello | [] [] [] [] [] [] [] [] [] |
|
||||||
|
id-utils | [] [] [] |
|
||||||
|
indent | [] [] [] |
|
||||||
|
jpilot | () () |
|
||||||
|
jwhois | [] [] [] |
|
||||||
|
kbd | |
|
||||||
|
ld | |
|
||||||
|
libc | [] [] [] [] |
|
||||||
|
libgpewidget | [] [] |
|
||||||
|
libiconv | [] [] |
|
||||||
|
lifelines | |
|
||||||
|
lilypond | [] |
|
||||||
|
lingoteach | |
|
||||||
|
lingoteach_lessons | |
|
||||||
|
lynx | [] [] |
|
||||||
|
m4 | [] [] [] [] |
|
||||||
|
mailutils | |
|
||||||
|
make | [] [] |
|
||||||
|
man-db | [] |
|
||||||
|
mysecretdiary | [] |
|
||||||
|
nano | [] [] [] [] |
|
||||||
|
nano_1_0 | [] [] [] [] |
|
||||||
|
opcodes | [] [] [] |
|
||||||
|
parted | [] [] [] |
|
||||||
|
ptx | [] [] [] [] [] [] [] |
|
||||||
|
python | |
|
||||||
|
radius | |
|
||||||
|
recode | [] [] [] |
|
||||||
|
screem | |
|
||||||
|
sed | [] [] |
|
||||||
|
sh-utils | [] |
|
||||||
|
sharutils | [] |
|
||||||
|
sketch | [] |
|
||||||
|
soundtracker | |
|
||||||
|
sp | |
|
||||||
|
tar | [] [] [] [] [] [] |
|
||||||
|
texinfo | [] |
|
||||||
|
textutils | [] |
|
||||||
|
tin | |
|
||||||
|
util-linux | [] [] |
|
||||||
|
vorbis-tools | [] [] |
|
||||||
|
wastesedge | |
|
||||||
|
wdiff | [] [] [] [] |
|
||||||
|
wget | [] [] [] |
|
||||||
|
xchat | [] [] |
|
||||||
|
xpad | [] |
|
||||||
|
+----------------------------------------+
|
||||||
|
lg lt lv ms nb nl nn no pl pt pt_BR ro
|
||||||
|
0 0 2 11 7 26 3 4 18 15 34 34
|
||||||
|
|
||||||
|
ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW
|
||||||
|
+-------------------------------------------+
|
||||||
|
a2ps | [] [] [] [] [] | 16
|
||||||
|
aegis | () | 0
|
||||||
|
anubis | [] [] | 5
|
||||||
|
ap-utils | () | 1
|
||||||
|
bash | [] | 7
|
||||||
|
batchelor | | 1
|
||||||
|
bfd | [] [] [] | 7
|
||||||
|
binutils | [] [] [] | 7
|
||||||
|
bison | [] [] | 13
|
||||||
|
bluez-pin | | 7
|
||||||
|
clisp | | 0
|
||||||
|
clisp | | 5
|
||||||
|
coreutils | [] [] [] [] [] | 14
|
||||||
|
cpio | [] [] [] | 13
|
||||||
|
darkstat | [] () () | 9
|
||||||
|
diffutils | [] [] [] [] | 21
|
||||||
|
e2fsprogs | [] | 3
|
||||||
|
enscript | [] [] [] | 11
|
||||||
|
error | [] [] [] | 14
|
||||||
|
fetchmail | [] | 7
|
||||||
|
fileutils | [] [] [] [] [] [] | 15
|
||||||
|
findutils | [] [] [] [] [] [] | 27
|
||||||
|
flex | [] [] [] | 10
|
||||||
|
gas | [] | 3
|
||||||
|
gawk | [] [] | 9
|
||||||
|
gcal | [] [] | 4
|
||||||
|
gcc | [] | 4
|
||||||
|
gettext | [] [] [] [] [] [] | 15
|
||||||
|
gettext-runtime | [] [] [] [] [] [] | 16
|
||||||
|
gettext-tools | [] [] | 5
|
||||||
|
gimp-print | [] [] | 10
|
||||||
|
gliv | | 1
|
||||||
|
glunarclock | [] [] [] | 11
|
||||||
|
gnucash | [] [] | 4
|
||||||
|
gnucash-glossary | [] [] [] | 8
|
||||||
|
gnupg | [] [] [] [] | 16
|
||||||
|
gpe-calendar | [] | 5
|
||||||
|
gpe-conf | | 3
|
||||||
|
gpe-contacts | [] | 4
|
||||||
|
gpe-edit | [] | 5
|
||||||
|
gpe-login | [] | 5
|
||||||
|
gpe-ownerinfo | [] | 7
|
||||||
|
gpe-sketchbook | [] | 5
|
||||||
|
gpe-timesheet | [] | 6
|
||||||
|
gpe-today | [] | 6
|
||||||
|
gpe-todo | [] | 6
|
||||||
|
gphoto2 | [] [] | 9
|
||||||
|
gprof | [] [] | 7
|
||||||
|
gpsdrive | [] [] | 3
|
||||||
|
grep | [] [] [] [] | 24
|
||||||
|
gretl | | 2
|
||||||
|
hello | [] [] [] [] [] | 33
|
||||||
|
id-utils | [] [] [] | 11
|
||||||
|
indent | [] [] [] [] | 19
|
||||||
|
jpilot | [] [] [] [] [] | 10
|
||||||
|
jwhois | () () [] [] | 10
|
||||||
|
kbd | [] [] | 8
|
||||||
|
ld | [] [] | 5
|
||||||
|
libc | [] [] [] [] | 20
|
||||||
|
libgpewidget | | 6
|
||||||
|
libiconv | [] [] [] [] [] [] | 21
|
||||||
|
lifelines | [] | 2
|
||||||
|
lilypond | [] | 4
|
||||||
|
lingoteach | | 2
|
||||||
|
lingoteach_lessons | () | 0
|
||||||
|
lynx | [] [] [] [] | 14
|
||||||
|
m4 | [] [] [] | 15
|
||||||
|
mailutils | | 2
|
||||||
|
make | [] [] [] [] | 15
|
||||||
|
man-db | [] | 6
|
||||||
|
mysecretdiary | [] [] | 8
|
||||||
|
nano | [] [] [] | 15
|
||||||
|
nano_1_0 | [] [] [] | 15
|
||||||
|
opcodes | [] [] | 9
|
||||||
|
parted | [] [] | 13
|
||||||
|
ptx | [] [] [] | 22
|
||||||
|
python | | 0
|
||||||
|
radius | | 0
|
||||||
|
recode | [] [] [] [] | 19
|
||||||
|
screem | [] | 1
|
||||||
|
sed | [] [] [] [] [] | 20
|
||||||
|
sh-utils | [] [] [] | 13
|
||||||
|
sharutils | [] [] [] [] | 16
|
||||||
|
sketch | [] | 5
|
||||||
|
soundtracker | [] | 7
|
||||||
|
sp | [] | 3
|
||||||
|
tar | [] [] [] [] [] | 24
|
||||||
|
texinfo | [] [] [] [] | 13
|
||||||
|
textutils | [] [] [] [] [] | 15
|
||||||
|
tin | | 1
|
||||||
|
util-linux | [] [] | 14
|
||||||
|
vorbis-tools | [] | 7
|
||||||
|
wastesedge | | 0
|
||||||
|
wdiff | [] [] [] [] | 17
|
||||||
|
wget | [] [] [] [] [] [] [] | 25
|
||||||
|
xchat | [] [] [] | 11
|
||||||
|
xpad | | 1
|
||||||
|
+-------------------------------------------+
|
||||||
|
50 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW
|
||||||
|
97 domains 32 19 16 0 56 0 48 10 1 1 12 23 913
|
||||||
|
|
||||||
Some counters in the preceding matrix are higher than the number of
|
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
|
visible blocks let us expect. This is because a few extra PO files are
|
||||||
|
@ -298,9 +599,9 @@ 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
|
lag between the mere existence a PO file and its wide availability in a
|
||||||
distribution.
|
distribution.
|
||||||
|
|
||||||
If September 2001 seems to be old, you may fetch a more recent copy
|
If May 2003 seems to be old, you may fetch a more recent copy of
|
||||||
of this `ABOUT-NLS' file on most GNU archive sites. The most
|
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
|
||||||
up-to-date matrix with full percentage details can be found at
|
matrix with full percentage details can be found at
|
||||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||||
|
|
||||||
Using `gettext' in new packages
|
Using `gettext' in new packages
|
||||||
|
@ -315,7 +616,7 @@ library, whereas only free software can use `libintl' as a static
|
||||||
library or use modified versions of `libintl'.
|
library or use modified versions of `libintl'.
|
||||||
|
|
||||||
Once the sources are changed appropriately and the setup can handle
|
Once the sources are changed appropriately and the setup can handle
|
||||||
to use of `gettext' the only thing missing are the translations. The
|
the use of `gettext' the only thing missing are the translations. The
|
||||||
Free Translation Project is also available for packages which are not
|
Free Translation Project is also available for packages which are not
|
||||||
developed inside the GNU project. Therefore the information given above
|
developed inside the GNU project. Therefore the information given above
|
||||||
applies also for every other Free Software Project. Contact
|
applies also for every other Free Software Project. Contact
|
||||||
|
|
4
AUTHORS
4
AUTHORS
|
@ -1,6 +1,6 @@
|
||||||
Main tinc authors:
|
Main tinc authors:
|
||||||
Guus Sliepen <guus@sliepen.warande.net>
|
Guus Sliepen <guus@tinc-vpn.org>
|
||||||
Ivo Timmermans <itimmermans@bigfoot.com>
|
Ivo Timmermans <ivo@tinc-vpn.org>
|
||||||
|
|
||||||
These files are from other sources:
|
These files are from other sources:
|
||||||
* lib/pidfile.h and lib/pidfile.c are by Martin Schulze, taken from
|
* lib/pidfile.h and lib/pidfile.c are by Martin Schulze, taken from
|
||||||
|
|
11
COPYING
11
COPYING
|
@ -2,7 +2,7 @@
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
675 Mass Ave, Cambridge, MA 02139, USA
|
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
Appendix: How to Apply These Terms to Your New Programs
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
If you develop a new program, and you want it to be of the greatest
|
||||||
possible use to the public, the best way to achieve this is to make it
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
Copyright (C) 19yy <name of author>
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -305,14 +305,15 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
If the program is interactive, make it output a short notice like this
|
||||||
when it starts in an interactive mode:
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
|
|
|
@ -1,4 +1,14 @@
|
||||||
This program is released under the GPL with the additional exemption
|
The following applies to tinc:
|
||||||
that compiling, linking, and/or using OpenSSL is allowed. You may
|
|
||||||
provide binary packages linked to the OpenSSL libraries, provided that
|
This program is released under the GPL with the additional exemption that
|
||||||
all other requirements of the GPL are met.
|
compiling, linking, and/or using OpenSSL is allowed. You may provide binary
|
||||||
|
packages linked to the OpenSSL libraries, provided that all other requirements
|
||||||
|
of the GPL are met.
|
||||||
|
|
||||||
|
The following applies to the LZO library:
|
||||||
|
|
||||||
|
Hereby I grant a special exception to the tinc VPN project
|
||||||
|
(http://tinc.nl.linux.org/) to link the LZO library with the OpenSSL library
|
||||||
|
(http://www.openssl.org).
|
||||||
|
|
||||||
|
Markus F.X.J. Oberhumer
|
||||||
|
|
133
INSTALL
133
INSTALL
|
@ -1,3 +1,9 @@
|
||||||
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
|
This file is free documentation; the Free Software Foundation gives
|
||||||
|
unlimited permission to copy, distribute and modify it.
|
||||||
|
|
||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
@ -8,20 +14,27 @@ various system-dependent variables used during compilation. It uses
|
||||||
those values to create a `Makefile' in each directory of the package.
|
those values to create a `Makefile' in each directory of the package.
|
||||||
It may also create one or more `.h' files containing system-dependent
|
It may also create one or more `.h' files containing system-dependent
|
||||||
definitions. Finally, it creates a shell script `config.status' that
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
you can run in the future to recreate the current configuration, a file
|
you can run in the future to recreate the current configuration, and a
|
||||||
`config.cache' that saves the results of its tests to speed up
|
file `config.log' containing compiler output (useful mainly for
|
||||||
reconfiguring, and a file `config.log' containing compiler output
|
debugging `configure').
|
||||||
(useful mainly for debugging `configure').
|
|
||||||
|
It can also use an optional file (typically called `config.cache'
|
||||||
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
|
the results of its tests to speed up reconfiguring. (Caching is
|
||||||
|
disabled by default to prevent problems with accidental use of stale
|
||||||
|
cache files.)
|
||||||
|
|
||||||
If you need to do unusual things to compile the package, please try
|
If you need to do unusual things to compile the package, please try
|
||||||
to figure out how `configure' could check whether to do them, and mail
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
diffs or instructions to the address given in the `README' so they can
|
diffs or instructions to the address given in the `README' so they can
|
||||||
be considered for the next release. If at some point `config.cache'
|
be considered for the next release. If you are using the cache, and at
|
||||||
contains results you don't want to keep, you may remove or edit it.
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
|
may remove or edit it.
|
||||||
|
|
||||||
The file `configure.in' is used to create `configure' by a program
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
called `autoconf'. You only need `configure.in' if you want to change
|
`configure' by a program called `autoconf'. You only need
|
||||||
it or regenerate `configure' using a newer version of `autoconf'.
|
`configure.ac' if you want to change it or regenerate `configure' using
|
||||||
|
a newer version of `autoconf'.
|
||||||
|
|
||||||
The simplest way to compile this package is:
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
@ -55,14 +68,16 @@ Compilers and Options
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Some systems require unusual options for compilation or linking that
|
Some systems require unusual options for compilation or linking that
|
||||||
the `configure' script does not know about. You can give `configure'
|
the `configure' script does not know about. Run `./configure --help'
|
||||||
initial values for variables by setting them in the environment. Using
|
for details on some of the pertinent environment variables.
|
||||||
a Bourne-compatible shell, you can do that on the command line like
|
|
||||||
this:
|
|
||||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
|
||||||
|
|
||||||
Or on systems that have the `env' program, you can do it like this:
|
You can give `configure' initial values for configuration parameters
|
||||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
by setting variables in the command line or in the environment. Here
|
||||||
|
is an example:
|
||||||
|
|
||||||
|
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||||
|
|
||||||
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
Compiling For Multiple Architectures
|
Compiling For Multiple Architectures
|
||||||
====================================
|
====================================
|
||||||
|
@ -75,11 +90,11 @@ directory where you want the object files and executables to go and run
|
||||||
the `configure' script. `configure' automatically checks for the
|
the `configure' script. `configure' automatically checks for the
|
||||||
source code in the directory that `configure' is in and in `..'.
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
If you have to use a `make' that does not supports the `VPATH'
|
If you have to use a `make' that does not support the `VPATH'
|
||||||
variable, you have to compile the package for one architecture at a time
|
variable, you have to compile the package for one architecture at a
|
||||||
in the source code directory. After you have installed the package for
|
time in the source code directory. After you have installed the
|
||||||
one architecture, use `make distclean' before reconfiguring for another
|
package for one architecture, use `make distclean' before reconfiguring
|
||||||
architecture.
|
for another architecture.
|
||||||
|
|
||||||
Installation Names
|
Installation Names
|
||||||
==================
|
==================
|
||||||
|
@ -122,22 +137,32 @@ you can use the `configure' options `--x-includes=DIR' and
|
||||||
Specifying the System Type
|
Specifying the System Type
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
There may be some features `configure' can not figure out
|
There may be some features `configure' cannot figure out
|
||||||
automatically, but needs to determine by the type of host the package
|
automatically, but needs to determine by the type of machine the package
|
||||||
will run on. Usually `configure' can figure that out, but if it prints
|
will run on. Usually, assuming the package is built to be run on the
|
||||||
a message saying it can not guess the host type, give it the
|
_same_ architectures, `configure' can figure that out, but if it prints
|
||||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
a message saying it cannot guess the machine type, give it the
|
||||||
type, such as `sun4', or a canonical name with three fields:
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
CPU-COMPANY-SYSTEM
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
See the file `config.sub' for the possible values of each field. If
|
where SYSTEM can have one of these forms:
|
||||||
`config.sub' isn't included in this package, then this package doesn't
|
|
||||||
need to know the host type.
|
|
||||||
|
|
||||||
If you are building compiler tools for cross-compiling, you can also
|
OS KERNEL-OS
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the machine type.
|
||||||
|
|
||||||
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
use the `--target=TYPE' option to select the type of system they will
|
use the `--target=TYPE' option to select the type of system they will
|
||||||
produce code for and the `--build=TYPE' option to select the type of
|
produce code for.
|
||||||
system on which you are compiling the package.
|
|
||||||
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
|
platform different from the build platform, you should specify the
|
||||||
|
"host" platform (i.e., that on which the generated programs will
|
||||||
|
eventually be run) with `--host=TYPE'.
|
||||||
|
|
||||||
Sharing Defaults
|
Sharing Defaults
|
||||||
================
|
================
|
||||||
|
@ -150,20 +175,44 @@ default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
`CONFIG_SITE' environment variable to the location of the site script.
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
A warning: not all `configure' scripts look for a site script.
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
Operation Controls
|
Defining Variables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
Variables not defined in a site shell script can be set in the
|
||||||
|
environment passed to `configure'. However, some packages may run
|
||||||
|
configure again during the build, and the customized values of these
|
||||||
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
|
them in the `configure' command line, using `VAR=value'. For example:
|
||||||
|
|
||||||
|
./configure CC=/usr/local2/bin/gcc
|
||||||
|
|
||||||
|
will cause the specified gcc to be used as the C compiler (unless it is
|
||||||
|
overridden in the site shell script).
|
||||||
|
|
||||||
|
`configure' Invocation
|
||||||
|
======================
|
||||||
|
|
||||||
`configure' recognizes the following options to control how it
|
`configure' recognizes the following options to control how it
|
||||||
operates.
|
operates.
|
||||||
|
|
||||||
`--cache-file=FILE'
|
|
||||||
Use and save the results of the tests in FILE instead of
|
|
||||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
|
||||||
debugging `configure'.
|
|
||||||
|
|
||||||
`--help'
|
`--help'
|
||||||
|
`-h'
|
||||||
Print a summary of the options to `configure', and exit.
|
Print a summary of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
`-V'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Enable the cache: use and save the results of the tests in FILE,
|
||||||
|
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||||
|
disable caching.
|
||||||
|
|
||||||
|
`--config-cache'
|
||||||
|
`-C'
|
||||||
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
`--quiet'
|
`--quiet'
|
||||||
`--silent'
|
`--silent'
|
||||||
`-q'
|
`-q'
|
||||||
|
@ -175,8 +224,6 @@ operates.
|
||||||
Look for the package's source code in directory DIR. Usually
|
Look for the package's source code in directory DIR. Usually
|
||||||
`configure' can determine that directory automatically.
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
`--version'
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
Print the version of Autoconf used to generate the `configure'
|
`configure --help' for more details.
|
||||||
script, and exit.
|
|
||||||
|
|
||||||
`configure' also accepts some other, not widely useful, options.
|
|
||||||
|
|
19
Makefile.am
19
Makefile.am
|
@ -2,24 +2,17 @@
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = gnu
|
AUTOMAKE_OPTIONS = gnu
|
||||||
|
|
||||||
SUBDIRS = m4 intl lib src doc po
|
SUBDIRS = m4 lib src doc po
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS =
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
EXTRA_DIST = system.h COPYING.README depcomp
|
EXTRA_DIST = config.rpath mkinstalldirs have.h system.h COPYING.README depcomp
|
||||||
|
|
||||||
CVS_CREATED = ABOUT-NLS configure aclocal.m4 config.h.in config.guess \
|
|
||||||
config.sub install-sh ltconfig ltmain.sh missing mkinstalldirs \
|
|
||||||
stamp-h.in m4/Makefile.am ChangeLog po/Makefile.in.in \
|
|
||||||
po/tinc.pot src/.libs intl depcomp
|
|
||||||
|
|
||||||
ChangeLog:
|
ChangeLog:
|
||||||
cvs2cl -U cvsusers --fsf
|
svn log > ChangeLog
|
||||||
|
|
||||||
cvs-clean: maintainer-clean
|
svn-clean: maintainer-clean
|
||||||
for f in $(CVS_CREATED) `find . -name Makefile.in` tinc-$(VERSION).tar.gz; do\
|
svn status --no-ignore | sed -n 's/^[?I] \+//p' | tr '\012' '\0' | xargs -r0 rm -rf
|
||||||
rm -Rf "$$f"; \
|
|
||||||
done
|
|
||||||
|
|
||||||
deb:
|
deb:
|
||||||
dpkg-buildpackage -rfakeroot
|
dpkg-buildpackage -rfakeroot
|
||||||
|
|
529
Makefile.in
529
Makefile.in
|
@ -1,7 +1,8 @@
|
||||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
# Free Software Foundation, Inc.
|
# 2003, 2004 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
@ -12,166 +13,229 @@
|
||||||
# PARTICULAR PURPOSE.
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
SHELL = @SHELL@
|
|
||||||
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
prefix = @prefix@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
|
|
||||||
bindir = @bindir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
datadir = @datadir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
libdir = @libdir@
|
|
||||||
infodir = @infodir@
|
|
||||||
mandir = @mandir@
|
|
||||||
includedir = @includedir@
|
|
||||||
oldincludedir = /usr/include
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
top_builddir = .
|
top_builddir = .
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
INSTALL_HEADER = $(INSTALL_DATA)
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
transform = @program_transform_name@
|
transform = $(program_transform_name)
|
||||||
NORMAL_INSTALL = :
|
NORMAL_INSTALL = :
|
||||||
PRE_INSTALL = :
|
PRE_INSTALL = :
|
||||||
POST_INSTALL = :
|
POST_INSTALL = :
|
||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
host_alias = @host_alias@
|
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
|
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||||
|
$(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \
|
||||||
|
INSTALL NEWS THANKS TODO config.guess config.rpath config.sub \
|
||||||
|
depcomp install-sh missing mkinstalldirs
|
||||||
|
subdir = .
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal-include.m4 \
|
||||||
|
$(top_srcdir)/m4/attribute.m4 $(top_srcdir)/m4/gettext.m4 \
|
||||||
|
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||||
|
$(top_srcdir)/m4/lzo.m4 $(top_srcdir)/m4/malloc.m4 \
|
||||||
|
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/openssl.m4 \
|
||||||
|
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||||
|
$(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/tuntap.m4 \
|
||||||
|
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.in
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
|
configure.lineno configure.status.lineno
|
||||||
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
|
CONFIG_HEADER = config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||||
|
html-recursive info-recursive install-data-recursive \
|
||||||
|
install-exec-recursive install-info-recursive \
|
||||||
|
install-recursive installcheck-recursive installdirs-recursive \
|
||||||
|
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||||
|
uninstall-recursive
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
|
top_distdir = $(distdir)
|
||||||
|
am__remove_distdir = \
|
||||||
|
{ test ! -d $(distdir) \
|
||||||
|
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||||
|
&& rm -fr $(distdir); }; }
|
||||||
|
DIST_ARCHIVES = $(distdir).tar.gz
|
||||||
|
GZIP_ENV = --best
|
||||||
|
distuninstallcheck_listfiles = find . -type f -print
|
||||||
|
distcleancheck_listfiles = find . -type f -print
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
ALLOCA = @ALLOCA@
|
||||||
|
AMDEP_FALSE = @AMDEP_FALSE@
|
||||||
|
AMDEP_TRUE = @AMDEP_TRUE@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
|
||||||
CATALOGS = @CATALOGS@
|
|
||||||
CATOBJEXT = @CATOBJEXT@
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
DATADIRNAME = @DATADIRNAME@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
GENCAT = @GENCAT@
|
|
||||||
GLIBC21 = @GLIBC21@
|
|
||||||
GMOFILES = @GMOFILES@
|
|
||||||
GMSGFMT = @GMSGFMT@
|
GMSGFMT = @GMSGFMT@
|
||||||
HAVE_TUNTAP = @HAVE_TUNTAP@
|
HAVE_TUNTAP = @HAVE_TUNTAP@
|
||||||
INCLUDES = @INCLUDES@
|
INCLUDES = @INCLUDES@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
|
||||||
INTLBISON = @INTLBISON@
|
|
||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
LDFLAGS = @LDFLAGS@
|
||||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
|
||||||
LIBICONV = @LIBICONV@
|
LIBICONV = @LIBICONV@
|
||||||
|
LIBINTL = @LIBINTL@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
LINUX_IF_TUN_H = @LINUX_IF_TUN_H@
|
LINUX_IF_TUN_H = @LINUX_IF_TUN_H@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
|
LTLIBICONV = @LTLIBICONV@
|
||||||
|
LTLIBINTL = @LTLIBINTL@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||||
|
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
MSGFMT = @MSGFMT@
|
MSGFMT = @MSGFMT@
|
||||||
|
MSGMERGE = @MSGMERGE@
|
||||||
OBJEXT = @OBJEXT@
|
OBJEXT = @OBJEXT@
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
PERL = @PERL@
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
POFILES = @POFILES@
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
POSUB = @POSUB@
|
POSUB = @POSUB@
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
USE_NLS = @USE_NLS@
|
USE_NLS = @USE_NLS@
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
|
XGETTEXT = @XGETTEXT@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||||
|
ac_ct_STRIP = @ac_ct_STRIP@
|
||||||
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
am__include = @am__include@
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
am__quote = @am__quote@
|
am__quote = @am__quote@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
datadir = @datadir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
install_sh = @install_sh@
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
AUTOMAKE_OPTIONS = gnu
|
AUTOMAKE_OPTIONS = gnu
|
||||||
|
SUBDIRS = m4 lib src doc po
|
||||||
SUBDIRS = m4 intl lib src doc po
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
EXTRA_DIST = config.rpath mkinstalldirs have.h system.h COPYING.README depcomp
|
||||||
ACLOCAL_AMFLAGS =
|
|
||||||
|
|
||||||
EXTRA_DIST = system.h COPYING.README depcomp
|
|
||||||
|
|
||||||
CVS_CREATED = ABOUT-NLS configure aclocal.m4 config.h.in config.guess \
|
|
||||||
config.sub install-sh ltconfig ltmain.sh missing mkinstalldirs \
|
|
||||||
stamp-h.in m4/Makefile.am ChangeLog po/Makefile.in.in \
|
|
||||||
po/tinc.pot src/.libs intl depcomp
|
|
||||||
|
|
||||||
subdir = .
|
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
|
||||||
CONFIG_HEADER = config.h
|
|
||||||
CONFIG_CLEAN_FILES = intl/Makefile
|
|
||||||
DIST_SOURCES =
|
|
||||||
|
|
||||||
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
|
|
||||||
uninstall-info-recursive all-recursive install-data-recursive \
|
|
||||||
install-exec-recursive installdirs-recursive install-recursive \
|
|
||||||
uninstall-recursive check-recursive installcheck-recursive
|
|
||||||
DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
|
|
||||||
INSTALL Makefile.am Makefile.in NEWS THANKS TODO acconfig.h \
|
|
||||||
aclocal.m4 config.guess config.h.in config.sub configure \
|
|
||||||
configure.in install-sh missing mkinstalldirs
|
|
||||||
DIST_SUBDIRS = $(SUBDIRS)
|
|
||||||
all: config.h
|
all: config.h
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
am--refresh:
|
||||||
|
@:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||||
|
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||||
cd $(top_srcdir) && \
|
cd $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu Makefile
|
$(AUTOMAKE) --gnu Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
.PRECIOUS: Makefile
|
||||||
cd $(top_builddir) && \
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
@case '$?' in \
|
||||||
CONFIG_FILES=$@ $(SHELL) ./config.status
|
*config.status*) \
|
||||||
|
echo ' $(SHELL) ./config.status'; \
|
||||||
|
$(SHELL) ./config.status;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
$(SHELL) ./config.status --recheck
|
$(SHELL) ./config.status --recheck
|
||||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
|
||||||
cd $(srcdir) && $(AUTOCONF)
|
|
||||||
|
|
||||||
$(ACLOCAL_M4): configure.in
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(srcdir) && $(AUTOCONF)
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
config.h: stamp-h
|
|
||||||
|
config.h: stamp-h1
|
||||||
@if test ! -f $@; then \
|
@if test ! -f $@; then \
|
||||||
rm -f stamp-h; \
|
rm -f stamp-h1; \
|
||||||
$(MAKE) stamp-h; \
|
$(MAKE) stamp-h1; \
|
||||||
else :; fi
|
else :; fi
|
||||||
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
|
|
||||||
@rm -f stamp-h stamp-hT
|
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||||
@echo timestamp > stamp-hT 2> /dev/null
|
@rm -f stamp-h1
|
||||||
cd $(top_builddir) \
|
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||||
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
|
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
$(SHELL) ./config.status
|
|
||||||
@mv stamp-hT stamp-h
|
|
||||||
$(srcdir)/config.h.in: $(srcdir)/./stamp-h.in
|
|
||||||
@if test ! -f $@; then \
|
|
||||||
rm -f $(srcdir)/./stamp-h.in; \
|
|
||||||
$(MAKE) $(srcdir)/./stamp-h.in; \
|
|
||||||
else :; fi
|
|
||||||
$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
|
|
||||||
@rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
|
|
||||||
@echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
|
|
||||||
cd $(top_srcdir) && $(AUTOHEADER)
|
cd $(top_srcdir) && $(AUTOHEADER)
|
||||||
@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
|
rm -f stamp-h1
|
||||||
|
touch $@
|
||||||
|
|
||||||
distclean-hdr:
|
distclean-hdr:
|
||||||
-rm -f config.h
|
-rm -f config.h stamp-h1
|
||||||
intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in
|
|
||||||
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
|
|
||||||
uninstall-info-am:
|
uninstall-info-am:
|
||||||
|
|
||||||
# This directory's subdirectories are mostly independent; you can cd
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
|
@ -181,7 +245,7 @@ uninstall-info-am:
|
||||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||||
# (2) otherwise, pass the desired values on the `make' command line.
|
# (2) otherwise, pass the desired values on the `make' command line.
|
||||||
$(RECURSIVE_TARGETS):
|
$(RECURSIVE_TARGETS):
|
||||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||||
dot_seen=no; \
|
dot_seen=no; \
|
||||||
target=`echo $@ | sed s/-recursive//`; \
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
@ -201,7 +265,7 @@ $(RECURSIVE_TARGETS):
|
||||||
|
|
||||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||||
maintainer-clean-recursive:
|
maintainer-clean-recursive:
|
||||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||||
dot_seen=no; \
|
dot_seen=no; \
|
||||||
case "$@" in \
|
case "$@" in \
|
||||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
|
@ -228,80 +292,111 @@ tags-recursive:
|
||||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||||
done
|
done
|
||||||
|
ctags-recursive:
|
||||||
tags: TAGS
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||||
|
done
|
||||||
|
|
||||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | \
|
done | \
|
||||||
$(AWK) ' { files[$$0] = 1; } \
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
END { for (i in files) print i; }'`; \
|
END { for (i in files) print i; }'`; \
|
||||||
mkid -fID $$unique $(LISP)
|
mkid -fID $$unique
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||||
$(TAGS_FILES) $(LISP)
|
$(TAGS_FILES) $(LISP)
|
||||||
tags=; \
|
tags=; \
|
||||||
here=`pwd`; \
|
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 \
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
if test "$$subdir" = .; then :; else \
|
if test "$$subdir" = .; then :; else \
|
||||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
test ! -f $$subdir/TAGS || \
|
||||||
|
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||||
fi; \
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | \
|
done | \
|
||||||
$(AWK) ' { files[$$0] = 1; } \
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
END { for (i in files) print i; }'`; \
|
END { for (i in files) print i; }'`; \
|
||||||
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||||
|| etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$tags $$unique; \
|
||||||
|
fi
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
tags=; \
|
||||||
|
here=`pwd`; \
|
||||||
|
list='$(SOURCES) $(HEADERS) config.h.in $(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; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$tags $$unique
|
||||||
|
|
||||||
GTAGS:
|
GTAGS:
|
||||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
&& cd $(top_srcdir) \
|
&& cd $(top_srcdir) \
|
||||||
&& gtags -i $(GTAGS_ARGS) $$here
|
&& gtags -i $(GTAGS_ARGS) $$here
|
||||||
|
|
||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
|
|
||||||
top_distdir = .
|
|
||||||
# Avoid unsightly `./'.
|
|
||||||
distdir = $(PACKAGE)-$(VERSION)
|
|
||||||
|
|
||||||
GZIP_ENV = --best
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
distdir: $(DISTFILES)
|
||||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
$(am__remove_distdir)
|
||||||
mkdir $(distdir)
|
mkdir $(distdir)
|
||||||
$(mkinstalldirs) $(distdir)/intl $(distdir)/po
|
$(mkdir_p) $(distdir)/m4 $(distdir)/po
|
||||||
@for file in $(DISTFILES); do \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
list='$(DISTFILES)'; for file in $$list; do \
|
||||||
|
case $$file in \
|
||||||
|
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||||
|
esac; \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
dir="/$$dir"; \
|
||||||
|
$(mkdir_p) "$(distdir)$$dir"; \
|
||||||
|
else \
|
||||||
|
dir=''; \
|
||||||
fi; \
|
fi; \
|
||||||
if test -d $$d/$$file; then \
|
if test -d $$d/$$file; then \
|
||||||
cp -pR $$d/$$file $(distdir) \
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|| exit 1; \
|
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
fi; \
|
||||||
|
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||||
else \
|
else \
|
||||||
test -f $(distdir)/$$file \
|
test -f $(distdir)/$$file \
|
||||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||||
|| exit 1; \
|
|| exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
for subdir in $(SUBDIRS); do \
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
if test "$$subdir" = .; then :; else \
|
if test "$$subdir" = .; then :; else \
|
||||||
test -d $(distdir)/$$subdir \
|
test -d "$(distdir)/$$subdir" \
|
||||||
|| mkdir $(distdir)/$$subdir \
|
|| mkdir "$(distdir)/$$subdir" \
|
||||||
|| exit 1; \
|
|| exit 1; \
|
||||||
(cd $$subdir && \
|
(cd $$subdir && \
|
||||||
$(MAKE) $(AM_MAKEFLAGS) \
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
top_distdir="$(top_distdir)" \
|
top_distdir="../$(top_distdir)" \
|
||||||
distdir=../$(distdir)/$$subdir \
|
distdir="../$(distdir)/$$subdir" \
|
||||||
distdir) \
|
distdir) \
|
||||||
|| exit 1; \
|
|| exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
|
@ -311,48 +406,103 @@ distdir: $(DISTFILES)
|
||||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||||
|| chmod -R a+r $(distdir)
|
|| chmod -R a+r $(distdir)
|
||||||
dist: distdir
|
dist-gzip: distdir
|
||||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-bzip2: distdir
|
||||||
|
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-tarZ: distdir
|
||||||
|
$(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-shar: distdir
|
||||||
|
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-zip: distdir
|
||||||
|
-rm -f $(distdir).zip
|
||||||
|
zip -rq $(distdir).zip $(distdir)
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist dist-all: distdir
|
||||||
|
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
# This target untars the dist file and tries a VPATH configuration. Then
|
# This target untars the dist file and tries a VPATH configuration. Then
|
||||||
# it guarantees that the distribution is self-contained by making another
|
# it guarantees that the distribution is self-contained by making another
|
||||||
# tarfile.
|
# tarfile.
|
||||||
distcheck: dist
|
distcheck: dist
|
||||||
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
|
case '$(DIST_ARCHIVES)' in \
|
||||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
|
*.tar.gz*) \
|
||||||
|
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
|
||||||
|
*.tar.bz2*) \
|
||||||
|
bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
|
||||||
|
*.tar.Z*) \
|
||||||
|
uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
|
||||||
|
*.shar.gz*) \
|
||||||
|
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||||
|
*.zip*) \
|
||||||
|
unzip $(distdir).zip ;;\
|
||||||
|
esac
|
||||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||||
mkdir $(distdir)/=build
|
mkdir $(distdir)/_build
|
||||||
mkdir $(distdir)/=inst
|
mkdir $(distdir)/_inst
|
||||||
chmod a-w $(distdir)
|
chmod a-w $(distdir)
|
||||||
dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
|
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||||
&& cd $(distdir)/=build \
|
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
&& cd $(distdir)/_build \
|
||||||
--with-included-gettext \
|
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||||
|
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||||
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
|
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||||
|| (echo "Error: files left after uninstall" 1>&2; \
|
distuninstallcheck \
|
||||||
exit 1) ) \
|
&& chmod -R a-w "$$dc_install_base" \
|
||||||
|
&& ({ \
|
||||||
|
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||||
|
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||||
|
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||||
|
&& rm -rf "$$dc_destdir" \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
|
&& rm -rf $(DIST_ARCHIVES) \
|
||||||
&& rm -f $(distdir).tar.gz \
|
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||||
&& (test `find . -type f -print | wc -l` -eq 0 \
|
$(am__remove_distdir)
|
||||||
|| (echo "Error: files left after distclean" 1>&2; \
|
@(echo "$(distdir) archives ready for distribution: "; \
|
||||||
exit 1) )
|
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||||
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
|
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||||
@echo "$(distdir).tar.gz is ready for distribution" | \
|
distuninstallcheck:
|
||||||
sed 'h;s/./=/g;p;x;p;x'
|
@cd $(distuninstallcheck_dir) \
|
||||||
|
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||||
|
|| { echo "ERROR: files left after uninstall:" ; \
|
||||||
|
if test -n "$(DESTDIR)"; then \
|
||||||
|
echo " (check DESTDIR support)"; \
|
||||||
|
fi ; \
|
||||||
|
$(distuninstallcheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
|
distcleancheck: distclean
|
||||||
|
@if test '$(srcdir)' = . ; then \
|
||||||
|
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||||
|
exit 1 ; \
|
||||||
|
fi
|
||||||
|
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||||
|
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||||
|
$(distcleancheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-recursive
|
check: check-recursive
|
||||||
all-am: Makefile config.h
|
all-am: Makefile config.h
|
||||||
installdirs: installdirs-recursive
|
installdirs: installdirs-recursive
|
||||||
installdirs-am:
|
installdirs-am:
|
||||||
|
|
||||||
install: install-recursive
|
install: install-recursive
|
||||||
install-exec: install-exec-recursive
|
install-exec: install-exec-recursive
|
||||||
install-data: install-data-recursive
|
install-data: install-data-recursive
|
||||||
|
@ -364,6 +514,7 @@ install-am: all-am
|
||||||
installcheck: installcheck-recursive
|
installcheck: installcheck-recursive
|
||||||
install-strip:
|
install-strip:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
`test -z '$(STRIP)' || \
|
`test -z '$(STRIP)' || \
|
||||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
@ -371,7 +522,7 @@ mostlyclean-generic:
|
||||||
clean-generic:
|
clean-generic:
|
||||||
|
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
-rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@ -380,17 +531,17 @@ clean: clean-recursive
|
||||||
|
|
||||||
clean-am: clean-generic mostlyclean-am
|
clean-am: clean-generic mostlyclean-am
|
||||||
|
|
||||||
dist-all: distdir
|
|
||||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
|
||||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
|
||||||
distclean: distclean-recursive
|
distclean: distclean-recursive
|
||||||
-rm -f config.status config.cache config.log
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
|
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
|
||||||
|
|
||||||
dvi: dvi-recursive
|
dvi: dvi-recursive
|
||||||
|
|
||||||
dvi-am:
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-recursive
|
||||||
|
|
||||||
info: info-recursive
|
info: info-recursive
|
||||||
|
|
||||||
info-am:
|
info-am:
|
||||||
|
@ -406,40 +557,48 @@ install-man:
|
||||||
installcheck-am:
|
installcheck-am:
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-recursive
|
maintainer-clean: maintainer-clean-recursive
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -rf $(top_srcdir)/autom4te.cache
|
||||||
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
mostlyclean: mostlyclean-recursive
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
mostlyclean-am: mostlyclean-generic
|
mostlyclean-am: mostlyclean-generic
|
||||||
|
|
||||||
|
pdf: pdf-recursive
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-recursive
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
uninstall-am: uninstall-info-am
|
uninstall-am: uninstall-info-am
|
||||||
|
|
||||||
uninstall-info: uninstall-info-recursive
|
uninstall-info: uninstall-info-recursive
|
||||||
|
|
||||||
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
|
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||||
clean-generic clean-recursive dist dist-all distcheck distclean \
|
check-am clean clean-generic clean-recursive ctags \
|
||||||
distclean-generic distclean-hdr distclean-recursive \
|
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
|
||||||
distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
|
dist-tarZ dist-zip distcheck distclean distclean-generic \
|
||||||
info-recursive install install-am install-data install-data-am \
|
distclean-hdr distclean-recursive distclean-tags \
|
||||||
install-data-recursive install-exec install-exec-am \
|
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||||
install-exec-recursive install-info install-info-am \
|
html-am info info-am install install-am install-data \
|
||||||
install-info-recursive install-man install-recursive \
|
install-data-am install-exec install-exec-am install-info \
|
||||||
install-strip installcheck installcheck-am installdirs \
|
install-info-am install-man install-strip installcheck \
|
||||||
installdirs-am installdirs-recursive maintainer-clean \
|
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||||
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
|
maintainer-clean-generic maintainer-clean-recursive \
|
||||||
mostlyclean-generic mostlyclean-recursive tags tags-recursive \
|
mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
|
||||||
uninstall uninstall-am uninstall-info-am \
|
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||||
uninstall-info-recursive uninstall-recursive
|
uninstall-info-am
|
||||||
|
|
||||||
|
|
||||||
ChangeLog:
|
ChangeLog:
|
||||||
cvs2cl -U cvsusers --fsf
|
svn log > ChangeLog
|
||||||
|
|
||||||
cvs-clean: maintainer-clean
|
svn-clean: maintainer-clean
|
||||||
for f in $(CVS_CREATED) `find . -name Makefile.in` tinc-$(VERSION).tar.gz; do\
|
svn status --no-ignore | sed -n 's/^[?I] \+//p' | tr '\012' '\0' | xargs -r0 rm -rf
|
||||||
rm -Rf "$$f"; \
|
|
||||||
done
|
|
||||||
|
|
||||||
deb:
|
deb:
|
||||||
dpkg-buildpackage -rfakeroot
|
dpkg-buildpackage -rfakeroot
|
||||||
|
|
71
NEWS
71
NEWS
|
@ -1,3 +1,74 @@
|
||||||
|
version 1.0.3 Nov 11 2004
|
||||||
|
|
||||||
|
* Show error message when failing to write a PID file.
|
||||||
|
|
||||||
|
* Ignore spaces at end of lines in config files.
|
||||||
|
|
||||||
|
* Fix handling of late packets.
|
||||||
|
|
||||||
|
* Unify BSD tun/tap device handling. This allows IPv6 on tun devices and
|
||||||
|
anything on tap devices as long as the underlying OS supports it.
|
||||||
|
|
||||||
|
* Handle IPv6 on Solaris tun devices.
|
||||||
|
|
||||||
|
* Allow tinc to work properly under Windows XP SP2.
|
||||||
|
|
||||||
|
* Allow VLAN tagged Ethernet frames in switch and hub mode.
|
||||||
|
|
||||||
|
* Experimental PMTUDiscovery, TunnelServer and BlockingTCP options.
|
||||||
|
|
||||||
|
version 1.0.2 Nov 8 2003
|
||||||
|
|
||||||
|
* Fix address and hostname resolving under Windows.
|
||||||
|
|
||||||
|
* Remove warnings about non-existing scripts and unsupported address families.
|
||||||
|
|
||||||
|
* Use the event logger under Windows.
|
||||||
|
|
||||||
|
* Fix quoting of filenames and command line arguments under Windows.
|
||||||
|
|
||||||
|
* Strict checks for length incoming network packets and return values of
|
||||||
|
cryptographic functions,
|
||||||
|
|
||||||
|
* Fix a bug in metadata handling that made the tinc daemon abort.
|
||||||
|
|
||||||
|
version 1.0.1 Aug 14 2003
|
||||||
|
|
||||||
|
* Allow empty lines in config files.
|
||||||
|
|
||||||
|
* Fix handling of spaces and backslashes in filenames under native Windows.
|
||||||
|
|
||||||
|
* Allow scripts to be executed under native Windows.
|
||||||
|
|
||||||
|
* Update documentation, make it less Linux specific.
|
||||||
|
|
||||||
|
version 1.0 Aug 4 2003
|
||||||
|
|
||||||
|
* Lots of small bugfixes and code cleanups.
|
||||||
|
|
||||||
|
* Throughput doubled and latency reduced.
|
||||||
|
|
||||||
|
* Added support for LZO compression.
|
||||||
|
|
||||||
|
* No need to set MAC address or disable ARP anymore.
|
||||||
|
|
||||||
|
* Added support for Windows 2000 and XP, both natively and in a Cygwin
|
||||||
|
environment.
|
||||||
|
|
||||||
|
version 1.0pre8 Sep 16 2002
|
||||||
|
|
||||||
|
* More fixes for subnets with prefixlength undivisible by 8.
|
||||||
|
|
||||||
|
* Added support for NetBSD and MacOS/X.
|
||||||
|
|
||||||
|
* Switched from undirected graphs to directed graphs to avoid certain race
|
||||||
|
conditions and improve scalability.
|
||||||
|
|
||||||
|
* Generalized broadcasting and forwarding of protocol messages.
|
||||||
|
|
||||||
|
* Cleanup of source code.
|
||||||
|
|
||||||
|
|
||||||
version 1.0pre7 Apr 7 2002
|
version 1.0pre7 Apr 7 2002
|
||||||
|
|
||||||
* Don't do blocking read()s when getting a signal.
|
* Don't do blocking read()s when getting a signal.
|
||||||
|
|
65
README
65
README
|
@ -1,10 +1,10 @@
|
||||||
This is the README file for tinc version 1.0pre7. Installation
|
This is the README file for tinc version 1.0.3. Installation
|
||||||
instructions may be found in the INSTALL file.
|
instructions may be found in the INSTALL file.
|
||||||
|
|
||||||
tinc is Copyright (C) 1998-2002 by:
|
tinc is Copyright (C) 1998-2004 by:
|
||||||
|
|
||||||
Ivo Timmermans <itimmermans@bigfoot.com>,
|
Ivo Timmermans <ivo@tinc-vpn.org>,
|
||||||
Guus Sliepen <guus@sliepen.warande.net>,
|
Guus Sliepen <guus@tinc-vpn.org>,
|
||||||
and others.
|
and others.
|
||||||
|
|
||||||
For a complete list of authors see the AUTHORS file.
|
For a complete list of authors see the AUTHORS file.
|
||||||
|
@ -31,6 +31,14 @@ launch a denial of service attack by replaying intercepted packets. The current
|
||||||
version adds sequence numbers and message authentication codes to prevent such
|
version adds sequence numbers and message authentication codes to prevent such
|
||||||
attacks.
|
attacks.
|
||||||
|
|
||||||
|
On September the 15th of 2003, Peter Gutmann contacted us and showed us a
|
||||||
|
writeup describing various security issues in several VPN daemons. He showed
|
||||||
|
that tinc lacks perfect forward security, the connection authentication could
|
||||||
|
be done more properly, that the sequence number we use as an IV is not the best
|
||||||
|
practice and that the default length of the HMAC for packets is too short in
|
||||||
|
his opinion. We do not know of a way to exploit these weaknesses, but we will
|
||||||
|
address these issues in tinc 2.0.
|
||||||
|
|
||||||
Cryptography is a hard thing to get right. We cannot make any
|
Cryptography is a hard thing to get right. We cannot make any
|
||||||
guarantees. Time, review and feedback are the only things that can
|
guarantees. Time, review and feedback are the only things that can
|
||||||
prove the security of any cryptographic product. If you wish to review
|
prove the security of any cryptographic product. If you wish to review
|
||||||
|
@ -44,13 +52,19 @@ Some configuration variables have different names now. Most notably "TapDevice"
|
||||||
should be changed into "Device", and "Device" should be changed into
|
should be changed into "Device", and "Device" should be changed into
|
||||||
"BindToDevice".
|
"BindToDevice".
|
||||||
|
|
||||||
|
Compatibility
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Version 1.0.3 is compatible with 1.0pre8, 1.0 and later, but not with older
|
||||||
|
versions of tinc.
|
||||||
|
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Since 1.0pre3, we use OpenSSL for all cryptographic functions. So you
|
Since 1.0pre3, we use OpenSSL for all cryptographic functions. So you
|
||||||
need to install this library first; grab it from
|
need to install this library first; grab it from
|
||||||
http://www.openssl.org/. We recommend version 0.9.5 or better. If
|
http://www.openssl.org/. You will need version 0.9.7 or later. If
|
||||||
this library is not installed on you system, configure will fail. The
|
this library is not installed on you system, configure will fail. The
|
||||||
manual in doc/tinc.texi contains more detailed information on how to
|
manual in doc/tinc.texi contains more detailed information on how to
|
||||||
install this library.
|
install this library.
|
||||||
|
@ -60,8 +74,11 @@ library whether or not you plan to enable the compression. You can find it at
|
||||||
http://www.gzip.org/zlib/. Because of a possible exploit in earlier versions we
|
http://www.gzip.org/zlib/. Because of a possible exploit in earlier versions we
|
||||||
recommand that you download version 1.1.4 or later.
|
recommand that you download version 1.1.4 or later.
|
||||||
|
|
||||||
In order to compile tinc, you will also need autoconf, automake, GNU make, m4
|
Since 1.0, the lzo library is also used for optional compression. You need this
|
||||||
and gettext.
|
library whether or not you plan to enable compression. You can find it at
|
||||||
|
http://www.oberhumer.com/opensource/lzo/.
|
||||||
|
|
||||||
|
In order to compile tinc, you will need a GNU C compiler environment.
|
||||||
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
|
@ -70,17 +87,7 @@ Features
|
||||||
This version of tinc supports multiple virtual networks at once. To
|
This version of tinc supports multiple virtual networks at once. To
|
||||||
use this feature, you may supply a netname via the -n or --net
|
use this feature, you may supply a netname via the -n or --net
|
||||||
options. The standard locations for the config files will then be
|
options. The standard locations for the config files will then be
|
||||||
/etc/tinc/<net>/. Because of this feature, tinc will send packets
|
/etc/tinc/<net>/.
|
||||||
directly to their destinations, instead of to the uplink. If this
|
|
||||||
behaviour is undesirable (for instance because of firewalls or other
|
|
||||||
restrictions), please use an older version of tinc (I would recommend
|
|
||||||
tinc-0.2.19).
|
|
||||||
|
|
||||||
In order to force the kernel to accept received packets, the
|
|
||||||
destination MAC address will be set to FE:FD:00:00:00:00 upon
|
|
||||||
reception. The MAC address of the ethertap or tun/tap interface must
|
|
||||||
also be set to this address. See the manual for more detailed
|
|
||||||
information.
|
|
||||||
|
|
||||||
tincd regenerates its encryption key pairs. It does this on the first
|
tincd regenerates its encryption key pairs. It does this on the first
|
||||||
activity after the keys have expired. This period is adjustable in the
|
activity after the keys have expired. This period is adjustable in the
|
||||||
|
@ -96,7 +103,7 @@ Since pre5, tinc can operate in several routing modes. The default mode,
|
||||||
determine the destination of packets. The other two modes, "switch" and "hub",
|
determine the destination of packets. The other two modes, "switch" and "hub",
|
||||||
allow the tinc daemons to work together like a single network switch or hub.
|
allow the tinc daemons to work together like a single network switch or hub.
|
||||||
This is useful for bridging networks. The latter modes only work properly on
|
This is useful for bridging networks. The latter modes only work properly on
|
||||||
Linux and FreeBSD.
|
Linux, FreeBSD and Windows.
|
||||||
|
|
||||||
The algorithms used for encryption and generating message authentication codes
|
The algorithms used for encryption and generating message authentication codes
|
||||||
can now be changed in the configuration files. All cipher and digest algorithms
|
can now be changed in the configuration files. All cipher and digest algorithms
|
||||||
|
@ -107,11 +114,17 @@ etcetera.
|
||||||
Support for routing IPv6 packets has been added. Just add Subnet lines with
|
Support for routing IPv6 packets has been added. Just add Subnet lines with
|
||||||
IPv6 addresses (without using :: abbreviations) and use ifconfig or ip (from
|
IPv6 addresses (without using :: abbreviations) and use ifconfig or ip (from
|
||||||
the iproute package) to give the virtual network interface corresponding IPv6
|
the iproute package) to give the virtual network interface corresponding IPv6
|
||||||
addresses. Autoconfiguration will not work in router mode. Tunneling IPv6
|
addresses. tinc does not provide autoconfiguration for IPv6 hosts, if you need
|
||||||
packets only works on Linux, FreeBSD and possibly OpenBSD.
|
it use radvd or zebra. Tunneling IPv6 packets only works on Linux, FreeBSD,
|
||||||
|
Windows and possibly OpenBSD.
|
||||||
|
|
||||||
|
It is also possible to make tunnels to other tinc daemons over IPv6 networks,
|
||||||
|
if the operating system supports IPv6. tinc will automatically use both IPv6
|
||||||
|
and IPv4 when available, but this can be changed by adding the option
|
||||||
|
"AddressFamily = ipv4" or "AddressFamily = ipv6" to the tinc.conf file.
|
||||||
|
|
||||||
|
Normally, when started tinc will detach and run in the background. In a native
|
||||||
|
Windows environment this means tinc will intall itself as a service, which will
|
||||||
|
restart after reboots. To prevent tinc from detaching or running as a service,
|
||||||
|
use the -D option.
|
||||||
|
|
||||||
It is also possible to make tunnels to other tinc daemons over IPv6 networks.
|
|
||||||
In order to enable this feature the option "AddressFamily = any" or
|
|
||||||
"AddressFamily = ipv6" must be added to the tinc.conf file. The host
|
|
||||||
configuration files should contain IPv6 addresses for the "Address" variables,
|
|
||||||
or hostnames which have an AAAA or A6 record.
|
|
||||||
|
|
47
THANKS
47
THANKS
|
@ -1,25 +1,32 @@
|
||||||
We would like to thank
|
We would like to thank the following people for their contributions to tinc:
|
||||||
|
|
||||||
* Hans Bayle (for making some useful coding suggestions and fixing a
|
* Alexander Reil and Gemeinde Berg
|
||||||
bug or two)
|
* Allesandro Gatti
|
||||||
* Lubomír Bulej (for the Redhat system init script)
|
* Armijn Hemel
|
||||||
* Wessel Dankers (for the name `tinc' and various suggestions)
|
* Cris van Pelt
|
||||||
* Mads Kiilerich (for finding some bugs and some errors in the
|
* Enrique Zanardi
|
||||||
documentation, and for making several suggestions to make it all
|
* Flynn Marquardt
|
||||||
more userfriendly, and the Redhat package)
|
* Hans Bayle
|
||||||
* James MacLean (for fixing several mission critical bugs, and for
|
* Ivo van Dong
|
||||||
giving me a few good ideas, and, most of all, for the wonderful
|
* James MacLean
|
||||||
testing and debugging)
|
* Jamie Briggs
|
||||||
* Robert van der Meulen (early configuration code)
|
* Jason Harper
|
||||||
* Cris van Pelt (small fixes)
|
* Jeroen Ubbink
|
||||||
* Enrique Zanardi (for the Spanish translation)
|
* Jerome Etienne
|
||||||
* Matias Carrasco (for the Spanish translation of the manual)
|
* Lubomír Bulej
|
||||||
* Jamie Briggs (for finding a lot of socket leaks)
|
* Mads Kiilerich
|
||||||
* Armijn Hemel (for being our very own PR manager)
|
* Marc A. Lehmann
|
||||||
* Jerome Etienne (for a thorough security analysis of tinc)
|
* Mark Glines
|
||||||
* Mark Glines (for his compression patch)
|
* Martin Kihlgren
|
||||||
|
* Matias Carrasco
|
||||||
|
* Nick Patavalis
|
||||||
|
* Paul Littlefield
|
||||||
|
* Robert van der Meulen
|
||||||
|
* Teemu Kiviniemi
|
||||||
|
* Wessel Dankers
|
||||||
|
* Wouter van Heyst
|
||||||
|
|
||||||
for their help, support and ideas. Thank you guys!
|
And everyone we forgot. Thank you guys!
|
||||||
|
|
||||||
Ivo Timmermans
|
Ivo Timmermans
|
||||||
Guus Sliepen
|
Guus Sliepen
|
||||||
|
|
4
TODO
4
TODO
|
@ -1,5 +1,3 @@
|
||||||
TODO LIST
|
TODO LIST
|
||||||
|
|
||||||
1.0:
|
* Think of new things to do.
|
||||||
|
|
||||||
* A nice, secure and stable release
|
|
||||||
|
|
77
acconfig.h
77
acconfig.h
|
@ -1,77 +0,0 @@
|
||||||
/* Define to the name name of this package */
|
|
||||||
#undef PACKAGE
|
|
||||||
|
|
||||||
/* Define to the version of the package */
|
|
||||||
#undef VERSION
|
|
||||||
|
|
||||||
/* Define to rpl_malloc if the replacement function should be used. */
|
|
||||||
#undef malloc
|
|
||||||
|
|
||||||
/* Define to rpl_realloc if the replacement function should be used. */
|
|
||||||
#undef realloc
|
|
||||||
|
|
||||||
/* This is always defined. It enables GNU extensions on systems that
|
|
||||||
have them. */
|
|
||||||
#if !defined(_GNU_SOURCE)
|
|
||||||
# undef _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(__USE_BSD)
|
|
||||||
# undef __USE_BSD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Define to 1 if NLS is requested. */
|
|
||||||
#undef ENABLE_NLS
|
|
||||||
|
|
||||||
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
|
|
||||||
#undef HAVE_CATGETS
|
|
||||||
|
|
||||||
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
|
|
||||||
#undef HAVE_GETTEXT
|
|
||||||
|
|
||||||
/* Define if your locale.h file contains LC_MESSAGES. */
|
|
||||||
#undef HAVE_LC_MESSAGES
|
|
||||||
|
|
||||||
/* Define to 1 if you have the stpcpy function. */
|
|
||||||
#undef HAVE_STPCPY
|
|
||||||
|
|
||||||
/* For getopt */
|
|
||||||
#if HAVE_STDLIB_H
|
|
||||||
# define getopt system_getopt
|
|
||||||
# include <stdlib.h>
|
|
||||||
# undef getopt
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Linux */
|
|
||||||
#undef HAVE_LINUX
|
|
||||||
|
|
||||||
/* FreeBSD */
|
|
||||||
#undef HAVE_FREEBSD
|
|
||||||
|
|
||||||
/* OpenBSD */
|
|
||||||
#undef HAVE_OPENBSD
|
|
||||||
|
|
||||||
/* Solaris */
|
|
||||||
#undef HAVE_SOLARIS
|
|
||||||
|
|
||||||
/* NetBSD */
|
|
||||||
#undef HAVE_NETBSD
|
|
||||||
|
|
||||||
/* Define to the location of the kernel sources */
|
|
||||||
#undef CONFIG_TINC_KERNELDIR
|
|
||||||
|
|
||||||
/* Define to 1 if tun/tap support is enabled and found */
|
|
||||||
#undef HAVE_TUNTAP
|
|
||||||
|
|
||||||
/* Define to the location of if_tun.h */
|
|
||||||
#undef LINUX_IF_TUN_H
|
|
||||||
|
|
||||||
/* Define to 1 if support for jumbograms is enabled */
|
|
||||||
#undef ENABLE_JUMBOGRAMS
|
|
||||||
|
|
||||||
/* Define to 1 if checkpoint tracing is enabled */
|
|
||||||
#undef ENABLE_TRACING
|
|
||||||
|
|
||||||
/* Define to enable use of old SSLeay_add_all_algorithms() function */
|
|
||||||
#undef HAVE_SSLEAY_ADD_ALL_ALGORITHMS
|
|
2148
aclocal.m4
vendored
2148
aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
368
config.guess
vendored
368
config.guess
vendored
|
@ -1,9 +1,9 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2002-03-20'
|
timestamp='2004-08-13'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# 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
|
# under the terms of the GNU General Public License as published by
|
||||||
|
@ -53,7 +53,7 @@ version="\
|
||||||
GNU config.guess ($timestamp)
|
GNU config.guess ($timestamp)
|
||||||
|
|
||||||
Originally written by Per Bothner.
|
Originally written by Per Bothner.
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
|
@ -88,30 +88,42 @@ if test $# != 0; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
trap 'exit 1' 1 2 15
|
||||||
|
|
||||||
dummy=dummy-$$
|
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
||||||
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
|
# compiler to aid in system detection is discouraged as it requires
|
||||||
|
# temporary files to be created and, as you can see below, it is a
|
||||||
|
# headache to deal with in a portable fashion.
|
||||||
|
|
||||||
# CC_FOR_BUILD -- compiler used by this script.
|
|
||||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||||
# use `HOST_CC' if defined, but it is deprecated.
|
# use `HOST_CC' if defined, but it is deprecated.
|
||||||
|
|
||||||
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
|
# Portable tmp directory creation inspired by the Autoconf team.
|
||||||
,,) echo "int dummy(){}" > $dummy.c ;
|
|
||||||
|
set_cc_for_build='
|
||||||
|
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||||
|
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||||
|
: ${TMPDIR=/tmp} ;
|
||||||
|
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||||
|
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||||
|
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||||
|
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||||
|
dummy=$tmp/dummy ;
|
||||||
|
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||||
|
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||||
|
,,) echo "int x;" > $dummy.c ;
|
||||||
for c in cc gcc c89 c99 ; do
|
for c in cc gcc c89 c99 ; do
|
||||||
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
|
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
|
||||||
if test $? = 0 ; then
|
|
||||||
CC_FOR_BUILD="$c"; break ;
|
CC_FOR_BUILD="$c"; break ;
|
||||||
fi ;
|
fi ;
|
||||||
done ;
|
done ;
|
||||||
rm -f $dummy.c $dummy.o $dummy.rel ;
|
|
||||||
if test x"$CC_FOR_BUILD" = x ; then
|
if test x"$CC_FOR_BUILD" = x ; then
|
||||||
CC_FOR_BUILD=no_compiler_found ;
|
CC_FOR_BUILD=no_compiler_found ;
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
,,*) CC_FOR_BUILD=$CC ;;
|
,,*) CC_FOR_BUILD=$CC ;;
|
||||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||||
esac'
|
esac ;'
|
||||||
|
|
||||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||||
# (ghazi@noc.rutgers.edu 1994-08-24)
|
# (ghazi@noc.rutgers.edu 1994-08-24)
|
||||||
|
@ -142,6 +154,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
||||||
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
||||||
case "${UNAME_MACHINE_ARCH}" in
|
case "${UNAME_MACHINE_ARCH}" in
|
||||||
|
armeb) machine=armeb-unknown ;;
|
||||||
arm*) machine=arm-unknown ;;
|
arm*) machine=arm-unknown ;;
|
||||||
sh3el) machine=shl-unknown ;;
|
sh3el) machine=shl-unknown ;;
|
||||||
sh3eb) machine=sh-unknown ;;
|
sh3eb) machine=sh-unknown ;;
|
||||||
|
@ -167,21 +180,38 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# The OS release
|
# The OS release
|
||||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
# Debian GNU/NetBSD machines have a different userland, and
|
||||||
|
# thus, need a distinct triplet. However, they do not need
|
||||||
|
# kernel version information, so it can be replaced with a
|
||||||
|
# suitable tag, in the style of linux-gnu.
|
||||||
|
case "${UNAME_VERSION}" in
|
||||||
|
Debian*)
|
||||||
|
release='-gnu'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||||
# contains redundant information, the shorter form:
|
# contains redundant information, the shorter form:
|
||||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||||
echo "${machine}-${os}${release}"
|
echo "${machine}-${os}${release}"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
amd64:OpenBSD:*:*)
|
||||||
|
echo x86_64-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
amiga:OpenBSD:*:*)
|
amiga:OpenBSD:*:*)
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
arc:OpenBSD:*:*)
|
cats:OpenBSD:*:*)
|
||||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
echo arm-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
hp300:OpenBSD:*:*)
|
hp300:OpenBSD:*:*)
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
luna88k:OpenBSD:*:*)
|
||||||
|
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
mac68k:OpenBSD:*:*)
|
mac68k:OpenBSD:*:*)
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -197,83 +227,76 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
mvmeppc:OpenBSD:*:*)
|
mvmeppc:OpenBSD:*:*)
|
||||||
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
pmax:OpenBSD:*:*)
|
|
||||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
sgi:OpenBSD:*:*)
|
sgi:OpenBSD:*:*)
|
||||||
echo mipseb-unknown-openbsd${UNAME_RELEASE}
|
echo mips64-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
sun3:OpenBSD:*:*)
|
sun3:OpenBSD:*:*)
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
wgrisc:OpenBSD:*:*)
|
|
||||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
*:OpenBSD:*:*)
|
*:OpenBSD:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
*:ekkoBSD:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
macppc:MirBSD:*:*)
|
||||||
|
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
*:MirBSD:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
alpha:OSF1:*:*)
|
alpha:OSF1:*:*)
|
||||||
if test $UNAME_RELEASE = "V4.0"; then
|
case $UNAME_RELEASE in
|
||||||
|
*4.0)
|
||||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||||
fi
|
;;
|
||||||
|
*5.*)
|
||||||
|
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# According to Compaq, /usr/sbin/psrinfo has been available on
|
||||||
|
# OSF/1 and Tru64 systems produced since 1995. I hope that
|
||||||
|
# covers most systems running today. This code pipes the CPU
|
||||||
|
# types through head -n 1, so we only detect the type of CPU 0.
|
||||||
|
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
||||||
|
case "$ALPHA_CPU_TYPE" in
|
||||||
|
"EV4 (21064)")
|
||||||
|
UNAME_MACHINE="alpha" ;;
|
||||||
|
"EV4.5 (21064)")
|
||||||
|
UNAME_MACHINE="alpha" ;;
|
||||||
|
"LCA4 (21066/21068)")
|
||||||
|
UNAME_MACHINE="alpha" ;;
|
||||||
|
"EV5 (21164)")
|
||||||
|
UNAME_MACHINE="alphaev5" ;;
|
||||||
|
"EV5.6 (21164A)")
|
||||||
|
UNAME_MACHINE="alphaev56" ;;
|
||||||
|
"EV5.6 (21164PC)")
|
||||||
|
UNAME_MACHINE="alphapca56" ;;
|
||||||
|
"EV5.7 (21164PC)")
|
||||||
|
UNAME_MACHINE="alphapca57" ;;
|
||||||
|
"EV6 (21264)")
|
||||||
|
UNAME_MACHINE="alphaev6" ;;
|
||||||
|
"EV6.7 (21264A)")
|
||||||
|
UNAME_MACHINE="alphaev67" ;;
|
||||||
|
"EV6.8CB (21264C)")
|
||||||
|
UNAME_MACHINE="alphaev68" ;;
|
||||||
|
"EV6.8AL (21264B)")
|
||||||
|
UNAME_MACHINE="alphaev68" ;;
|
||||||
|
"EV6.8CX (21264D)")
|
||||||
|
UNAME_MACHINE="alphaev68" ;;
|
||||||
|
"EV6.9A (21264/EV69A)")
|
||||||
|
UNAME_MACHINE="alphaev69" ;;
|
||||||
|
"EV7 (21364)")
|
||||||
|
UNAME_MACHINE="alphaev7" ;;
|
||||||
|
"EV7.9 (21364A)")
|
||||||
|
UNAME_MACHINE="alphaev79" ;;
|
||||||
|
esac
|
||||||
|
# A Pn.n version is a patched version.
|
||||||
# A Vn.n version is a released version.
|
# A Vn.n version is a released version.
|
||||||
# A Tn.n version is a released field test version.
|
# A Tn.n version is a released field test version.
|
||||||
# A Xn.n version is an unreleased experimental baselevel.
|
# A Xn.n version is an unreleased experimental baselevel.
|
||||||
# 1.2 uses "1.2" for uname -r.
|
# 1.2 uses "1.2" for uname -r.
|
||||||
cat <<EOF >$dummy.s
|
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||||
.data
|
|
||||||
\$Lformat:
|
|
||||||
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
|
||||||
|
|
||||||
.text
|
|
||||||
.globl main
|
|
||||||
.align 4
|
|
||||||
.ent main
|
|
||||||
main:
|
|
||||||
.frame \$30,16,\$26,0
|
|
||||||
ldgp \$29,0(\$27)
|
|
||||||
.prologue 1
|
|
||||||
.long 0x47e03d80 # implver \$0
|
|
||||||
lda \$2,-1
|
|
||||||
.long 0x47e20c21 # amask \$2,\$1
|
|
||||||
lda \$16,\$Lformat
|
|
||||||
mov \$0,\$17
|
|
||||||
not \$1,\$18
|
|
||||||
jsr \$26,printf
|
|
||||||
ldgp \$29,0(\$26)
|
|
||||||
mov 0,\$16
|
|
||||||
jsr \$26,exit
|
|
||||||
.end main
|
|
||||||
EOF
|
|
||||||
eval $set_cc_for_build
|
|
||||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
|
||||||
if test "$?" = 0 ; then
|
|
||||||
case `./$dummy` in
|
|
||||||
0-0)
|
|
||||||
UNAME_MACHINE="alpha"
|
|
||||||
;;
|
|
||||||
1-0)
|
|
||||||
UNAME_MACHINE="alphaev5"
|
|
||||||
;;
|
|
||||||
1-1)
|
|
||||||
UNAME_MACHINE="alphaev56"
|
|
||||||
;;
|
|
||||||
1-101)
|
|
||||||
UNAME_MACHINE="alphapca56"
|
|
||||||
;;
|
|
||||||
2-303)
|
|
||||||
UNAME_MACHINE="alphaev6"
|
|
||||||
;;
|
|
||||||
2-307)
|
|
||||||
UNAME_MACHINE="alphaev67"
|
|
||||||
;;
|
|
||||||
2-1307)
|
|
||||||
UNAME_MACHINE="alphaev68"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
rm -f $dummy.s $dummy
|
|
||||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
Alpha\ *:Windows_NT*:*)
|
Alpha\ *:Windows_NT*:*)
|
||||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||||
|
@ -296,6 +319,9 @@ EOF
|
||||||
*:OS/390:*:*)
|
*:OS/390:*:*)
|
||||||
echo i370-ibm-openedition
|
echo i370-ibm-openedition
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
*:OS400:*:*)
|
||||||
|
echo powerpc-ibm-os400
|
||||||
|
exit 0 ;;
|
||||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||||
exit 0;;
|
exit 0;;
|
||||||
|
@ -313,6 +339,13 @@ EOF
|
||||||
NILE*:*:*:dcosx)
|
NILE*:*:*:dcosx)
|
||||||
echo pyramid-pyramid-svr4
|
echo pyramid-pyramid-svr4
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
DRS?6000:unix:4.0:6*)
|
||||||
|
echo sparc-icl-nx6
|
||||||
|
exit 0 ;;
|
||||||
|
DRS?6000:UNIX_SV:4.2*:7*)
|
||||||
|
case `/usr/bin/uname -p` in
|
||||||
|
sparc) echo sparc-icl-nx7 && exit 0 ;;
|
||||||
|
esac ;;
|
||||||
sun4H:SunOS:5.*:*)
|
sun4H:SunOS:5.*:*)
|
||||||
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -381,6 +414,9 @@ EOF
|
||||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
m68k:machten:*:*)
|
||||||
|
echo m68k-apple-machten${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
powerpc:machten:*:*)
|
powerpc:machten:*:*)
|
||||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -419,15 +455,20 @@ EOF
|
||||||
exit (-1);
|
exit (-1);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
$CC_FOR_BUILD $dummy.c -o $dummy \
|
$CC_FOR_BUILD -o $dummy $dummy.c \
|
||||||
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||||
&& rm -f $dummy.c $dummy && exit 0
|
&& exit 0
|
||||||
rm -f $dummy.c $dummy
|
|
||||||
echo mips-mips-riscos${UNAME_RELEASE}
|
echo mips-mips-riscos${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
Motorola:PowerMAX_OS:*:*)
|
Motorola:PowerMAX_OS:*:*)
|
||||||
echo powerpc-motorola-powermax
|
echo powerpc-motorola-powermax
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
Motorola:*:4.3:PL8-*)
|
||||||
|
echo powerpc-harris-powermax
|
||||||
|
exit 0 ;;
|
||||||
|
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
|
||||||
|
echo powerpc-harris-powermax
|
||||||
|
exit 0 ;;
|
||||||
Night_Hawk:Power_UNIX:*:*)
|
Night_Hawk:Power_UNIX:*:*)
|
||||||
echo powerpc-harris-powerunix
|
echo powerpc-harris-powerunix
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -500,8 +541,7 @@ EOF
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||||
rm -f $dummy.c $dummy
|
|
||||||
echo rs6000-ibm-aix3.2.5
|
echo rs6000-ibm-aix3.2.5
|
||||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||||
echo rs6000-ibm-aix3.2.4
|
echo rs6000-ibm-aix3.2.4
|
||||||
|
@ -599,11 +639,21 @@ EOF
|
||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
|
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||||
rm -f $dummy.c $dummy
|
|
||||||
fi ;;
|
fi ;;
|
||||||
esac
|
esac
|
||||||
|
if [ ${HP_ARCH} = "hppa2.0w" ]
|
||||||
|
then
|
||||||
|
# avoid double evaluation of $set_cc_for_build
|
||||||
|
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
|
||||||
|
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
|
||||||
|
then
|
||||||
|
HP_ARCH="hppa2.0w"
|
||||||
|
else
|
||||||
|
HP_ARCH="hppa64"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
ia64:HP-UX:*:*)
|
ia64:HP-UX:*:*)
|
||||||
|
@ -637,8 +687,7 @@ EOF
|
||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||||
rm -f $dummy.c $dummy
|
|
||||||
echo unknown-hitachi-hiuxwe2
|
echo unknown-hitachi-hiuxwe2
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||||
|
@ -696,21 +745,26 @@ EOF
|
||||||
CRAY*TS:*:*:*)
|
CRAY*TS:*:*:*)
|
||||||
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
CRAY*T3D:*:*:*)
|
|
||||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
|
||||||
exit 0 ;;
|
|
||||||
CRAY*T3E:*:*:*)
|
CRAY*T3E:*:*:*)
|
||||||
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
CRAY*SV1:*:*:*)
|
CRAY*SV1:*:*:*)
|
||||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
*:UNICOS/mp:*:*)
|
||||||
|
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||||
|
exit 0 ;;
|
||||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
5000:UNIX_System_V:4.*:*)
|
||||||
|
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||||
|
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||||
|
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||||
|
exit 0 ;;
|
||||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -732,14 +786,17 @@ EOF
|
||||||
i*:PW*:*)
|
i*:PW*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-pw32
|
echo ${UNAME_MACHINE}-pc-pw32
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
x86:Interix*:3*)
|
x86:Interix*:[34]*)
|
||||||
echo i386-pc-interix3
|
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
|
||||||
|
exit 0 ;;
|
||||||
|
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||||
|
echo i${UNAME_MACHINE}-pc-mks
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||||
# UNAME_MACHINE based on the output of uname instead of i386?
|
# UNAME_MACHINE based on the output of uname instead of i386?
|
||||||
echo i386-pc-interix
|
echo i586-pc-interix
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
i*:UWIN*:*)
|
i*:UWIN*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-uwin
|
echo ${UNAME_MACHINE}-pc-uwin
|
||||||
|
@ -751,17 +808,28 @@ EOF
|
||||||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
*:GNU:*:*)
|
*:GNU:*:*)
|
||||||
|
# the GNU system
|
||||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
*:GNU/*:*:*)
|
||||||
|
# other systems with GNU libc and userland
|
||||||
|
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
||||||
|
exit 0 ;;
|
||||||
i*86:Minix:*:*)
|
i*86:Minix:*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-minix
|
echo ${UNAME_MACHINE}-pc-minix
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
arm*:Linux:*:*)
|
arm*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
cris:Linux:*:*)
|
||||||
|
echo cris-axis-linux-gnu
|
||||||
|
exit 0 ;;
|
||||||
ia64:Linux:*:*)
|
ia64:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
m32r*:Linux:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
|
exit 0 ;;
|
||||||
m68*:Linux:*:*)
|
m68*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -782,8 +850,26 @@ EOF
|
||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||||
rm -f $dummy.c
|
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
||||||
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
|
;;
|
||||||
|
mips64:Linux:*:*)
|
||||||
|
eval $set_cc_for_build
|
||||||
|
sed 's/^ //' << EOF >$dummy.c
|
||||||
|
#undef CPU
|
||||||
|
#undef mips64
|
||||||
|
#undef mips64el
|
||||||
|
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||||
|
CPU=mips64el
|
||||||
|
#else
|
||||||
|
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||||
|
CPU=mips64
|
||||||
|
#else
|
||||||
|
CPU=
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||||
|
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
||||||
;;
|
;;
|
||||||
ppc:Linux:*:*)
|
ppc:Linux:*:*)
|
||||||
echo powerpc-unknown-linux-gnu
|
echo powerpc-unknown-linux-gnu
|
||||||
|
@ -819,6 +905,9 @@ EOF
|
||||||
s390:Linux:*:* | s390x:Linux:*:*)
|
s390:Linux:*:* | s390x:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-ibm-linux
|
echo ${UNAME_MACHINE}-ibm-linux
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
sh64*:Linux:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
|
exit 0 ;;
|
||||||
sh*:Linux:*:*)
|
sh*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -876,9 +965,11 @@ EOF
|
||||||
LIBC=gnuaout
|
LIBC=gnuaout
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __dietlibc__
|
||||||
|
LIBC=dietlibc
|
||||||
|
#endif
|
||||||
EOF
|
EOF
|
||||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||||
rm -f $dummy.c
|
|
||||||
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
|
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
|
||||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||||
;;
|
;;
|
||||||
|
@ -896,6 +987,26 @@ EOF
|
||||||
# Use sysv4.2uw... so that sysv4* matches it.
|
# Use sysv4.2uw... so that sysv4* matches it.
|
||||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
i*86:OS/2:*:*)
|
||||||
|
# If we were able to find `uname', then EMX Unix compatibility
|
||||||
|
# is probably installed.
|
||||||
|
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||||
|
exit 0 ;;
|
||||||
|
i*86:XTS-300:*:STOP)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-stop
|
||||||
|
exit 0 ;;
|
||||||
|
i*86:atheos:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-atheos
|
||||||
|
exit 0 ;;
|
||||||
|
i*86:syllable:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-pc-syllable
|
||||||
|
exit 0 ;;
|
||||||
|
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||||
|
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
i*86:*DOS:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||||
|
exit 0 ;;
|
||||||
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
|
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
|
||||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||||
|
@ -917,22 +1028,19 @@ EOF
|
||||||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||||
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
||||||
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
|
||||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
|
||||||
&& UNAME_MACHINE=i586
|
&& UNAME_MACHINE=i586
|
||||||
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
|
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
|
||||||
&& UNAME_MACHINE=i686
|
&& UNAME_MACHINE=i686
|
||||||
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
|
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
|
||||||
&& UNAME_MACHINE=i686
|
&& UNAME_MACHINE=i686
|
||||||
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
|
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
|
||||||
else
|
else
|
||||||
echo ${UNAME_MACHINE}-pc-sysv32
|
echo ${UNAME_MACHINE}-pc-sysv32
|
||||||
fi
|
fi
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
i*86:*DOS:*:*)
|
|
||||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
|
||||||
exit 0 ;;
|
|
||||||
pc:*:*:*)
|
pc:*:*:*)
|
||||||
# Left here for compatibility:
|
# Left here for compatibility:
|
||||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||||
|
@ -956,9 +1064,15 @@ EOF
|
||||||
# "miniframe"
|
# "miniframe"
|
||||||
echo m68010-convergent-sysv
|
echo m68010-convergent-sysv
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
M68*:*:R3V[567]*:*)
|
mc68k:UNIX:SYSTEM5:3.51m)
|
||||||
|
echo m68k-convergent-sysv
|
||||||
|
exit 0 ;;
|
||||||
|
M680?0:D-NIX:5.3:*)
|
||||||
|
echo m68k-diab-dnix
|
||||||
|
exit 0 ;;
|
||||||
|
M68*:*:R3V[5678]*:*)
|
||||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
|
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
|
||||||
OS_REL=''
|
OS_REL=''
|
||||||
test -r /etc/.relid \
|
test -r /etc/.relid \
|
||||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||||
|
@ -975,9 +1089,6 @@ EOF
|
||||||
mc68030:UNIX_System_V:4.*:*)
|
mc68030:UNIX_System_V:4.*:*)
|
||||||
echo m68k-atari-sysv4
|
echo m68k-atari-sysv4
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
|
||||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
TSUNAMI:LynxOS:2.*:*)
|
TSUNAMI:LynxOS:2.*:*)
|
||||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -1049,6 +1160,9 @@ EOF
|
||||||
SX-5:SUPER-UX:*:*)
|
SX-5:SUPER-UX:*:*)
|
||||||
echo sx5-nec-superux${UNAME_RELEASE}
|
echo sx5-nec-superux${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
SX-6:SUPER-UX:*:*)
|
||||||
|
echo sx6-nec-superux${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
Power*:Rhapsody:*:*)
|
Power*:Rhapsody:*:*)
|
||||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -1056,7 +1170,12 @@ EOF
|
||||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
*:Darwin:*:*)
|
*:Darwin:*:*)
|
||||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||||
|
case $UNAME_PROCESSOR in
|
||||||
|
*86) UNAME_PROCESSOR=i686 ;;
|
||||||
|
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||||
|
esac
|
||||||
|
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||||
UNAME_PROCESSOR=`uname -p`
|
UNAME_PROCESSOR=`uname -p`
|
||||||
|
@ -1069,7 +1188,7 @@ EOF
|
||||||
*:QNX:*:4*)
|
*:QNX:*:4*)
|
||||||
echo i386-pc-qnx
|
echo i386-pc-qnx
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
|
NSR-?:NONSTOP_KERNEL:*:*)
|
||||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
*:NonStop-UX:*:*)
|
*:NonStop-UX:*:*)
|
||||||
|
@ -1092,11 +1211,6 @@ EOF
|
||||||
fi
|
fi
|
||||||
echo ${UNAME_MACHINE}-unknown-plan9
|
echo ${UNAME_MACHINE}-unknown-plan9
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
i*86:OS/2:*:*)
|
|
||||||
# If we were able to find `uname', then EMX Unix compatibility
|
|
||||||
# is probably installed.
|
|
||||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
|
||||||
exit 0 ;;
|
|
||||||
*:TOPS-10:*:*)
|
*:TOPS-10:*:*)
|
||||||
echo pdp10-unknown-tops10
|
echo pdp10-unknown-tops10
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -1115,12 +1229,19 @@ EOF
|
||||||
*:ITS:*:*)
|
*:ITS:*:*)
|
||||||
echo pdp10-unknown-its
|
echo pdp10-unknown-its
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
i*86:XTS-300:*:STOP)
|
SEI:*:*:SEIUX)
|
||||||
echo ${UNAME_MACHINE}-unknown-stop
|
echo mips-sei-seiux${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
i*86:atheos:*:*)
|
*:DragonFly:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-atheos
|
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
*:*VMS:*:*)
|
||||||
|
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||||
|
case "${UNAME_MACHINE}" in
|
||||||
|
A*) echo alpha-dec-vms && exit 0 ;;
|
||||||
|
I*) echo ia64-dec-vms && exit 0 ;;
|
||||||
|
V*) echo vax-dec-vms && exit 0 ;;
|
||||||
|
esac
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||||
|
@ -1241,8 +1362,7 @@ main ()
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
|
||||||
rm -f $dummy.c $dummy
|
|
||||||
|
|
||||||
# Apollos put the system type in the environment.
|
# Apollos put the system type in the environment.
|
||||||
|
|
||||||
|
|
651
config.h.in
651
config.h.in
|
@ -1,310 +1,405 @@
|
||||||
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
|
/* config.h.in. Generated from configure.in by autoheader. */
|
||||||
|
|
||||||
/* Define if using alloca.c. */
|
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||||
#undef C_ALLOCA
|
systems. This function is required for `alloca.c' support on those systems.
|
||||||
|
*/
|
||||||
/* Define to empty if the keyword does not work. */
|
|
||||||
#undef const
|
|
||||||
|
|
||||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
|
|
||||||
This function is required for alloca.c support on those systems. */
|
|
||||||
#undef CRAY_STACKSEG_END
|
#undef CRAY_STACKSEG_END
|
||||||
|
|
||||||
/* Define if you have alloca, as a function or macro. */
|
/* Define to 1 if using `alloca.c'. */
|
||||||
|
#undef C_ALLOCA
|
||||||
|
|
||||||
|
/* Support for jumbograms (packets up to 9000 bytes) */
|
||||||
|
#undef ENABLE_JUMBOGRAMS
|
||||||
|
|
||||||
|
/* Define to 1 if translation of program messages to the user's native
|
||||||
|
language is requested. */
|
||||||
|
#undef ENABLE_NLS
|
||||||
|
|
||||||
|
/* Checkpoint tracing */
|
||||||
|
#undef ENABLE_TRACING
|
||||||
|
|
||||||
|
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||||
#undef HAVE_ALLOCA
|
#undef HAVE_ALLOCA
|
||||||
|
|
||||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||||
|
*/
|
||||||
#undef HAVE_ALLOCA_H
|
#undef HAVE_ALLOCA_H
|
||||||
|
|
||||||
/* Define if you have a working `mmap' system call. */
|
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||||
#undef HAVE_MMAP
|
#undef HAVE_ARPA_INET_H
|
||||||
|
|
||||||
/* Define as __inline if that's what the C compiler calls it. */
|
/* Define to 1 if you have the `asprintf' function. */
|
||||||
#undef inline
|
#undef HAVE_ASPRINTF
|
||||||
|
|
||||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
/* Unknown BSD variant */
|
||||||
#undef off_t
|
#undef HAVE_BSD
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Cygwin */
|
||||||
#undef pid_t
|
#undef HAVE_CYGWIN
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (int or void). */
|
/* Define to 1 if you have the `daemon' function. */
|
||||||
#undef RETSIGTYPE
|
#undef HAVE_DAEMON
|
||||||
|
|
||||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
/* Darwin (MacOS/X) */
|
||||||
#undef size_t
|
#undef HAVE_DARWIN
|
||||||
|
|
||||||
/* If using the C implementation of alloca, define if you know the
|
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||||
direction of stack growth for your system; otherwise it will be
|
*/
|
||||||
automatically deduced at run-time.
|
#undef HAVE_DCGETTEXT
|
||||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
|
||||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
|
||||||
STACK_DIRECTION = 0 => direction of growth unknown
|
|
||||||
*/
|
|
||||||
#undef STACK_DIRECTION
|
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
/* Needed for xmalloc.c */
|
||||||
#undef STDC_HEADERS
|
#undef HAVE_DONE_WORKING_MALLOC_CHECK
|
||||||
|
|
||||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
/* Needed for xmalloc.c */
|
||||||
#undef TIME_WITH_SYS_TIME
|
#undef HAVE_DONE_WORKING_REALLOC_CHECK
|
||||||
|
|
||||||
/* Define if your <sys/time.h> declares struct tm. */
|
/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
|
||||||
#undef TM_IN_SYS_TIME
|
#undef HAVE_EVP_ENCRYPTINIT_EX
|
||||||
|
|
||||||
/* Define to rpl_malloc if the replacement function should be used. */
|
/* Define to 1 if you have the `fchmod' function. */
|
||||||
#undef malloc
|
#undef HAVE_FCHMOD
|
||||||
|
|
||||||
/* Define to rpl_realloc if the replacement function should be used. */
|
/* Define to 1 if you have the `flock' function. */
|
||||||
#undef realloc
|
#undef HAVE_FLOCK
|
||||||
|
|
||||||
/* This is always defined. It enables GNU extensions on systems that
|
/* Define to 1 if you have the `fork' function. */
|
||||||
have them. */
|
#undef HAVE_FORK
|
||||||
#if !defined(_GNU_SOURCE)
|
|
||||||
# undef _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Linux */
|
/* Define to 1 if you have the `freeaddrinfo' function. */
|
||||||
#undef HAVE_LINUX
|
#undef HAVE_FREEADDRINFO
|
||||||
|
|
||||||
/* FreeBSD */
|
/* FreeBSD */
|
||||||
#undef HAVE_FREEBSD
|
#undef HAVE_FREEBSD
|
||||||
|
|
||||||
/* OpenBSD */
|
/* Define to 1 if you have the `ftime' function. */
|
||||||
#undef HAVE_OPENBSD
|
|
||||||
|
|
||||||
/* Solaris */
|
|
||||||
#undef HAVE_SOLARIS
|
|
||||||
|
|
||||||
/* NetBSD */
|
|
||||||
#undef HAVE_NETBSD
|
|
||||||
|
|
||||||
/* Define to 1 if tun/tap support is enabled and found */
|
|
||||||
#undef HAVE_TUNTAP
|
|
||||||
|
|
||||||
/* Define to the location of if_tun.h */
|
|
||||||
#undef LINUX_IF_TUN_H
|
|
||||||
|
|
||||||
/* Define to 1 if support for jumbograms is enabled */
|
|
||||||
#undef ENABLE_JUMBOGRAMS
|
|
||||||
|
|
||||||
/* Define to 1 if checkpoint tracing is enabled */
|
|
||||||
#undef ENABLE_TRACING
|
|
||||||
|
|
||||||
/* Define to enable use of old SSLeay_add_all_algorithms() function */
|
|
||||||
#undef HAVE_SSLEAY_ADD_ALL_ALGORITHMS
|
|
||||||
|
|
||||||
/* Define if you have the DONE_WORKING_MALLOC_CHECK function. */
|
|
||||||
#undef HAVE_DONE_WORKING_MALLOC_CHECK
|
|
||||||
|
|
||||||
/* Define if you have the DONE_WORKING_REALLOC_CHECK function. */
|
|
||||||
#undef HAVE_DONE_WORKING_REALLOC_CHECK
|
|
||||||
|
|
||||||
/* Define if you have the RAND_pseudo_bytes function. */
|
|
||||||
#undef HAVE_RAND_PSEUDO_BYTES
|
|
||||||
|
|
||||||
/* Define if you have the __argz_count function. */
|
|
||||||
#undef HAVE___ARGZ_COUNT
|
|
||||||
|
|
||||||
/* Define if you have the __argz_next function. */
|
|
||||||
#undef HAVE___ARGZ_NEXT
|
|
||||||
|
|
||||||
/* Define if you have the __argz_stringify function. */
|
|
||||||
#undef HAVE___ARGZ_STRINGIFY
|
|
||||||
|
|
||||||
/* Define if you have the asprintf function. */
|
|
||||||
#undef HAVE_ASPRINTF
|
|
||||||
|
|
||||||
/* Define if you have the daemon function. */
|
|
||||||
#undef HAVE_DAEMON
|
|
||||||
|
|
||||||
/* Define if you have the dcgettext function. */
|
|
||||||
#undef HAVE_DCGETTEXT
|
|
||||||
|
|
||||||
/* Define if you have the fcloseall function. */
|
|
||||||
#undef HAVE_FCLOSEALL
|
|
||||||
|
|
||||||
/* Define if you have the feof_unlocked function. */
|
|
||||||
#undef HAVE_FEOF_UNLOCKED
|
|
||||||
|
|
||||||
/* Define if you have the fgets_unlocked function. */
|
|
||||||
#undef HAVE_FGETS_UNLOCKED
|
|
||||||
|
|
||||||
/* Define if you have the flock function. */
|
|
||||||
#undef HAVE_FLOCK
|
|
||||||
|
|
||||||
/* Define if you have the ftime function. */
|
|
||||||
#undef HAVE_FTIME
|
#undef HAVE_FTIME
|
||||||
|
|
||||||
/* Define if you have the get_current_dir_name function. */
|
/* Define to 1 if you have the `gai_strerror' function. */
|
||||||
#undef HAVE_GET_CURRENT_DIR_NAME
|
#undef HAVE_GAI_STRERROR
|
||||||
|
|
||||||
/* Define if you have the getcwd function. */
|
/* Define to 1 if you have the `getaddrinfo' function. */
|
||||||
#undef HAVE_GETCWD
|
#undef HAVE_GETADDRINFO
|
||||||
|
|
||||||
/* Define if you have the getegid function. */
|
/* Define to 1 if you have the `getnameinfo' function. */
|
||||||
#undef HAVE_GETEGID
|
#undef HAVE_GETNAMEINFO
|
||||||
|
|
||||||
/* Define if you have the geteuid function. */
|
|
||||||
#undef HAVE_GETEUID
|
|
||||||
|
|
||||||
/* Define if you have the getgid function. */
|
|
||||||
#undef HAVE_GETGID
|
|
||||||
|
|
||||||
/* Define if you have the getpagesize function. */
|
|
||||||
#undef HAVE_GETPAGESIZE
|
|
||||||
|
|
||||||
/* Define if you have the getuid function. */
|
|
||||||
#undef HAVE_GETUID
|
|
||||||
|
|
||||||
/* Define if you have the mempcpy function. */
|
|
||||||
#undef HAVE_MEMPCPY
|
|
||||||
|
|
||||||
/* Define if you have the munmap function. */
|
|
||||||
#undef HAVE_MUNMAP
|
|
||||||
|
|
||||||
/* Define if you have the putenv function. */
|
|
||||||
#undef HAVE_PUTENV
|
|
||||||
|
|
||||||
/* Define if you have the select function. */
|
|
||||||
#undef HAVE_SELECT
|
|
||||||
|
|
||||||
/* Define if you have the setenv function. */
|
|
||||||
#undef HAVE_SETENV
|
|
||||||
|
|
||||||
/* Define if you have the setlocale function. */
|
|
||||||
#undef HAVE_SETLOCALE
|
|
||||||
|
|
||||||
/* Define if you have the socket function. */
|
|
||||||
#undef HAVE_SOCKET
|
|
||||||
|
|
||||||
/* Define if you have the stpcpy function. */
|
|
||||||
#undef HAVE_STPCPY
|
|
||||||
|
|
||||||
/* Define if you have the strcasecmp function. */
|
|
||||||
#undef HAVE_STRCASECMP
|
|
||||||
|
|
||||||
/* Define if you have the strchr function. */
|
|
||||||
#undef HAVE_STRCHR
|
|
||||||
|
|
||||||
/* Define if you have the strdup function. */
|
|
||||||
#undef HAVE_STRDUP
|
|
||||||
|
|
||||||
/* Define if you have the strerror function. */
|
|
||||||
#undef HAVE_STRERROR
|
|
||||||
|
|
||||||
/* Define if you have the strsignal function. */
|
|
||||||
#undef HAVE_STRSIGNAL
|
|
||||||
|
|
||||||
/* Define if you have the strtol function. */
|
|
||||||
#undef HAVE_STRTOL
|
|
||||||
|
|
||||||
/* Define if you have the strtoul function. */
|
|
||||||
#undef HAVE_STRTOUL
|
|
||||||
|
|
||||||
/* Define if you have the tsearch function. */
|
|
||||||
#undef HAVE_TSEARCH
|
|
||||||
|
|
||||||
/* Define if you have the unsetenv function. */
|
|
||||||
#undef HAVE_UNSETENV
|
|
||||||
|
|
||||||
/* Define if you have the <argz.h> header file. */
|
|
||||||
#undef HAVE_ARGZ_H
|
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
|
||||||
#undef HAVE_FCNTL_H
|
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
|
||||||
#undef HAVE_LIMITS_H
|
|
||||||
|
|
||||||
/* Define if you have the <locale.h> header file. */
|
|
||||||
#undef HAVE_LOCALE_H
|
|
||||||
|
|
||||||
/* Define if you have the <malloc.h> header file. */
|
|
||||||
#undef HAVE_MALLOC_H
|
|
||||||
|
|
||||||
/* Define if you have the <nl_types.h> header file. */
|
|
||||||
#undef HAVE_NL_TYPES_H
|
|
||||||
|
|
||||||
/* Define if you have the <openssl/err.h> header file. */
|
|
||||||
#undef HAVE_OPENSSL_ERR_H
|
|
||||||
|
|
||||||
/* Define if you have the <openssl/evp.h> header file. */
|
|
||||||
#undef HAVE_OPENSSL_EVP_H
|
|
||||||
|
|
||||||
/* Define if you have the <openssl/pem.h> header file. */
|
|
||||||
#undef HAVE_OPENSSL_PEM_H
|
|
||||||
|
|
||||||
/* Define if you have the <openssl/rand.h> header file. */
|
|
||||||
#undef HAVE_OPENSSL_RAND_H
|
|
||||||
|
|
||||||
/* Define if you have the <openssl/rsa.h> header file. */
|
|
||||||
#undef HAVE_OPENSSL_RSA_H
|
|
||||||
|
|
||||||
/* Define if you have the <openssl/sha.h> header file. */
|
|
||||||
#undef HAVE_OPENSSL_SHA_H
|
|
||||||
|
|
||||||
/* Define if you have the <stddef.h> header file. */
|
|
||||||
#undef HAVE_STDDEF_H
|
|
||||||
|
|
||||||
/* Define if you have the <stdlib.h> header file. */
|
|
||||||
#undef HAVE_STDLIB_H
|
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
|
||||||
#undef HAVE_STRING_H
|
|
||||||
|
|
||||||
/* Define if you have the <strings.h> header file. */
|
|
||||||
#undef HAVE_STRINGS_H
|
|
||||||
|
|
||||||
/* Define if you have the <sys/file.h> header file. */
|
|
||||||
#undef HAVE_SYS_FILE_H
|
|
||||||
|
|
||||||
/* Define if you have the <sys/ioctl.h> header file. */
|
|
||||||
#undef HAVE_SYS_IOCTL_H
|
|
||||||
|
|
||||||
/* Define if you have the <sys/param.h> header file. */
|
|
||||||
#undef HAVE_SYS_PARAM_H
|
|
||||||
|
|
||||||
/* Define if you have the <sys/time.h> header file. */
|
|
||||||
#undef HAVE_SYS_TIME_H
|
|
||||||
|
|
||||||
/* Define if you have the <syslog.h> header file. */
|
|
||||||
#undef HAVE_SYSLOG_H
|
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> header file. */
|
|
||||||
#undef HAVE_UNISTD_H
|
|
||||||
|
|
||||||
/* Define if you have the <zlib.h> header file. */
|
|
||||||
#undef HAVE_ZLIB_H
|
|
||||||
|
|
||||||
/* Define if you have the nsl library (-lnsl). */
|
|
||||||
#undef HAVE_LIBNSL
|
|
||||||
|
|
||||||
/* Define if you have the socket library (-lsocket). */
|
|
||||||
#undef HAVE_LIBSOCKET
|
|
||||||
|
|
||||||
/* Name of package */
|
|
||||||
#undef PACKAGE
|
|
||||||
|
|
||||||
/* Version number of package */
|
|
||||||
#undef VERSION
|
|
||||||
|
|
||||||
/* Define if you have the iconv() function. */
|
|
||||||
#undef HAVE_ICONV
|
|
||||||
|
|
||||||
/* Define as const if the declaration of iconv() needs const. */
|
|
||||||
#undef ICONV_CONST
|
|
||||||
|
|
||||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
|
||||||
#undef HAVE_LANGINFO_CODESET
|
|
||||||
|
|
||||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
|
||||||
#undef HAVE_LC_MESSAGES
|
|
||||||
|
|
||||||
/* Define to 1 if translation of program messages to the user's native language
|
|
||||||
is requested. */
|
|
||||||
#undef ENABLE_NLS
|
|
||||||
|
|
||||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||||
#undef HAVE_GETTEXT
|
#undef HAVE_GETTEXT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `gettimeofday' function. */
|
||||||
|
#undef HAVE_GETTIMEOFDAY
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `get_current_dir_name' function. */
|
||||||
|
#undef HAVE_GET_CURRENT_DIR_NAME
|
||||||
|
|
||||||
|
/* Define if you have the iconv() function. */
|
||||||
|
#undef HAVE_ICONV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `inet_aton' function. */
|
||||||
|
#undef HAVE_INET_ATON
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||||
|
#undef HAVE_LIBNSL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||||
|
#undef HAVE_LIBSOCKET
|
||||||
|
|
||||||
|
/* Linux */
|
||||||
|
#undef HAVE_LINUX
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <lzo1x.h> header file. */
|
||||||
|
#undef HAVE_LZO1X_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* MinGW */
|
||||||
|
#undef HAVE_MINGW
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `mlockall' function. */
|
||||||
|
#undef HAVE_MLOCKALL
|
||||||
|
|
||||||
|
/* NetBSD */
|
||||||
|
#undef HAVE_NETBSD
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netdb.h> header file. */
|
||||||
|
#undef HAVE_NETDB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/icmp6.h> header file. */
|
||||||
|
#undef HAVE_NETINET_ICMP6_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/if_ether.h> header file. */
|
||||||
|
#undef HAVE_NETINET_IF_ETHER_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/in6.h> header file. */
|
||||||
|
#undef HAVE_NETINET_IN6_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||||
|
#undef HAVE_NETINET_IN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/in_systm.h> header file. */
|
||||||
|
#undef HAVE_NETINET_IN_SYSTM_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/ip6.h> header file. */
|
||||||
|
#undef HAVE_NETINET_IP6_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/ip.h> header file. */
|
||||||
|
#undef HAVE_NETINET_IP_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/ip_icmp.h> header file. */
|
||||||
|
#undef HAVE_NETINET_IP_ICMP_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||||
|
#undef HAVE_NETINET_TCP_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <net/ethernet.h> header file. */
|
||||||
|
#undef HAVE_NET_ETHERNET_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <net/if_arp.h> header file. */
|
||||||
|
#undef HAVE_NET_IF_ARP_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <net/if.h> header file. */
|
||||||
|
#undef HAVE_NET_IF_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <net/if_tap.h> header file. */
|
||||||
|
#undef HAVE_NET_IF_TAP_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <net/if_tun.h> header file. */
|
||||||
|
#undef HAVE_NET_IF_TUN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <net/if_types.h> header file. */
|
||||||
|
#undef HAVE_NET_IF_TYPES_H
|
||||||
|
|
||||||
|
/* OpenBSD */
|
||||||
|
#undef HAVE_OPENBSD
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <openssl/err.h> header file. */
|
||||||
|
#undef HAVE_OPENSSL_ERR_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <openssl/evp.h> header file. */
|
||||||
|
#undef HAVE_OPENSSL_EVP_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <openssl/pem.h> header file. */
|
||||||
|
#undef HAVE_OPENSSL_PEM_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <openssl/rand.h> header file. */
|
||||||
|
#undef HAVE_OPENSSL_RAND_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <openssl/rsa.h> header file. */
|
||||||
|
#undef HAVE_OPENSSL_RSA_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <openssl/sha.h> header file. */
|
||||||
|
#undef HAVE_OPENSSL_SHA_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `putenv' function. */
|
||||||
|
#undef HAVE_PUTENV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `random' function. */
|
||||||
|
#undef HAVE_RANDOM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `RAND_pseudo_bytes' function. */
|
||||||
|
#undef HAVE_RAND_PSEUDO_BYTES
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `select' function. */
|
||||||
|
#undef HAVE_SELECT
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `socklen_t'. */
|
||||||
|
#undef HAVE_SOCKLEN_T
|
||||||
|
|
||||||
|
/* Solaris/SunOS */
|
||||||
|
#undef HAVE_SOLARIS
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdbool.h> header file. */
|
||||||
|
#undef HAVE_STDBOOL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strdup' function. */
|
||||||
|
#undef HAVE_STRDUP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strerror' function. */
|
||||||
|
#undef HAVE_STRERROR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strsignal' function. */
|
||||||
|
#undef HAVE_STRSIGNAL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strtol' function. */
|
||||||
|
#undef HAVE_STRTOL
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct addrinfo'. */
|
||||||
|
#undef HAVE_STRUCT_ADDRINFO
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct arphdr'. */
|
||||||
|
#undef HAVE_STRUCT_ARPHDR
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct ether_arp'. */
|
||||||
|
#undef HAVE_STRUCT_ETHER_ARP
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct ether_header'. */
|
||||||
|
#undef HAVE_STRUCT_ETHER_HEADER
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct icmp'. */
|
||||||
|
#undef HAVE_STRUCT_ICMP
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct icmp6_hdr'. */
|
||||||
|
#undef HAVE_STRUCT_ICMP6_HDR
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct in6_addr'. */
|
||||||
|
#undef HAVE_STRUCT_IN6_ADDR
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct in_addr'. */
|
||||||
|
#undef HAVE_STRUCT_IN_ADDR
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct ip'. */
|
||||||
|
#undef HAVE_STRUCT_IP
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct ip6_hdr'. */
|
||||||
|
#undef HAVE_STRUCT_IP6_HDR
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct nd_neighbor_solicit'. */
|
||||||
|
#undef HAVE_STRUCT_ND_NEIGHBOR_SOLICIT
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct nd_opt_hdr'. */
|
||||||
|
#undef HAVE_STRUCT_ND_OPT_HDR
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct sockaddr_in6'. */
|
||||||
|
#undef HAVE_STRUCT_SOCKADDR_IN6
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <syslog.h> header file. */
|
||||||
|
#undef HAVE_SYSLOG_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `system' function. */
|
||||||
|
#undef HAVE_SYSTEM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/file.h> header file. */
|
||||||
|
#undef HAVE_SYS_FILE_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||||
|
#undef HAVE_SYS_IOCTL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||||
|
#undef HAVE_SYS_MMAN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||||
|
#undef HAVE_SYS_PARAM_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||||
|
#undef HAVE_SYS_SOCKET_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
|
#undef HAVE_SYS_TIME_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||||
|
#undef HAVE_SYS_UIO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||||
|
#undef HAVE_SYS_WAIT_H
|
||||||
|
|
||||||
|
/* Universal tun/tap driver present */
|
||||||
|
#undef HAVE_TUNTAP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `unsetenv' function. */
|
||||||
|
#undef HAVE_UNSETENV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `vsyslog' function. */
|
||||||
|
#undef HAVE_VSYSLOG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `writev' function. */
|
||||||
|
#undef HAVE_WRITEV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <zlib.h> header file. */
|
||||||
|
#undef HAVE_ZLIB_H
|
||||||
|
|
||||||
|
/* Location of if_tun.h */
|
||||||
|
#undef LINUX_IF_TUN_H
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#undef PACKAGE
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||||
|
#undef RETSIGTYPE
|
||||||
|
|
||||||
|
/* If using the C implementation of alloca, define if you know the
|
||||||
|
direction of stack growth for your system; otherwise it will be
|
||||||
|
automatically deduced at run-time.
|
||||||
|
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||||
|
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||||
|
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||||
|
#undef STACK_DIRECTION
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
|
#undef TIME_WITH_SYS_TIME
|
||||||
|
|
||||||
|
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||||
|
#undef TM_IN_SYS_TIME
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Enable GNU extenstions */
|
||||||
|
#undef _GNU_SOURCE
|
||||||
|
|
||||||
|
/* Enable BSD extensions */
|
||||||
|
#undef __USE_BSD
|
||||||
|
|
||||||
|
/* Defined if the __malloc__ attribute is not supported. */
|
||||||
|
#undef __malloc__
|
||||||
|
|
||||||
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
#undef const
|
||||||
|
|
||||||
|
/* Replacement malloc() */
|
||||||
|
#undef malloc
|
||||||
|
|
||||||
|
/* Define to `int' if <sys/types.h> does not define. */
|
||||||
|
#undef pid_t
|
||||||
|
|
||||||
|
/* Replacement realloc() */
|
||||||
|
#undef realloc
|
||||||
|
|
||||||
|
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||||
|
#undef size_t
|
||||||
|
|
||||||
|
/* Define to empty if the keyword `volatile' does not work. Warning: valid
|
||||||
|
code using `volatile' can become incorrect without. Disable with care. */
|
||||||
|
#undef volatile
|
||||||
|
|
548
config.rpath
Executable file
548
config.rpath
Executable file
|
@ -0,0 +1,548 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# Output a system dependent set of variables, describing how to set the
|
||||||
|
# run time search path of shared libraries in an executable.
|
||||||
|
#
|
||||||
|
# Copyright 1996-2003 Free Software Foundation, Inc.
|
||||||
|
# Taken from GNU libtool, 2001
|
||||||
|
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
#
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
#
|
||||||
|
# The first argument passed to this file is the canonical host specification,
|
||||||
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||||
|
# or
|
||||||
|
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||||
|
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||||
|
# should be set by the caller.
|
||||||
|
#
|
||||||
|
# The set of defined variables is at the end of this script.
|
||||||
|
|
||||||
|
# Known limitations:
|
||||||
|
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
||||||
|
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
||||||
|
# known workaround is to choose shorter directory names for the build
|
||||||
|
# directory and/or the installation directory.
|
||||||
|
|
||||||
|
# All known linkers require a `.a' archive for static linking (except M$VC,
|
||||||
|
# which needs '.lib').
|
||||||
|
libext=a
|
||||||
|
shrext=.so
|
||||||
|
|
||||||
|
host="$1"
|
||||||
|
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||||
|
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||||
|
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||||
|
|
||||||
|
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
|
||||||
|
|
||||||
|
wl=
|
||||||
|
if test "$GCC" = yes; then
|
||||||
|
wl='-Wl,'
|
||||||
|
else
|
||||||
|
case "$host_os" in
|
||||||
|
aix*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
mingw* | pw32* | os2*)
|
||||||
|
;;
|
||||||
|
hpux9* | hpux10* | hpux11*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
irix5* | irix6* | nonstopux*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
newsos6)
|
||||||
|
;;
|
||||||
|
linux*)
|
||||||
|
case $CC in
|
||||||
|
icc|ecc)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
ccc)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
osf3* | osf4* | osf5*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
sco3.2v5*)
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
sunos4*)
|
||||||
|
wl='-Qoption ld '
|
||||||
|
;;
|
||||||
|
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
sysv4*MP*)
|
||||||
|
;;
|
||||||
|
uts4*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
|
||||||
|
|
||||||
|
hardcode_libdir_flag_spec=
|
||||||
|
hardcode_libdir_separator=
|
||||||
|
hardcode_direct=no
|
||||||
|
hardcode_minus_L=no
|
||||||
|
|
||||||
|
case "$host_os" in
|
||||||
|
cygwin* | mingw* | pw32*)
|
||||||
|
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||||
|
# When not using gcc, we currently assume that we are using
|
||||||
|
# Microsoft Visual C++.
|
||||||
|
if test "$GCC" != yes; then
|
||||||
|
with_gnu_ld=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
openbsd*)
|
||||||
|
with_gnu_ld=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ld_shlibs=yes
|
||||||
|
if test "$with_gnu_ld" = yes; then
|
||||||
|
case "$host_os" in
|
||||||
|
aix3* | aix4* | aix5*)
|
||||||
|
# On AIX/PPC, the GNU linker is very broken
|
||||||
|
if test "$host_cpu" != ia64; then
|
||||||
|
ld_shlibs=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
amigaos*)
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||||
|
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||||
|
# to version 4, is to share data among multiple programs linked
|
||||||
|
# with the same dynamic library. Since this doesn't match the
|
||||||
|
# behavior of shared libraries on other platforms, we can use
|
||||||
|
# them.
|
||||||
|
ld_shlibs=no
|
||||||
|
;;
|
||||||
|
beos*)
|
||||||
|
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ld_shlibs=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
cygwin* | mingw* | pw32*)
|
||||||
|
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||||
|
# no search path for DLLs.
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ld_shlibs=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
netbsd*)
|
||||||
|
;;
|
||||||
|
solaris* | sysv5*)
|
||||||
|
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
|
||||||
|
ld_shlibs=no
|
||||||
|
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ld_shlibs=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
sunos4*)
|
||||||
|
hardcode_direct=yes
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ld_shlibs=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if test "$ld_shlibs" = yes; then
|
||||||
|
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
||||||
|
# option of GNU ld is called -rpath, not --rpath.
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
case "$host_os" in
|
||||||
|
aix3*)
|
||||||
|
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||||
|
# are no directories specified by -L.
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
if test "$GCC" = yes; then
|
||||||
|
# Neither direct hardcoding nor static linking is supported with a
|
||||||
|
# broken collect2.
|
||||||
|
hardcode_direct=unsupported
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
aix4* | aix5*)
|
||||||
|
if test "$host_cpu" = ia64; then
|
||||||
|
# On IA64, the linker does run time linking by default, so we don't
|
||||||
|
# have to do anything special.
|
||||||
|
aix_use_runtimelinking=no
|
||||||
|
else
|
||||||
|
aix_use_runtimelinking=no
|
||||||
|
# Test if we are trying to use run time linking or normal
|
||||||
|
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||||
|
# need to do runtime linking.
|
||||||
|
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
|
||||||
|
for ld_flag in $LDFLAGS; do
|
||||||
|
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||||
|
aix_use_runtimelinking=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
hardcode_direct=yes
|
||||||
|
hardcode_libdir_separator=':'
|
||||||
|
if test "$GCC" = yes; then
|
||||||
|
case $host_os in aix4.[012]|aix4.[012].*)
|
||||||
|
collect2name=`${CC} -print-prog-name=collect2`
|
||||||
|
if test -f "$collect2name" && \
|
||||||
|
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||||
|
then
|
||||||
|
# We have reworked collect2
|
||||||
|
hardcode_direct=yes
|
||||||
|
else
|
||||||
|
# We have old collect2
|
||||||
|
hardcode_direct=unsupported
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
hardcode_libdir_separator=
|
||||||
|
fi
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
||||||
|
echo 'int main () { return 0; }' > conftest.c
|
||||||
|
${CC} ${LDFLAGS} conftest.c -o conftest
|
||||||
|
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||||
|
}'`
|
||||||
|
if test -z "$aix_libpath"; then
|
||||||
|
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||||
|
}'`
|
||||||
|
fi
|
||||||
|
if test -z "$aix_libpath"; then
|
||||||
|
aix_libpath="/usr/lib:/lib"
|
||||||
|
fi
|
||||||
|
rm -f conftest.c conftest
|
||||||
|
# End _LT_AC_SYS_LIBPATH_AIX.
|
||||||
|
if test "$aix_use_runtimelinking" = yes; then
|
||||||
|
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||||
|
else
|
||||||
|
if test "$host_cpu" = ia64; then
|
||||||
|
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||||
|
else
|
||||||
|
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
amigaos*)
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
# see comment about different semantics on the GNU ld section
|
||||||
|
ld_shlibs=no
|
||||||
|
;;
|
||||||
|
bsdi4*)
|
||||||
|
;;
|
||||||
|
cygwin* | mingw* | pw32*)
|
||||||
|
# When not using gcc, we currently assume that we are using
|
||||||
|
# Microsoft Visual C++.
|
||||||
|
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||||
|
# no search path for DLLs.
|
||||||
|
hardcode_libdir_flag_spec=' '
|
||||||
|
libext=lib
|
||||||
|
;;
|
||||||
|
darwin* | rhapsody*)
|
||||||
|
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
|
||||||
|
hardcode_direct=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
dgux*)
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
;;
|
||||||
|
freebsd1*)
|
||||||
|
ld_shlibs=no
|
||||||
|
;;
|
||||||
|
freebsd2.2*)
|
||||||
|
hardcode_libdir_flag_spec='-R$libdir'
|
||||||
|
hardcode_direct=yes
|
||||||
|
;;
|
||||||
|
freebsd2*)
|
||||||
|
hardcode_direct=yes
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
;;
|
||||||
|
freebsd*)
|
||||||
|
hardcode_libdir_flag_spec='-R$libdir'
|
||||||
|
hardcode_direct=yes
|
||||||
|
;;
|
||||||
|
hpux9*)
|
||||||
|
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||||
|
hardcode_libdir_separator=:
|
||||||
|
hardcode_direct=yes
|
||||||
|
# hardcode_minus_L: Not really in the search PATH,
|
||||||
|
# but as the default location of the library.
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
;;
|
||||||
|
hpux10* | hpux11*)
|
||||||
|
if test "$with_gnu_ld" = no; then
|
||||||
|
case "$host_cpu" in
|
||||||
|
hppa*64*)
|
||||||
|
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||||
|
hardcode_libdir_separator=:
|
||||||
|
hardcode_direct=no
|
||||||
|
;;
|
||||||
|
ia64*)
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
hardcode_direct=no
|
||||||
|
# hardcode_minus_L: Not really in the search PATH,
|
||||||
|
# but as the default location of the library.
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||||
|
hardcode_libdir_separator=:
|
||||||
|
hardcode_direct=yes
|
||||||
|
# hardcode_minus_L: Not really in the search PATH,
|
||||||
|
# but as the default location of the library.
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
irix5* | irix6* | nonstopux*)
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||||
|
hardcode_libdir_separator=:
|
||||||
|
;;
|
||||||
|
netbsd*)
|
||||||
|
hardcode_libdir_flag_spec='-R$libdir'
|
||||||
|
hardcode_direct=yes
|
||||||
|
;;
|
||||||
|
newsos6)
|
||||||
|
hardcode_direct=yes
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||||
|
hardcode_libdir_separator=:
|
||||||
|
;;
|
||||||
|
openbsd*)
|
||||||
|
hardcode_direct=yes
|
||||||
|
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||||
|
else
|
||||||
|
case "$host_os" in
|
||||||
|
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||||
|
hardcode_libdir_flag_spec='-R$libdir'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
os2*)
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
;;
|
||||||
|
osf3*)
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||||
|
hardcode_libdir_separator=:
|
||||||
|
;;
|
||||||
|
osf4* | osf5*)
|
||||||
|
if test "$GCC" = yes; then
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||||
|
else
|
||||||
|
# Both cc and cxx compiler support -rpath directly
|
||||||
|
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||||
|
fi
|
||||||
|
hardcode_libdir_separator=:
|
||||||
|
;;
|
||||||
|
sco3.2v5*)
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
hardcode_libdir_flag_spec='-R$libdir'
|
||||||
|
;;
|
||||||
|
sunos4*)
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
hardcode_direct=yes
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
;;
|
||||||
|
sysv4)
|
||||||
|
case $host_vendor in
|
||||||
|
sni)
|
||||||
|
hardcode_direct=yes # is this really true???
|
||||||
|
;;
|
||||||
|
siemens)
|
||||||
|
hardcode_direct=no
|
||||||
|
;;
|
||||||
|
motorola)
|
||||||
|
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
sysv4.3*)
|
||||||
|
;;
|
||||||
|
sysv4*MP*)
|
||||||
|
if test -d /usr/nec; then
|
||||||
|
ld_shlibs=yes
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
sysv4.2uw2*)
|
||||||
|
hardcode_direct=yes
|
||||||
|
hardcode_minus_L=no
|
||||||
|
;;
|
||||||
|
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
|
||||||
|
;;
|
||||||
|
sysv5*)
|
||||||
|
hardcode_libdir_flag_spec=
|
||||||
|
;;
|
||||||
|
uts4*)
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ld_shlibs=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check dynamic linker characteristics
|
||||||
|
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
|
||||||
|
libname_spec='lib$name'
|
||||||
|
case "$host_os" in
|
||||||
|
aix3*)
|
||||||
|
;;
|
||||||
|
aix4* | aix5*)
|
||||||
|
;;
|
||||||
|
amigaos*)
|
||||||
|
;;
|
||||||
|
beos*)
|
||||||
|
;;
|
||||||
|
bsdi4*)
|
||||||
|
;;
|
||||||
|
cygwin* | mingw* | pw32*)
|
||||||
|
shrext=.dll
|
||||||
|
;;
|
||||||
|
darwin* | rhapsody*)
|
||||||
|
shrext=.dylib
|
||||||
|
;;
|
||||||
|
dgux*)
|
||||||
|
;;
|
||||||
|
freebsd1*)
|
||||||
|
;;
|
||||||
|
freebsd*)
|
||||||
|
;;
|
||||||
|
gnu*)
|
||||||
|
;;
|
||||||
|
hpux9* | hpux10* | hpux11*)
|
||||||
|
case "$host_cpu" in
|
||||||
|
ia64*)
|
||||||
|
shrext=.so
|
||||||
|
;;
|
||||||
|
hppa*64*)
|
||||||
|
shrext=.sl
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
shrext=.sl
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
irix5* | irix6* | nonstopux*)
|
||||||
|
case "$host_os" in
|
||||||
|
irix5* | nonstopux*)
|
||||||
|
libsuff= shlibsuff=
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case $LD in
|
||||||
|
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
||||||
|
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
||||||
|
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
||||||
|
*) libsuff= shlibsuff= ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
linux*oldld* | linux*aout* | linux*coff*)
|
||||||
|
;;
|
||||||
|
linux*)
|
||||||
|
;;
|
||||||
|
netbsd*)
|
||||||
|
;;
|
||||||
|
newsos6)
|
||||||
|
;;
|
||||||
|
nto-qnx)
|
||||||
|
;;
|
||||||
|
openbsd*)
|
||||||
|
;;
|
||||||
|
os2*)
|
||||||
|
libname_spec='$name'
|
||||||
|
shrext=.dll
|
||||||
|
;;
|
||||||
|
osf3* | osf4* | osf5*)
|
||||||
|
;;
|
||||||
|
sco3.2v5*)
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
;;
|
||||||
|
sunos4*)
|
||||||
|
;;
|
||||||
|
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||||
|
;;
|
||||||
|
sysv4*MP*)
|
||||||
|
;;
|
||||||
|
uts4*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||||
|
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||||
|
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||||
|
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||||
|
|
||||||
|
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||||
|
|
||||||
|
# How to pass a linker flag through the compiler.
|
||||||
|
wl="$escaped_wl"
|
||||||
|
|
||||||
|
# Static library suffix (normally "a").
|
||||||
|
libext="$libext"
|
||||||
|
|
||||||
|
# Shared library suffix (normally "so").
|
||||||
|
shlibext="$shlibext"
|
||||||
|
|
||||||
|
# Flag to hardcode \$libdir into a binary during linking.
|
||||||
|
# This must work even if \$libdir does not exist.
|
||||||
|
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||||
|
|
||||||
|
# Whether we need a single -rpath flag with a separated argument.
|
||||||
|
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||||
|
|
||||||
|
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||||
|
# resulting binary.
|
||||||
|
hardcode_direct="$hardcode_direct"
|
||||||
|
|
||||||
|
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||||
|
# resulting binary.
|
||||||
|
hardcode_minus_L="$hardcode_minus_L"
|
||||||
|
|
||||||
|
EOF
|
259
config.sub
vendored
259
config.sub
vendored
|
@ -1,9 +1,9 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2002-03-07'
|
timestamp='2004-06-24'
|
||||||
|
|
||||||
# This file is (in principle) common to ALL GNU software.
|
# This file is (in principle) common to ALL GNU software.
|
||||||
# The presence of a machine in this file suggests that SOME GNU software
|
# The presence of a machine in this file suggests that SOME GNU software
|
||||||
|
@ -70,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
|
@ -118,7 +118,8 @@ esac
|
||||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||||
case $maybe_os in
|
case $maybe_os in
|
||||||
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
|
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
|
||||||
|
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||||
os=-$maybe_os
|
os=-$maybe_os
|
||||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||||
;;
|
;;
|
||||||
|
@ -144,7 +145,7 @@ case $os in
|
||||||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||||
-apple | -axis)
|
-apple | -axis | -knuth | -cray)
|
||||||
os=
|
os=
|
||||||
basic_machine=$1
|
basic_machine=$1
|
||||||
;;
|
;;
|
||||||
|
@ -228,28 +229,42 @@ case $basic_machine in
|
||||||
| a29k \
|
| a29k \
|
||||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||||
|
| am33_2.0 \
|
||||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||||
| c4x | clipper \
|
| c4x | clipper \
|
||||||
| d10v | d30v | dsp16xx \
|
| d10v | d30v | dlx | dsp16xx \
|
||||||
| fr30 \
|
| fr30 | frv \
|
||||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||||
| i370 | i860 | i960 | ia64 \
|
| i370 | i860 | i960 | ia64 \
|
||||||
| m32r | m68000 | m68k | m88k | mcore \
|
| ip2k | iq2000 \
|
||||||
| mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
|
| m32r | m32rle | m68000 | m68k | m88k | mcore \
|
||||||
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
|
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||||
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
|
| mips16 \
|
||||||
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
|
| mips64 | mips64el \
|
||||||
| mipsisa32 | mipsisa64 \
|
| mips64vr | mips64vrel \
|
||||||
|
| mips64orion | mips64orionel \
|
||||||
|
| mips64vr4100 | mips64vr4100el \
|
||||||
|
| mips64vr4300 | mips64vr4300el \
|
||||||
|
| mips64vr5000 | mips64vr5000el \
|
||||||
|
| mipsisa32 | mipsisa32el \
|
||||||
|
| mipsisa32r2 | mipsisa32r2el \
|
||||||
|
| mipsisa64 | mipsisa64el \
|
||||||
|
| mipsisa64r2 | mipsisa64r2el \
|
||||||
|
| mipsisa64sb1 | mipsisa64sb1el \
|
||||||
|
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||||
|
| mipstx39 | mipstx39el \
|
||||||
| mn10200 | mn10300 \
|
| mn10200 | mn10300 \
|
||||||
|
| msp430 \
|
||||||
| ns16k | ns32k \
|
| ns16k | ns32k \
|
||||||
| openrisc | or32 \
|
| openrisc | or32 \
|
||||||
| pdp10 | pdp11 | pj | pjl \
|
| pdp10 | pdp11 | pj | pjl \
|
||||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||||
| pyramid \
|
| pyramid \
|
||||||
| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
|
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
|
| sh64 | sh64le \
|
||||||
|
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
|
||||||
| strongarm \
|
| strongarm \
|
||||||
| tahoe | thumb | tic80 | tron \
|
| tahoe | thumb | tic4x | tic80 | tron \
|
||||||
| v850 | v850e \
|
| v850 | v850e \
|
||||||
| we32k \
|
| we32k \
|
||||||
| x86 | xscale | xstormy16 | xtensa \
|
| x86 | xscale | xstormy16 | xtensa \
|
||||||
|
@ -281,34 +296,51 @@ case $basic_machine in
|
||||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||||
| arm-* | armbe-* | armle-* | armv*-* \
|
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||||
| avr-* \
|
| avr-* \
|
||||||
| bs2000-* \
|
| bs2000-* \
|
||||||
| c[123]* | c30-* | [cjt]90-* | c54x-* \
|
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||||
| clipper-* | cydra-* \
|
| clipper-* | craynv-* | cydra-* \
|
||||||
| d10v-* | d30v-* \
|
| d10v-* | d30v-* | dlx-* \
|
||||||
| elxsi-* \
|
| elxsi-* \
|
||||||
| f30[01]-* | f700-* | fr30-* | fx80-* \
|
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||||
| h8300-* | h8500-* \
|
| h8300-* | h8500-* \
|
||||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||||
| i*86-* | i860-* | i960-* | ia64-* \
|
| i*86-* | i860-* | i960-* | ia64-* \
|
||||||
| m32r-* \
|
| ip2k-* | iq2000-* \
|
||||||
|
| m32r-* | m32rle-* \
|
||||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||||
| m88110-* | m88k-* | mcore-* \
|
| m88110-* | m88k-* | mcore-* \
|
||||||
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
|
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||||
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
|
| mips16-* \
|
||||||
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
|
| mips64-* | mips64el-* \
|
||||||
| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
|
| mips64vr-* | mips64vrel-* \
|
||||||
|
| mips64orion-* | mips64orionel-* \
|
||||||
|
| mips64vr4100-* | mips64vr4100el-* \
|
||||||
|
| mips64vr4300-* | mips64vr4300el-* \
|
||||||
|
| mips64vr5000-* | mips64vr5000el-* \
|
||||||
|
| mipsisa32-* | mipsisa32el-* \
|
||||||
|
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||||
|
| mipsisa64-* | mipsisa64el-* \
|
||||||
|
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||||
|
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||||
|
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||||
|
| mipstx39-* | mipstx39el-* \
|
||||||
|
| mmix-* \
|
||||||
|
| msp430-* \
|
||||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||||
| orion-* \
|
| orion-* \
|
||||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||||
| pyramid-* \
|
| pyramid-* \
|
||||||
| romp-* | rs6000-* \
|
| romp-* | rs6000-* \
|
||||||
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
|
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||||
|
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||||
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||||
| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
|
| tahoe-* | thumb-* \
|
||||||
|
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||||
|
| tron-* \
|
||||||
| v850-* | v850e-* | vax-* \
|
| v850-* | v850e-* | vax-* \
|
||||||
| we32k-* \
|
| we32k-* \
|
||||||
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
|
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
|
||||||
|
@ -332,6 +364,9 @@ case $basic_machine in
|
||||||
basic_machine=a29k-amd
|
basic_machine=a29k-amd
|
||||||
os=-udi
|
os=-udi
|
||||||
;;
|
;;
|
||||||
|
abacus)
|
||||||
|
basic_machine=abacus-unknown
|
||||||
|
;;
|
||||||
adobe68k)
|
adobe68k)
|
||||||
basic_machine=m68010-adobe
|
basic_machine=m68010-adobe
|
||||||
os=-scout
|
os=-scout
|
||||||
|
@ -346,6 +381,12 @@ case $basic_machine in
|
||||||
basic_machine=a29k-none
|
basic_machine=a29k-none
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
|
amd64)
|
||||||
|
basic_machine=x86_64-pc
|
||||||
|
;;
|
||||||
|
amd64-*)
|
||||||
|
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
|
;;
|
||||||
amdahl)
|
amdahl)
|
||||||
basic_machine=580-amdahl
|
basic_machine=580-amdahl
|
||||||
os=-sysv
|
os=-sysv
|
||||||
|
@ -405,12 +446,24 @@ case $basic_machine in
|
||||||
basic_machine=j90-cray
|
basic_machine=j90-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
;;
|
;;
|
||||||
|
craynv)
|
||||||
|
basic_machine=craynv-cray
|
||||||
|
os=-unicosmp
|
||||||
|
;;
|
||||||
|
cr16c)
|
||||||
|
basic_machine=cr16c-unknown
|
||||||
|
os=-elf
|
||||||
|
;;
|
||||||
crds | unos)
|
crds | unos)
|
||||||
basic_machine=m68k-crds
|
basic_machine=m68k-crds
|
||||||
;;
|
;;
|
||||||
cris | cris-* | etrax*)
|
cris | cris-* | etrax*)
|
||||||
basic_machine=cris-axis
|
basic_machine=cris-axis
|
||||||
;;
|
;;
|
||||||
|
crx)
|
||||||
|
basic_machine=crx-unknown
|
||||||
|
os=-elf
|
||||||
|
;;
|
||||||
da30 | da30-*)
|
da30 | da30-*)
|
||||||
basic_machine=m68k-da30
|
basic_machine=m68k-da30
|
||||||
;;
|
;;
|
||||||
|
@ -611,10 +664,6 @@ case $basic_machine in
|
||||||
mips3*)
|
mips3*)
|
||||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||||
;;
|
;;
|
||||||
mmix*)
|
|
||||||
basic_machine=mmix-knuth
|
|
||||||
os=-mmixware
|
|
||||||
;;
|
|
||||||
monitor)
|
monitor)
|
||||||
basic_machine=m68k-rom68k
|
basic_machine=m68k-rom68k
|
||||||
os=-coff
|
os=-coff
|
||||||
|
@ -706,6 +755,10 @@ case $basic_machine in
|
||||||
basic_machine=or32-unknown
|
basic_machine=or32-unknown
|
||||||
os=-coff
|
os=-coff
|
||||||
;;
|
;;
|
||||||
|
os400)
|
||||||
|
basic_machine=powerpc-ibm
|
||||||
|
os=-os400
|
||||||
|
;;
|
||||||
OSE68000 | ose68000)
|
OSE68000 | ose68000)
|
||||||
basic_machine=m68000-ericsson
|
basic_machine=m68000-ericsson
|
||||||
os=-ose
|
os=-ose
|
||||||
|
@ -728,49 +781,55 @@ case $basic_machine in
|
||||||
pbb)
|
pbb)
|
||||||
basic_machine=m68k-tti
|
basic_machine=m68k-tti
|
||||||
;;
|
;;
|
||||||
pc532 | pc532-*)
|
pc532 | pc532-*)
|
||||||
basic_machine=ns32k-pc532
|
basic_machine=ns32k-pc532
|
||||||
;;
|
;;
|
||||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||||
basic_machine=i586-pc
|
basic_machine=i586-pc
|
||||||
;;
|
;;
|
||||||
pentiumpro | p6 | 6x86 | athlon)
|
pentiumpro | p6 | 6x86 | athlon | athlon_*)
|
||||||
basic_machine=i686-pc
|
basic_machine=i686-pc
|
||||||
;;
|
;;
|
||||||
pentiumii | pentium2)
|
pentiumii | pentium2 | pentiumiii | pentium3)
|
||||||
basic_machine=i686-pc
|
basic_machine=i686-pc
|
||||||
;;
|
;;
|
||||||
|
pentium4)
|
||||||
|
basic_machine=i786-pc
|
||||||
|
;;
|
||||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentiumii-* | pentium2-*)
|
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
|
pentium4-*)
|
||||||
|
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
|
;;
|
||||||
pn)
|
pn)
|
||||||
basic_machine=pn-gould
|
basic_machine=pn-gould
|
||||||
;;
|
;;
|
||||||
power) basic_machine=power-ibm
|
power) basic_machine=power-ibm
|
||||||
;;
|
;;
|
||||||
ppc) basic_machine=powerpc-unknown
|
ppc) basic_machine=powerpc-unknown
|
||||||
;;
|
;;
|
||||||
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||||
basic_machine=powerpcle-unknown
|
basic_machine=powerpcle-unknown
|
||||||
;;
|
;;
|
||||||
ppcle-* | powerpclittle-*)
|
ppcle-* | powerpclittle-*)
|
||||||
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ppc64) basic_machine=powerpc64-unknown
|
ppc64) basic_machine=powerpc64-unknown
|
||||||
;;
|
;;
|
||||||
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
||||||
basic_machine=powerpc64le-unknown
|
basic_machine=powerpc64le-unknown
|
||||||
;;
|
;;
|
||||||
ppc64le-* | powerpc64little-*)
|
ppc64le-* | powerpc64little-*)
|
||||||
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
|
@ -801,6 +860,16 @@ case $basic_machine in
|
||||||
basic_machine=a29k-amd
|
basic_machine=a29k-amd
|
||||||
os=-udi
|
os=-udi
|
||||||
;;
|
;;
|
||||||
|
sb1)
|
||||||
|
basic_machine=mipsisa64sb1-unknown
|
||||||
|
;;
|
||||||
|
sb1el)
|
||||||
|
basic_machine=mipsisa64sb1el-unknown
|
||||||
|
;;
|
||||||
|
sei)
|
||||||
|
basic_machine=mips-sei
|
||||||
|
os=-seiux
|
||||||
|
;;
|
||||||
sequent)
|
sequent)
|
||||||
basic_machine=i386-sequent
|
basic_machine=i386-sequent
|
||||||
;;
|
;;
|
||||||
|
@ -808,6 +877,9 @@ case $basic_machine in
|
||||||
basic_machine=sh-hitachi
|
basic_machine=sh-hitachi
|
||||||
os=-hms
|
os=-hms
|
||||||
;;
|
;;
|
||||||
|
sh64)
|
||||||
|
basic_machine=sh64-unknown
|
||||||
|
;;
|
||||||
sparclite-wrs | simso-wrs)
|
sparclite-wrs | simso-wrs)
|
||||||
basic_machine=sparclite-wrs
|
basic_machine=sparclite-wrs
|
||||||
os=-vxworks
|
os=-vxworks
|
||||||
|
@ -866,7 +938,7 @@ case $basic_machine in
|
||||||
sun386 | sun386i | roadrunner)
|
sun386 | sun386i | roadrunner)
|
||||||
basic_machine=i386-sun
|
basic_machine=i386-sun
|
||||||
;;
|
;;
|
||||||
sv1)
|
sv1)
|
||||||
basic_machine=sv1-cray
|
basic_machine=sv1-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
;;
|
;;
|
||||||
|
@ -874,10 +946,6 @@ case $basic_machine in
|
||||||
basic_machine=i386-sequent
|
basic_machine=i386-sequent
|
||||||
os=-dynix
|
os=-dynix
|
||||||
;;
|
;;
|
||||||
t3d)
|
|
||||||
basic_machine=alpha-cray
|
|
||||||
os=-unicos
|
|
||||||
;;
|
|
||||||
t3e)
|
t3e)
|
||||||
basic_machine=alphaev5-cray
|
basic_machine=alphaev5-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
|
@ -890,6 +958,14 @@ case $basic_machine in
|
||||||
basic_machine=tic54x-unknown
|
basic_machine=tic54x-unknown
|
||||||
os=-coff
|
os=-coff
|
||||||
;;
|
;;
|
||||||
|
tic55x | c55x*)
|
||||||
|
basic_machine=tic55x-unknown
|
||||||
|
os=-coff
|
||||||
|
;;
|
||||||
|
tic6x | c6x*)
|
||||||
|
basic_machine=tic6x-unknown
|
||||||
|
os=-coff
|
||||||
|
;;
|
||||||
tx39)
|
tx39)
|
||||||
basic_machine=mipstx39-unknown
|
basic_machine=mipstx39-unknown
|
||||||
;;
|
;;
|
||||||
|
@ -903,6 +979,10 @@ case $basic_machine in
|
||||||
tower | tower-32)
|
tower | tower-32)
|
||||||
basic_machine=m68k-ncr
|
basic_machine=m68k-ncr
|
||||||
;;
|
;;
|
||||||
|
tpf)
|
||||||
|
basic_machine=s390x-ibm
|
||||||
|
os=-tpf
|
||||||
|
;;
|
||||||
udi29k)
|
udi29k)
|
||||||
basic_machine=a29k-amd
|
basic_machine=a29k-amd
|
||||||
os=-udi
|
os=-udi
|
||||||
|
@ -924,8 +1004,8 @@ case $basic_machine in
|
||||||
os=-vms
|
os=-vms
|
||||||
;;
|
;;
|
||||||
vpp*|vx|vx-*)
|
vpp*|vx|vx-*)
|
||||||
basic_machine=f301-fujitsu
|
basic_machine=f301-fujitsu
|
||||||
;;
|
;;
|
||||||
vxworks960)
|
vxworks960)
|
||||||
basic_machine=i960-wrs
|
basic_machine=i960-wrs
|
||||||
os=-vxworks
|
os=-vxworks
|
||||||
|
@ -946,11 +1026,7 @@ case $basic_machine in
|
||||||
basic_machine=hppa1.1-winbond
|
basic_machine=hppa1.1-winbond
|
||||||
os=-proelf
|
os=-proelf
|
||||||
;;
|
;;
|
||||||
windows32)
|
xps | xps100)
|
||||||
basic_machine=i386-pc
|
|
||||||
os=-windows32-msvcrt
|
|
||||||
;;
|
|
||||||
xps | xps100)
|
|
||||||
basic_machine=xps100-honeywell
|
basic_machine=xps100-honeywell
|
||||||
;;
|
;;
|
||||||
ymp)
|
ymp)
|
||||||
|
@ -980,6 +1056,9 @@ case $basic_machine in
|
||||||
romp)
|
romp)
|
||||||
basic_machine=romp-ibm
|
basic_machine=romp-ibm
|
||||||
;;
|
;;
|
||||||
|
mmix)
|
||||||
|
basic_machine=mmix-knuth
|
||||||
|
;;
|
||||||
rs6000)
|
rs6000)
|
||||||
basic_machine=rs6000-ibm
|
basic_machine=rs6000-ibm
|
||||||
;;
|
;;
|
||||||
|
@ -996,16 +1075,16 @@ case $basic_machine in
|
||||||
we32k)
|
we32k)
|
||||||
basic_machine=we32k-att
|
basic_machine=we32k-att
|
||||||
;;
|
;;
|
||||||
sh3 | sh4 | sh3eb | sh4eb)
|
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||||
basic_machine=sh-unknown
|
basic_machine=sh-unknown
|
||||||
;;
|
;;
|
||||||
sh64)
|
sh64)
|
||||||
basic_machine=sh64-unknown
|
basic_machine=sh64-unknown
|
||||||
;;
|
;;
|
||||||
sparc | sparcv9 | sparcv9b)
|
sparc | sparcv8 | sparcv9 | sparcv9b)
|
||||||
basic_machine=sparc-sun
|
basic_machine=sparc-sun
|
||||||
;;
|
;;
|
||||||
cydra)
|
cydra)
|
||||||
basic_machine=cydra-cydrome
|
basic_machine=cydra-cydrome
|
||||||
;;
|
;;
|
||||||
orion)
|
orion)
|
||||||
|
@ -1020,10 +1099,6 @@ case $basic_machine in
|
||||||
pmac | pmac-mpw)
|
pmac | pmac-mpw)
|
||||||
basic_machine=powerpc-apple
|
basic_machine=powerpc-apple
|
||||||
;;
|
;;
|
||||||
c4x*)
|
|
||||||
basic_machine=c4x-none
|
|
||||||
os=-coff
|
|
||||||
;;
|
|
||||||
*-unknown)
|
*-unknown)
|
||||||
# Make sure to match an already-canonicalized machine name.
|
# Make sure to match an already-canonicalized machine name.
|
||||||
;;
|
;;
|
||||||
|
@ -1079,18 +1154,20 @@ case $os in
|
||||||
| -aos* \
|
| -aos* \
|
||||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
|
||||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||||
|
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||||
| -chorusos* | -chorusrdb* \
|
| -chorusos* | -chorusrdb* \
|
||||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova*)
|
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||||
|
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
|
||||||
# Remember, each alternative MUST END IN *, to match a version number.
|
# Remember, each alternative MUST END IN *, to match a version number.
|
||||||
;;
|
;;
|
||||||
-qnx*)
|
-qnx*)
|
||||||
|
@ -1102,8 +1179,10 @@ case $os in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
-nto-qnx*)
|
||||||
|
;;
|
||||||
-nto*)
|
-nto*)
|
||||||
os=-nto-qnx
|
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||||
;;
|
;;
|
||||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||||
|
@ -1112,6 +1191,9 @@ case $os in
|
||||||
-mac*)
|
-mac*)
|
||||||
os=`echo $os | sed -e 's|mac|macos|'`
|
os=`echo $os | sed -e 's|mac|macos|'`
|
||||||
;;
|
;;
|
||||||
|
-linux-dietlibc)
|
||||||
|
os=-linux-dietlibc
|
||||||
|
;;
|
||||||
-linux*)
|
-linux*)
|
||||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||||
;;
|
;;
|
||||||
|
@ -1124,6 +1206,9 @@ case $os in
|
||||||
-opened*)
|
-opened*)
|
||||||
os=-openedition
|
os=-openedition
|
||||||
;;
|
;;
|
||||||
|
-os400*)
|
||||||
|
os=-os400
|
||||||
|
;;
|
||||||
-wince*)
|
-wince*)
|
||||||
os=-wince
|
os=-wince
|
||||||
;;
|
;;
|
||||||
|
@ -1145,6 +1230,9 @@ case $os in
|
||||||
-atheos*)
|
-atheos*)
|
||||||
os=-atheos
|
os=-atheos
|
||||||
;;
|
;;
|
||||||
|
-syllable*)
|
||||||
|
os=-syllable
|
||||||
|
;;
|
||||||
-386bsd)
|
-386bsd)
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
|
@ -1155,7 +1243,7 @@ case $os in
|
||||||
os=-rtmk-nova
|
os=-rtmk-nova
|
||||||
;;
|
;;
|
||||||
-ns2 )
|
-ns2 )
|
||||||
os=-nextstep2
|
os=-nextstep2
|
||||||
;;
|
;;
|
||||||
-nsk*)
|
-nsk*)
|
||||||
os=-nsk
|
os=-nsk
|
||||||
|
@ -1167,6 +1255,9 @@ case $os in
|
||||||
-sinix*)
|
-sinix*)
|
||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
|
-tpf*)
|
||||||
|
os=-tpf
|
||||||
|
;;
|
||||||
-triton*)
|
-triton*)
|
||||||
os=-sysv3
|
os=-sysv3
|
||||||
;;
|
;;
|
||||||
|
@ -1194,8 +1285,14 @@ case $os in
|
||||||
-xenix)
|
-xenix)
|
||||||
os=-xenix
|
os=-xenix
|
||||||
;;
|
;;
|
||||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||||
os=-mint
|
os=-mint
|
||||||
|
;;
|
||||||
|
-aros*)
|
||||||
|
os=-aros
|
||||||
|
;;
|
||||||
|
-kaos*)
|
||||||
|
os=-kaos
|
||||||
;;
|
;;
|
||||||
-none)
|
-none)
|
||||||
;;
|
;;
|
||||||
|
@ -1228,11 +1325,14 @@ case $basic_machine in
|
||||||
arm*-semi)
|
arm*-semi)
|
||||||
os=-aout
|
os=-aout
|
||||||
;;
|
;;
|
||||||
|
c4x-* | tic4x-*)
|
||||||
|
os=-coff
|
||||||
|
;;
|
||||||
# This must come before the *-dec entry.
|
# This must come before the *-dec entry.
|
||||||
pdp10-*)
|
pdp10-*)
|
||||||
os=-tops20
|
os=-tops20
|
||||||
;;
|
;;
|
||||||
pdp11-*)
|
pdp11-*)
|
||||||
os=-none
|
os=-none
|
||||||
;;
|
;;
|
||||||
*-dec | vax-*)
|
*-dec | vax-*)
|
||||||
|
@ -1274,6 +1374,9 @@ case $basic_machine in
|
||||||
*-ibm)
|
*-ibm)
|
||||||
os=-aix
|
os=-aix
|
||||||
;;
|
;;
|
||||||
|
*-knuth)
|
||||||
|
os=-mmixware
|
||||||
|
;;
|
||||||
*-wec)
|
*-wec)
|
||||||
os=-proelf
|
os=-proelf
|
||||||
;;
|
;;
|
||||||
|
@ -1325,19 +1428,19 @@ case $basic_machine in
|
||||||
*-next)
|
*-next)
|
||||||
os=-nextstep3
|
os=-nextstep3
|
||||||
;;
|
;;
|
||||||
*-gould)
|
*-gould)
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
*-highlevel)
|
*-highlevel)
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
*-encore)
|
*-encore)
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
*-sgi)
|
*-sgi)
|
||||||
os=-irix
|
os=-irix
|
||||||
;;
|
;;
|
||||||
*-siemens)
|
*-siemens)
|
||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
*-masscomp)
|
*-masscomp)
|
||||||
|
@ -1406,10 +1509,16 @@ case $basic_machine in
|
||||||
-mvs* | -opened*)
|
-mvs* | -opened*)
|
||||||
vendor=ibm
|
vendor=ibm
|
||||||
;;
|
;;
|
||||||
|
-os400*)
|
||||||
|
vendor=ibm
|
||||||
|
;;
|
||||||
-ptx*)
|
-ptx*)
|
||||||
vendor=sequent
|
vendor=sequent
|
||||||
;;
|
;;
|
||||||
-vxsim* | -vxworks*)
|
-tpf*)
|
||||||
|
vendor=ibm
|
||||||
|
;;
|
||||||
|
-vxsim* | -vxworks* | -windiss*)
|
||||||
vendor=wrs
|
vendor=wrs
|
||||||
;;
|
;;
|
||||||
-aux*)
|
-aux*)
|
||||||
|
|
128
configure.in
128
configure.in
|
@ -1,18 +1,25 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
dnl $Id: configure.in,v 1.13.2.43.2.1 2002/04/09 11:51:16 guus Exp $
|
dnl $Id: configure.in 1415 2004-11-10 23:20:59Z guus $
|
||||||
|
|
||||||
AC_INIT(src/tincd.c)
|
AC_PREREQ(2.59)
|
||||||
AM_INIT_AUTOMAKE(tinc, 1.0pre7)
|
AC_INIT
|
||||||
AM_CONFIG_HEADER(config.h)
|
AC_CONFIG_SRCDIR([src/tincd.c])
|
||||||
|
AM_INIT_AUTOMAKE(tinc, 1.0.3)
|
||||||
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
dnl Include the macros from the m4/ directory
|
dnl Include the macros from the m4/ directory
|
||||||
AM_ACLOCAL_INCLUDE(m4)
|
AM_ACLOCAL_INCLUDE(m4)
|
||||||
|
|
||||||
|
AM_GNU_GETTEXT([external])
|
||||||
|
AM_GNU_GETTEXT_VERSION(0.12.1)
|
||||||
|
|
||||||
# Enable GNU extensions.
|
# Enable GNU extensions.
|
||||||
# Define this here, not in acconfig's @TOP@ section, since definitions
|
# Define this here, not in acconfig's @TOP@ section, since definitions
|
||||||
# in the latter don't make it into the configure-time tests.
|
# in the latter don't make it into the configure-time tests.
|
||||||
AC_DEFINE([_GNU_SOURCE], [__USE_BSD])
|
AC_DEFINE([_GNU_SOURCE], 1, [Enable GNU extenstions])
|
||||||
|
AC_DEFINE([__USE_BSD], 1, [Enable BSD extensions])
|
||||||
|
|
||||||
ALL_LINGUAS="nl"
|
ALL_LINGUAS="nl"
|
||||||
|
|
||||||
|
@ -24,66 +31,108 @@ AC_PROG_AWK
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
jm_PERL
|
AC_PROG_RANLIB
|
||||||
|
|
||||||
|
|
||||||
AC_ISC_POSIX
|
AC_ISC_POSIX
|
||||||
|
|
||||||
dnl Check and set OS
|
dnl Check and set OS
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
#AC_CANONICAL_HOST
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
*linux*)
|
*linux*)
|
||||||
AC_DEFINE(HAVE_LINUX)
|
AC_DEFINE(HAVE_LINUX, 1, [Linux])
|
||||||
[ rm -f src/device.c; ln -sf linux/device.c src/device.c ]
|
[ rm -f src/device.c; ln -sf linux/device.c src/device.c ]
|
||||||
;;
|
;;
|
||||||
*freebsd*)
|
*freebsd*)
|
||||||
AC_DEFINE(HAVE_FREEBSD)
|
AC_DEFINE(HAVE_FREEBSD, 1, [FreeBSD])
|
||||||
[ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ]
|
[ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
|
||||||
|
;;
|
||||||
|
*darwin*)
|
||||||
|
AC_DEFINE(HAVE_DARWIN, 1, [Darwin (MacOS/X)])
|
||||||
|
[ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
|
||||||
;;
|
;;
|
||||||
*solaris*)
|
*solaris*)
|
||||||
AC_DEFINE(HAVE_SOLARIS)
|
AC_DEFINE(HAVE_SOLARIS, 1, [Solaris/SunOS])
|
||||||
[ rm -f src/device.c; ln -sf solaris/device.c src/device.c ]
|
[ rm -f src/device.c; ln -sf solaris/device.c src/device.c ]
|
||||||
;;
|
;;
|
||||||
*openbsd*)
|
*openbsd*)
|
||||||
AC_DEFINE(HAVE_OPENBSD)
|
AC_DEFINE(HAVE_OPENBSD, 1, [OpenBSD])
|
||||||
[ rm -f src/device.c; ln -sf openbsd/device.c src/device.c ]
|
[ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
|
||||||
;;
|
;;
|
||||||
*netbsd*)
|
*netbsd*)
|
||||||
AC_DEFINE(HAVE_NETBSD)
|
AC_DEFINE(HAVE_NETBSD, 1, [NetBSD])
|
||||||
[ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ]
|
[ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
|
||||||
|
;;
|
||||||
|
*bsd*)
|
||||||
|
AC_MSG_WARN("Unknown BSD variant, tinc might not compile or work!")
|
||||||
|
AC_DEFINE(HAVE_BSD, 1, [Unknown BSD variant])
|
||||||
|
[ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
|
||||||
|
;;
|
||||||
|
*cygwin*)
|
||||||
|
AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin])
|
||||||
|
[ rm -f src/device.c; ln -sf cygwin/device.c src/device.c ]
|
||||||
|
;;
|
||||||
|
*mingw*)
|
||||||
|
AC_DEFINE(HAVE_MINGW, 1, [MinGW])
|
||||||
|
[ rm -f src/device.c; cp -f src/mingw/device.c src/device.c ]
|
||||||
|
LIBS="$LIBS -lws2_32"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_MSG_ERROR("Unknown operating system.")
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_CACHE_SAVE
|
AC_CACHE_SAVE
|
||||||
|
|
||||||
|
if test -d /sw/include ; then
|
||||||
|
CPPFLAGS="$CPPFLAGS -I/sw/include"
|
||||||
|
fi
|
||||||
|
if test -d /sw/lib ; then
|
||||||
|
LIBS="$LIBS -L/sw/lib"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Checks for libraries.
|
dnl Checks for libraries.
|
||||||
|
|
||||||
dnl Checks for header files.
|
dnl Checks for header files.
|
||||||
|
dnl We do this in multiple stages, because unlike Linux all the other operating systems really suck and don't include their own dependencies.
|
||||||
|
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS([fcntl.h limits.h sys/ioctl.h syslog.h unistd.h \
|
AC_CHECK_HEADERS([stdbool.h syslog.h sys/file.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/time.h sys/uio.h sys/wait.h netdb.h arpa/inet.h])
|
||||||
sys/time.h malloc.h strings.h sys/file.h])
|
AC_CHECK_HEADERS([net/if.h net/if_types.h net/if_tun.h net/if_tap.h net/ethernet.h net/if_arp.h netinet/in_systm.h netinet/in.h netinet/in6.h],
|
||||||
|
[], [], [#include "have.h"]
|
||||||
|
)
|
||||||
|
AC_CHECK_HEADERS([netinet/if_ether.h netinet/ip.h netinet/ip6.h],
|
||||||
|
[], [], [#include "have.h"]
|
||||||
|
)
|
||||||
|
AC_CHECK_HEADERS([netinet/tcp.h netinet/ip_icmp.h netinet/icmp6.h],
|
||||||
|
[], [], [#include "have.h"]
|
||||||
|
)
|
||||||
|
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
|
AC_C_VOLATILE
|
||||||
AC_TYPE_PID_T
|
AC_TYPE_PID_T
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
AC_HEADER_TIME
|
AC_HEADER_TIME
|
||||||
AC_STRUCT_TM
|
AC_STRUCT_TM
|
||||||
|
|
||||||
|
tinc_ATTRIBUTE(__malloc__)
|
||||||
|
|
||||||
|
AC_CHECK_TYPES([socklen_t, struct ether_header, struct arphdr, struct ether_arp, struct in_addr, struct addrinfo, struct ip, struct icmp, struct in6_addr, struct sockaddr_in6, struct ip6_hdr, struct icmp6_hdr, struct nd_neighbor_solicit, struct nd_opt_hdr], , ,
|
||||||
|
[#include "have.h"]
|
||||||
|
)
|
||||||
|
|
||||||
dnl Checks for library functions.
|
dnl Checks for library functions.
|
||||||
AC_FUNC_MEMCMP
|
AC_FUNC_MEMCMP
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
AC_TYPE_SIGNAL
|
AC_TYPE_SIGNAL
|
||||||
AC_CHECK_FUNCS([ftime socket select strtol strerror flock unsetenv \
|
AC_CHECK_FUNCS([asprintf daemon fchmod flock ftime fork get_current_dir_name gettimeofday mlockall putenv random select strdup strerror strsignal strtol system unsetenv vsyslog writev],
|
||||||
asprintf putenv strdup fcloseall daemon strsignal get_current_dir_name])
|
[], [], [#include "have.h"]
|
||||||
|
)
|
||||||
jm_FUNC_MALLOC
|
jm_FUNC_MALLOC
|
||||||
jm_FUNC_REALLOC
|
jm_FUNC_REALLOC
|
||||||
|
|
||||||
AM_GNU_GETTEXT
|
|
||||||
|
|
||||||
|
|
||||||
dnl Support for SunOS
|
dnl Support for SunOS
|
||||||
|
|
||||||
AC_CHECK_FUNC(socket, [], [
|
AC_CHECK_FUNC(socket, [], [
|
||||||
|
@ -93,33 +142,38 @@ AC_CHECK_FUNC(gethostbyname, [], [
|
||||||
AC_CHECK_LIB(nsl, gethostbyname)
|
AC_CHECK_LIB(nsl, gethostbyname)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS([freeaddrinfo gai_strerror getaddrinfo getnameinfo inet_aton],
|
||||||
|
[], [], [#include "have.h"]
|
||||||
|
)
|
||||||
|
|
||||||
AC_CACHE_SAVE
|
AC_CACHE_SAVE
|
||||||
|
|
||||||
dnl These are defined in files in m4/
|
dnl These are defined in files in m4/
|
||||||
tinc_TUNTAP
|
|
||||||
|
case $host_os in
|
||||||
|
*linux*)
|
||||||
|
tinc_TUNTAP
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
tinc_OPENSSL
|
tinc_OPENSSL
|
||||||
tinc_ZLIB
|
tinc_ZLIB
|
||||||
|
tinc_LZO
|
||||||
|
|
||||||
dnl Check if support for jumbograms is requested
|
dnl Check if support for jumbograms is requested
|
||||||
AC_ARG_ENABLE(jumbograms,
|
AC_ARG_ENABLE(jumbograms,
|
||||||
[ --enable-jumbograms enable support for jumbograms (packets up to 9000 bytes)],
|
AS_HELP_STRING([--enable-jumbograms], [enable support for jumbograms (packets up to 9000 bytes)]),
|
||||||
[ AC_DEFINE(ENABLE_JUMBOGRAMS) ]
|
[ AC_DEFINE(ENABLE_JUMBOGRAMS, 1, [Support for jumbograms (packets up to 9000 bytes)]) ]
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl Check if checkpoint tracing has to be enabled
|
dnl Check if checkpoint tracing has to be enabled
|
||||||
AC_ARG_ENABLE(tracing,
|
AC_ARG_ENABLE(tracing,
|
||||||
[ --enable-tracing enable checkpoint tracing (debugging only)],
|
AS_HELP_STRING([--enable-tracing], [enable checkpoint tracing (debugging only)]),
|
||||||
[ AC_DEFINE(ENABLE_TRACING) ]
|
[ AC_DEFINE(ENABLE_TRACING, 1, [Checkpoint tracing]) ]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_SUBST(INCLUDES)
|
AC_SUBST(INCLUDES)
|
||||||
|
|
||||||
AC_OUTPUT(Makefile
|
AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile lib/Makefile po/Makefile.in m4/Makefile])
|
||||||
src/Makefile
|
|
||||||
doc/Makefile
|
AC_OUTPUT
|
||||||
doc/es/Makefile
|
|
||||||
intl/Makefile
|
|
||||||
lib/Makefile
|
|
||||||
m4/Makefile
|
|
||||||
po/Makefile.in
|
|
||||||
)
|
|
||||||
|
|
353
depcomp
353
depcomp
|
@ -1,7 +1,9 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
# depcomp - compile a program generating dependencies as side-effects
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
|
||||||
|
scriptversion=2004-04-25.13
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -25,13 +27,52 @@
|
||||||
|
|
||||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||||
|
as side-effects.
|
||||||
|
|
||||||
|
Environment variables:
|
||||||
|
depmode Dependency tracking mode.
|
||||||
|
source Source file read by `PROGRAMS ARGS'.
|
||||||
|
object Object file output by `PROGRAMS ARGS'.
|
||||||
|
depfile Dependency file to output.
|
||||||
|
tmpdepfile Temporary file to use when outputing dependencies.
|
||||||
|
libtool Whether libtool is used (yes/no).
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "depcomp $scriptversion"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# `libtool' can also be set to `yes' or `no'.
|
# `libtool' can also be set to `yes' or `no'.
|
||||||
|
|
||||||
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
|
if test -z "$depfile"; then
|
||||||
|
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||||
|
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||||
|
if test "$dir" = "$object"; then
|
||||||
|
dir=
|
||||||
|
fi
|
||||||
|
# FIXME: should be _deps on DOS.
|
||||||
|
depfile="$dir.deps/$base"
|
||||||
|
fi
|
||||||
|
|
||||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
|
@ -163,19 +204,25 @@ sgi)
|
||||||
|
|
||||||
aix)
|
aix)
|
||||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
# in a .u file. This file always lives in the current directory.
|
# in a .u file. In older versions, this file always lives in the
|
||||||
# Also, the AIX compiler puts `$object:' at the start of each line;
|
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||||
# $object doesn't have directory information.
|
# start of each line; $object doesn't have directory information.
|
||||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
# Version 6 uses the directory in both cases.
|
||||||
|
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||||
tmpdepfile="$stripped.u"
|
tmpdepfile="$stripped.u"
|
||||||
outname="$stripped.o"
|
|
||||||
if test "$libtool" = yes; then
|
if test "$libtool" = yes; then
|
||||||
"$@" -Wc,-M
|
"$@" -Wc,-M
|
||||||
else
|
else
|
||||||
"$@" -M
|
"$@" -M
|
||||||
fi
|
fi
|
||||||
|
|
||||||
stat=$?
|
stat=$?
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then :
|
||||||
|
else
|
||||||
|
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||||
|
tmpdepfile="$stripped.u"
|
||||||
|
fi
|
||||||
|
|
||||||
if test $stat -eq 0; then :
|
if test $stat -eq 0; then :
|
||||||
else
|
else
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
|
@ -183,6 +230,7 @@ aix)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -f "$tmpdepfile"; then
|
if test -f "$tmpdepfile"; then
|
||||||
|
outname="$stripped.o"
|
||||||
# Each line is of the form `foo.o: dependent.h'.
|
# Each line is of the form `foo.o: dependent.h'.
|
||||||
# Do two passes, one to just change these to
|
# Do two passes, one to just change these to
|
||||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
@ -197,37 +245,86 @@ aix)
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
icc)
|
||||||
|
# Intel's C compiler understands `-MD -MF file'. However on
|
||||||
|
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||||
|
# ICC 7.0 will fill foo.d with something like
|
||||||
|
# foo.o: sub/foo.c
|
||||||
|
# foo.o: sub/foo.h
|
||||||
|
# which is wrong. We want:
|
||||||
|
# sub/foo.o: sub/foo.c
|
||||||
|
# sub/foo.o: sub/foo.h
|
||||||
|
# sub/foo.c:
|
||||||
|
# sub/foo.h:
|
||||||
|
# ICC 7.1 will output
|
||||||
|
# foo.o: sub/foo.c sub/foo.h
|
||||||
|
# and will wrap long lines using \ :
|
||||||
|
# foo.o: sub/foo.c ... \
|
||||||
|
# sub/foo.h ... \
|
||||||
|
# ...
|
||||||
|
|
||||||
|
"$@" -MD -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each line is of the form `foo.o: dependent.h',
|
||||||
|
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||||
|
sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
tru64)
|
tru64)
|
||||||
# The Tru64 AIX compiler uses -MD to generate dependencies as a side
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
# dependencies in `foo.d' instead, so we check for that too.
|
# dependencies in `foo.d' instead, so we check for that too.
|
||||||
# Subdirectories are respected.
|
# Subdirectories are respected.
|
||||||
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
|
|
||||||
tmpdepfile1="$object.d"
|
|
||||||
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
|
|
||||||
if test "$libtool" = yes; then
|
if test "$libtool" = yes; then
|
||||||
|
# Dependencies are output in .lo.d with libtool 1.4.
|
||||||
|
# They are output in .o.d with libtool 1.5.
|
||||||
|
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||||
|
tmpdepfile2="$dir.libs/$base.o.d"
|
||||||
|
tmpdepfile3="$dir.libs/$base.d"
|
||||||
"$@" -Wc,-MD
|
"$@" -Wc,-MD
|
||||||
else
|
else
|
||||||
|
tmpdepfile1="$dir$base.o.d"
|
||||||
|
tmpdepfile2="$dir$base.d"
|
||||||
|
tmpdepfile3="$dir$base.d"
|
||||||
"$@" -MD
|
"$@" -MD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
stat=$?
|
stat=$?
|
||||||
if test $stat -eq 0; then :
|
if test $stat -eq 0; then :
|
||||||
else
|
else
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
exit $stat
|
exit $stat
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -f "$tmpdepfile1"; then
|
if test -f "$tmpdepfile1"; then
|
||||||
tmpdepfile="$tmpdepfile1"
|
tmpdepfile="$tmpdepfile1"
|
||||||
else
|
elif test -f "$tmpdepfile2"; then
|
||||||
tmpdepfile="$tmpdepfile2"
|
tmpdepfile="$tmpdepfile2"
|
||||||
|
else
|
||||||
|
tmpdepfile="$tmpdepfile3"
|
||||||
fi
|
fi
|
||||||
if test -f "$tmpdepfile"; then
|
if test -f "$tmpdepfile"; then
|
||||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||||
# That's a space and a tab in the [].
|
# That's a tab and a space in the [].
|
||||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||||
else
|
else
|
||||||
echo "#dummy" > "$depfile"
|
echo "#dummy" > "$depfile"
|
||||||
fi
|
fi
|
||||||
|
@ -240,34 +337,42 @@ tru64)
|
||||||
|
|
||||||
dashmstdout)
|
dashmstdout)
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
# always write the proprocessed file to stdout, regardless of -o,
|
# always write the preprocessed file to stdout, regardless of -o.
|
||||||
# because we must use -o when running libtool.
|
"$@" || exit $?
|
||||||
test -z "$dashmflag" && dashmflag=-M
|
|
||||||
( IFS=" "
|
# Remove the call to Libtool.
|
||||||
case " $* " in
|
if test "$libtool" = yes; then
|
||||||
*" --mode=compile "*) # this is libtool, let us make it quiet
|
while test $1 != '--mode=compile'; do
|
||||||
for arg
|
shift
|
||||||
do # cycle over the arguments
|
done
|
||||||
case "$arg" in
|
shift
|
||||||
"--mode=compile")
|
fi
|
||||||
# insert --quiet before "--mode=compile"
|
|
||||||
set fnord "$@" --quiet
|
# Remove `-o $object'.
|
||||||
shift # fnord
|
IFS=" "
|
||||||
;;
|
for arg
|
||||||
esac
|
do
|
||||||
set fnord "$@" "$arg"
|
case $arg in
|
||||||
shift # fnord
|
-o)
|
||||||
shift # "$arg"
|
shift
|
||||||
done
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
done
|
||||||
) &
|
|
||||||
proc=$!
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
"$@"
|
# Require at least two characters before searching for `:'
|
||||||
stat=$?
|
# in the target name. This is to cope with DOS-style filenames:
|
||||||
wait "$proc"
|
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||||
if test "$stat" != 0; then exit $stat; fi
|
"$@" $dashmflag |
|
||||||
|
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
cat < "$tmpdepfile" > "$depfile"
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
tr ' ' '
|
tr ' ' '
|
||||||
|
@ -285,36 +390,40 @@ dashXmstdout)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
makedepend)
|
makedepend)
|
||||||
# X makedepend
|
"$@" || exit $?
|
||||||
(
|
# Remove any Libtool call
|
||||||
shift
|
if test "$libtool" = yes; then
|
||||||
cleared=no
|
while test $1 != '--mode=compile'; do
|
||||||
for arg in "$@"; do
|
shift
|
||||||
case $cleared in no)
|
|
||||||
set ""; shift
|
|
||||||
cleared=yes
|
|
||||||
esac
|
|
||||||
case "$arg" in
|
|
||||||
-D*|-I*)
|
|
||||||
set fnord "$@" "$arg"; shift;;
|
|
||||||
-*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"; shift;;
|
|
||||||
esac
|
|
||||||
done
|
done
|
||||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
shift
|
||||||
touch "$tmpdepfile"
|
fi
|
||||||
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
# X makedepend
|
||||||
) &
|
shift
|
||||||
proc=$!
|
cleared=no
|
||||||
"$@"
|
for arg in "$@"; do
|
||||||
stat=$?
|
case $cleared in
|
||||||
wait "$proc"
|
no)
|
||||||
if test "$stat" != 0; then exit $stat; fi
|
set ""; shift
|
||||||
|
cleared=yes ;;
|
||||||
|
esac
|
||||||
|
case "$arg" in
|
||||||
|
-D*|-I*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
# Strip any option that makedepend may not understand. Remove
|
||||||
|
# the object too, otherwise makedepend will parse it as a source file.
|
||||||
|
-*|$object)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||||
|
touch "$tmpdepfile"
|
||||||
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
cat < "$tmpdepfile" > "$depfile"
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
tail +3 "$tmpdepfile" | tr ' ' '
|
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||||
' | \
|
' | \
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
## correctly. Breaking it into two sed invocations is a workaround.
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
@ -324,35 +433,39 @@ makedepend)
|
||||||
|
|
||||||
cpp)
|
cpp)
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
# always write the proprocessed file to stdout, regardless of -o,
|
# always write the preprocessed file to stdout.
|
||||||
# because we must use -o when running libtool.
|
"$@" || exit $?
|
||||||
( IFS=" "
|
|
||||||
case " $* " in
|
# Remove the call to Libtool.
|
||||||
*" --mode=compile "*)
|
if test "$libtool" = yes; then
|
||||||
for arg
|
while test $1 != '--mode=compile'; do
|
||||||
do # cycle over the arguments
|
shift
|
||||||
case $arg in
|
done
|
||||||
"--mode=compile")
|
shift
|
||||||
# insert --quiet before "--mode=compile"
|
fi
|
||||||
set fnord "$@" --quiet
|
|
||||||
shift # fnord
|
# Remove `-o $object'.
|
||||||
;;
|
IFS=" "
|
||||||
esac
|
for arg
|
||||||
set fnord "$@" "$arg"
|
do
|
||||||
shift # fnord
|
case $arg in
|
||||||
shift # "$arg"
|
-o)
|
||||||
done
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
"$@" -E |
|
done
|
||||||
|
|
||||||
|
"$@" -E |
|
||||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||||
sed '$ s: \\$::' > "$tmpdepfile"
|
sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
) &
|
|
||||||
proc=$!
|
|
||||||
"$@"
|
|
||||||
stat=$?
|
|
||||||
wait "$proc"
|
|
||||||
if test "$stat" != 0; then exit $stat; fi
|
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
echo "$object : \\" > "$depfile"
|
echo "$object : \\" > "$depfile"
|
||||||
cat < "$tmpdepfile" >> "$depfile"
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
@ -362,34 +475,27 @@ cpp)
|
||||||
|
|
||||||
msvisualcpp)
|
msvisualcpp)
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
# always write the proprocessed file to stdout, regardless of -o,
|
# always write the preprocessed file to stdout, regardless of -o,
|
||||||
# because we must use -o when running libtool.
|
# because we must use -o when running libtool.
|
||||||
( IFS=" "
|
"$@" || exit $?
|
||||||
case " $* " in
|
IFS=" "
|
||||||
*" --mode=compile "*)
|
for arg
|
||||||
for arg
|
do
|
||||||
do # cycle over the arguments
|
case "$arg" in
|
||||||
case $arg in
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
"--mode=compile")
|
set fnord "$@"
|
||||||
# insert --quiet before "--mode=compile"
|
shift
|
||||||
set fnord "$@" --quiet
|
shift
|
||||||
shift # fnord
|
;;
|
||||||
;;
|
*)
|
||||||
esac
|
|
||||||
set fnord "$@" "$arg"
|
set fnord "$@" "$arg"
|
||||||
shift # fnord
|
shift
|
||||||
shift # "$arg"
|
shift
|
||||||
done
|
;;
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
"$@" -E |
|
done
|
||||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
"$@" -E |
|
||||||
) &
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||||
proc=$!
|
|
||||||
"$@"
|
|
||||||
stat=$?
|
|
||||||
wait "$proc"
|
|
||||||
if test "$stat" != 0; then exit $stat; fi
|
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
echo "$object : \\" > "$depfile"
|
echo "$object : \\" > "$depfile"
|
||||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||||
|
@ -409,3 +515,12 @@ none)
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-end: "$"
|
||||||
|
# End:
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
# Having a separate GNUmakefile lets me use features of GNU make
|
|
||||||
# to generate the man pages.
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
have-Makefile := $(shell test -f Makefile && echo yes)
|
|
||||||
|
|
||||||
# If the user runs GNU make but has not yet run ./configure,
|
|
||||||
# give them a diagnostic.
|
|
||||||
ifeq ($(have-Makefile),yes)
|
|
||||||
|
|
||||||
include Makefile
|
|
||||||
include $(srcdir)/Makefile.maint
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
all:
|
|
||||||
@echo There seems to be no Makefile in this directory.
|
|
||||||
@echo "You must run ./configure before running \`make'."
|
|
||||||
@exit 1
|
|
||||||
|
|
||||||
endif
|
|
|
@ -1,20 +1,12 @@
|
||||||
## Process this file with automake to get Makefile.in
|
## Process this file with automake to get Makefile.in
|
||||||
|
|
||||||
SUBDIRS = es
|
|
||||||
|
|
||||||
info_TEXINFOS = tinc.texi
|
info_TEXINFOS = tinc.texi
|
||||||
|
|
||||||
dyn_MANS =
|
man_MANS = tincd.8 tinc.conf.5
|
||||||
man_aux = $(dyn_MANS:.8=.x)
|
|
||||||
|
|
||||||
man_MANS = tincd.8 tinc.conf.5 $(dyn_MANS)
|
EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.conf.5.in sample-config.tar.gz
|
||||||
|
|
||||||
PERL = @PERL@
|
CLEANFILES = *.html tinc.info tincd.8 tinc.conf.5 tincinclude.texi
|
||||||
HELP2MAN = help2man
|
|
||||||
MAINTAINERCLEANFILES = $(dyn_MANS)
|
|
||||||
|
|
||||||
EXTRA_DIST = $(man_MANS) $(HELP2MAN) $(man_aux) \
|
|
||||||
Makefile.maint GNUmakefile Makefile.summ sample-config.tar.gz
|
|
||||||
|
|
||||||
# Use `ginstall' in the definition of man_MANS to avoid
|
# Use `ginstall' in the definition of man_MANS to avoid
|
||||||
# confusion with the `install' target. The install rule transforms `ginstall'
|
# confusion with the `install' target. The install rule transforms `ginstall'
|
||||||
|
@ -23,3 +15,29 @@ transform = s/ginstall/install/; @program_transform_name@
|
||||||
|
|
||||||
# For additional rules usually of interest only to the maintainer,
|
# For additional rules usually of interest only to the maintainer,
|
||||||
# see GNUmakefile and Makefile.maint.
|
# see GNUmakefile and Makefile.maint.
|
||||||
|
|
||||||
|
sample-config.tar.gz: sample-config
|
||||||
|
GZIP=$(GZIP_ENV) $(AMTAR) chozf sample-config.tar.gz --exclude .svn sample-config
|
||||||
|
|
||||||
|
texi2html: tinc.texi
|
||||||
|
texi2html -split=chapter tinc.texi
|
||||||
|
|
||||||
|
%.html: $(man_MANS)
|
||||||
|
w3mman2html $< > $@
|
||||||
|
|
||||||
|
substitute = sed \
|
||||||
|
-e s,'@PACKAGE\@',"$(PACKAGE)",g \
|
||||||
|
-e s,'@VERSION\@',"$(VERSION)",g \
|
||||||
|
-e s,'@sysconfdir\@',"$(sysconfdir)",g \
|
||||||
|
-e s,'@localstatedir\@',"$(localstatedir)",g
|
||||||
|
|
||||||
|
tincd.8: tincd.8.in
|
||||||
|
$(substitute) tincd.8.in > tincd.8
|
||||||
|
|
||||||
|
tinc.conf.5: tinc.conf.5.in
|
||||||
|
$(substitute) tinc.conf.5.in > tinc.conf.5
|
||||||
|
|
||||||
|
tincinclude.texi: tincinclude.texi.in
|
||||||
|
$(substitute) tincinclude.texi.in > tincinclude.texi
|
||||||
|
|
||||||
|
tinc.texi: tincinclude.texi
|
||||||
|
|
689
doc/Makefile.in
689
doc/Makefile.in
|
@ -1,7 +1,8 @@
|
||||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
# Free Software Foundation, Inc.
|
# 2003, 2004 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
@ -12,41 +13,18 @@
|
||||||
# PARTICULAR PURPOSE.
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
SHELL = @SHELL@
|
|
||||||
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
prefix = @prefix@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
|
|
||||||
bindir = @bindir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
datadir = @datadir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
libdir = @libdir@
|
|
||||||
infodir = @infodir@
|
|
||||||
mandir = @mandir@
|
|
||||||
includedir = @includedir@
|
|
||||||
oldincludedir = /usr/include
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
top_builddir = ..
|
top_builddir = ..
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
INSTALL_HEADER = $(INSTALL_DATA)
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
NORMAL_INSTALL = :
|
NORMAL_INSTALL = :
|
||||||
PRE_INSTALL = :
|
PRE_INSTALL = :
|
||||||
|
@ -54,170 +32,282 @@ POST_INSTALL = :
|
||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
host_alias = @host_alias@
|
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
AMTAR = @AMTAR@
|
subdir = doc
|
||||||
AWK = @AWK@
|
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in texinfo.tex
|
||||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
CATALOGS = @CATALOGS@
|
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal-include.m4 \
|
||||||
CATOBJEXT = @CATOBJEXT@
|
$(top_srcdir)/m4/attribute.m4 $(top_srcdir)/m4/gettext.m4 \
|
||||||
CC = @CC@
|
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||||
CPP = @CPP@
|
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||||
DATADIRNAME = @DATADIRNAME@
|
$(top_srcdir)/m4/lzo.m4 $(top_srcdir)/m4/malloc.m4 \
|
||||||
DEPDIR = @DEPDIR@
|
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/openssl.m4 \
|
||||||
EXEEXT = @EXEEXT@
|
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||||
GENCAT = @GENCAT@
|
$(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/tuntap.m4 \
|
||||||
GLIBC21 = @GLIBC21@
|
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.in
|
||||||
GMOFILES = @GMOFILES@
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
GMSGFMT = @GMSGFMT@
|
$(ACLOCAL_M4)
|
||||||
HAVE_TUNTAP = @HAVE_TUNTAP@
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
INCLUDES = @INCLUDES@
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
CONFIG_CLEAN_FILES =
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
SOURCES =
|
||||||
INTLBISON = @INTLBISON@
|
DIST_SOURCES =
|
||||||
INTLLIBS = @INTLLIBS@
|
INFO_DEPS = tinc.info
|
||||||
INTLOBJS = @INTLOBJS@
|
am__TEXINFO_TEX_DIR = $(srcdir)
|
||||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
DVIS = tinc.dvi
|
||||||
LIBICONV = @LIBICONV@
|
PDFS = tinc.pdf
|
||||||
LINUX_IF_TUN_H = @LINUX_IF_TUN_H@
|
PSS = tinc.ps
|
||||||
LN_S = @LN_S@
|
HTMLS = tinc.html
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
TEXINFOS = tinc.texi
|
||||||
MSGFMT = @MSGFMT@
|
TEXI2DVI = texi2dvi
|
||||||
OBJEXT = @OBJEXT@
|
TEXI2PDF = $(TEXI2DVI) --pdf --batch
|
||||||
PACKAGE = @PACKAGE@
|
MAKEINFOHTML = $(MAKEINFO) --html
|
||||||
POFILES = @POFILES@
|
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
|
||||||
POSUB = @POSUB@
|
DVIPS = dvips
|
||||||
RANLIB = @RANLIB@
|
am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"
|
||||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
man5dir = $(mandir)/man5
|
||||||
USE_NLS = @USE_NLS@
|
man8dir = $(mandir)/man8
|
||||||
VERSION = @VERSION@
|
NROFF = nroff
|
||||||
am__include = @am__include@
|
MANS = $(man_MANS)
|
||||||
am__quote = @am__quote@
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
install_sh = @install_sh@
|
|
||||||
|
|
||||||
# Use `ginstall' in the definition of man_MANS to avoid
|
# Use `ginstall' in the definition of man_MANS to avoid
|
||||||
# confusion with the `install' target. The install rule transforms `ginstall'
|
# confusion with the `install' target. The install rule transforms `ginstall'
|
||||||
# to install before applying any user-specified name transformations.
|
# to install before applying any user-specified name transformations.
|
||||||
transform = s/ginstall/install/; @program_transform_name@
|
transform = s/ginstall/install/; @program_transform_name@
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
PERL = @PERL@
|
ALLOCA = @ALLOCA@
|
||||||
|
AMDEP_FALSE = @AMDEP_FALSE@
|
||||||
SUBDIRS = es
|
AMDEP_TRUE = @AMDEP_TRUE@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
GMSGFMT = @GMSGFMT@
|
||||||
|
HAVE_TUNTAP = @HAVE_TUNTAP@
|
||||||
|
INCLUDES = @INCLUDES@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
INTLLIBS = @INTLLIBS@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBICONV = @LIBICONV@
|
||||||
|
LIBINTL = @LIBINTL@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LINUX_IF_TUN_H = @LINUX_IF_TUN_H@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBICONV = @LTLIBICONV@
|
||||||
|
LTLIBINTL = @LTLIBINTL@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||||
|
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
|
MSGFMT = @MSGFMT@
|
||||||
|
MSGMERGE = @MSGMERGE@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
POSUB = @POSUB@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USE_NLS = @USE_NLS@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
XGETTEXT = @XGETTEXT@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||||
|
ac_ct_STRIP = @ac_ct_STRIP@
|
||||||
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
datadir = @datadir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
info_TEXINFOS = tinc.texi
|
info_TEXINFOS = tinc.texi
|
||||||
|
man_MANS = tincd.8 tinc.conf.5
|
||||||
|
EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.conf.5.in sample-config.tar.gz
|
||||||
|
CLEANFILES = *.html tinc.info tincd.8 tinc.conf.5 tincinclude.texi
|
||||||
|
substitute = sed \
|
||||||
|
-e s,'@PACKAGE\@',"$(PACKAGE)",g \
|
||||||
|
-e s,'@VERSION\@',"$(VERSION)",g \
|
||||||
|
-e s,'@sysconfdir\@',"$(sysconfdir)",g \
|
||||||
|
-e s,'@localstatedir\@',"$(localstatedir)",g
|
||||||
|
|
||||||
dyn_MANS =
|
all: all-am
|
||||||
man_aux = $(dyn_MANS:.8=.x)
|
|
||||||
|
|
||||||
man_MANS = tincd.8 tinc.conf.5 $(dyn_MANS)
|
|
||||||
HELP2MAN = help2man
|
|
||||||
MAINTAINERCLEANFILES = $(dyn_MANS)
|
|
||||||
|
|
||||||
EXTRA_DIST = $(man_MANS) $(HELP2MAN) $(man_aux) \
|
|
||||||
Makefile.maint GNUmakefile Makefile.summ sample-config.tar.gz
|
|
||||||
|
|
||||||
subdir = doc
|
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
|
||||||
CONFIG_CLEAN_FILES =
|
|
||||||
DIST_SOURCES =
|
|
||||||
INFO_DEPS = tinc.info
|
|
||||||
DVIS = tinc.dvi
|
|
||||||
TEXINFOS = tinc.texi
|
|
||||||
|
|
||||||
NROFF = nroff
|
|
||||||
MANS = $(man_MANS)
|
|
||||||
|
|
||||||
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
|
|
||||||
uninstall-info-recursive all-recursive install-data-recursive \
|
|
||||||
install-exec-recursive installdirs-recursive install-recursive \
|
|
||||||
uninstall-recursive check-recursive installcheck-recursive
|
|
||||||
DIST_COMMON = Makefile.am Makefile.in texinfo.tex
|
|
||||||
DIST_SUBDIRS = $(SUBDIRS)
|
|
||||||
all: all-recursive
|
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .dvi .info .ps .texi
|
.SUFFIXES: .dvi .ps
|
||||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||||
cd $(top_srcdir) && \
|
cd $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu doc/Makefile
|
$(AUTOMAKE) --gnu doc/Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
.PRECIOUS: Makefile
|
||||||
cd $(top_builddir) && \
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
@case '$?' in \
|
||||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
*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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
tinc.info: tinc.texi
|
tinc.info: tinc.texi
|
||||||
|
restore=: && \
|
||||||
|
backupdir="$(am__leading_dot)am$$$$" && \
|
||||||
|
rm -rf $$backupdir && mkdir $$backupdir && \
|
||||||
|
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||||||
|
if test -f $$f; then \
|
||||||
|
mv $$f $$backupdir; \
|
||||||
|
restore=mv; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||||
|
-o $@ `test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi; \
|
||||||
|
then \
|
||||||
|
rc=0; \
|
||||||
|
else \
|
||||||
|
rc=$$?; \
|
||||||
|
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
|
||||||
|
fi; \
|
||||||
|
rm -rf $$backupdir; \
|
||||||
|
exit $$rc
|
||||||
|
|
||||||
tinc.dvi: tinc.texi
|
tinc.dvi: tinc.texi
|
||||||
|
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||||
.texi.info:
|
|
||||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
|
||||||
cd $(srcdir) \
|
|
||||||
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
|
|
||||||
`echo $< | sed 's,.*/,,'`
|
|
||||||
|
|
||||||
.texi.dvi:
|
|
||||||
TEXINPUTS=$(srcdir):$$TEXINPUTS \
|
|
||||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||||
$(TEXI2DVI) $<
|
$(TEXI2DVI) -o $@ `test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi
|
||||||
|
|
||||||
.texi:
|
tinc.pdf: tinc.texi
|
||||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||||
cd $(srcdir) \
|
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||||
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
|
$(TEXI2PDF) -o $@ `test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi
|
||||||
`echo $< | sed 's,.*/,,'`
|
|
||||||
|
|
||||||
MAKEINFO = @MAKEINFO@
|
tinc.html: tinc.texi
|
||||||
TEXI2DVI = texi2dvi
|
$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||||
DVIPS = dvips
|
-o $@ `test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi
|
||||||
|
if test ! -d $@ && test -d $(@:.html=); then \
|
||||||
|
mv $(@:.html=) $@; else :; fi
|
||||||
.dvi.ps:
|
.dvi.ps:
|
||||||
$(DVIPS) $< -o $@
|
$(DVIPS) -o $@ $<
|
||||||
|
|
||||||
uninstall-info-am:
|
uninstall-info-am:
|
||||||
$(PRE_UNINSTALL)
|
$(PRE_UNINSTALL)
|
||||||
@if (install-info --version && \
|
@if (install-info --version && \
|
||||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||||
list='$(INFO_DEPS)'; \
|
list='$(INFO_DEPS)'; \
|
||||||
for file in $$list; do \
|
for file in $$list; do \
|
||||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
|
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||||
install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
|
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||||
|
install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||||
done; \
|
done; \
|
||||||
else :; fi
|
else :; fi
|
||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
@list='$(INFO_DEPS)'; \
|
@list='$(INFO_DEPS)'; \
|
||||||
for file in $$list; do \
|
for file in $$list; do \
|
||||||
(if cd $(DESTDIR)$(infodir); then \
|
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||||
echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
|
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||||
rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
|
(if cd "$(DESTDIR)$(infodir)"; then \
|
||||||
|
echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
|
||||||
|
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
|
||||||
else :; fi); \
|
else :; fi); \
|
||||||
done
|
done
|
||||||
|
|
||||||
dist-info: $(INFO_DEPS)
|
dist-info: $(INFO_DEPS)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
list='$(INFO_DEPS)'; \
|
list='$(INFO_DEPS)'; \
|
||||||
for base in $$list; do \
|
for base in $$list; do \
|
||||||
d=$(srcdir); \
|
case $$base in \
|
||||||
for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
|
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
test -f $(distdir)/$$file \
|
esac; \
|
||||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
if test -f $$base; then d=.; else d=$(srcdir); fi; \
|
||||||
|
for file in $$d/$$base*; do \
|
||||||
|
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
|
||||||
|
test -f $(distdir)/$$relfile || \
|
||||||
|
cp -p $$file $(distdir)/$$relfile; \
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
|
|
||||||
mostlyclean-aminfo:
|
mostlyclean-aminfo:
|
||||||
-rm -f tinc.aux tinc.cp tinc.cps tinc.dvi tinc.fn tinc.ky tinc.log tinc.pg \
|
-rm -rf tinc.aux tinc.cp tinc.cps tinc.fn tinc.fns tinc.ky tinc.kys tinc.log \
|
||||||
tinc.ps tinc.toc tinc.tp tinc.vr
|
tinc.pg tinc.pgs tinc.tmp tinc.toc tinc.tp tinc.tps tinc.vr \
|
||||||
|
tinc.vrs tinc.dvi tinc.pdf tinc.ps tinc.html
|
||||||
|
|
||||||
maintainer-clean-aminfo:
|
maintainer-clean-aminfo:
|
||||||
cd $(srcdir) && \
|
@list='$(INFO_DEPS)'; for i in $$list; do \
|
||||||
for i in $(INFO_DEPS); do \
|
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||||
rm -f $$i; \
|
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
|
||||||
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
|
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
|
||||||
rm -f $$i-[0-9]*; \
|
|
||||||
fi; \
|
|
||||||
done
|
done
|
||||||
|
|
||||||
man5dir = $(mandir)/man5
|
|
||||||
install-man5: $(man5_MANS) $(man_MANS)
|
install-man5: $(man5_MANS) $(man_MANS)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
$(mkinstalldirs) $(DESTDIR)$(man5dir)
|
test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)"
|
||||||
@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
|
@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
|
||||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||||
for i in $$l2; do \
|
for i in $$l2; do \
|
||||||
|
@ -229,11 +319,15 @@ install-man5: $(man5_MANS) $(man_MANS)
|
||||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||||
else file=$$i; fi; \
|
else file=$$i; fi; \
|
||||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||||
|
case "$$ext" in \
|
||||||
|
5*) ;; \
|
||||||
|
*) ext='5' ;; \
|
||||||
|
esac; \
|
||||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst"; \
|
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
|
||||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst; \
|
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \
|
||||||
done
|
done
|
||||||
uninstall-man5:
|
uninstall-man5:
|
||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@ -246,17 +340,19 @@ uninstall-man5:
|
||||||
done; \
|
done; \
|
||||||
for i in $$list; do \
|
for i in $$list; do \
|
||||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||||
|
case "$$ext" in \
|
||||||
|
5*) ;; \
|
||||||
|
*) ext='5' ;; \
|
||||||
|
esac; \
|
||||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||||
echo " rm -f $(DESTDIR)$(man5dir)/$$inst"; \
|
echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \
|
||||||
rm -f $(DESTDIR)$(man5dir)/$$inst; \
|
rm -f "$(DESTDIR)$(man5dir)/$$inst"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
man8dir = $(mandir)/man8
|
|
||||||
install-man8: $(man8_MANS) $(man_MANS)
|
install-man8: $(man8_MANS) $(man_MANS)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
$(mkinstalldirs) $(DESTDIR)$(man8dir)
|
test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
|
||||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||||
for i in $$l2; do \
|
for i in $$l2; do \
|
||||||
|
@ -268,11 +364,15 @@ install-man8: $(man8_MANS) $(man_MANS)
|
||||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||||
else file=$$i; fi; \
|
else file=$$i; fi; \
|
||||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||||
|
case "$$ext" in \
|
||||||
|
8*) ;; \
|
||||||
|
*) ext='8' ;; \
|
||||||
|
esac; \
|
||||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst"; \
|
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
|
||||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \
|
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
|
||||||
done
|
done
|
||||||
uninstall-man8:
|
uninstall-man8:
|
||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@ -285,186 +385,102 @@ uninstall-man8:
|
||||||
done; \
|
done; \
|
||||||
for i in $$list; do \
|
for i in $$list; do \
|
||||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||||
|
case "$$ext" in \
|
||||||
|
8*) ;; \
|
||||||
|
*) ext='8' ;; \
|
||||||
|
esac; \
|
||||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||||
echo " rm -f $(DESTDIR)$(man8dir)/$$inst"; \
|
echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \
|
||||||
rm -f $(DESTDIR)$(man8dir)/$$inst; \
|
rm -f "$(DESTDIR)$(man8dir)/$$inst"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# 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):
|
|
||||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
|
||||||
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; \
|
|
||||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
|
||||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
|
||||||
done; \
|
|
||||||
if test "$$dot_seen" = "no"; then \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
|
||||||
fi; test -z "$$fail"
|
|
||||||
|
|
||||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
|
||||||
maintainer-clean-recursive:
|
|
||||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
|
||||||
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; \
|
|
||||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
|
||||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
|
||||||
done && test -z "$$fail"
|
|
||||||
tags-recursive:
|
|
||||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
|
||||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
|
||||||
done
|
|
||||||
|
|
||||||
tags: TAGS
|
tags: TAGS
|
||||||
|
TAGS:
|
||||||
|
|
||||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
ctags: CTAGS
|
||||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
CTAGS:
|
||||||
unique=`for i in $$list; do \
|
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
|
||||||
done | \
|
|
||||||
$(AWK) ' { files[$$0] = 1; } \
|
|
||||||
END { for (i in files) print i; }'`; \
|
|
||||||
mkid -fID $$unique $(LISP)
|
|
||||||
|
|
||||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|
||||||
$(TAGS_FILES) $(LISP)
|
|
||||||
tags=; \
|
|
||||||
here=`pwd`; \
|
|
||||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
|
||||||
if test "$$subdir" = .; then :; else \
|
|
||||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
|
||||||
fi; \
|
|
||||||
done; \
|
|
||||||
list='$(SOURCES) $(HEADERS) $(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; } \
|
|
||||||
END { for (i in files) print i; }'`; \
|
|
||||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
|
||||||
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
|
|
||||||
|
|
||||||
GTAGS:
|
|
||||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
|
||||||
&& cd $(top_srcdir) \
|
|
||||||
&& gtags -i $(GTAGS_ARGS) $$here
|
|
||||||
|
|
||||||
distclean-tags:
|
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
|
|
||||||
top_distdir = ..
|
|
||||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
distdir: $(DISTFILES)
|
||||||
@for file in $(DISTFILES); do \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
list='$(DISTFILES)'; for file in $$list; do \
|
||||||
|
case $$file in \
|
||||||
|
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||||
|
esac; \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
dir="/$$dir"; \
|
||||||
|
$(mkdir_p) "$(distdir)$$dir"; \
|
||||||
|
else \
|
||||||
|
dir=''; \
|
||||||
fi; \
|
fi; \
|
||||||
if test -d $$d/$$file; then \
|
if test -d $$d/$$file; then \
|
||||||
cp -pR $$d/$$file $(distdir) \
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|| exit 1; \
|
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
fi; \
|
||||||
|
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||||
else \
|
else \
|
||||||
test -f $(distdir)/$$file \
|
test -f $(distdir)/$$file \
|
||||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||||
|| exit 1; \
|
|| exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
for subdir in $(SUBDIRS); do \
|
|
||||||
if test "$$subdir" = .; then :; else \
|
|
||||||
test -d $(distdir)/$$subdir \
|
|
||||||
|| mkdir $(distdir)/$$subdir \
|
|
||||||
|| exit 1; \
|
|
||||||
(cd $$subdir && \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) \
|
|
||||||
top_distdir="$(top_distdir)" \
|
|
||||||
distdir=../$(distdir)/$$subdir \
|
|
||||||
distdir) \
|
|
||||||
|| exit 1; \
|
|
||||||
fi; \
|
|
||||||
done
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) \
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
top_distdir="${top_distdir}" distdir="$(distdir)" \
|
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||||
dist-info
|
dist-info
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-recursive
|
check: check-am
|
||||||
all-am: Makefile $(INFO_DEPS) $(MANS)
|
all-am: Makefile $(INFO_DEPS) $(MANS)
|
||||||
installdirs: installdirs-recursive
|
installdirs:
|
||||||
installdirs-am:
|
for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
|
||||||
$(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(man5dir) $(DESTDIR)$(man8dir)
|
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||||
|
done
|
||||||
install: install-recursive
|
install: install-am
|
||||||
install-exec: install-exec-recursive
|
install-exec: install-exec-am
|
||||||
install-data: install-data-recursive
|
install-data: install-data-am
|
||||||
uninstall: uninstall-recursive
|
uninstall: uninstall-am
|
||||||
|
|
||||||
install-am: all-am
|
install-am: all-am
|
||||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
installcheck: installcheck-recursive
|
installcheck: installcheck-am
|
||||||
install-strip:
|
install-strip:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
`test -z '$(STRIP)' || \
|
`test -z '$(STRIP)' || \
|
||||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
|
||||||
clean-generic:
|
clean-generic:
|
||||||
|
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||||
|
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
-rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
clean: clean-am
|
||||||
clean: clean-recursive
|
|
||||||
|
|
||||||
clean-am: clean-generic mostlyclean-am
|
clean-am: clean-generic mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-recursive
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
distclean-am: clean-am distclean-generic distclean-tags
|
dvi: dvi-am
|
||||||
|
|
||||||
dvi: dvi-recursive
|
|
||||||
|
|
||||||
dvi-am: $(DVIS)
|
dvi-am: $(DVIS)
|
||||||
|
|
||||||
info: info-recursive
|
html: html-am
|
||||||
|
|
||||||
|
html-am: $(HTMLS)
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
info-am: $(INFO_DEPS)
|
info-am: $(INFO_DEPS)
|
||||||
|
|
||||||
|
@ -472,68 +488,97 @@ install-data-am: install-info-am install-man
|
||||||
|
|
||||||
install-exec-am:
|
install-exec-am:
|
||||||
|
|
||||||
install-info: install-info-recursive
|
install-info: install-info-am
|
||||||
|
|
||||||
install-info-am: $(INFO_DEPS)
|
install-info-am: $(INFO_DEPS)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
|
||||||
@list='$(INFO_DEPS)'; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
list='$(INFO_DEPS)'; \
|
||||||
for file in $$list; do \
|
for file in $$list; do \
|
||||||
d=$(srcdir); \
|
case $$file in \
|
||||||
for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
if test -f $$d/$$ifile; then \
|
esac; \
|
||||||
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
|
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
|
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||||
|
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
|
||||||
|
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
|
||||||
|
if test -f $$ifile; then \
|
||||||
|
relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
|
||||||
|
echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||||
|
$(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||||
else : ; fi; \
|
else : ; fi; \
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
@$(POST_INSTALL)
|
@$(POST_INSTALL)
|
||||||
@if (install-info --version && \
|
@if (install-info --version && \
|
||||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||||
list='$(INFO_DEPS)'; \
|
list='$(INFO_DEPS)'; \
|
||||||
for file in $$list; do \
|
for file in $$list; do \
|
||||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
|
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||||
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
|
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
|
||||||
|
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
|
||||||
done; \
|
done; \
|
||||||
else : ; fi
|
else : ; fi
|
||||||
install-man: install-man5 install-man8
|
install-man: install-man5 install-man8
|
||||||
|
|
||||||
installcheck-am:
|
installcheck-am:
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-recursive
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||||
maintainer-clean-generic
|
maintainer-clean-generic
|
||||||
|
|
||||||
mostlyclean: mostlyclean-recursive
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
|
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
|
||||||
|
|
||||||
uninstall-am: uninstall-info-am uninstall-man
|
pdf: pdf-am
|
||||||
|
|
||||||
uninstall-info: uninstall-info-recursive
|
pdf-am: $(PDFS)
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am: $(PSS)
|
||||||
|
|
||||||
|
uninstall-am: uninstall-info-am uninstall-man
|
||||||
|
|
||||||
uninstall-man: uninstall-man5 uninstall-man8
|
uninstall-man: uninstall-man5 uninstall-man8
|
||||||
|
|
||||||
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
|
.PHONY: all all-am check check-am clean clean-generic dist-info \
|
||||||
clean-generic clean-recursive dist-info distclean \
|
distclean distclean-generic distdir dvi dvi-am html html-am \
|
||||||
distclean-generic distclean-recursive distclean-tags distdir \
|
info info-am install install-am install-data install-data-am \
|
||||||
dvi dvi-am dvi-recursive info info-am info-recursive install \
|
install-exec install-exec-am install-info install-info-am \
|
||||||
install-am install-data install-data-am install-data-recursive \
|
install-man install-man5 install-man8 install-strip \
|
||||||
install-exec install-exec-am install-exec-recursive \
|
installcheck installcheck-am installdirs maintainer-clean \
|
||||||
install-info install-info-am install-info-recursive install-man \
|
maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
|
||||||
install-man5 install-man8 install-recursive install-strip \
|
mostlyclean-aminfo mostlyclean-generic pdf pdf-am ps ps-am \
|
||||||
installcheck installcheck-am installdirs installdirs-am \
|
uninstall uninstall-am uninstall-info-am uninstall-man \
|
||||||
installdirs-recursive maintainer-clean maintainer-clean-aminfo \
|
uninstall-man5 uninstall-man8
|
||||||
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
|
|
||||||
mostlyclean-aminfo mostlyclean-generic mostlyclean-recursive \
|
|
||||||
tags tags-recursive uninstall uninstall-am uninstall-info-am \
|
|
||||||
uninstall-info-recursive uninstall-man uninstall-man5 \
|
|
||||||
uninstall-man8 uninstall-recursive
|
|
||||||
|
|
||||||
|
|
||||||
# For additional rules usually of interest only to the maintainer,
|
# For additional rules usually of interest only to the maintainer,
|
||||||
# see GNUmakefile and Makefile.maint.
|
# see GNUmakefile and Makefile.maint.
|
||||||
|
|
||||||
|
sample-config.tar.gz: sample-config
|
||||||
|
GZIP=$(GZIP_ENV) $(AMTAR) chozf sample-config.tar.gz --exclude .svn sample-config
|
||||||
|
|
||||||
|
texi2html: tinc.texi
|
||||||
|
texi2html -split=chapter tinc.texi
|
||||||
|
|
||||||
|
%.html: $(man_MANS)
|
||||||
|
w3mman2html $< > $@
|
||||||
|
|
||||||
|
tincd.8: tincd.8.in
|
||||||
|
$(substitute) tincd.8.in > tincd.8
|
||||||
|
|
||||||
|
tinc.conf.5: tinc.conf.5.in
|
||||||
|
$(substitute) tinc.conf.5.in > tinc.conf.5
|
||||||
|
|
||||||
|
tincinclude.texi: tincinclude.texi.in
|
||||||
|
$(substitute) tincinclude.texi.in > tincinclude.texi
|
||||||
|
|
||||||
|
tinc.texi: tincinclude.texi
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# 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.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
# This -*- Makefile -*- uses features of GNU make.
|
|
||||||
# It is included via GNUmakefile.
|
|
||||||
|
|
||||||
# The following one line summaries were extracted from the
|
|
||||||
# original man pages using this bit of sh code:
|
|
||||||
# for i in *.1; do echo "$i: "|tr -d '\012'; \
|
|
||||||
# grep -A1 SH.NAME $i|sed '/SH NAME/d;s/^[^ ][^ ]* .- //'; done
|
|
||||||
|
|
||||||
include Makefile.summ
|
|
||||||
|
|
||||||
HELP2MAN-run = $(PERL) -w -- $(srcdir)/$(HELP2MAN)
|
|
||||||
|
|
||||||
# Depend on configure.in to get version number changes.
|
|
||||||
$(dyn_MANS): $(top_srcdir)/configure.in
|
|
||||||
|
|
||||||
# Depend on the source file containing the --help text.
|
|
||||||
# Filter out irregular cases.
|
|
||||||
regular-men = $(filter-out $(irregular-men),$(dyn_MANS))
|
|
||||||
$(regular-men): %.8: $(top_srcdir)/src/%.c
|
|
||||||
|
|
||||||
executable = $(patsubst %/install,%/ginstall, ../src/$(basename $@))
|
|
||||||
$(dyn_MANS): %.8: %.x $(HELP2MAN)
|
|
||||||
@if test -f $(executable); then \
|
|
||||||
echo "Updating man page $@"; \
|
|
||||||
rm -f $@-t $@; \
|
|
||||||
$(HELP2MAN-run) \
|
|
||||||
--name="$($(basename $@)-summary)" \
|
|
||||||
--include=$(basename $@).x \
|
|
||||||
$(executable) > $@-t; \
|
|
||||||
chmod -w $@-t; \
|
|
||||||
mv $@-t $@; \
|
|
||||||
else \
|
|
||||||
echo "WARNING: The man page $@ cannot be updated yet."; \
|
|
||||||
echo " Retry once the corresponding executable is built."; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
sample-config.tar.gz:
|
|
||||||
GZIP=$(GZIP_ENV) $(AMTAR) chozf sample-config.tar.gz sample-config
|
|
|
@ -1,2 +0,0 @@
|
||||||
# -*- makefile -*-
|
|
||||||
tincd-summary = tinc VPN daemon
|
|
|
@ -1,3 +0,0 @@
|
||||||
## Process this file with automake to get Makefile.in
|
|
||||||
|
|
||||||
# Nothing to see here, go away!
|
|
|
@ -1,218 +0,0 @@
|
||||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
|
||||||
|
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
|
||||||
# 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@
|
|
||||||
|
|
||||||
# Nothing to see here, go away!
|
|
||||||
|
|
||||||
SHELL = @SHELL@
|
|
||||||
|
|
||||||
srcdir = @srcdir@
|
|
||||||
top_srcdir = @top_srcdir@
|
|
||||||
VPATH = @srcdir@
|
|
||||||
prefix = @prefix@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
|
|
||||||
bindir = @bindir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
datadir = @datadir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
libdir = @libdir@
|
|
||||||
infodir = @infodir@
|
|
||||||
mandir = @mandir@
|
|
||||||
includedir = @includedir@
|
|
||||||
oldincludedir = /usr/include
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
|
||||||
top_builddir = ../..
|
|
||||||
|
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
||||||
INSTALL_HEADER = $(INSTALL_DATA)
|
|
||||||
transform = @program_transform_name@
|
|
||||||
NORMAL_INSTALL = :
|
|
||||||
PRE_INSTALL = :
|
|
||||||
POST_INSTALL = :
|
|
||||||
NORMAL_UNINSTALL = :
|
|
||||||
PRE_UNINSTALL = :
|
|
||||||
POST_UNINSTALL = :
|
|
||||||
host_alias = @host_alias@
|
|
||||||
host_triplet = @host@
|
|
||||||
AMTAR = @AMTAR@
|
|
||||||
AWK = @AWK@
|
|
||||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
|
||||||
CATALOGS = @CATALOGS@
|
|
||||||
CATOBJEXT = @CATOBJEXT@
|
|
||||||
CC = @CC@
|
|
||||||
CPP = @CPP@
|
|
||||||
DATADIRNAME = @DATADIRNAME@
|
|
||||||
DEPDIR = @DEPDIR@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
GENCAT = @GENCAT@
|
|
||||||
GLIBC21 = @GLIBC21@
|
|
||||||
GMOFILES = @GMOFILES@
|
|
||||||
GMSGFMT = @GMSGFMT@
|
|
||||||
HAVE_TUNTAP = @HAVE_TUNTAP@
|
|
||||||
INCLUDES = @INCLUDES@
|
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
|
||||||
INTLBISON = @INTLBISON@
|
|
||||||
INTLLIBS = @INTLLIBS@
|
|
||||||
INTLOBJS = @INTLOBJS@
|
|
||||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
|
||||||
LIBICONV = @LIBICONV@
|
|
||||||
LINUX_IF_TUN_H = @LINUX_IF_TUN_H@
|
|
||||||
LN_S = @LN_S@
|
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
|
||||||
MSGFMT = @MSGFMT@
|
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
PACKAGE = @PACKAGE@
|
|
||||||
PERL = @PERL@
|
|
||||||
POFILES = @POFILES@
|
|
||||||
POSUB = @POSUB@
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
|
||||||
USE_NLS = @USE_NLS@
|
|
||||||
VERSION = @VERSION@
|
|
||||||
am__include = @am__include@
|
|
||||||
am__quote = @am__quote@
|
|
||||||
install_sh = @install_sh@
|
|
||||||
subdir = doc/es
|
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
|
||||||
CONFIG_CLEAN_FILES =
|
|
||||||
DIST_SOURCES =
|
|
||||||
DIST_COMMON = Makefile.am Makefile.in
|
|
||||||
all: all-am
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
|
||||||
cd $(top_srcdir) && \
|
|
||||||
$(AUTOMAKE) --gnu doc/es/Makefile
|
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|
||||||
cd $(top_builddir) && \
|
|
||||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
|
||||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
|
||||||
uninstall-info-am:
|
|
||||||
tags: TAGS
|
|
||||||
TAGS:
|
|
||||||
|
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
|
|
||||||
top_distdir = ../..
|
|
||||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
|
||||||
@for file in $(DISTFILES); do \
|
|
||||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
|
||||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
|
||||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
|
||||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
|
||||||
fi; \
|
|
||||||
if test -d $$d/$$file; then \
|
|
||||||
cp -pR $$d/$$file $(distdir) \
|
|
||||||
|| 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
|
|
||||||
|
|
||||||
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)" \
|
|
||||||
`test -z '$(STRIP)' || \
|
|
||||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
|
||||||
mostlyclean-generic:
|
|
||||||
|
|
||||||
clean-generic:
|
|
||||||
|
|
||||||
distclean-generic:
|
|
||||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
|
||||||
|
|
||||||
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 mostlyclean-am
|
|
||||||
|
|
||||||
distclean: distclean-am
|
|
||||||
|
|
||||||
distclean-am: clean-am distclean-generic
|
|
||||||
|
|
||||||
dvi: dvi-am
|
|
||||||
|
|
||||||
dvi-am:
|
|
||||||
|
|
||||||
info: info-am
|
|
||||||
|
|
||||||
info-am:
|
|
||||||
|
|
||||||
install-data-am:
|
|
||||||
|
|
||||||
install-exec-am:
|
|
||||||
|
|
||||||
install-info: install-info-am
|
|
||||||
|
|
||||||
install-man:
|
|
||||||
|
|
||||||
installcheck-am:
|
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
|
||||||
|
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
|
||||||
|
|
||||||
mostlyclean: mostlyclean-am
|
|
||||||
|
|
||||||
mostlyclean-am: mostlyclean-generic
|
|
||||||
|
|
||||||
uninstall-am: uninstall-info-am
|
|
||||||
|
|
||||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
|
||||||
distclean-generic distdir dvi dvi-am info info-am install \
|
|
||||||
install-am install-data install-data-am install-exec \
|
|
||||||
install-exec-am install-info install-info-am install-man \
|
|
||||||
install-strip installcheck installcheck-am installdirs \
|
|
||||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
|
||||||
mostlyclean-generic uninstall uninstall-am uninstall-info-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:
|
|
375
doc/help2man
375
doc/help2man
|
@ -1,375 +0,0 @@
|
||||||
#!/usr/bin/perl -w
|
|
||||||
|
|
||||||
# Generate a short man page from --help and --version output.
|
|
||||||
# Copyright © 1997, 98 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 2, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
# Written by Brendan O'Dea <bod@compusol.com.au>
|
|
||||||
|
|
||||||
use 5.004;
|
|
||||||
use strict;
|
|
||||||
use Getopt::Long;
|
|
||||||
use POSIX qw(strftime setlocale LC_TIME);
|
|
||||||
|
|
||||||
my $this_program = 'help2man';
|
|
||||||
my $this_version = '1.006';
|
|
||||||
my $version_info = <<EOT;
|
|
||||||
$this_program $this_version
|
|
||||||
|
|
||||||
Copyright (C) 1997, 98 Free Software Foundation, Inc.
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
Written by Brendan O'Dea <bod\@compusol.com.au>
|
|
||||||
EOT
|
|
||||||
|
|
||||||
my $help_info = <<EOT;
|
|
||||||
`$this_program' generates a man page out of `--help' and `--version' output.
|
|
||||||
|
|
||||||
Usage: $this_program [OPTION]... EXECUTABLE
|
|
||||||
|
|
||||||
--name=STRING use `STRING' as the description for the NAME paragraph
|
|
||||||
--include=FILE include material from `FILE'
|
|
||||||
--opt-include=FILE include material from `FILE' if it exists
|
|
||||||
--output=FILE send output to `FILE'
|
|
||||||
--no-info suppress pointer to Texinfo manual
|
|
||||||
--help print this help, then exit
|
|
||||||
--version print $this_program program version number, then exit
|
|
||||||
|
|
||||||
EXECUTABLE should accept `--help' and `version' options.
|
|
||||||
EOT
|
|
||||||
|
|
||||||
my ($include, $opt_name, $opt_include, $opt_output, $opt_no_info);
|
|
||||||
|
|
||||||
# Parse options.
|
|
||||||
GetOptions (
|
|
||||||
'name=s' => \$opt_name,
|
|
||||||
'include=s' => \$include,
|
|
||||||
'opt-include=s' => \$opt_include,
|
|
||||||
'output=s' => \$opt_output,
|
|
||||||
'no-info' => \$opt_no_info,
|
|
||||||
help => sub { print $help_info; exit },
|
|
||||||
version => sub { print $version_info; exit },
|
|
||||||
) or die $help_info;
|
|
||||||
|
|
||||||
die $help_info unless @ARGV == 1;
|
|
||||||
|
|
||||||
my %include = ();
|
|
||||||
my @include = (); # to retain order
|
|
||||||
|
|
||||||
# Process include file (if given). Format is:
|
|
||||||
#
|
|
||||||
# [section name]
|
|
||||||
# verbatim text
|
|
||||||
|
|
||||||
if ($include or $opt_include)
|
|
||||||
{
|
|
||||||
if (open INC, $include || $opt_include)
|
|
||||||
{
|
|
||||||
my $sect;
|
|
||||||
|
|
||||||
while (<INC>)
|
|
||||||
{
|
|
||||||
if (/^\[([^]]+)\]/)
|
|
||||||
{
|
|
||||||
$sect = uc $1;
|
|
||||||
$sect =~ s/^\s+//;
|
|
||||||
$sect =~ s/\s+$//;
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Silently ignore anything before the first
|
|
||||||
# section--allows for comments and revision info.
|
|
||||||
next unless $sect;
|
|
||||||
|
|
||||||
push @include, $sect unless $include{$sect};
|
|
||||||
$include{$sect} ||= '';
|
|
||||||
$include{$sect} .= $_;
|
|
||||||
}
|
|
||||||
|
|
||||||
close INC;
|
|
||||||
|
|
||||||
die "$this_program: no valid information found in `$include'\n"
|
|
||||||
unless %include;
|
|
||||||
|
|
||||||
# Compress trailing blank lines.
|
|
||||||
for (keys %include)
|
|
||||||
{
|
|
||||||
$include{$_} =~ s/\n+$//;
|
|
||||||
$include{$_} .= "\n" unless /^NAME$/;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
die "$this_program: can't open `$include' ($!)\n" if $include;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Turn off localisation of executable's ouput.
|
|
||||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
|
||||||
|
|
||||||
# Turn off localisation of date (for strftime)
|
|
||||||
setlocale LC_TIME, 'C';
|
|
||||||
|
|
||||||
# Grab help and version paragraphs from executable
|
|
||||||
my @help = split /\n\n+/, `$ARGV[0] --help 2>/dev/null`
|
|
||||||
or die "$this_program: can't get `--help' info from $ARGV[0]\n";
|
|
||||||
|
|
||||||
my @version = split /\n\n+/, `$ARGV[0] --version 2>/dev/null`
|
|
||||||
or die "$this_program: can't get `--version' info from $ARGV[0]\n";
|
|
||||||
|
|
||||||
my $date = strftime "%B %Y", localtime;
|
|
||||||
my $program = $ARGV[0]; $program =~ s!.*/!!;
|
|
||||||
my $package = $program;
|
|
||||||
my $version;
|
|
||||||
|
|
||||||
if ($opt_output)
|
|
||||||
{
|
|
||||||
unlink $opt_output
|
|
||||||
or die "$this_program: can't unlink $opt_output ($!)\n"
|
|
||||||
if -e $opt_output;
|
|
||||||
|
|
||||||
open STDOUT, ">$opt_output"
|
|
||||||
or die "$this_program: can't create $opt_output ($!)\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# The first line of the --version information is assumed to be in one
|
|
||||||
# of the following formats:
|
|
||||||
#
|
|
||||||
# <version>
|
|
||||||
# <program> <version>
|
|
||||||
# GNU <program> <version>
|
|
||||||
# <program> (GNU <package>) <version>
|
|
||||||
# <program> - GNU <package> <version>
|
|
||||||
#
|
|
||||||
# and seperated from any copyright/author details by a blank line.
|
|
||||||
|
|
||||||
$_ = shift @version;
|
|
||||||
|
|
||||||
if (/^(\S+)\s+\((GNU\s+[^)]+)\)\s+(.*)/ or
|
|
||||||
/^(\S+)\s+-\s*(GNU\s+\S+)\s+(.*)/)
|
|
||||||
{
|
|
||||||
$program = $1;
|
|
||||||
$package = $2;
|
|
||||||
$version = $3;
|
|
||||||
}
|
|
||||||
elsif (/^(GNU\s+)?(\S+)\s+(.*)/)
|
|
||||||
{
|
|
||||||
$program = $2;
|
|
||||||
$package = $1 ? "$1$2" : $2;
|
|
||||||
$version = $3;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$version = $_;
|
|
||||||
}
|
|
||||||
|
|
||||||
$program =~ s!.*/!!;
|
|
||||||
|
|
||||||
# no info for `info' itself
|
|
||||||
$opt_no_info = 1 if $program eq 'info';
|
|
||||||
|
|
||||||
# --name overrides --include contents
|
|
||||||
$include{NAME} = "$program \\- $opt_name" if $opt_name;
|
|
||||||
|
|
||||||
# Default (useless) NAME paragraph
|
|
||||||
$include{NAME} ||= "$program \\- manual page for $program $version";
|
|
||||||
|
|
||||||
# Man pages traditionally have the page title in caps.
|
|
||||||
my $PROGRAM = uc $program;
|
|
||||||
|
|
||||||
# Header.
|
|
||||||
print <<EOT;
|
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
|
|
||||||
.TH $PROGRAM 1 "$date" "$package $version" "FSF"
|
|
||||||
.SH NAME
|
|
||||||
$include{NAME}
|
|
||||||
EOT
|
|
||||||
|
|
||||||
my $accumulate = 1;
|
|
||||||
my @description = ();
|
|
||||||
|
|
||||||
sub convert_option;
|
|
||||||
|
|
||||||
# Output converted --help information.
|
|
||||||
for (@help)
|
|
||||||
{
|
|
||||||
chomp;
|
|
||||||
|
|
||||||
if (s/^Usage:\s+\S+\s+(.*)\n?//)
|
|
||||||
{
|
|
||||||
# Turn the usage clause into a synopsis.
|
|
||||||
my $synopsis = '';
|
|
||||||
|
|
||||||
do {
|
|
||||||
my $syn = $1;
|
|
||||||
$syn =~ s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
|
|
||||||
$syn =~ s/^/\\fI/ unless $syn =~ s/^\\fR//;
|
|
||||||
$syn .= '\fR';
|
|
||||||
$syn =~ s/\\fI(\s*)\\fR/$1/g;
|
|
||||||
|
|
||||||
$synopsis .= ".br\n" unless $accumulate;
|
|
||||||
$synopsis .= ".B $program\n";
|
|
||||||
$synopsis .= "$syn\n";
|
|
||||||
$accumulate = 0;
|
|
||||||
} while s/^(?:Usage|\s*or):\s+\S+\s+(.*)\n?//;
|
|
||||||
|
|
||||||
# Include file overrides SYNOPSIS.
|
|
||||||
print ".SH SYNOPSIS\n", $include{SYNOPSIS} || $synopsis;
|
|
||||||
|
|
||||||
# Dump any accumulated description text.
|
|
||||||
print ".SH DESCRIPTION\n";
|
|
||||||
print @description;
|
|
||||||
|
|
||||||
# Add additional description text from include file.
|
|
||||||
if ($include{DESCRIPTION})
|
|
||||||
{
|
|
||||||
print ".PP\n" unless $include{DESCRIPTION} =~ /^\..P/;
|
|
||||||
print $include{DESCRIPTION};
|
|
||||||
}
|
|
||||||
|
|
||||||
next unless $_;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Accumulate text if the synopsis has not been produced yet.
|
|
||||||
if ($accumulate)
|
|
||||||
{
|
|
||||||
push @description, ".PP\n" if @description;
|
|
||||||
push @description, "$_\n";
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Catch start of options.
|
|
||||||
if (/^Options:/)
|
|
||||||
{
|
|
||||||
print qq(.SH OPTIONS\n);
|
|
||||||
s/Options://;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Catch bug report text.
|
|
||||||
if (/^Report bugs |^Email bug reports to /)
|
|
||||||
{
|
|
||||||
print qq(.SH "REPORTING BUGS"\n$_\n);
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Special case for tar 1.12: --label=NAME\nPATTERN.
|
|
||||||
s{(\n[ \t]*)(-V,[ \t]+--label=NAME.*)\n[ \t]+PATTERN[ \t]+}
|
|
||||||
{$1$2$1\\&...=PATTERN };
|
|
||||||
|
|
||||||
# Convert options.
|
|
||||||
s/(\s)(-[][\w=-]+|\\&\S+)/$1 . convert_option $2/ge;
|
|
||||||
|
|
||||||
# Option subsections have second line indented.
|
|
||||||
print qq(.SS "$1"\n) if s/^(\S.*)\n(\s)/$2/;
|
|
||||||
|
|
||||||
# Lines indented more than about 10 spaces may be assumed to be
|
|
||||||
# continuations of the previous line.
|
|
||||||
s/\n {10,}/ /g;
|
|
||||||
|
|
||||||
# Lines following dotted (*) or numbered points may also be
|
|
||||||
# continued if indented to the same level as the text following
|
|
||||||
# the point.
|
|
||||||
1 while s{((?:^|\n)(\s+)(?:[1-9][.)]|\*)(\s+)(?:[^\n]+))\n\2 \3(\S)}
|
|
||||||
{$1 $4}g;
|
|
||||||
|
|
||||||
# Indented paragraph.
|
|
||||||
if (/^\s/)
|
|
||||||
{
|
|
||||||
for (split /\n/)
|
|
||||||
{
|
|
||||||
s/^\s+//;
|
|
||||||
s/([^,])\s+/$1\n/;
|
|
||||||
print ".TP\n$_\n" if $_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# Anything else.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print ".PP\n$_\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Print any include items other than the ones we have already dealt
|
|
||||||
# with.
|
|
||||||
for (@include)
|
|
||||||
{
|
|
||||||
print qq(.SH "$_"\n$include{$_})
|
|
||||||
unless /^(NAME|SYNOPSIS|DESCRIPTION|SEE ALSO)$/;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Refer to the real documentation.
|
|
||||||
if ($include{'SEE ALSO'} or !$opt_no_info)
|
|
||||||
{
|
|
||||||
print qq(.SH "SEE ALSO"\n);
|
|
||||||
print $include{'SEE ALSO'}, ".PP\n" if $include{'SEE ALSO'};
|
|
||||||
|
|
||||||
print <<EOT unless $opt_no_info;
|
|
||||||
The full documentation for
|
|
||||||
.B $program
|
|
||||||
is maintained as a Texinfo manual. If the
|
|
||||||
.B info
|
|
||||||
and
|
|
||||||
.B $program
|
|
||||||
programs are properly installed at your site, the command
|
|
||||||
.IP
|
|
||||||
.B info $program
|
|
||||||
.PP
|
|
||||||
should give you access to the complete manual.
|
|
||||||
EOT
|
|
||||||
}
|
|
||||||
|
|
||||||
# Output converted --version information.
|
|
||||||
for (@version)
|
|
||||||
{
|
|
||||||
chomp;
|
|
||||||
|
|
||||||
# Join hyphenated lines.
|
|
||||||
s/([A-Za-z])-\n */$1/g;
|
|
||||||
|
|
||||||
# Convert copyright symbol or (c) to nroff character.
|
|
||||||
s/Copyright\s+(?:\xa9|\([Cc]\))/Copyright \\(co/g;
|
|
||||||
|
|
||||||
# Insert appropriate headings for copyright and author.
|
|
||||||
if (/^Copyright\s\\/) { print ".SH COPYRIGHT\n" }
|
|
||||||
elsif (/^Written\s+by/) { print ".SH AUTHOR\n" }
|
|
||||||
else { print ".PP\n"; }
|
|
||||||
|
|
||||||
# Insert line breaks before additional copyright messages and the
|
|
||||||
# disclaimer.
|
|
||||||
s/(.)\n(Copyright\s|This is free software)/$1\n.br\n$2/g;
|
|
||||||
|
|
||||||
print "$_\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
exit;
|
|
||||||
|
|
||||||
# Convert option dashes to \- to stop nroff from hyphenating 'em, and
|
|
||||||
# embolden. Option arguments get italicised.
|
|
||||||
sub convert_option
|
|
||||||
{
|
|
||||||
my $option = '\fB' . shift;
|
|
||||||
|
|
||||||
$option =~ s/-/\\-/g;
|
|
||||||
unless ($option =~ s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
|
|
||||||
{
|
|
||||||
$option =~ s/=(.)/\\fR=\\fI$1/;
|
|
||||||
$option =~ s/ (.)/ \\fI$1/;
|
|
||||||
$option .= '\fR';
|
|
||||||
}
|
|
||||||
|
|
||||||
$option;
|
|
||||||
}
|
|
Binary file not shown.
7266
doc/texinfo.tex
7266
doc/texinfo.tex
File diff suppressed because it is too large
Load diff
|
@ -1,14 +1,14 @@
|
||||||
.Dd 2002-04-09
|
.Dd 2002-04-09
|
||||||
.Dt TINC.CONF 5
|
.Dt TINC.CONF 5
|
||||||
.\" Manual page created by:
|
.\" Manual page created by:
|
||||||
.\" Ivo Timmermans <itimmermans@bigfoot.com>
|
.\" Ivo Timmermans <ivo@tinc-vpn.org>
|
||||||
.\" Guus Sliepen <guus@sliepen.warande.net>
|
.\" Guus Sliepen <guus@tinc-vpn.org>
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm tinc.conf
|
.Nm tinc.conf
|
||||||
.Nd tinc daemon configuration
|
.Nd tinc daemon configuration
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The files in the
|
The files in the
|
||||||
.Pa /etc/tinc/
|
.Pa @sysconfdir@/tinc/
|
||||||
directory contain runtime and security information for the tinc daemon.
|
directory contain runtime and security information for the tinc daemon.
|
||||||
.Sh NETWORKS
|
.Sh NETWORKS
|
||||||
It is perfectly ok for you to run more than one tinc daemon.
|
It is perfectly ok for you to run more than one tinc daemon.
|
||||||
|
@ -25,7 +25,7 @@ with the
|
||||||
option, which will assign a name to this daemon.
|
option, which will assign a name to this daemon.
|
||||||
.Pp
|
.Pp
|
||||||
The effect of this is that the daemon will set its configuration root to
|
The effect of this is that the daemon will set its configuration root to
|
||||||
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa / ,
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa / ,
|
||||||
where
|
where
|
||||||
.Ar NETNAME
|
.Ar NETNAME
|
||||||
is your argument to the
|
is your argument to the
|
||||||
|
@ -41,13 +41,13 @@ In this case, the network name would just be empty,
|
||||||
and it will be used as such.
|
and it will be used as such.
|
||||||
.Nm tinc
|
.Nm tinc
|
||||||
now looks for files in
|
now looks for files in
|
||||||
.Pa /etc/tinc/ ,
|
.Pa @sysconfdir@/tinc/ ,
|
||||||
instead of
|
instead of
|
||||||
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa / ;
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa / ;
|
||||||
the configuration file should be
|
the configuration file should be
|
||||||
.Pa /etc/tinc/tinc.conf ,
|
.Pa @sysconfdir@/tinc/tinc.conf ,
|
||||||
and the host configuration files are now expected to be in
|
and the host configuration files are now expected to be in
|
||||||
.Pa /etc/tinc/hosts/ .
|
.Pa @sysconfdir@/tinc/hosts/ .
|
||||||
.Pp
|
.Pp
|
||||||
But it is highly recommended that you use this feature of
|
But it is highly recommended that you use this feature of
|
||||||
.Nm tinc ,
|
.Nm tinc ,
|
||||||
|
@ -57,7 +57,7 @@ Hence, we will assume that you use it.
|
||||||
Each tinc daemon should have a name that is unique in the network which it will be part of.
|
Each tinc daemon should have a name that is unique in the network which it will be part of.
|
||||||
The name will be used by other tinc daemons for identification.
|
The name will be used by other tinc daemons for identification.
|
||||||
The name has to be declared in the
|
The name has to be declared in the
|
||||||
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
|
||||||
file.
|
file.
|
||||||
.Pp
|
.Pp
|
||||||
To make things easy,
|
To make things easy,
|
||||||
|
@ -69,21 +69,21 @@ You should use
|
||||||
to generate public/private keypairs.
|
to generate public/private keypairs.
|
||||||
It will generate two keys.
|
It will generate two keys.
|
||||||
The private key should be stored in a separate file
|
The private key should be stored in a separate file
|
||||||
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /rsa_key.priv
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /rsa_key.priv
|
||||||
\-\- where
|
\-\- where
|
||||||
.Ar NETNAME
|
.Ar NETNAME
|
||||||
stands for the network (see
|
stands for the network (see
|
||||||
.Sx NETWORKS )
|
.Sx NETWORKS )
|
||||||
above.
|
above.
|
||||||
The public key should be stored in the host configuration file
|
The public key should be stored in the host configuration file
|
||||||
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Va NAME
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Va NAME
|
||||||
\-\- where
|
\-\- where
|
||||||
.Va NAME
|
.Va NAME
|
||||||
stands for the name of the local tinc daemon (see
|
stands for the name of the local tinc daemon (see
|
||||||
.Sx NAMES ) .
|
.Sx NAMES ) .
|
||||||
.Sh SERVER CONFIGURATION
|
.Sh SERVER CONFIGURATION
|
||||||
The server configuration of the daemon is done in the file
|
The server configuration of the daemon is done in the file
|
||||||
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf .
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf .
|
||||||
This file consists of comments (lines started with a
|
This file consists of comments (lines started with a
|
||||||
.Li # )
|
.Li # )
|
||||||
or assignments in the form of:
|
or assignments in the form of:
|
||||||
|
@ -100,12 +100,19 @@ If you leave it out, remember to replace it with at least one space character.
|
||||||
Here are all valid variables, listed in alphabetical order.
|
Here are all valid variables, listed in alphabetical order.
|
||||||
The default value is given between parentheses.
|
The default value is given between parentheses.
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Va AddressFamily Li = ipv4 | ipv6 | any Po ipv4 Pc Bq experimental
|
.It Va AddressFamily Li = ipv4 | ipv6 | any Pq any
|
||||||
This option affects the address family of listening and outgoing sockets.
|
This option affects the address family of listening and outgoing sockets.
|
||||||
If
|
If
|
||||||
.Qq any
|
.Qq any
|
||||||
is selected, then depending on the operating system both IPv4 and IPv6 or just
|
is selected, then depending on the operating system both IPv4 and IPv6 or just
|
||||||
IPv6 listening sockets will be created.
|
IPv6 listening sockets will be created.
|
||||||
|
.It Va BindToAddress Li = Ar address Bq experimental
|
||||||
|
If your computer has more than one IPv4 or IPv6 address,
|
||||||
|
.Nm tinc
|
||||||
|
will by default listen on all of them for incoming connections.
|
||||||
|
It is possible to bind only to a single address with this variable.
|
||||||
|
.Pp
|
||||||
|
This option may not work on all platforms.
|
||||||
.It Va BindToInterface Li = Ar interface Bq experimental
|
.It Va BindToInterface Li = Ar interface Bq experimental
|
||||||
If your computer has more than one network interface,
|
If your computer has more than one network interface,
|
||||||
.Nm tinc
|
.Nm tinc
|
||||||
|
@ -113,6 +120,13 @@ will by default listen on all of them for incoming connections.
|
||||||
It is possible to bind only to a single interface with this variable.
|
It is possible to bind only to a single interface with this variable.
|
||||||
.Pp
|
.Pp
|
||||||
This option may not work on all platforms.
|
This option may not work on all platforms.
|
||||||
|
.It Va BlockingTCP Li = yes | no Po no Pc Bq experimental
|
||||||
|
This options selects whether TCP connections, when established, should use blocking writes.
|
||||||
|
When turned off, tinc will never block when a TCP connection becomes congested, but will have to terminate that connection instead.
|
||||||
|
If turned on, tinc will not terminate connections but will block, thereby unable to process data to/from other connections.
|
||||||
|
Turn this option on if you also use
|
||||||
|
.Va TCPOnly
|
||||||
|
and tinc terminates connections frequently.
|
||||||
.It Va ConnectTo Li = Ar name
|
.It Va ConnectTo Li = Ar name
|
||||||
Specifies which other tinc daemon to connect to on startup.
|
Specifies which other tinc daemon to connect to on startup.
|
||||||
Multiple
|
Multiple
|
||||||
|
@ -129,11 +143,15 @@ If you don't specify a host with
|
||||||
.Nm tinc
|
.Nm tinc
|
||||||
won't try to connect to other daemons at all,
|
won't try to connect to other daemons at all,
|
||||||
and will instead just listen for incoming connections.
|
and will instead just listen for incoming connections.
|
||||||
.It Va Device Li = Ar device Po /dev/tap0 or /dev/misc/net/tun Pc
|
.It Va Device Li = Ar device Po Pa /dev/tap0 , Pa /dev/net/tun No or other depending on platform Pc
|
||||||
The virtual network device to use.
|
The virtual network device to use.
|
||||||
.Nm tinc
|
.Nm tinc
|
||||||
will automatically detect what kind of device it is.
|
will automatically detect what kind of device it is.
|
||||||
Note that you can only use one device per daemon.
|
Note that you can only use one device per daemon.
|
||||||
|
Under Windows, use
|
||||||
|
.Va Interface
|
||||||
|
instead of
|
||||||
|
.Va Device .
|
||||||
The info pages of the tinc package contain more information
|
The info pages of the tinc package contain more information
|
||||||
about configuring the virtual network device.
|
about configuring the virtual network device.
|
||||||
.It Va Hostnames Li = yes | no Pq no
|
.It Va Hostnames Li = yes | no Pq no
|
||||||
|
@ -146,19 +164,22 @@ This does not affect resolving hostnames to IP addresses from the
|
||||||
host configuration files.
|
host configuration files.
|
||||||
.It Va Interface Li = Ar interface
|
.It Va Interface Li = Ar interface
|
||||||
Defines the name of the interface corresponding to the virtual network device.
|
Defines the name of the interface corresponding to the virtual network device.
|
||||||
Depending on the operating system and the type of device this may or may not actually set the name.
|
Depending on the operating system and the type of device this may or may not actually set the name of the interface.
|
||||||
Currently this option only affects the Linux tun/tap device.
|
Under Windows, this variable is used to select which network interface will be used.
|
||||||
.It Va KeyExpire Li = Ar period Pq 3600
|
If you specified a
|
||||||
|
.Va Device ,
|
||||||
|
this variable is almost always already correctly set.
|
||||||
|
.It Va KeyExpire Li = Ar seconds Pq 3600
|
||||||
This option controls the period the encryption keys used to encrypt the data are valid.
|
This option controls the period the encryption keys used to encrypt the data are valid.
|
||||||
It is common practice to change keys at regular intervals to make it even harder for crackers,
|
It is common practice to change keys at regular intervals to make it even harder for crackers,
|
||||||
even though it is thought to be nearly impossible to crack a single key.
|
even though it is thought to be nearly impossible to crack a single key.
|
||||||
.It Va MACExpire Li = Ar period Pq 600
|
.It Va MACExpire Li = Ar seconds Pq 600
|
||||||
This option controls the amount of time MAC addresses are kept before they are removed.
|
This option controls the amount of time MAC addresses are kept before they are removed.
|
||||||
This only has effect when
|
This only has effect when
|
||||||
.Va Mode
|
.Va Mode
|
||||||
is set to
|
is set to
|
||||||
.Qq switch .
|
.Qq switch .
|
||||||
.It Va MaxTimeout Li = Ar period Pq 900
|
.It Va MaxTimeout Li = Ar seconds Pq 900
|
||||||
This is the maximum delay before trying to reconnect to other tinc daemons.
|
This is the maximum delay before trying to reconnect to other tinc daemons.
|
||||||
.It Va Mode Li = router | switch | hub Pq router
|
.It Va Mode Li = router | switch | hub Pq router
|
||||||
This option selects the way packets are routed to other daemons.
|
This option selects the way packets are routed to other daemons.
|
||||||
|
@ -168,11 +189,15 @@ In this mode
|
||||||
.Va Subnet
|
.Va Subnet
|
||||||
variables in the host configuration files will be used to form a routing table.
|
variables in the host configuration files will be used to form a routing table.
|
||||||
Only unicast packets of routable protocols (IPv4 and IPv6) are supported in this mode.
|
Only unicast packets of routable protocols (IPv4 and IPv6) are supported in this mode.
|
||||||
|
.Pp
|
||||||
|
This is the default mode, and unless you really know you need another mode, don't change it.
|
||||||
.It switch
|
.It switch
|
||||||
In this mode the MAC addresses of the packets on the VPN will be used to
|
In this mode the MAC addresses of the packets on the VPN will be used to
|
||||||
dynamically create a routing table just like an Ethernet switch does.
|
dynamically create a routing table just like an Ethernet switch does.
|
||||||
Unicast, multicast and broadcast packets of every protocol that runs over Ethernet are supported in this mode
|
Unicast, multicast and broadcast packets of every protocol that runs over Ethernet are supported in this mode
|
||||||
at the cost of frequent broadcast ARP requests and routing table updates.
|
at the cost of frequent broadcast ARP requests and routing table updates.
|
||||||
|
.Pp
|
||||||
|
This mode is primarily useful if you want to bridge Ethernet segments.
|
||||||
.It hub
|
.It hub
|
||||||
This mode is almost the same as the switch mode, but instead
|
This mode is almost the same as the switch mode, but instead
|
||||||
every packet will be broadcast to the other daemons
|
every packet will be broadcast to the other daemons
|
||||||
|
@ -181,7 +206,7 @@ while no routing table is managed.
|
||||||
.It Va Name Li = Ar name Bq required
|
.It Va Name Li = Ar name Bq required
|
||||||
This is the name which identifies this tinc daemon.
|
This is the name which identifies this tinc daemon.
|
||||||
It must be unique for the virtual private network this daemon will connect to.
|
It must be unique for the virtual private network this daemon will connect to.
|
||||||
.It Va PingTimeout Li = Ar period Pq 60
|
.It Va PingTimeout Li = Ar seconds Pq 60
|
||||||
The number of seconds of inactivity that
|
The number of seconds of inactivity that
|
||||||
.Nm tinc
|
.Nm tinc
|
||||||
will wait before sending a probe to the other end.
|
will wait before sending a probe to the other end.
|
||||||
|
@ -194,13 +219,18 @@ will be inherited by the UDP packets that are sent out.
|
||||||
.It Va PrivateKey Li = Ar key Bq obsolete
|
.It Va PrivateKey Li = Ar key Bq obsolete
|
||||||
The private RSA key of this tinc daemon.
|
The private RSA key of this tinc daemon.
|
||||||
It will allow this tinc daemon to authenticate itself to other daemons.
|
It will allow this tinc daemon to authenticate itself to other daemons.
|
||||||
.It Va PrivateKeyFile Li = Ar filename Bq recommended
|
.It Va PrivateKeyFile Li = Ar filename Po Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /rsa_key.priv Pc
|
||||||
The file in which the private RSA key of this tinc daemon resides.
|
The file in which the private RSA key of this tinc daemon resides.
|
||||||
Note that there must be exactly one of
|
Note that there must be exactly one of
|
||||||
.Va PrivateKey
|
.Va PrivateKey
|
||||||
or
|
or
|
||||||
.Va PrivateKeyFile
|
.Va PrivateKeyFile
|
||||||
specified in the configuration file.
|
specified in the configuration file.
|
||||||
|
.It Va TunnelServer Li = yes | no Po no Pc Bq experimental
|
||||||
|
When this option is enabled tinc will no longer forward information between other tinc daemons,
|
||||||
|
and will only allow nodes and subnets on the VPN which are present in the
|
||||||
|
.Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/
|
||||||
|
directory.
|
||||||
.El
|
.El
|
||||||
.Sh HOST CONFIGURATION FILES
|
.Sh HOST CONFIGURATION FILES
|
||||||
The host configuration files contain all information needed
|
The host configuration files contain all information needed
|
||||||
|
@ -228,9 +258,11 @@ Any cipher supported by OpenSSL is recognised.
|
||||||
Furthermore, specifying
|
Furthermore, specifying
|
||||||
.Qq none
|
.Qq none
|
||||||
will turn off packet encryption.
|
will turn off packet encryption.
|
||||||
|
It is best to use only those ciphers which support CBC mode.
|
||||||
.It Va Compression Li = Ar level Pq 0
|
.It Va Compression Li = Ar level Pq 0
|
||||||
This option sets the level of compression used for UDP packets.
|
This option sets the level of compression used for UDP packets.
|
||||||
Possible values are 0 (off), 1 (fast) and any integer up to 9 (best).
|
Possible values are 0 (off), 1 (fast zlib) and any integer up to 9 (best zlib),
|
||||||
|
10 (fast lzo) and 11 (best lzo).
|
||||||
.It Va Digest Li = Ar digest Pq sha1
|
.It Va Digest Li = Ar digest Pq sha1
|
||||||
The digest algorithm used to authenticate UDP packets.
|
The digest algorithm used to authenticate UDP packets.
|
||||||
Any digest supported by OpenSSL is recognised.
|
Any digest supported by OpenSSL is recognised.
|
||||||
|
@ -249,6 +281,11 @@ The length of the message authentication code used to authenticate UDP packets.
|
||||||
Can be anything from
|
Can be anything from
|
||||||
.Qq 0
|
.Qq 0
|
||||||
up to the length of the digest produced by the digest algorithm.
|
up to the length of the digest produced by the digest algorithm.
|
||||||
|
.It Va PMTU Li = Ar mtu Po 1514 Pc Bq experimental
|
||||||
|
This option controls the initial path MTU to this node.
|
||||||
|
.It Va PMTUDiscovery Li = yes | no Po no Pc Bq experimental
|
||||||
|
When this option is enabled, tinc will try to discover the path MTU to this node.
|
||||||
|
After the path MTU has been discovered, it will be enforced on the VPN.
|
||||||
.It Va Port Li = Ar port Pq 655
|
.It Va Port Li = Ar port Pq 655
|
||||||
The port number on which this tinc daemon is listening for incoming connections.
|
The port number on which this tinc daemon is listening for incoming connections.
|
||||||
.It Va PublicKey Li = Ar key Bq obsolete
|
.It Va PublicKey Li = Ar key Bq obsolete
|
||||||
|
@ -292,39 +329,79 @@ from behind a masquerading firewall,
|
||||||
or if UDP packet routing is disabled somehow.
|
or if UDP packet routing is disabled somehow.
|
||||||
Setting this options also implicitly sets IndirectData.
|
Setting this options also implicitly sets IndirectData.
|
||||||
.El
|
.El
|
||||||
.Sh FILES
|
.Sh SCRIPTS
|
||||||
|
Apart from reading the server and host configuration files,
|
||||||
|
tinc can also run scripts at certain moments.
|
||||||
|
Under Windows (not Cygwin), the scripts should have the extension
|
||||||
|
.Pa .bat .
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Pa /etc/tinc/
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
|
||||||
|
This is the most important script.
|
||||||
|
If it is present it will be executed right after the tinc daemon has been started and has connected to the virtual network device.
|
||||||
|
It should be used to set up the corresponding network interface,
|
||||||
|
but can also be used to start other things.
|
||||||
|
Under Windows you can use the Network Connections control panel instead of creating this script.
|
||||||
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-down
|
||||||
|
This script is started right before the tinc daemon quits.
|
||||||
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar HOST Ns Pa -up
|
||||||
|
This script is started when the tinc daemon with name
|
||||||
|
.Ar HOST
|
||||||
|
becomes reachable.
|
||||||
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar HOST Ns Pa -down
|
||||||
|
This script is started when the tinc daemon with name
|
||||||
|
.Ar HOST
|
||||||
|
becomes unreachable.
|
||||||
|
.El
|
||||||
|
.Pp
|
||||||
|
The scripts are started without command line arguments, but can make use of certain environment variables.
|
||||||
|
Under UNIX like operating systems the names of environment variables must be preceded by a
|
||||||
|
.Li $
|
||||||
|
in scripts.
|
||||||
|
Under Windows, in
|
||||||
|
.Pa .bat
|
||||||
|
files, they have to be put between
|
||||||
|
.Li %
|
||||||
|
signs.
|
||||||
|
.Bl -tag -width indent
|
||||||
|
.It Ev NETNAME
|
||||||
|
If a netname was specified, this environment variable contains it.
|
||||||
|
.It Ev NAME
|
||||||
|
Contains the name of this tinc daemon.
|
||||||
|
.It Ev DEVICE
|
||||||
|
Contains the name of the virtual network device that tinc uses.
|
||||||
|
.It Ev INTERFACE
|
||||||
|
Contains the name of the virtual network interface that tinc uses.
|
||||||
|
This should be used for commands like
|
||||||
|
.Pa ifconfig .
|
||||||
|
.It Ev NODE
|
||||||
|
When a host becomes (un)reachable, this is set to its name.
|
||||||
|
.It Ev REMOTEADDRESS
|
||||||
|
When a host becomes (un)reachable, this is set to its real address.
|
||||||
|
.It Ev REMOTEPORT
|
||||||
|
When a host becomes (un)reachable, this is set to the port number it uses for communication with other tinc daemons.
|
||||||
|
.El
|
||||||
|
.Sh FILES
|
||||||
|
The most important files are:
|
||||||
|
.Bl -tag -width indent
|
||||||
|
.It Pa @sysconfdir@/tinc/
|
||||||
The top directory for configuration files.
|
The top directory for configuration files.
|
||||||
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
|
||||||
The default name of the server configuration file for net
|
The default name of the server configuration file for net
|
||||||
.Ar NETNAME .
|
.Ar NETNAME .
|
||||||
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /hosts/
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/
|
||||||
Host configuration files are kept in this directory.
|
Host configuration files are kept in this directory.
|
||||||
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
|
||||||
If an executable file with this name exists,
|
If an executable file with this name exists,
|
||||||
it will be executed right after the tinc daemon has connected to the virtual network device.
|
it will be executed right after the tinc daemon has connected to the virtual network device.
|
||||||
It can be used to set up the corresponding network interface.
|
It can be used to set up the corresponding network interface.
|
||||||
.Pp
|
.It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-down
|
||||||
The environment variable
|
|
||||||
.Ev $NETNAME
|
|
||||||
will be passed to the executable.
|
|
||||||
If specified with the
|
|
||||||
.Va Interface
|
|
||||||
configuration variable,
|
|
||||||
or if the virtual network device is a Linux tun/tap device,
|
|
||||||
the environment variable
|
|
||||||
.Ev $INTERFACE
|
|
||||||
will be set to the name of the network interface.
|
|
||||||
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc-down
|
|
||||||
If an executable file with this name exists,
|
If an executable file with this name exists,
|
||||||
it will be executed right before the tinc daemon is going to close
|
it will be executed right before the tinc daemon is going to close
|
||||||
its connection to the virtual network device.
|
its connection to the virtual network device.
|
||||||
The same environment variables will be passed as mentioned above.
|
|
||||||
.El
|
.El
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr tincd 8 ,
|
.Xr tincd 8 ,
|
||||||
.Pa http://tinc.nl.linux.org/ ,
|
.Pa http://www.tinc-vpn.org/ ,
|
||||||
.Pa http://www.linuxdoc.org/LDP/nag2/ .
|
.Pa http://www.linuxdoc.org/LDP/nag2/ .
|
||||||
.Pp
|
.Pp
|
||||||
The full documentation for
|
The full documentation for
|
2440
doc/tinc.info
2440
doc/tinc.info
File diff suppressed because it is too large
Load diff
1317
doc/tinc.info-1
1317
doc/tinc.info-1
File diff suppressed because it is too large
Load diff
520
doc/tinc.info-2
520
doc/tinc.info-2
|
@ -1,520 +0,0 @@
|
||||||
This is tinc.info, produced by makeinfo version 4.1 from tinc.texi.
|
|
||||||
|
|
||||||
INFO-DIR-SECTION Networking tools
|
|
||||||
START-INFO-DIR-ENTRY
|
|
||||||
* tinc: (tinc). The tinc Manual.
|
|
||||||
END-INFO-DIR-ENTRY
|
|
||||||
|
|
||||||
This is the info manual for tinc, a Virtual Private Network daemon.
|
|
||||||
|
|
||||||
Copyright (C) 1998-2002 Ivo Timmermans <itimmermans@bigfoot.com>,
|
|
||||||
Guus Sliepen <guus@sliepen.warande.net> and Wessel Dankers
|
|
||||||
<wsl@nl.linux.org>.
|
|
||||||
|
|
||||||
$Id: tinc.texi,v 1.8.4.28 2002/04/09 11:43:29 guus Exp $
|
|
||||||
|
|
||||||
Permission is granted to make and distribute verbatim copies of this
|
|
||||||
manual provided the copyright notice and this permission notice are
|
|
||||||
preserved on all copies.
|
|
||||||
|
|
||||||
Permission is granted to copy and distribute modified versions of
|
|
||||||
this manual under the conditions for verbatim copying, provided that the
|
|
||||||
entire resulting derived work is distributed under the terms of a
|
|
||||||
permission notice identical to this one.
|
|
||||||
|
|
||||||
|
|
||||||
File: tinc.info, Node: The UDP tunnel, Next: The meta-connection, Prev: The connection, Up: The connection
|
|
||||||
|
|
||||||
The UDP tunnel
|
|
||||||
--------------
|
|
||||||
|
|
||||||
The data itself is read from a character device file, the so-called
|
|
||||||
_virtual network device_. This device is associated with a network
|
|
||||||
interface. Any data sent to this interface can be read from the device,
|
|
||||||
and any data written to the device gets sent from the interface. Data
|
|
||||||
to and from the device is formatted as if it were a normal Ethernet
|
|
||||||
card, so a frame is preceded by two MAC addresses and a _frame type_
|
|
||||||
field.
|
|
||||||
|
|
||||||
So when tinc reads an Ethernet frame from the device, it determines
|
|
||||||
its type. When tinc is in it's default routing mode, it can handle IPv4
|
|
||||||
and IPv6 packets. Depending on the Subnet lines, it will send the
|
|
||||||
packets off to their destination. In the `switch' and `hub' mode, tinc
|
|
||||||
will use broadcasts and MAC address discovery to deduce the destination
|
|
||||||
of the packets. Since the latter modes only depend on the link layer
|
|
||||||
information, any protocol that runs over Ethernet is supported (for
|
|
||||||
instance IPX and Appletalk).
|
|
||||||
|
|
||||||
After the destination has been determined, a sequence number will be
|
|
||||||
added to the packet. The packet will then be encrypted and a message
|
|
||||||
authentication code will be appended.
|
|
||||||
|
|
||||||
When that is done, time has come to actually transport the packet to
|
|
||||||
the destination computer. We do this by sending the packet over an UDP
|
|
||||||
connection to the destination host. This is called _encapsulating_,
|
|
||||||
the VPN packet (though now encrypted) is encapsulated in another IP
|
|
||||||
datagram.
|
|
||||||
|
|
||||||
When the destination receives this packet, the same thing happens,
|
|
||||||
only in reverse. So it checks the message authentication code,
|
|
||||||
decrypts the contents of the UDP datagram, checks the sequence number
|
|
||||||
and writes the decrypted information to its own virtual network device.
|
|
||||||
|
|
||||||
To let the kernel on the receiving end accept the packet, the
|
|
||||||
destination MAC address must match that of the virtual network
|
|
||||||
interface. If tinc is in it's default routing mode, ARP does not work,
|
|
||||||
so the correct destination MAC cannot be set by the sending daemons.
|
|
||||||
tinc solves this by always overwriting the destination MAC address with
|
|
||||||
fe:fd:0:0:0:0. That is also the reason why you must set the MAC address
|
|
||||||
of your tap interface to that address.
|
|
||||||
|
|
||||||
|
|
||||||
File: tinc.info, Node: The meta-connection, Prev: The UDP tunnel, Up: The connection
|
|
||||||
|
|
||||||
The meta-connection
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
Having only an UDP connection available is not enough. Though
|
|
||||||
suitable for transmitting data, we want to be able to reliably send
|
|
||||||
other information, such as routing and session key information to
|
|
||||||
somebody.
|
|
||||||
|
|
||||||
TCP is a better alternative, because it already contains protection
|
|
||||||
against information being lost, unlike UDP.
|
|
||||||
|
|
||||||
So we establish two connections. One for the encrypted VPN data,
|
|
||||||
and one for other information, the meta-data. Hence, we call the second
|
|
||||||
connection the meta-connection. We can now be sure that the
|
|
||||||
meta-information doesn't get lost on the way to another computer.
|
|
||||||
|
|
||||||
Like with any communication, we must have a protocol, so that
|
|
||||||
everybody knows what everything stands for, and how she should react.
|
|
||||||
Because we have two connections, we also have two protocols. The
|
|
||||||
protocol used for the UDP data is the "data-protocol," the other one is
|
|
||||||
the "meta-protocol."
|
|
||||||
|
|
||||||
The reason we don't use TCP for both protocols is that UDP is much
|
|
||||||
better for encapsulation, even while it is less reliable. The real
|
|
||||||
problem is that when TCP would be used to encapsulate a TCP stream
|
|
||||||
that's on the private network, for every packet sent there would be
|
|
||||||
three ACKs sent instead of just one. Furthermore, if there would be a
|
|
||||||
timeout, both TCP streams would sense the timeout, and both would start
|
|
||||||
re-sending packets.
|
|
||||||
|
|
||||||
|
|
||||||
File: tinc.info, Node: The meta-protocol, Next: Security, Prev: The connection, Up: Technical information
|
|
||||||
|
|
||||||
The meta-protocol
|
|
||||||
=================
|
|
||||||
|
|
||||||
The meta protocol is used to tie all tinc daemons together, and
|
|
||||||
exchange information about which tinc daemon serves which virtual
|
|
||||||
subnet.
|
|
||||||
|
|
||||||
The meta protocol consists of requests that can be sent to the other
|
|
||||||
side. Each request has a unique number and several parameters. All
|
|
||||||
requests are represented in the standard ASCII character set. It is
|
|
||||||
possible to use tools such as telnet or netcat to connect to a tinc
|
|
||||||
daemon and to read and write requests by hand, provided that one
|
|
||||||
understands the numeric codes sent.
|
|
||||||
|
|
||||||
The authentication scheme is described in *Note Authentication
|
|
||||||
protocol::. After a successful authentication, the server and the
|
|
||||||
client will exchange all the information about other tinc daemons and
|
|
||||||
subnets they know of, so that both sides (and all the other tinc
|
|
||||||
daemons behind them) have their information synchronised.
|
|
||||||
|
|
||||||
daemon message
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
origin ADD_EDGE node1 12.23.34.45 655 node2 21.32.43.54 655 222 0
|
|
||||||
| | | \___________________/ | +-> options
|
|
||||||
| | | | +----> weight
|
|
||||||
| | | +----------------> see below
|
|
||||||
| | +--> UDP port
|
|
||||||
| +----------> real address
|
|
||||||
+------------------> name of node on one side of the edge
|
|
||||||
|
|
||||||
origin ADD_SUBNET node 192.168.1.0/24
|
|
||||||
| | +--> prefixlength
|
|
||||||
| +--------> IPv4 network address
|
|
||||||
+------------------> owner of this subnet
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
In case a connection between two daemons is closed or broken,
|
|
||||||
DEL_EDGE messages are sent to inform the other daemons of that fact.
|
|
||||||
Each daemon will calculate a new route to the the daemons, or mark them
|
|
||||||
unreachable if there isn't any.
|
|
||||||
|
|
||||||
The keys used to encrypt VPN packets are not sent out directly. This
|
|
||||||
is because it would generate a lot of traffic on VPNs with many
|
|
||||||
daemons, and chances are that not every tinc daemon will ever send a
|
|
||||||
packet to every other daemon. Instead, if a daemon needs a key it sends
|
|
||||||
a request for it via the meta connection of the nearest hop in the
|
|
||||||
direction of the destination. If any hop on the way has already learned
|
|
||||||
the key, it will act as a proxy and forward its copy back to the
|
|
||||||
requester.
|
|
||||||
|
|
||||||
daemon message
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
daemon REQ_KEY origin destination
|
|
||||||
| +--> name of the tinc daemon it wants the key from
|
|
||||||
+----------> name of the daemon that wants the key
|
|
||||||
|
|
||||||
daemon ANS_KEY origin destination 4ae0b0a82d6e0078 91 64 4
|
|
||||||
| | \______________/ | | +--> MAC length
|
|
||||||
| | | | +-----> digest algorithm
|
|
||||||
| | | +--------> cipher algorithm
|
|
||||||
| | +--> 128 bits key
|
|
||||||
| +--> name of the daemon that wants the key
|
|
||||||
+----------> name of the daemon that uses this key
|
|
||||||
|
|
||||||
daemon KEY_CHANGED origin
|
|
||||||
+--> daemon that has changed it's packet key
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
There is also a mechanism to check if hosts are still alive. Since
|
|
||||||
network failures or a crash can cause a daemon to be killed without
|
|
||||||
properly shutting down the TCP connection, this is necessary to keep an
|
|
||||||
up to date connection list. PINGs are sent at regular intervals, except
|
|
||||||
when there is also some other traffic. A little bit of salt (random
|
|
||||||
data) is added with each PING and PONG message, to make sure that long
|
|
||||||
sequences of PING/PONG messages without any other traffic won't result
|
|
||||||
in known plaintext.
|
|
||||||
|
|
||||||
daemon message
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
origin PING
|
|
||||||
dest. PONG
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
This basically covers what is sent over the meta connection by tinc.
|
|
||||||
|
|
||||||
|
|
||||||
File: tinc.info, Node: Security, Prev: The meta-protocol, Up: Technical information
|
|
||||||
|
|
||||||
About tinc's encryption and other security-related issues.
|
|
||||||
==========================================================
|
|
||||||
|
|
||||||
tinc got its name from "TINC," short for _There Is No Cabal_; the
|
|
||||||
alleged Cabal was/is an organisation that was said to keep an eye on the
|
|
||||||
entire Internet. As this is exactly what you _don't_ want, we named
|
|
||||||
the tinc project after TINC.
|
|
||||||
|
|
||||||
But in order to be "immune" to eavesdropping, you'll have to encrypt
|
|
||||||
your data. Because tinc is a _Secure_ VPN (SVPN) daemon, it does
|
|
||||||
exactly that: encrypt. tinc by default uses blowfish encryption with
|
|
||||||
128 bit keys in CBC mode, 32 bit sequence numbers and 4 byte long
|
|
||||||
message authentication codes to make sure eavesdroppers cannot get and
|
|
||||||
cannot change any information at all from the packets they can
|
|
||||||
intercept. The encryption algorithm and message authentication
|
|
||||||
algorithm can be changed in the configuration. The length of the message
|
|
||||||
authentication codes is also adjustable. The length of the key for the
|
|
||||||
encryption algorithm is always the default length used by OpenSSL.
|
|
||||||
|
|
||||||
* Menu:
|
|
||||||
|
|
||||||
* Authentication protocol::
|
|
||||||
* Encryption of network packets::
|
|
||||||
|
|
||||||
|
|
||||||
File: tinc.info, Node: Authentication protocol, Next: Encryption of network packets, Prev: Security, Up: Security
|
|
||||||
|
|
||||||
Authentication protocol
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
A new scheme for authentication in tinc has been devised, which
|
|
||||||
offers some improvements over the protocol used in 1.0pre2 and 1.0pre3.
|
|
||||||
Explanation is below.
|
|
||||||
|
|
||||||
daemon message
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
client <attempts connection>
|
|
||||||
|
|
||||||
server <accepts connection>
|
|
||||||
|
|
||||||
client ID client 12
|
|
||||||
| +---> version
|
|
||||||
+-------> name of tinc daemon
|
|
||||||
|
|
||||||
server ID server 12
|
|
||||||
| +---> version
|
|
||||||
+-------> name of tinc daemon
|
|
||||||
|
|
||||||
client META_KEY 5f0823a93e35b69e...7086ec7866ce582b
|
|
||||||
\_________________________________/
|
|
||||||
+-> RSAKEYLEN bits totally random string S1,
|
|
||||||
encrypted with server's public RSA key
|
|
||||||
|
|
||||||
server META_KEY 6ab9c1640388f8f0...45d1a07f8a672630
|
|
||||||
\_________________________________/
|
|
||||||
+-> RSAKEYLEN bits totally random string S2,
|
|
||||||
encrypted with client's public RSA key
|
|
||||||
|
|
||||||
From now on:
|
|
||||||
- the client will symmetrically encrypt outgoing traffic using S1
|
|
||||||
- the server will symmetrically encrypt outgoing traffic using S2
|
|
||||||
|
|
||||||
client CHALLENGE da02add1817c1920989ba6ae2a49cecbda0
|
|
||||||
\_________________________________/
|
|
||||||
+-> CHALLEN bits totally random string H1
|
|
||||||
|
|
||||||
server CHALLENGE 57fb4b2ccd70d6bb35a64c142f47e61d57f
|
|
||||||
\_________________________________/
|
|
||||||
+-> CHALLEN bits totally random string H2
|
|
||||||
|
|
||||||
client CHAL_REPLY 816a86
|
|
||||||
+-> 160 bits SHA1 of H2
|
|
||||||
|
|
||||||
server CHAL_REPLY 928ffe
|
|
||||||
+-> 160 bits SHA1 of H1
|
|
||||||
|
|
||||||
After the correct challenge replies are received, both ends have proved
|
|
||||||
their identity. Further information is exchanged.
|
|
||||||
|
|
||||||
client ACK 655 12.23.34.45 123 0
|
|
||||||
| | | +-> options
|
|
||||||
| | +----> estimated weight
|
|
||||||
| +------------> IP address of server as seen by client
|
|
||||||
+--------------------> UDP port of client
|
|
||||||
|
|
||||||
server ACK 655 21.32.43.54 321 0
|
|
||||||
| | | +-> options
|
|
||||||
| | +----> estimated weight
|
|
||||||
| +------------> IP address of client as seen by server
|
|
||||||
+--------------------> UDP port of server
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
This new scheme has several improvements, both in efficiency and
|
|
||||||
security.
|
|
||||||
|
|
||||||
First of all, the server sends exactly the same kind of messages
|
|
||||||
over the wire as the client. The previous versions of tinc first
|
|
||||||
authenticated the client, and then the server. This scheme even allows
|
|
||||||
both sides to send their messages simultaneously, there is no need to
|
|
||||||
wait for the other to send something first. This means that any
|
|
||||||
calculations that need to be done upon sending or receiving a message
|
|
||||||
can also be done in parallel. This is especially important when doing
|
|
||||||
RSA encryption/decryption. Given that these calculations are the main
|
|
||||||
part of the CPU time spent for the authentication, speed is improved by
|
|
||||||
a factor 2.
|
|
||||||
|
|
||||||
Second, only one RSA encrypted message is sent instead of two. This
|
|
||||||
reduces the amount of information attackers can see (and thus use for a
|
|
||||||
cryptographic attack). It also improves speed by a factor two, making
|
|
||||||
the total speedup a factor 4.
|
|
||||||
|
|
||||||
Third, and most important: The symmetric cipher keys are exchanged
|
|
||||||
first, the challenge is done afterwards. In the previous authentication
|
|
||||||
scheme, because a man-in-the-middle could pass the challenge/chal_reply
|
|
||||||
phase (by just copying the messages between the two real tinc daemons),
|
|
||||||
but no information was exchanged that was really needed to read the
|
|
||||||
rest of the messages, the challenge/chal_reply phase was of no real
|
|
||||||
use. The man-in-the-middle was only stopped by the fact that only after
|
|
||||||
the ACK messages were encrypted with the symmetric cipher. Potentially,
|
|
||||||
it could even send it's own symmetric key to the server (if it knew the
|
|
||||||
server's public key) and read some of the metadata the server would
|
|
||||||
send it (it was impossible for the mitm to read actual network packets
|
|
||||||
though). The new scheme however prevents this.
|
|
||||||
|
|
||||||
This new scheme makes sure that first of all, symmetric keys are
|
|
||||||
exchanged. The rest of the messages are then encrypted with the
|
|
||||||
symmetric cipher. Then, each side can only read received messages if
|
|
||||||
they have their private key. The challenge is there to let the other
|
|
||||||
side know that the private key is really known, because a challenge
|
|
||||||
reply can only be sent back if the challenge is decrypted correctly,
|
|
||||||
and that can only be done with knowledge of the private key.
|
|
||||||
|
|
||||||
Fourth: the first thing that is send via the symmetric cipher
|
|
||||||
encrypted connection is a totally random string, so that there is no
|
|
||||||
known plaintext (for an attacker) in the beginning of the encrypted
|
|
||||||
stream.
|
|
||||||
|
|
||||||
|
|
||||||
File: tinc.info, Node: Encryption of network packets, Prev: Authentication protocol, Up: Security
|
|
||||||
|
|
||||||
Encryption of network packet
|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
A data packet can only be sent if the encryption key is known to both
|
|
||||||
parties, and the connection is activated. If the encryption key is not
|
|
||||||
known, a request is sent to the destination using the meta connection
|
|
||||||
to retrieve it. The packet is stored in a queue while waiting for the
|
|
||||||
key to arrive.
|
|
||||||
|
|
||||||
The UDP packet containing the network packet from the VPN has the
|
|
||||||
following layout:
|
|
||||||
|
|
||||||
... | IP header | UDP header | seqno | VPN packet | MAC | UDP trailer
|
|
||||||
\___________________/\_____/
|
|
||||||
| |
|
|
||||||
V +---> digest algorithm
|
|
||||||
Encrypted with symmetric cipher
|
|
||||||
|
|
||||||
So, the entire VPN packet is encrypted using a symmetric cipher. A
|
|
||||||
32 bits sequence number is added in front of the actual VPN packet, to
|
|
||||||
act as a unique IV for each packet and to prevent replay attacks. A
|
|
||||||
message authentication code is added to the UDP packet to prevent
|
|
||||||
alteration of packets. By default the first 4 bytes of the digest are
|
|
||||||
used for this, but this can be changed using the MACLength
|
|
||||||
configuration variable.
|
|
||||||
|
|
||||||
|
|
||||||
File: tinc.info, Node: About us, Next: Concept Index, Prev: Technical information, Up: Top
|
|
||||||
|
|
||||||
About us
|
|
||||||
********
|
|
||||||
|
|
||||||
* Menu:
|
|
||||||
|
|
||||||
* Contact Information::
|
|
||||||
* Authors::
|
|
||||||
|
|
||||||
|
|
||||||
File: tinc.info, Node: Contact Information, Next: Authors, Prev: About us, Up: About us
|
|
||||||
|
|
||||||
Contact information
|
|
||||||
===================
|
|
||||||
|
|
||||||
tinc's website is at <http://tinc.nl.linux.org/>, this server is
|
|
||||||
located in the Netherlands.
|
|
||||||
|
|
||||||
We have an IRC channel on the Open Projects IRC network. Connect to
|
|
||||||
irc.openprojects.net (http://openprojects.nu/services/irc.html), and
|
|
||||||
join channel #tinc.
|
|
||||||
|
|
||||||
|
|
||||||
File: tinc.info, Node: Authors, Prev: Contact Information, Up: About us
|
|
||||||
|
|
||||||
Authors
|
|
||||||
=======
|
|
||||||
|
|
||||||
Ivo Timmermans (zarq) (<itimmermans@bigfoot.com>)
|
|
||||||
Main coder/hacker and maintainer of the package.
|
|
||||||
|
|
||||||
Guus Sliepen (guus) (<guus@sliepen.warande.net>)
|
|
||||||
Originator of it all, co-author.
|
|
||||||
|
|
||||||
Wessel Dankers (Ubiq) (<wsl@nl.linux.org>)
|
|
||||||
For the name `tinc' and various suggestions.
|
|
||||||
|
|
||||||
We have received a lot of valuable input from users. With their
|
|
||||||
help, tinc has become the flexible and robust tool that it is today.
|
|
||||||
We have composed a list of contributions, in the file called `THANKS' in
|
|
||||||
the source distribution.
|
|
||||||
|
|
||||||
|
|
||||||
File: tinc.info, Node: Concept Index, Prev: About us, Up: Top
|
|
||||||
|
|
||||||
Concept Index
|
|
||||||
*************
|
|
||||||
|
|
||||||
* Menu:
|
|
||||||
|
|
||||||
* ACK: Authentication protocol.
|
|
||||||
* ADD_EDGE: The meta-protocol.
|
|
||||||
* ADD_SUBNET: The meta-protocol.
|
|
||||||
* Address: Host configuration variables.
|
|
||||||
* AddressFamily: Main configuration variables.
|
|
||||||
* ANS_KEY: The meta-protocol.
|
|
||||||
* arp <1>: Error messages.
|
|
||||||
* arp: Network interfaces.
|
|
||||||
* authentication: Authentication protocol.
|
|
||||||
* binary package: Building and installing tinc.
|
|
||||||
* BindToInterface: Main configuration variables.
|
|
||||||
* Cabal: Security.
|
|
||||||
* CHAL_REPLY: Authentication protocol.
|
|
||||||
* CHALLENGE: Authentication protocol.
|
|
||||||
* CIDR notation: Host configuration variables.
|
|
||||||
* Cipher: Host configuration variables.
|
|
||||||
* client: How connections work.
|
|
||||||
* command line: Runtime options.
|
|
||||||
* Compression: Host configuration variables.
|
|
||||||
* connection: The connection.
|
|
||||||
* ConnectTo: Main configuration variables.
|
|
||||||
* daemon: Running tinc.
|
|
||||||
* data-protocol: The meta-connection.
|
|
||||||
* Debian: Configuring the kernel.
|
|
||||||
* debug level: Runtime options.
|
|
||||||
* DEL_EDGE: The meta-protocol.
|
|
||||||
* Device: Main configuration variables.
|
|
||||||
* device files: Device files.
|
|
||||||
* Digest: Host configuration variables.
|
|
||||||
* encapsulating: The UDP tunnel.
|
|
||||||
* encryption: Encryption of network packets.
|
|
||||||
* ethertap: Configuring the kernel.
|
|
||||||
* example: Example configuration.
|
|
||||||
* frame type: The UDP tunnel.
|
|
||||||
* FreeBSD: Supported platforms.
|
|
||||||
* hardware address: Network interfaces.
|
|
||||||
* Hostnames: Main configuration variables.
|
|
||||||
* hub: Main configuration variables.
|
|
||||||
* ID: Authentication protocol.
|
|
||||||
* ifconfig: Network interfaces.
|
|
||||||
* IndirectData: Host configuration variables.
|
|
||||||
* Interface: Main configuration variables.
|
|
||||||
* IRC: Contact Information.
|
|
||||||
* Kernel-HOWTO: Configuring the kernel.
|
|
||||||
* key generation: Generating keypairs.
|
|
||||||
* KEY_CHANGED: The meta-protocol.
|
|
||||||
* KeyExpire: Main configuration variables.
|
|
||||||
* libraries: Libraries.
|
|
||||||
* license: OpenSSL.
|
|
||||||
* Linux: Supported platforms.
|
|
||||||
* MAC address: Network interfaces.
|
|
||||||
* MACExpire: Main configuration variables.
|
|
||||||
* MACLength: Host configuration variables.
|
|
||||||
* meta-protocol: The meta-connection.
|
|
||||||
* META_KEY: Authentication protocol.
|
|
||||||
* Mode: Main configuration variables.
|
|
||||||
* multiple networks: Multiple networks.
|
|
||||||
* Name: Main configuration variables.
|
|
||||||
* netlink_dev: Configuring the kernel.
|
|
||||||
* netmask: Network interfaces.
|
|
||||||
* netname: Multiple networks.
|
|
||||||
* Network Administrators Guide: Configuration introduction.
|
|
||||||
* OpenBSD: Supported platforms.
|
|
||||||
* OpenSSL: OpenSSL.
|
|
||||||
* options: Runtime options.
|
|
||||||
* PEM format: Host configuration variables.
|
|
||||||
* PING: The meta-protocol.
|
|
||||||
* PingTimeout: Main configuration variables.
|
|
||||||
* platforms: Supported platforms.
|
|
||||||
* PONG: The meta-protocol.
|
|
||||||
* Port: Host configuration variables.
|
|
||||||
* port numbers: Other files.
|
|
||||||
* PriorityInheritance: Main configuration variables.
|
|
||||||
* private: VPNs.
|
|
||||||
* PrivateKey: Main configuration variables.
|
|
||||||
* PrivateKeyFile: Main configuration variables.
|
|
||||||
* PublicKey: Host configuration variables.
|
|
||||||
* PublicKeyFile: Host configuration variables.
|
|
||||||
* RedHat: Configuring the kernel.
|
|
||||||
* release: Supported platforms.
|
|
||||||
* REQ_KEY: The meta-protocol.
|
|
||||||
* requirements: Libraries.
|
|
||||||
* router: Main configuration variables.
|
|
||||||
* runtime options: Runtime options.
|
|
||||||
* scalability: tinc.
|
|
||||||
* server: How connections work.
|
|
||||||
* Solaris: Supported platforms.
|
|
||||||
* Subnet: Host configuration variables.
|
|
||||||
* SVPN: Security.
|
|
||||||
* switch: Main configuration variables.
|
|
||||||
* TCP: The meta-connection.
|
|
||||||
* TCPonly: Host configuration variables.
|
|
||||||
* TINC: Security.
|
|
||||||
* tinc: Introduction.
|
|
||||||
* tinc-up: Network interfaces.
|
|
||||||
* tincd: tinc.
|
|
||||||
* Traditional VPNs: tinc.
|
|
||||||
* tun: Configuring the kernel.
|
|
||||||
* UDP <1>: Encryption of network packets.
|
|
||||||
* UDP: The UDP tunnel.
|
|
||||||
* virtual: VPNs.
|
|
||||||
* virtual network device: The UDP tunnel.
|
|
||||||
* VPN: VPNs.
|
|
||||||
* vpnd: tinc.
|
|
||||||
* website: Contact Information.
|
|
||||||
* zlib: zlib.
|
|
||||||
|
|
||||||
|
|
1397
doc/tinc.texi
1397
doc/tinc.texi
File diff suppressed because it is too large
Load diff
|
@ -1,22 +1,25 @@
|
||||||
.Dd 2002-03-25
|
.Dd 2002-03-25
|
||||||
.Dt TINCD 8
|
.Dt TINCD 8
|
||||||
.\" Manual page created by:
|
.\" Manual page created by:
|
||||||
.\" Ivo Timmermans <itimmermans@bigfoot.com>
|
.\" Ivo Timmermans <ivo@tinc-vpn.org>
|
||||||
.\" Guus Sliepen <guus@sliepen.warande.net>
|
.\" Guus Sliepen <guus@tinc-vpn.org>
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm tincd
|
.Nm tincd
|
||||||
.Nd tinc VPN daemon
|
.Nd tinc VPN daemon
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl cdDkKn
|
.Op Fl cdDkKnL
|
||||||
.Op Fl -bypass-security
|
|
||||||
.Op Fl -config Ns = Ns Ar DIR
|
.Op Fl -config Ns = Ns Ar DIR
|
||||||
.Op Fl -debug Ns = Ns Ar LEVEL
|
|
||||||
.Op Fl -generate-keys Ns Op = Ns Ar BITS
|
|
||||||
.Op Fl -help
|
|
||||||
.Op Fl -kill Ns = Ns Ar SIGNAL
|
|
||||||
.Op Fl -net Ns = Ns Ar NETNAME
|
|
||||||
.Op Fl -no-detach
|
.Op Fl -no-detach
|
||||||
|
.Op Fl -debug Ns Op = Ns Ar LEVEL
|
||||||
|
.Op Fl -kill Ns Op = Ns Ar SIGNAL
|
||||||
|
.Op Fl -net Ns = Ns Ar NETNAME
|
||||||
|
.Op Fl -generate-keys Ns Op = Ns Ar BITS
|
||||||
|
.Op Fl -mlock
|
||||||
|
.Op Fl -logfile Ns Op = Ns Ar FILE
|
||||||
|
.Op Fl -pidfile Ns = Ns Ar FILE
|
||||||
|
.Op Fl -bypass-security
|
||||||
|
.Op Fl -help
|
||||||
.Op Fl -version
|
.Op Fl -version
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
This is the daemon of tinc, a secure virtual private network (VPN) project.
|
This is the daemon of tinc, a secure virtual private network (VPN) project.
|
||||||
|
@ -31,37 +34,61 @@ If that succeeds,
|
||||||
it will detach from the controlling terminal and continue in the background,
|
it will detach from the controlling terminal and continue in the background,
|
||||||
accepting and setting up connections to other tinc daemons
|
accepting and setting up connections to other tinc daemons
|
||||||
that are part of the virtual private network.
|
that are part of the virtual private network.
|
||||||
|
Under Windows (not Cygwin) tinc will install itself as a service,
|
||||||
|
which will be restarted automatically after reboots.
|
||||||
.Sh OPTIONS
|
.Sh OPTIONS
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Fl -bypass-security
|
|
||||||
Disables encryption and authentication.
|
|
||||||
Only useful for debugging.
|
|
||||||
.It Fl c, -config Ns = Ns Ar DIR
|
.It Fl c, -config Ns = Ns Ar DIR
|
||||||
Read configuration options from
|
Read configuration files from
|
||||||
.Ar DIR .
|
.Ar DIR
|
||||||
|
instead of
|
||||||
|
.Pa @sysconfdir@/tinc/ .
|
||||||
|
.It Fl D, -no-detach
|
||||||
|
Don't fork and detach.
|
||||||
|
This will also disable the automatic restart mechanism for fatal errors.
|
||||||
|
If not mentioned otherwise, this will show log messages on the standard error output.
|
||||||
.It Fl d, -debug Ns Op = Ns Ar LEVEL
|
.It Fl d, -debug Ns Op = Ns Ar LEVEL
|
||||||
Increase debug level or set it to
|
Increase debug level or set it to
|
||||||
.Ar LEVEL
|
.Ar LEVEL
|
||||||
(see below).
|
(see below).
|
||||||
.It Fl K, -generate-keys Ns Op = Ns Ar BITS
|
|
||||||
Generate public/private RSA keypair and exit.
|
|
||||||
If
|
|
||||||
.Ar BITS
|
|
||||||
is omitted, the default length will be 1024 bits.
|
|
||||||
.It Fl -help
|
|
||||||
Display short list of options.
|
|
||||||
.It Fl k, -kill Ns Op = Ns Ar SIGNAL
|
.It Fl k, -kill Ns Op = Ns Ar SIGNAL
|
||||||
Attempt to kill a running
|
Attempt to kill a running
|
||||||
.Nm
|
.Nm
|
||||||
(optionally with the specified
|
(optionally with the specified
|
||||||
.Ar SIGNAL
|
.Ar SIGNAL
|
||||||
instead of SIGTERM) and exit.
|
instead of SIGTERM) and exit.
|
||||||
|
Under Windows (not Cygwin) the optional argument is ignored,
|
||||||
|
the service will always be stopped and removed.
|
||||||
.It Fl n, -net Ns = Ns Ar NETNAME
|
.It Fl n, -net Ns = Ns Ar NETNAME
|
||||||
Connect to net
|
Connect to net
|
||||||
.Ar NETNAME .
|
.Ar NETNAME .
|
||||||
.It Fl D, -no-detach
|
.It Fl K, -generate-keys Ns Op = Ns Ar BITS
|
||||||
Don't fork and detach.
|
Generate public/private RSA keypair and exit.
|
||||||
This will also disable the automatic restart mechanism for fatal errors.
|
If
|
||||||
|
.Ar BITS
|
||||||
|
is omitted, the default length will be 1024 bits.
|
||||||
|
When saving keys to existing files, tinc will not delete the old keys,
|
||||||
|
you have to remove them manually.
|
||||||
|
.It Fl L, -mlock
|
||||||
|
Lock tinc into main memory.
|
||||||
|
This will prevent sensitive data like shared private keys to be written to the system swap files/partitions.
|
||||||
|
.It Fl -logfile Ns Op = Ns Ar FILE
|
||||||
|
Write log entries to a file instead of to the system logging facility.
|
||||||
|
If
|
||||||
|
.Ar FILE
|
||||||
|
is omitted, the default is
|
||||||
|
.Pa @localstatedir@/log/tinc. Ns Ar NETNAME Ns Pa .log.
|
||||||
|
.It Fl -pidfile Ns = Ns Ar FILE
|
||||||
|
Write PID to
|
||||||
|
.Ar FILE
|
||||||
|
instead of
|
||||||
|
.Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid.
|
||||||
|
Under Windows this option will be ignored.
|
||||||
|
.It Fl -bypass-security
|
||||||
|
Disables encryption and authentication of the meta protocol.
|
||||||
|
Only useful for debugging.
|
||||||
|
.It Fl -help
|
||||||
|
Display short list of options.
|
||||||
.It Fl -version
|
.It Fl -version
|
||||||
Output version information and exit.
|
Output version information and exit.
|
||||||
.El
|
.El
|
||||||
|
@ -80,7 +107,11 @@ and if
|
||||||
didn't succeed to connect to an uplink the first time after it started,
|
didn't succeed to connect to an uplink the first time after it started,
|
||||||
it defaults to the maximum time of 15 minutes.
|
it defaults to the maximum time of 15 minutes.
|
||||||
.It HUP
|
.It HUP
|
||||||
Closes all connections, rereads the configuration file and restarts the daemon.
|
Partially rereads configuration files.
|
||||||
|
Connections to hosts whose host config file are removed are closed.
|
||||||
|
New outgoing connections specified in
|
||||||
|
.Pa tinc.conf
|
||||||
|
will be made.
|
||||||
.It INT
|
.It INT
|
||||||
Temporarily increases debug level to 5.
|
Temporarily increases debug level to 5.
|
||||||
Send this signal again to revert to the original level.
|
Send this signal again to revert to the original level.
|
||||||
|
@ -101,11 +132,11 @@ Each level inherits all messages of the previous level:
|
||||||
This will log a message indicating
|
This will log a message indicating
|
||||||
.Nm
|
.Nm
|
||||||
has started along with a version number.
|
has started along with a version number.
|
||||||
It will also any serious error.
|
It will also log any serious error.
|
||||||
.It 1
|
.It 1
|
||||||
This will log all connections that are made with other tinc daemons.
|
This will log all connections that are made with other tinc daemons.
|
||||||
.It 2
|
.It 2
|
||||||
This will log status and error messages from other tinc daemons.
|
This will log status and error messages from scripts and other tinc daemons.
|
||||||
.It 3
|
.It 3
|
||||||
This will log all requests that are exchanged with other tinc daemons. These include
|
This will log all requests that are exchanged with other tinc daemons. These include
|
||||||
authentication, key exchange and connection list updates.
|
authentication, key exchange and connection list updates.
|
||||||
|
@ -116,29 +147,11 @@ This will log all network traffic over the virtual private network.
|
||||||
.El
|
.El
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
|
.It Pa @sysconfdir@/tinc/
|
||||||
The configuration file for
|
Directory containing the configuration files tinc uses.
|
||||||
.Nm .
|
For more information, see
|
||||||
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
|
.Xr tinc.conf 5 .
|
||||||
Script which is executed as soon as the virtual network device has been allocated.
|
.It Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid
|
||||||
Purpose is to further configure that device.
|
|
||||||
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc-down
|
|
||||||
Script which is executed when
|
|
||||||
.Nm
|
|
||||||
exits.
|
|
||||||
Purpose is to cleanly shut down the virtual network device before it will be deallocated.
|
|
||||||
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /hosts/*
|
|
||||||
The directory containing the host configuration files
|
|
||||||
used to authenticate other tinc daemons.
|
|
||||||
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar NAME Ns Pa -up
|
|
||||||
Script which is executed as soon as host
|
|
||||||
.Ar NAME
|
|
||||||
becomes reachable.
|
|
||||||
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar NAME Ns Pa -down
|
|
||||||
Script which is executed as soon as host
|
|
||||||
.Ar NAME
|
|
||||||
becomes unreachable.
|
|
||||||
.It Pa /var/run/tinc. Ns Ar NETNAME Ns Pa .pid
|
|
||||||
The PID of the currently running
|
The PID of the currently running
|
||||||
.Nm
|
.Nm
|
||||||
is stored in this file.
|
is stored in this file.
|
||||||
|
@ -150,12 +163,12 @@ option may not work correctly.
|
||||||
.Pp
|
.Pp
|
||||||
.Sy The cryptography in tinc is not well tested yet. Use it at your own risk!
|
.Sy The cryptography in tinc is not well tested yet. Use it at your own risk!
|
||||||
.Pp
|
.Pp
|
||||||
If you find any bugs, report them to tinc@nl.linux.org.
|
If you find any bugs, report them to tinc@tinc-vpn.org.
|
||||||
.Sh TODO
|
.Sh TODO
|
||||||
A lot, especially security auditing.
|
A lot, especially security auditing.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr tinc.conf 5 ,
|
.Xr tinc.conf 5 ,
|
||||||
.Pa http://tinc.nl.linux.org/ ,
|
.Pa http://www.tinc-vpn.org/ ,
|
||||||
.Pa http://www.cabal.org/ .
|
.Pa http://www.cabal.org/ .
|
||||||
.Pp
|
.Pp
|
||||||
The full documentation for tinc is maintained as a Texinfo manual.
|
The full documentation for tinc is maintained as a Texinfo manual.
|
||||||
|
@ -168,7 +181,7 @@ tinc comes with ABSOLUTELY NO WARRANTY.
|
||||||
This is free software, and you are welcome to redistribute it under certain conditions;
|
This is free software, and you are welcome to redistribute it under certain conditions;
|
||||||
see the file COPYING for details.
|
see the file COPYING for details.
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
.An "Ivo Timmermans" Aq itimmermans@bigfoot.com
|
.An "Ivo Timmermans" Aq ivo@tinc-vpn.org
|
||||||
.An "Guus Sliepen" Aq guus@sliepen.warande.net
|
.An "Guus Sliepen" Aq guus@tinc-vpn.org
|
||||||
.Pp
|
.Pp
|
||||||
And thanks to many others for their contributions to tinc!
|
And thanks to many others for their contributions to tinc!
|
4
doc/tincinclude.texi.in
Normal file
4
doc/tincinclude.texi.in
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
@set VERSION @VERSION@
|
||||||
|
@set PACKAGE @PACKAGE@
|
||||||
|
@set sysconfdir @sysconfdir@
|
||||||
|
@set localstatedir @localstatedir@
|
164
have.h
Normal file
164
have.h
Normal file
|
@ -0,0 +1,164 @@
|
||||||
|
/*
|
||||||
|
have.h -- include headers which are known to exist
|
||||||
|
Copyright (C) 1998-2004 Ivo Timmermans <ivo@tinc-vpn.org>
|
||||||
|
2003-2004 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __TINC_HAVE_H__
|
||||||
|
#define __TINC_HAVE_H__
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_STDBOOL_H
|
||||||
|
#include <stdbool.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TERMIOS_H
|
||||||
|
#include <termios.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_INTTYPES_H
|
||||||
|
#include <inttypes.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Include system specific headers */
|
||||||
|
|
||||||
|
#ifdef HAVE_SYSLOG_H
|
||||||
|
#include <syslog.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_TIME_H
|
||||||
|
#include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_STAT_H
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_FILE_H
|
||||||
|
#include <sys/file.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_WAIT_H
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_IOCTL_H
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_UIO_H
|
||||||
|
#include <sys/uio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* SunOS really wants sys/socket.h BEFORE net/if.h,
|
||||||
|
and FreeBSD wants these lines below the rest. */
|
||||||
|
|
||||||
|
#ifdef HAVE_NETDB_H
|
||||||
|
#include <netdb.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NET_IF_H
|
||||||
|
#include <net/if.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NET_IF_TYPES_H
|
||||||
|
#include <net/if_types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NET_IF_TUN_H
|
||||||
|
#include <net/if_tun.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NET_IF_TAP_H
|
||||||
|
#include <net/if_tap.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||||
|
#include <netinet/in_systm.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_ARPA_INET_H
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_IP_H
|
||||||
|
#include <netinet/ip.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_TCP_H
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_IN6_H
|
||||||
|
#include <netinet/in6.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_IP6_H
|
||||||
|
#include <netinet/ip6.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NET_ETHERNET_H
|
||||||
|
#include <net/ethernet.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NET_IF_ARP_H
|
||||||
|
#include <net/if_arp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_IP_ICMP_H
|
||||||
|
#include <netinet/ip_icmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_ICMP6_H
|
||||||
|
#include <netinet/icmp6.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_IF_ETHER_H
|
||||||
|
#include <netinet/if_ether.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_MINGW
|
||||||
|
#include <windows.h>
|
||||||
|
#include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __TINC_SYSTEM_H__ */
|
484
install-sh
484
install-sh
|
@ -1,19 +1,38 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
|
||||||
# install - install a program, script, or datafile
|
# install - install a program, script, or datafile
|
||||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
|
||||||
|
scriptversion=2004-04-01.17
|
||||||
|
|
||||||
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
|
# following copyright and license.
|
||||||
#
|
#
|
||||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
# Copyright (C) 1994 X Consortium
|
||||||
#
|
#
|
||||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# documentation for any purpose is hereby granted without fee, provided that
|
# of this software and associated documentation files (the "Software"), to
|
||||||
# the above copyright notice appear in all copies and that both that
|
# deal in the Software without restriction, including without limitation the
|
||||||
# copyright notice and this permission notice appear in supporting
|
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
# sell copies of the Software, and to permit persons to whom the Software is
|
||||||
# publicity pertaining to distribution of the software without specific,
|
# furnished to do so, subject to the following conditions:
|
||||||
# written prior permission. M.I.T. makes no representations about the
|
#
|
||||||
# suitability of this software for any purpose. It is provided "as is"
|
# The above copyright notice and this permission notice shall be included in
|
||||||
# without express or implied warranty.
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||||
|
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
#
|
||||||
|
# Except as contained in this notice, the name of the X Consortium shall not
|
||||||
|
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||||
|
# ings in this Software without prior written authorization from the X Consor-
|
||||||
|
# tium.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# FSF changes to this file are in the public domain.
|
||||||
#
|
#
|
||||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
# `make' implicit rules from creating a file called install from it
|
# `make' implicit rules from creating a file called install from it
|
||||||
|
@ -23,13 +42,11 @@
|
||||||
# from scratch. It can only install one file at a time, a restriction
|
# from scratch. It can only install one file at a time, a restriction
|
||||||
# shared with many OS's install programs.
|
# shared with many OS's install programs.
|
||||||
|
|
||||||
|
|
||||||
# set DOITPROG to echo to test this script
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
doit="${DOITPROG-}"
|
doit="${DOITPROG-}"
|
||||||
|
|
||||||
|
|
||||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||||
|
|
||||||
mvprog="${MVPROG-mv}"
|
mvprog="${MVPROG-mv}"
|
||||||
|
@ -41,211 +58,268 @@ stripprog="${STRIPPROG-strip}"
|
||||||
rmprog="${RMPROG-rm}"
|
rmprog="${RMPROG-rm}"
|
||||||
mkdirprog="${MKDIRPROG-mkdir}"
|
mkdirprog="${MKDIRPROG-mkdir}"
|
||||||
|
|
||||||
transformbasename=""
|
transformbasename=
|
||||||
transform_arg=""
|
transform_arg=
|
||||||
instcmd="$mvprog"
|
instcmd="$mvprog"
|
||||||
chmodcmd="$chmodprog 0755"
|
chmodcmd="$chmodprog 0755"
|
||||||
chowncmd=""
|
chowncmd=
|
||||||
chgrpcmd=""
|
chgrpcmd=
|
||||||
stripcmd=""
|
stripcmd=
|
||||||
rmcmd="$rmprog -f"
|
rmcmd="$rmprog -f"
|
||||||
mvcmd="$mvprog"
|
mvcmd="$mvprog"
|
||||||
src=""
|
src=
|
||||||
dst=""
|
dst=
|
||||||
dir_arg=""
|
dir_arg=
|
||||||
|
|
||||||
while [ x"$1" != x ]; do
|
usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
|
||||||
case $1 in
|
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||||
-c) instcmd="$cpprog"
|
or: $0 -d DIRECTORIES...
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
-d) dir_arg=true
|
In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
|
||||||
shift
|
In the second, create the directory path DIR.
|
||||||
continue;;
|
|
||||||
|
|
||||||
-m) chmodcmd="$chmodprog $2"
|
Options:
|
||||||
shift
|
-b=TRANSFORMBASENAME
|
||||||
shift
|
-c copy source (using $cpprog) instead of moving (using $mvprog).
|
||||||
continue;;
|
-d create directories instead of installing files.
|
||||||
|
-g GROUP $chgrp installed files to GROUP.
|
||||||
|
-m MODE $chmod installed files to MODE.
|
||||||
|
-o USER $chown installed files to USER.
|
||||||
|
-s strip installed files (using $stripprog).
|
||||||
|
-t=TRANSFORM
|
||||||
|
--help display this help and exit.
|
||||||
|
--version display version info and exit.
|
||||||
|
|
||||||
-o) chowncmd="$chownprog $2"
|
Environment variables override the default commands:
|
||||||
shift
|
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
||||||
shift
|
"
|
||||||
continue;;
|
|
||||||
|
|
||||||
-g) chgrpcmd="$chgrpprog $2"
|
while test -n "$1"; do
|
||||||
shift
|
case $1 in
|
||||||
shift
|
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||||
continue;;
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
-s) stripcmd="$stripprog"
|
-c) instcmd=$cpprog
|
||||||
shift
|
shift
|
||||||
continue;;
|
continue;;
|
||||||
|
|
||||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
-d) dir_arg=true
|
||||||
shift
|
shift
|
||||||
continue;;
|
continue;;
|
||||||
|
|
||||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
shift
|
shift
|
||||||
continue;;
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
*) if [ x"$src" = x ]
|
--help) echo "$usage"; exit 0;;
|
||||||
then
|
|
||||||
src=$1
|
-m) chmodcmd="$chmodprog $2"
|
||||||
else
|
shift
|
||||||
# this colon is to work around a 386BSD /bin/sh bug
|
shift
|
||||||
:
|
continue;;
|
||||||
dst=$1
|
|
||||||
fi
|
-o) chowncmd="$chownprog $2"
|
||||||
shift
|
shift
|
||||||
continue;;
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-s) stripcmd=$stripprog
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
--version) echo "$0 $scriptversion"; exit 0;;
|
||||||
|
|
||||||
|
*) # When -d is used, all remaining arguments are directories to create.
|
||||||
|
test -n "$dir_arg" && break
|
||||||
|
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$dstarg"; then
|
||||||
|
# $@ is not empty: it contains at least $arg.
|
||||||
|
set fnord "$@" "$dstarg"
|
||||||
|
shift # fnord
|
||||||
|
fi
|
||||||
|
shift # arg
|
||||||
|
dstarg=$arg
|
||||||
|
done
|
||||||
|
break;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$1"; then
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
echo "$0: no input file specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# It's OK to call `install-sh -d' without argument.
|
||||||
|
# This can happen when creating conditional directories.
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
for src
|
||||||
|
do
|
||||||
|
# Protect names starting with `-'.
|
||||||
|
case $src in
|
||||||
|
-*) src=./$src ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
dst=$src
|
||||||
|
src=
|
||||||
|
|
||||||
|
if test -d "$dst"; then
|
||||||
|
instcmd=:
|
||||||
|
chmodcmd=
|
||||||
|
else
|
||||||
|
instcmd=$mkdirprog
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||||
|
# might cause directories to be created, which would be especially bad
|
||||||
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
if test ! -f "$src" && test ! -d "$src"; then
|
||||||
|
echo "$0: $src does not exist." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dstarg"; then
|
||||||
|
echo "$0: no destination specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dst=$dstarg
|
||||||
|
# Protect names starting with `-'.
|
||||||
|
case $dst in
|
||||||
|
-*) dst=./$dst ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; won't work
|
||||||
|
# if double slashes aren't ignored.
|
||||||
|
if test -d "$dst"; then
|
||||||
|
dst=$dst/`basename "$src"`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This sed command emulates the dirname command.
|
||||||
|
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||||
|
|
||||||
|
# Make sure that the destination directory exists.
|
||||||
|
|
||||||
|
# Skip lots of stat calls in the usual case.
|
||||||
|
if test ! -d "$dstdir"; then
|
||||||
|
defaultIFS='
|
||||||
|
'
|
||||||
|
IFS="${IFS-$defaultIFS}"
|
||||||
|
|
||||||
|
oIFS=$IFS
|
||||||
|
# Some sh's can't handle IFS=/ for some reason.
|
||||||
|
IFS='%'
|
||||||
|
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||||
|
IFS=$oIFS
|
||||||
|
|
||||||
|
pathcomp=
|
||||||
|
|
||||||
|
while test $# -ne 0 ; do
|
||||||
|
pathcomp=$pathcomp$1
|
||||||
|
shift
|
||||||
|
if test ! -d "$pathcomp"; then
|
||||||
|
$mkdirprog "$pathcomp" || lasterr=$?
|
||||||
|
# mkdir can fail with a `File exist' error in case several
|
||||||
|
# install-sh are creating the directory concurrently. This
|
||||||
|
# is OK.
|
||||||
|
test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; }
|
||||||
|
fi
|
||||||
|
pathcomp=$pathcomp/
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
$doit $instcmd "$dst" \
|
||||||
|
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
|
||||||
|
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
|
||||||
|
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
|
||||||
|
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
|
||||||
|
|
||||||
|
else
|
||||||
|
# If we're going to rename the final executable, determine the name now.
|
||||||
|
if test -z "$transformarg"; then
|
||||||
|
dstfile=`basename "$dst"`
|
||||||
|
else
|
||||||
|
dstfile=`basename "$dst" $transformbasename \
|
||||||
|
| sed $transformarg`$transformbasename
|
||||||
|
fi
|
||||||
|
|
||||||
|
# don't allow the sed command to completely eliminate the filename.
|
||||||
|
test -z "$dstfile" && dstfile=`basename "$dst"`
|
||||||
|
|
||||||
|
# Make a couple of temp file names in the proper directory.
|
||||||
|
dsttmp=$dstdir/_inst.$$_
|
||||||
|
rmtmp=$dstdir/_rm.$$_
|
||||||
|
|
||||||
|
# Trap to clean up those temp files at exit.
|
||||||
|
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||||
|
trap '(exit $?); exit' 1 2 13 15
|
||||||
|
|
||||||
|
# Move or copy the file name to the temp name
|
||||||
|
$doit $instcmd "$src" "$dsttmp" &&
|
||||||
|
|
||||||
|
# and set any options; do chmod last to preserve setuid bits.
|
||||||
|
#
|
||||||
|
# If any of these fail, we abort the whole thing. If we want to
|
||||||
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
|
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||||
|
#
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
||||||
|
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
||||||
|
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
||||||
|
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|
||||||
|
|| {
|
||||||
|
# The rename failed, perhaps because mv can't rename something else
|
||||||
|
# to itself, or perhaps because mv is so ancient that it does not
|
||||||
|
# support -f.
|
||||||
|
|
||||||
|
# Now remove or move aside any old file at destination location.
|
||||||
|
# We try this two ways since rm can't unlink itself on some
|
||||||
|
# systems and the destination file might be busy for other
|
||||||
|
# reasons. In this case, the final cleanup might fail but the new
|
||||||
|
# file should still install successfully.
|
||||||
|
{
|
||||||
|
if test -f "$dstdir/$dstfile"; then
|
||||||
|
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|
||||||
|
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|
||||||
|
|| {
|
||||||
|
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||||
|
(exit 1); exit
|
||||||
|
}
|
||||||
|
else
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
} &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fi || { (exit 1); exit; }
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ x"$src" = x ]
|
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||||
then
|
{
|
||||||
echo "install: no input file specified"
|
(exit 0); exit
|
||||||
exit 1
|
}
|
||||||
else
|
|
||||||
true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ x"$dir_arg" != x ]; then
|
# Local variables:
|
||||||
dst=$src
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
src=""
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
if [ -d $dst ]; then
|
# time-stamp-end: "$"
|
||||||
instcmd=:
|
# End:
|
||||||
chmodcmd=""
|
|
||||||
else
|
|
||||||
instcmd=mkdir
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
|
|
||||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
|
||||||
# might cause directories to be created, which would be especially bad
|
|
||||||
# if $src (and thus $dsttmp) contains '*'.
|
|
||||||
|
|
||||||
if [ -f $src -o -d $src ]
|
|
||||||
then
|
|
||||||
true
|
|
||||||
else
|
|
||||||
echo "install: $src does not exist"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ x"$dst" = x ]
|
|
||||||
then
|
|
||||||
echo "install: no destination specified"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If destination is a directory, append the input filename; if your system
|
|
||||||
# does not like double slashes in filenames, you may need to add some logic
|
|
||||||
|
|
||||||
if [ -d $dst ]
|
|
||||||
then
|
|
||||||
dst="$dst"/`basename $src`
|
|
||||||
else
|
|
||||||
true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
## this sed command emulates the dirname command
|
|
||||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
|
||||||
|
|
||||||
# Make sure that the destination directory exists.
|
|
||||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
|
||||||
|
|
||||||
# Skip lots of stat calls in the usual case.
|
|
||||||
if [ ! -d "$dstdir" ]; then
|
|
||||||
defaultIFS='
|
|
||||||
'
|
|
||||||
IFS="${IFS-${defaultIFS}}"
|
|
||||||
|
|
||||||
oIFS="${IFS}"
|
|
||||||
# Some sh's can't handle IFS=/ for some reason.
|
|
||||||
IFS='%'
|
|
||||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
|
||||||
IFS="${oIFS}"
|
|
||||||
|
|
||||||
pathcomp=''
|
|
||||||
|
|
||||||
while [ $# -ne 0 ] ; do
|
|
||||||
pathcomp="${pathcomp}${1}"
|
|
||||||
shift
|
|
||||||
|
|
||||||
if [ ! -d "${pathcomp}" ] ;
|
|
||||||
then
|
|
||||||
$mkdirprog "${pathcomp}"
|
|
||||||
else
|
|
||||||
true
|
|
||||||
fi
|
|
||||||
|
|
||||||
pathcomp="${pathcomp}/"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ x"$dir_arg" != x ]
|
|
||||||
then
|
|
||||||
$doit $instcmd $dst &&
|
|
||||||
|
|
||||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
|
||||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
|
||||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
|
||||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
|
||||||
else
|
|
||||||
|
|
||||||
# If we're going to rename the final executable, determine the name now.
|
|
||||||
|
|
||||||
if [ x"$transformarg" = x ]
|
|
||||||
then
|
|
||||||
dstfile=`basename $dst`
|
|
||||||
else
|
|
||||||
dstfile=`basename $dst $transformbasename |
|
|
||||||
sed $transformarg`$transformbasename
|
|
||||||
fi
|
|
||||||
|
|
||||||
# don't allow the sed command to completely eliminate the filename
|
|
||||||
|
|
||||||
if [ x"$dstfile" = x ]
|
|
||||||
then
|
|
||||||
dstfile=`basename $dst`
|
|
||||||
else
|
|
||||||
true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make a temp file name in the proper directory.
|
|
||||||
|
|
||||||
dsttmp=$dstdir/#inst.$$#
|
|
||||||
|
|
||||||
# Move or copy the file name to the temp name
|
|
||||||
|
|
||||||
$doit $instcmd $src $dsttmp &&
|
|
||||||
|
|
||||||
trap "rm -f ${dsttmp}" 0 &&
|
|
||||||
|
|
||||||
# and set any options; do chmod last to preserve setuid bits
|
|
||||||
|
|
||||||
# If any of these fail, we abort the whole thing. If we want to
|
|
||||||
# ignore errors from any of these, just make sure not to ignore
|
|
||||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
|
||||||
|
|
||||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
|
||||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
|
||||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
|
||||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
|
||||||
|
|
||||||
# Now rename the file to the real destination.
|
|
||||||
|
|
||||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
|
||||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
|
||||||
|
|
||||||
fi &&
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
2001-09-13 GNU <bug-gnu-utils@gnu.org>
|
|
||||||
|
|
||||||
* Version 0.10.40 released.
|
|
||||||
|
|
313
intl/Makefile.in
313
intl/Makefile.in
|
@ -1,313 +0,0 @@
|
||||||
# Makefile for directory with message catalog handling in GNU NLS Utilities.
|
|
||||||
# Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU Library General Public License as published
|
|
||||||
# by the Free Software Foundation; either version 2, 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
|
|
||||||
# Library General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Library General Public
|
|
||||||
# License along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
# USA.
|
|
||||||
|
|
||||||
PACKAGE = @PACKAGE@
|
|
||||||
VERSION = @VERSION@
|
|
||||||
|
|
||||||
SHELL = /bin/sh
|
|
||||||
|
|
||||||
srcdir = @srcdir@
|
|
||||||
top_srcdir = @top_srcdir@
|
|
||||||
top_builddir = ..
|
|
||||||
VPATH = @srcdir@
|
|
||||||
|
|
||||||
prefix = @prefix@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
transform = @program_transform_name@
|
|
||||||
libdir = @libdir@
|
|
||||||
includedir = @includedir@
|
|
||||||
datadir = @datadir@
|
|
||||||
localedir = $(datadir)/locale
|
|
||||||
gettextsrcdir = $(datadir)/gettext/intl
|
|
||||||
aliaspath = $(localedir)
|
|
||||||
subdir = intl
|
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
|
||||||
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
|
|
||||||
|
|
||||||
l = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
|
||||||
|
|
||||||
AR = ar
|
|
||||||
CC = @CC@
|
|
||||||
LIBTOOL = @LIBTOOL@
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
YACC = @INTLBISON@ -y -d
|
|
||||||
YFLAGS = --name-prefix=__gettext
|
|
||||||
|
|
||||||
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
|
|
||||||
-DLIBDIR=\"$(libdir)\" @DEFS@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
|
|
||||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
|
||||||
|
|
||||||
HEADERS = $(COMHDRS) libgnuintl.h libgettext.h loadinfo.h
|
|
||||||
COMHDRS = gettext.h gettextP.h hash-string.h
|
|
||||||
SOURCES = $(COMSRCS) intl-compat.c
|
|
||||||
COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
|
|
||||||
finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
|
|
||||||
explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
|
|
||||||
localcharset.c
|
|
||||||
OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
|
|
||||||
finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
|
|
||||||
explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
|
|
||||||
plural.$lo localcharset.$lo
|
|
||||||
GETTOBJS = intl-compat.$lo
|
|
||||||
DISTFILES.common = Makefile.in \
|
|
||||||
config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
|
|
||||||
DISTFILES.generated = plural.c
|
|
||||||
DISTFILES.normal = VERSION
|
|
||||||
DISTFILES.gettext = COPYING.LIB-2 COPYING.LIB-2.1 libintl.glibc
|
|
||||||
DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c
|
|
||||||
|
|
||||||
# Libtool's library version information for libintl.
|
|
||||||
# Before making a gettext release, the gettext maintainer must change this
|
|
||||||
# according to the libtool documentation, section "Library interface versions".
|
|
||||||
# Maintainers of other packages that include the intl directory must *not*
|
|
||||||
# change these values.
|
|
||||||
LTV_CURRENT=1
|
|
||||||
LTV_REVISION=1
|
|
||||||
LTV_AGE=0
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
.SUFFIXES: .c .y .o .lo .sin .sed
|
|
||||||
.c.o:
|
|
||||||
$(COMPILE) $<
|
|
||||||
.c.lo:
|
|
||||||
$(LIBTOOL) --mode=compile $(COMPILE) $<
|
|
||||||
|
|
||||||
.y.c:
|
|
||||||
$(YACC) $(YFLAGS) --output $@ $<
|
|
||||||
rm -f $*.h
|
|
||||||
|
|
||||||
.sin.sed:
|
|
||||||
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
|
|
||||||
mv t-$@ $@
|
|
||||||
|
|
||||||
INCLUDES = -I.. -I. -I$(top_srcdir)/intl
|
|
||||||
|
|
||||||
all: all-@USE_INCLUDED_LIBINTL@
|
|
||||||
all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
|
|
||||||
all-no: all-no-@BUILD_INCLUDED_LIBINTL@
|
|
||||||
all-no-yes: libgnuintl.$la
|
|
||||||
all-no-no:
|
|
||||||
|
|
||||||
libintl.a libgnuintl.a: $(OBJECTS)
|
|
||||||
rm -f $@
|
|
||||||
$(AR) cru $@ $(OBJECTS)
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
libintl.la libgnuintl.la: $(OBJECTS)
|
|
||||||
$(LIBTOOL) --mode=link \
|
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
|
|
||||||
$(OBJECTS) @LIBICONV@ \
|
|
||||||
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
|
|
||||||
-rpath $(libdir) \
|
|
||||||
-no-undefined
|
|
||||||
|
|
||||||
libintl.h: libgnuintl.h
|
|
||||||
cp $(srcdir)/libgnuintl.h libintl.h
|
|
||||||
|
|
||||||
charset.alias: config.charset
|
|
||||||
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
|
|
||||||
mv t-$@ $@
|
|
||||||
|
|
||||||
check: all
|
|
||||||
|
|
||||||
# This installation goal is only used in GNU gettext. Packages which
|
|
||||||
# only use the library should use install instead.
|
|
||||||
|
|
||||||
# We must not install the libintl.h/libintl.a files if we are on a
|
|
||||||
# system which has the GNU gettext() function in its C library or in a
|
|
||||||
# separate library.
|
|
||||||
# If you want to use the one which comes with this version of the
|
|
||||||
# package, you have to use `configure --with-included-gettext'.
|
|
||||||
install: install-exec install-data
|
|
||||||
install-exec: all
|
|
||||||
if test "$(PACKAGE)" = "gettext" \
|
|
||||||
&& test '@INTLOBJS@' = '$(GETTOBJS)'; then \
|
|
||||||
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
|
|
||||||
$(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
|
|
||||||
$(LIBTOOL) --mode=install \
|
|
||||||
$(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
|
|
||||||
else \
|
|
||||||
: ; \
|
|
||||||
fi
|
|
||||||
if test '@USE_INCLUDED_LIBINTL@' = yes; then \
|
|
||||||
$(mkinstalldirs) $(DESTDIR)$(libdir); \
|
|
||||||
temp=$(DESTDIR)$(libdir)/t-charset.alias; \
|
|
||||||
dest=$(DESTDIR)$(libdir)/charset.alias; \
|
|
||||||
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
|
|
||||||
orig=$(DESTDIR)$(libdir)/charset.alias; \
|
|
||||||
sed -f ref-add.sed $$orig > $$temp; \
|
|
||||||
$(INSTALL_DATA) $$temp $$dest; \
|
|
||||||
rm -f $$temp; \
|
|
||||||
else \
|
|
||||||
if test @GLIBC21@ = no; then \
|
|
||||||
orig=charset.alias; \
|
|
||||||
sed -f ref-add.sed $$orig > $$temp; \
|
|
||||||
$(INSTALL_DATA) $$temp $$dest; \
|
|
||||||
rm -f $$temp; \
|
|
||||||
fi; \
|
|
||||||
fi; \
|
|
||||||
$(mkinstalldirs) $(DESTDIR)$(localedir); \
|
|
||||||
test -f $(DESTDIR)$(localedir)/locale.alias \
|
|
||||||
&& orig=$(DESTDIR)$(localedir)/locale.alias \
|
|
||||||
|| orig=$(srcdir)/locale.alias; \
|
|
||||||
temp=$(DESTDIR)$(localedir)/t-locale.alias; \
|
|
||||||
dest=$(DESTDIR)$(localedir)/locale.alias; \
|
|
||||||
sed -f ref-add.sed $$orig > $$temp; \
|
|
||||||
$(INSTALL_DATA) $$temp $$dest; \
|
|
||||||
rm -f $$temp; \
|
|
||||||
else \
|
|
||||||
: ; \
|
|
||||||
fi
|
|
||||||
install-data: all
|
|
||||||
if test "$(PACKAGE)" = "gettext"; then \
|
|
||||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
|
||||||
$(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
|
|
||||||
$(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
|
|
||||||
dists="COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common)"; \
|
|
||||||
for file in $$dists; do \
|
|
||||||
$(INSTALL_DATA) $(srcdir)/$$file \
|
|
||||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
|
||||||
done; \
|
|
||||||
chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
|
|
||||||
dists="$(DISTFILES.generated)"; \
|
|
||||||
for file in $$dists; do \
|
|
||||||
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
|
|
||||||
$(INSTALL_DATA) $$dir/$$file \
|
|
||||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
|
||||||
done; \
|
|
||||||
dists="$(DISTFILES.obsolete)"; \
|
|
||||||
for file in $$dists; do \
|
|
||||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
|
||||||
done; \
|
|
||||||
else \
|
|
||||||
: ; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define this as empty until I found a useful application.
|
|
||||||
installcheck:
|
|
||||||
|
|
||||||
uninstall:
|
|
||||||
if test "$(PACKAGE)" = "gettext" \
|
|
||||||
&& test '@INTLOBJS@' = '$(GETTOBJS)'; then \
|
|
||||||
rm -f $(DESTDIR)$(includedir)/libintl.h; \
|
|
||||||
$(LIBTOOL) --mode=uninstall \
|
|
||||||
rm -f $(DESTDIR)$(libdir)/libintl.$la; \
|
|
||||||
else \
|
|
||||||
: ; \
|
|
||||||
fi
|
|
||||||
if test '@USE_INCLUDED_LIBINTL@' = yes; then \
|
|
||||||
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
|
|
||||||
temp=$(DESTDIR)$(libdir)/t-charset.alias; \
|
|
||||||
dest=$(DESTDIR)$(libdir)/charset.alias; \
|
|
||||||
sed -f ref-del.sed $$dest > $$temp; \
|
|
||||||
if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
|
|
||||||
rm -f $$dest; \
|
|
||||||
else \
|
|
||||||
$(INSTALL_DATA) $$temp $$dest; \
|
|
||||||
fi; \
|
|
||||||
rm -f $$temp; \
|
|
||||||
fi; \
|
|
||||||
if test -f $(DESTDIR)$(localedir)/locale.alias; then \
|
|
||||||
temp=$(DESTDIR)$(localedir)/t-locale.alias; \
|
|
||||||
dest=$(DESTDIR)$(localedir)/locale.alias; \
|
|
||||||
sed -f ref-del.sed $$dest > $$temp; \
|
|
||||||
if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
|
|
||||||
rm -f $$dest; \
|
|
||||||
else \
|
|
||||||
$(INSTALL_DATA) $$temp $$dest; \
|
|
||||||
fi; \
|
|
||||||
rm -f $$temp; \
|
|
||||||
fi; \
|
|
||||||
else \
|
|
||||||
: ; \
|
|
||||||
fi
|
|
||||||
if test "$(PACKAGE)" = "gettext"; then \
|
|
||||||
for file in VERSION ChangeLog COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
|
|
||||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
|
||||||
done; \
|
|
||||||
else \
|
|
||||||
: ; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
info dvi:
|
|
||||||
|
|
||||||
$(OBJECTS): ../config.h libgnuintl.h
|
|
||||||
bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
|
|
||||||
dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
|
|
||||||
|
|
||||||
tags: TAGS
|
|
||||||
|
|
||||||
TAGS: $(HEADERS) $(SOURCES)
|
|
||||||
here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
|
|
||||||
|
|
||||||
id: ID
|
|
||||||
|
|
||||||
ID: $(HEADERS) $(SOURCES)
|
|
||||||
here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
|
|
||||||
|
|
||||||
|
|
||||||
mostlyclean:
|
|
||||||
rm -f *.a *.la *.o *.lo core core.*
|
|
||||||
rm -f libintl.h charset.alias ref-add.sed ref-del.sed
|
|
||||||
rm -f -r .libs _libs
|
|
||||||
|
|
||||||
clean: mostlyclean
|
|
||||||
|
|
||||||
distclean: clean
|
|
||||||
rm -f Makefile ID TAGS
|
|
||||||
if test "$(PACKAGE)" = gettext; then \
|
|
||||||
rm -f ChangeLog.inst $(DISTFILES.normal); \
|
|
||||||
else \
|
|
||||||
: ; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
maintainer-clean: distclean
|
|
||||||
@echo "This command is intended for maintainers to use;"
|
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
|
||||||
|
|
||||||
|
|
||||||
# GNU gettext needs not contain the file `VERSION' but contains some
|
|
||||||
# other files which should not be distributed in other packages.
|
|
||||||
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
|
||||||
dist distdir: Makefile
|
|
||||||
if test "$(PACKAGE)" = gettext; then \
|
|
||||||
additional="$(DISTFILES.gettext)"; \
|
|
||||||
else \
|
|
||||||
additional="$(DISTFILES.normal)"; \
|
|
||||||
fi; \
|
|
||||||
$(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
|
|
||||||
for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
|
|
||||||
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
|
|
||||||
ln $$dir/$$file $(distdir) 2> /dev/null \
|
|
||||||
|| cp -p $$dir/$$file $(distdir); \
|
|
||||||
done
|
|
||||||
|
|
||||||
Makefile: Makefile.in ../config.status
|
|
||||||
cd .. \
|
|
||||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
|
||||||
.NOEXPORT:
|
|
|
@ -1 +0,0 @@
|
||||||
GNU gettext library from gettext-0.10.40
|
|
|
@ -1,369 +0,0 @@
|
||||||
/* Implementation of the bindtextdomain(3) function
|
|
||||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include <libintl.h>
|
|
||||||
#else
|
|
||||||
# include "libgnuintl.h"
|
|
||||||
#endif
|
|
||||||
#include "gettextP.h"
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* We have to handle multi-threaded applications. */
|
|
||||||
# include <bits/libc-lock.h>
|
|
||||||
#else
|
|
||||||
/* Provide dummy implementation if this is outside glibc. */
|
|
||||||
# define __libc_rwlock_define(CLASS, NAME)
|
|
||||||
# define __libc_rwlock_wrlock(NAME)
|
|
||||||
# define __libc_rwlock_unlock(NAME)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The internal variables in the standalone libintl.a must have different
|
|
||||||
names than the internal variables in GNU libc, otherwise programs
|
|
||||||
using libintl.a cannot be linked statically. */
|
|
||||||
#if !defined _LIBC
|
|
||||||
# define _nl_default_dirname _nl_default_dirname__
|
|
||||||
# define _nl_domain_bindings _nl_domain_bindings__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
|
|
||||||
#ifndef offsetof
|
|
||||||
# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
/* Contains the default location of the message catalogs. */
|
|
||||||
extern const char _nl_default_dirname[];
|
|
||||||
|
|
||||||
/* List with bindings of specific domains. */
|
|
||||||
extern struct binding *_nl_domain_bindings;
|
|
||||||
|
|
||||||
/* Lock variable to protect the global data in the gettext implementation. */
|
|
||||||
__libc_rwlock_define (extern, _nl_state_lock)
|
|
||||||
|
|
||||||
|
|
||||||
/* Names for the libintl functions are a problem. They must not clash
|
|
||||||
with existing names and they should follow ANSI C. But this source
|
|
||||||
code is also used in GNU C Library where the names have a __
|
|
||||||
prefix. So we have to make a difference here. */
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define BINDTEXTDOMAIN __bindtextdomain
|
|
||||||
# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
|
|
||||||
# ifndef strdup
|
|
||||||
# define strdup(str) __strdup (str)
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define BINDTEXTDOMAIN bindtextdomain__
|
|
||||||
# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Prototypes for local functions. */
|
|
||||||
static void set_binding_values PARAMS ((const char *domainname,
|
|
||||||
const char **dirnamep,
|
|
||||||
const char **codesetp));
|
|
||||||
|
|
||||||
/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
|
|
||||||
to be used for the DOMAINNAME message catalog.
|
|
||||||
If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
|
|
||||||
modified, only the current value is returned.
|
|
||||||
If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
|
|
||||||
modified nor returned. */
|
|
||||||
static void
|
|
||||||
set_binding_values (domainname, dirnamep, codesetp)
|
|
||||||
const char *domainname;
|
|
||||||
const char **dirnamep;
|
|
||||||
const char **codesetp;
|
|
||||||
{
|
|
||||||
struct binding *binding;
|
|
||||||
int modified;
|
|
||||||
|
|
||||||
/* Some sanity checks. */
|
|
||||||
if (domainname == NULL || domainname[0] == '\0')
|
|
||||||
{
|
|
||||||
if (dirnamep)
|
|
||||||
*dirnamep = NULL;
|
|
||||||
if (codesetp)
|
|
||||||
*codesetp = NULL;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
__libc_rwlock_wrlock (_nl_state_lock);
|
|
||||||
|
|
||||||
modified = 0;
|
|
||||||
|
|
||||||
for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
|
|
||||||
{
|
|
||||||
int compare = strcmp (domainname, binding->domainname);
|
|
||||||
if (compare == 0)
|
|
||||||
/* We found it! */
|
|
||||||
break;
|
|
||||||
if (compare < 0)
|
|
||||||
{
|
|
||||||
/* It is not in the list. */
|
|
||||||
binding = NULL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (binding != NULL)
|
|
||||||
{
|
|
||||||
if (dirnamep)
|
|
||||||
{
|
|
||||||
const char *dirname = *dirnamep;
|
|
||||||
|
|
||||||
if (dirname == NULL)
|
|
||||||
/* The current binding has be to returned. */
|
|
||||||
*dirnamep = binding->dirname;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* The domain is already bound. If the new value and the old
|
|
||||||
one are equal we simply do nothing. Otherwise replace the
|
|
||||||
old binding. */
|
|
||||||
char *result = binding->dirname;
|
|
||||||
if (strcmp (dirname, result) != 0)
|
|
||||||
{
|
|
||||||
if (strcmp (dirname, _nl_default_dirname) == 0)
|
|
||||||
result = (char *) _nl_default_dirname;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#if defined _LIBC || defined HAVE_STRDUP
|
|
||||||
result = strdup (dirname);
|
|
||||||
#else
|
|
||||||
size_t len = strlen (dirname) + 1;
|
|
||||||
result = (char *) malloc (len);
|
|
||||||
if (__builtin_expect (result != NULL, 1))
|
|
||||||
memcpy (result, dirname, len);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__builtin_expect (result != NULL, 1))
|
|
||||||
{
|
|
||||||
if (binding->dirname != _nl_default_dirname)
|
|
||||||
free (binding->dirname);
|
|
||||||
|
|
||||||
binding->dirname = result;
|
|
||||||
modified = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*dirnamep = result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (codesetp)
|
|
||||||
{
|
|
||||||
const char *codeset = *codesetp;
|
|
||||||
|
|
||||||
if (codeset == NULL)
|
|
||||||
/* The current binding has be to returned. */
|
|
||||||
*codesetp = binding->codeset;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* The domain is already bound. If the new value and the old
|
|
||||||
one are equal we simply do nothing. Otherwise replace the
|
|
||||||
old binding. */
|
|
||||||
char *result = binding->codeset;
|
|
||||||
if (result == NULL || strcmp (codeset, result) != 0)
|
|
||||||
{
|
|
||||||
#if defined _LIBC || defined HAVE_STRDUP
|
|
||||||
result = strdup (codeset);
|
|
||||||
#else
|
|
||||||
size_t len = strlen (codeset) + 1;
|
|
||||||
result = (char *) malloc (len);
|
|
||||||
if (__builtin_expect (result != NULL, 1))
|
|
||||||
memcpy (result, codeset, len);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (__builtin_expect (result != NULL, 1))
|
|
||||||
{
|
|
||||||
if (binding->codeset != NULL)
|
|
||||||
free (binding->codeset);
|
|
||||||
|
|
||||||
binding->codeset = result;
|
|
||||||
binding->codeset_cntr++;
|
|
||||||
modified = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*codesetp = result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ((dirnamep == NULL || *dirnamep == NULL)
|
|
||||||
&& (codesetp == NULL || *codesetp == NULL))
|
|
||||||
{
|
|
||||||
/* Simply return the default values. */
|
|
||||||
if (dirnamep)
|
|
||||||
*dirnamep = _nl_default_dirname;
|
|
||||||
if (codesetp)
|
|
||||||
*codesetp = NULL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* We have to create a new binding. */
|
|
||||||
size_t len = strlen (domainname) + 1;
|
|
||||||
struct binding *new_binding =
|
|
||||||
(struct binding *) malloc (offsetof (struct binding, domainname) + len);
|
|
||||||
|
|
||||||
if (__builtin_expect (new_binding == NULL, 0))
|
|
||||||
goto failed;
|
|
||||||
|
|
||||||
memcpy (new_binding->domainname, domainname, len);
|
|
||||||
|
|
||||||
if (dirnamep)
|
|
||||||
{
|
|
||||||
const char *dirname = *dirnamep;
|
|
||||||
|
|
||||||
if (dirname == NULL)
|
|
||||||
/* The default value. */
|
|
||||||
dirname = _nl_default_dirname;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (strcmp (dirname, _nl_default_dirname) == 0)
|
|
||||||
dirname = _nl_default_dirname;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
char *result;
|
|
||||||
#if defined _LIBC || defined HAVE_STRDUP
|
|
||||||
result = strdup (dirname);
|
|
||||||
if (__builtin_expect (result == NULL, 0))
|
|
||||||
goto failed_dirname;
|
|
||||||
#else
|
|
||||||
size_t len = strlen (dirname) + 1;
|
|
||||||
result = (char *) malloc (len);
|
|
||||||
if (__builtin_expect (result == NULL, 0))
|
|
||||||
goto failed_dirname;
|
|
||||||
memcpy (result, dirname, len);
|
|
||||||
#endif
|
|
||||||
dirname = result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*dirnamep = dirname;
|
|
||||||
new_binding->dirname = (char *) dirname;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
/* The default value. */
|
|
||||||
new_binding->dirname = (char *) _nl_default_dirname;
|
|
||||||
|
|
||||||
new_binding->codeset_cntr = 0;
|
|
||||||
|
|
||||||
if (codesetp)
|
|
||||||
{
|
|
||||||
const char *codeset = *codesetp;
|
|
||||||
|
|
||||||
if (codeset != NULL)
|
|
||||||
{
|
|
||||||
char *result;
|
|
||||||
|
|
||||||
#if defined _LIBC || defined HAVE_STRDUP
|
|
||||||
result = strdup (codeset);
|
|
||||||
if (__builtin_expect (result == NULL, 0))
|
|
||||||
goto failed_codeset;
|
|
||||||
#else
|
|
||||||
size_t len = strlen (codeset) + 1;
|
|
||||||
result = (char *) malloc (len);
|
|
||||||
if (__builtin_expect (result == NULL, 0))
|
|
||||||
goto failed_codeset;
|
|
||||||
memcpy (result, codeset, len);
|
|
||||||
#endif
|
|
||||||
codeset = result;
|
|
||||||
new_binding->codeset_cntr++;
|
|
||||||
}
|
|
||||||
*codesetp = codeset;
|
|
||||||
new_binding->codeset = (char *) codeset;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
new_binding->codeset = NULL;
|
|
||||||
|
|
||||||
/* Now enqueue it. */
|
|
||||||
if (_nl_domain_bindings == NULL
|
|
||||||
|| strcmp (domainname, _nl_domain_bindings->domainname) < 0)
|
|
||||||
{
|
|
||||||
new_binding->next = _nl_domain_bindings;
|
|
||||||
_nl_domain_bindings = new_binding;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
binding = _nl_domain_bindings;
|
|
||||||
while (binding->next != NULL
|
|
||||||
&& strcmp (domainname, binding->next->domainname) > 0)
|
|
||||||
binding = binding->next;
|
|
||||||
|
|
||||||
new_binding->next = binding->next;
|
|
||||||
binding->next = new_binding;
|
|
||||||
}
|
|
||||||
|
|
||||||
modified = 1;
|
|
||||||
|
|
||||||
/* Here we deal with memory allocation failures. */
|
|
||||||
if (0)
|
|
||||||
{
|
|
||||||
failed_codeset:
|
|
||||||
if (new_binding->dirname != _nl_default_dirname)
|
|
||||||
free (new_binding->dirname);
|
|
||||||
failed_dirname:
|
|
||||||
free (new_binding);
|
|
||||||
failed:
|
|
||||||
if (dirnamep)
|
|
||||||
*dirnamep = NULL;
|
|
||||||
if (codesetp)
|
|
||||||
*codesetp = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we modified any binding, we flush the caches. */
|
|
||||||
if (modified)
|
|
||||||
++_nl_msg_cat_cntr;
|
|
||||||
|
|
||||||
__libc_rwlock_unlock (_nl_state_lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Specify that the DOMAINNAME message catalog will be found
|
|
||||||
in DIRNAME rather than in the system locale data base. */
|
|
||||||
char *
|
|
||||||
BINDTEXTDOMAIN (domainname, dirname)
|
|
||||||
const char *domainname;
|
|
||||||
const char *dirname;
|
|
||||||
{
|
|
||||||
set_binding_values (domainname, &dirname, NULL);
|
|
||||||
return (char *) dirname;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Specify the character encoding in which the messages from the
|
|
||||||
DOMAINNAME message catalog will be returned. */
|
|
||||||
char *
|
|
||||||
BIND_TEXTDOMAIN_CODESET (domainname, codeset)
|
|
||||||
const char *domainname;
|
|
||||||
const char *codeset;
|
|
||||||
{
|
|
||||||
set_binding_values (domainname, NULL, &codeset);
|
|
||||||
return (char *) codeset;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* Aliases for function names in GNU C Library. */
|
|
||||||
weak_alias (__bindtextdomain, bindtextdomain);
|
|
||||||
weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
|
|
||||||
#endif
|
|
|
@ -1,438 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
# Output a system dependent table of character encoding aliases.
|
|
||||||
#
|
|
||||||
# Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU Library General Public License as published
|
|
||||||
# by the Free Software Foundation; either version 2, 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
|
|
||||||
# Library General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Library General Public
|
|
||||||
# License along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
# USA.
|
|
||||||
#
|
|
||||||
# The table consists of lines of the form
|
|
||||||
# ALIAS CANONICAL
|
|
||||||
#
|
|
||||||
# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
|
|
||||||
# ALIAS is compared in a case sensitive way.
|
|
||||||
#
|
|
||||||
# CANONICAL is the GNU canonical name for this character encoding.
|
|
||||||
# It must be an encoding supported by libiconv. Support by GNU libc is
|
|
||||||
# also desirable. CANONICAL is case insensitive. Usually an upper case
|
|
||||||
# MIME charset name is preferred.
|
|
||||||
# The current list of GNU canonical charset names is as follows.
|
|
||||||
#
|
|
||||||
# name used by which systems a MIME name?
|
|
||||||
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
|
|
||||||
# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
|
|
||||||
# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
|
|
||||||
# ISO-8859-3 glibc yes
|
|
||||||
# ISO-8859-4 osf solaris freebsd yes
|
|
||||||
# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
|
|
||||||
# ISO-8859-6 glibc aix hpux solaris yes
|
|
||||||
# ISO-8859-7 glibc aix hpux irix osf solaris yes
|
|
||||||
# ISO-8859-8 glibc aix hpux osf solaris yes
|
|
||||||
# ISO-8859-9 glibc aix hpux irix osf solaris yes
|
|
||||||
# ISO-8859-13 glibc
|
|
||||||
# ISO-8859-15 glibc aix osf solaris freebsd
|
|
||||||
# KOI8-R glibc solaris freebsd yes
|
|
||||||
# KOI8-U glibc freebsd yes
|
|
||||||
# CP437 dos
|
|
||||||
# CP775 dos
|
|
||||||
# CP850 aix osf dos
|
|
||||||
# CP852 dos
|
|
||||||
# CP855 dos
|
|
||||||
# CP856 aix
|
|
||||||
# CP857 dos
|
|
||||||
# CP861 dos
|
|
||||||
# CP862 dos
|
|
||||||
# CP864 dos
|
|
||||||
# CP865 dos
|
|
||||||
# CP866 freebsd dos
|
|
||||||
# CP869 dos
|
|
||||||
# CP874 win32 dos
|
|
||||||
# CP922 aix
|
|
||||||
# CP932 aix win32 dos
|
|
||||||
# CP943 aix
|
|
||||||
# CP949 osf win32 dos
|
|
||||||
# CP950 win32 dos
|
|
||||||
# CP1046 aix
|
|
||||||
# CP1124 aix
|
|
||||||
# CP1129 aix
|
|
||||||
# CP1250 win32
|
|
||||||
# CP1251 glibc win32
|
|
||||||
# CP1252 aix win32
|
|
||||||
# CP1253 win32
|
|
||||||
# CP1254 win32
|
|
||||||
# CP1255 win32
|
|
||||||
# CP1256 win32
|
|
||||||
# CP1257 win32
|
|
||||||
# GB2312 glibc aix hpux irix solaris freebsd yes
|
|
||||||
# EUC-JP glibc aix hpux irix osf solaris freebsd yes
|
|
||||||
# EUC-KR glibc aix hpux irix osf solaris freebsd yes
|
|
||||||
# EUC-TW glibc aix hpux irix osf solaris
|
|
||||||
# BIG5 glibc aix hpux osf solaris freebsd yes
|
|
||||||
# BIG5-HKSCS glibc
|
|
||||||
# GBK aix osf win32 dos
|
|
||||||
# GB18030 glibc
|
|
||||||
# SHIFT_JIS hpux osf solaris freebsd yes
|
|
||||||
# JOHAB glibc win32
|
|
||||||
# TIS-620 glibc aix hpux osf solaris
|
|
||||||
# VISCII glibc yes
|
|
||||||
# HP-ROMAN8 hpux
|
|
||||||
# HP-ARABIC8 hpux
|
|
||||||
# HP-GREEK8 hpux
|
|
||||||
# HP-HEBREW8 hpux
|
|
||||||
# HP-TURKISH8 hpux
|
|
||||||
# HP-KANA8 hpux
|
|
||||||
# DEC-KANJI osf
|
|
||||||
# DEC-HANYU osf
|
|
||||||
# UTF-8 glibc aix hpux osf solaris yes
|
|
||||||
#
|
|
||||||
# Note: Names which are not marked as being a MIME name should not be used in
|
|
||||||
# Internet protocols for information interchange (mail, news, etc.).
|
|
||||||
#
|
|
||||||
# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
|
|
||||||
# must understand both names and treat them as equivalent.
|
|
||||||
#
|
|
||||||
# The first argument passed to this file is the canonical host specification,
|
|
||||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
|
||||||
# or
|
|
||||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
|
||||||
|
|
||||||
host="$1"
|
|
||||||
os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
|
|
||||||
echo "# This file contains a table of character encoding aliases,"
|
|
||||||
echo "# suitable for operating system '${os}'."
|
|
||||||
echo "# It was automatically generated from config.charset."
|
|
||||||
# List of references, updated during installation:
|
|
||||||
echo "# Packages using this file: "
|
|
||||||
case "$os" in
|
|
||||||
linux* | *-gnu*)
|
|
||||||
# With glibc-2.1 or newer, we don't need any canonicalization,
|
|
||||||
# because glibc has iconv and both glibc and libiconv support all
|
|
||||||
# GNU canonical names directly. Therefore, the Makefile does not
|
|
||||||
# need to install the alias file at all.
|
|
||||||
# The following applies only to glibc-2.0.x and older libcs.
|
|
||||||
echo "ISO_646.IRV:1983 ASCII"
|
|
||||||
;;
|
|
||||||
aix*)
|
|
||||||
echo "ISO8859-1 ISO-8859-1"
|
|
||||||
echo "ISO8859-2 ISO-8859-2"
|
|
||||||
echo "ISO8859-5 ISO-8859-5"
|
|
||||||
echo "ISO8859-6 ISO-8859-6"
|
|
||||||
echo "ISO8859-7 ISO-8859-7"
|
|
||||||
echo "ISO8859-8 ISO-8859-8"
|
|
||||||
echo "ISO8859-9 ISO-8859-9"
|
|
||||||
echo "ISO8859-15 ISO-8859-15"
|
|
||||||
echo "IBM-850 CP850"
|
|
||||||
echo "IBM-856 CP856"
|
|
||||||
echo "IBM-921 ISO-8859-13"
|
|
||||||
echo "IBM-922 CP922"
|
|
||||||
echo "IBM-932 CP932"
|
|
||||||
echo "IBM-943 CP943"
|
|
||||||
echo "IBM-1046 CP1046"
|
|
||||||
echo "IBM-1124 CP1124"
|
|
||||||
echo "IBM-1129 CP1129"
|
|
||||||
echo "IBM-1252 CP1252"
|
|
||||||
echo "IBM-eucCN GB2312"
|
|
||||||
echo "IBM-eucJP EUC-JP"
|
|
||||||
echo "IBM-eucKR EUC-KR"
|
|
||||||
echo "IBM-eucTW EUC-TW"
|
|
||||||
echo "big5 BIG5"
|
|
||||||
echo "GBK GBK"
|
|
||||||
echo "TIS-620 TIS-620"
|
|
||||||
echo "UTF-8 UTF-8"
|
|
||||||
;;
|
|
||||||
hpux*)
|
|
||||||
echo "iso88591 ISO-8859-1"
|
|
||||||
echo "iso88592 ISO-8859-2"
|
|
||||||
echo "iso88595 ISO-8859-5"
|
|
||||||
echo "iso88596 ISO-8859-6"
|
|
||||||
echo "iso88597 ISO-8859-7"
|
|
||||||
echo "iso88598 ISO-8859-8"
|
|
||||||
echo "iso88599 ISO-8859-9"
|
|
||||||
echo "iso885915 ISO-8859-15"
|
|
||||||
echo "roman8 HP-ROMAN8"
|
|
||||||
echo "arabic8 HP-ARABIC8"
|
|
||||||
echo "greek8 HP-GREEK8"
|
|
||||||
echo "hebrew8 HP-HEBREW8"
|
|
||||||
echo "turkish8 HP-TURKISH8"
|
|
||||||
echo "kana8 HP-KANA8"
|
|
||||||
echo "tis620 TIS-620"
|
|
||||||
echo "big5 BIG5"
|
|
||||||
echo "eucJP EUC-JP"
|
|
||||||
echo "eucKR EUC-KR"
|
|
||||||
echo "eucTW EUC-TW"
|
|
||||||
echo "hp15CN GB2312"
|
|
||||||
#echo "ccdc ?" # what is this?
|
|
||||||
echo "SJIS SHIFT_JIS"
|
|
||||||
echo "utf8 UTF-8"
|
|
||||||
;;
|
|
||||||
irix*)
|
|
||||||
echo "ISO8859-1 ISO-8859-1"
|
|
||||||
echo "ISO8859-2 ISO-8859-2"
|
|
||||||
echo "ISO8859-5 ISO-8859-5"
|
|
||||||
echo "ISO8859-7 ISO-8859-7"
|
|
||||||
echo "ISO8859-9 ISO-8859-9"
|
|
||||||
echo "eucCN GB2312"
|
|
||||||
echo "eucJP EUC-JP"
|
|
||||||
echo "eucKR EUC-KR"
|
|
||||||
echo "eucTW EUC-TW"
|
|
||||||
;;
|
|
||||||
osf*)
|
|
||||||
echo "ISO8859-1 ISO-8859-1"
|
|
||||||
echo "ISO8859-2 ISO-8859-2"
|
|
||||||
echo "ISO8859-4 ISO-8859-4"
|
|
||||||
echo "ISO8859-5 ISO-8859-5"
|
|
||||||
echo "ISO8859-7 ISO-8859-7"
|
|
||||||
echo "ISO8859-8 ISO-8859-8"
|
|
||||||
echo "ISO8859-9 ISO-8859-9"
|
|
||||||
echo "ISO8859-15 ISO-8859-15"
|
|
||||||
echo "cp850 CP850"
|
|
||||||
echo "big5 BIG5"
|
|
||||||
echo "dechanyu DEC-HANYU"
|
|
||||||
echo "dechanzi GB2312"
|
|
||||||
echo "deckanji DEC-KANJI"
|
|
||||||
echo "deckorean EUC-KR"
|
|
||||||
echo "eucJP EUC-JP"
|
|
||||||
echo "eucKR EUC-KR"
|
|
||||||
echo "eucTW EUC-TW"
|
|
||||||
echo "GBK GBK"
|
|
||||||
echo "KSC5601 CP949"
|
|
||||||
echo "sdeckanji EUC-JP"
|
|
||||||
echo "SJIS SHIFT_JIS"
|
|
||||||
echo "TACTIS TIS-620"
|
|
||||||
echo "UTF-8 UTF-8"
|
|
||||||
;;
|
|
||||||
solaris*)
|
|
||||||
echo "646 ASCII"
|
|
||||||
echo "ISO8859-1 ISO-8859-1"
|
|
||||||
echo "ISO8859-2 ISO-8859-2"
|
|
||||||
echo "ISO8859-4 ISO-8859-4"
|
|
||||||
echo "ISO8859-5 ISO-8859-5"
|
|
||||||
echo "ISO8859-6 ISO-8859-6"
|
|
||||||
echo "ISO8859-7 ISO-8859-7"
|
|
||||||
echo "ISO8859-8 ISO-8859-8"
|
|
||||||
echo "ISO8859-9 ISO-8859-9"
|
|
||||||
echo "ISO8859-15 ISO-8859-15"
|
|
||||||
echo "koi8-r KOI8-R"
|
|
||||||
echo "BIG5 BIG5"
|
|
||||||
echo "gb2312 GB2312"
|
|
||||||
echo "cns11643 EUC-TW"
|
|
||||||
echo "5601 EUC-KR"
|
|
||||||
echo "eucJP EUC-JP"
|
|
||||||
echo "PCK SHIFT_JIS"
|
|
||||||
echo "TIS620.2533 TIS-620"
|
|
||||||
#echo "sun_eu_greek ?" # what is this?
|
|
||||||
echo "UTF-8 UTF-8"
|
|
||||||
;;
|
|
||||||
freebsd*)
|
|
||||||
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
|
|
||||||
# localcharset.c falls back to using the full locale name
|
|
||||||
# from the environment variables.
|
|
||||||
echo "C ASCII"
|
|
||||||
echo "US-ASCII ASCII"
|
|
||||||
for l in la_LN lt_LN; do
|
|
||||||
echo "$l.ASCII ASCII"
|
|
||||||
done
|
|
||||||
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
|
|
||||||
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
|
|
||||||
lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
|
|
||||||
echo "$l.ISO_8859-1 ISO-8859-1"
|
|
||||||
echo "$l.DIS_8859-15 ISO-8859-15"
|
|
||||||
done
|
|
||||||
for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
|
|
||||||
echo "$l.ISO_8859-2 ISO-8859-2"
|
|
||||||
done
|
|
||||||
for l in la_LN lt_LT; do
|
|
||||||
echo "$l.ISO_8859-4 ISO-8859-4"
|
|
||||||
done
|
|
||||||
for l in ru_RU ru_SU; do
|
|
||||||
echo "$l.KOI8-R KOI8-R"
|
|
||||||
echo "$l.ISO_8859-5 ISO-8859-5"
|
|
||||||
echo "$l.CP866 CP866"
|
|
||||||
done
|
|
||||||
echo "uk_UA.KOI8-U KOI8-U"
|
|
||||||
echo "zh_TW.BIG5 BIG5"
|
|
||||||
echo "zh_TW.Big5 BIG5"
|
|
||||||
echo "zh_CN.EUC GB2312"
|
|
||||||
echo "ja_JP.EUC EUC-JP"
|
|
||||||
echo "ja_JP.SJIS SHIFT_JIS"
|
|
||||||
echo "ja_JP.Shift_JIS SHIFT_JIS"
|
|
||||||
echo "ko_KR.EUC EUC-KR"
|
|
||||||
;;
|
|
||||||
beos*)
|
|
||||||
# BeOS has a single locale, and it has UTF-8 encoding.
|
|
||||||
echo "* UTF-8"
|
|
||||||
;;
|
|
||||||
msdosdjgpp*)
|
|
||||||
# DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
|
|
||||||
# localcharset.c falls back to using the full locale name
|
|
||||||
# from the environment variables.
|
|
||||||
echo "#"
|
|
||||||
echo "# The encodings given here may not all be correct."
|
|
||||||
echo "# If you find that the encoding given for your language and"
|
|
||||||
echo "# country is not the one your DOS machine actually uses, just"
|
|
||||||
echo "# correct it in this file, and send a mail to"
|
|
||||||
echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
|
|
||||||
echo "# and Bruno Haible <haible@clisp.cons.org>."
|
|
||||||
echo "#"
|
|
||||||
echo "C ASCII"
|
|
||||||
# ISO-8859-1 languages
|
|
||||||
echo "ca CP850"
|
|
||||||
echo "ca_ES CP850"
|
|
||||||
echo "da CP865" # not CP850 ??
|
|
||||||
echo "da_DK CP865" # not CP850 ??
|
|
||||||
echo "de CP850"
|
|
||||||
echo "de_AT CP850"
|
|
||||||
echo "de_CH CP850"
|
|
||||||
echo "de_DE CP850"
|
|
||||||
echo "en CP850"
|
|
||||||
echo "en_AU CP850" # not CP437 ??
|
|
||||||
echo "en_CA CP850"
|
|
||||||
echo "en_GB CP850"
|
|
||||||
echo "en_NZ CP437"
|
|
||||||
echo "en_US CP437"
|
|
||||||
echo "en_ZA CP850" # not CP437 ??
|
|
||||||
echo "es CP850"
|
|
||||||
echo "es_AR CP850"
|
|
||||||
echo "es_BO CP850"
|
|
||||||
echo "es_CL CP850"
|
|
||||||
echo "es_CO CP850"
|
|
||||||
echo "es_CR CP850"
|
|
||||||
echo "es_CU CP850"
|
|
||||||
echo "es_DO CP850"
|
|
||||||
echo "es_EC CP850"
|
|
||||||
echo "es_ES CP850"
|
|
||||||
echo "es_GT CP850"
|
|
||||||
echo "es_HN CP850"
|
|
||||||
echo "es_MX CP850"
|
|
||||||
echo "es_NI CP850"
|
|
||||||
echo "es_PA CP850"
|
|
||||||
echo "es_PY CP850"
|
|
||||||
echo "es_PE CP850"
|
|
||||||
echo "es_SV CP850"
|
|
||||||
echo "es_UY CP850"
|
|
||||||
echo "es_VE CP850"
|
|
||||||
echo "et CP850"
|
|
||||||
echo "et_EE CP850"
|
|
||||||
echo "eu CP850"
|
|
||||||
echo "eu_ES CP850"
|
|
||||||
echo "fi CP850"
|
|
||||||
echo "fi_FI CP850"
|
|
||||||
echo "fr CP850"
|
|
||||||
echo "fr_BE CP850"
|
|
||||||
echo "fr_CA CP850"
|
|
||||||
echo "fr_CH CP850"
|
|
||||||
echo "fr_FR CP850"
|
|
||||||
echo "ga CP850"
|
|
||||||
echo "ga_IE CP850"
|
|
||||||
echo "gd CP850"
|
|
||||||
echo "gd_GB CP850"
|
|
||||||
echo "gl CP850"
|
|
||||||
echo "gl_ES CP850"
|
|
||||||
echo "id CP850" # not CP437 ??
|
|
||||||
echo "id_ID CP850" # not CP437 ??
|
|
||||||
echo "is CP861" # not CP850 ??
|
|
||||||
echo "is_IS CP861" # not CP850 ??
|
|
||||||
echo "it CP850"
|
|
||||||
echo "it_CH CP850"
|
|
||||||
echo "it_IT CP850"
|
|
||||||
echo "lt CP775"
|
|
||||||
echo "lt_LT CP775"
|
|
||||||
echo "lv CP775"
|
|
||||||
echo "lv_LV CP775"
|
|
||||||
echo "nb CP865" # not CP850 ??
|
|
||||||
echo "nb_NO CP865" # not CP850 ??
|
|
||||||
echo "nl CP850"
|
|
||||||
echo "nl_BE CP850"
|
|
||||||
echo "nl_NL CP850"
|
|
||||||
echo "nn CP865" # not CP850 ??
|
|
||||||
echo "nn_NO CP865" # not CP850 ??
|
|
||||||
echo "no CP865" # not CP850 ??
|
|
||||||
echo "no_NO CP865" # not CP850 ??
|
|
||||||
echo "pt CP850"
|
|
||||||
echo "pt_BR CP850"
|
|
||||||
echo "pt_PT CP850"
|
|
||||||
echo "sv CP850"
|
|
||||||
echo "sv_SE CP850"
|
|
||||||
# ISO-8859-2 languages
|
|
||||||
echo "cs CP852"
|
|
||||||
echo "cs_CZ CP852"
|
|
||||||
echo "hr CP852"
|
|
||||||
echo "hr_HR CP852"
|
|
||||||
echo "hu CP852"
|
|
||||||
echo "hu_HU CP852"
|
|
||||||
echo "pl CP852"
|
|
||||||
echo "pl_PL CP852"
|
|
||||||
echo "ro CP852"
|
|
||||||
echo "ro_RO CP852"
|
|
||||||
echo "sk CP852"
|
|
||||||
echo "sk_SK CP852"
|
|
||||||
echo "sl CP852"
|
|
||||||
echo "sl_SI CP852"
|
|
||||||
echo "sq CP852"
|
|
||||||
echo "sq_AL CP852"
|
|
||||||
echo "sr CP852" # CP852 or CP866 or CP855 ??
|
|
||||||
echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
|
|
||||||
# ISO-8859-3 languages
|
|
||||||
echo "mt CP850"
|
|
||||||
echo "mt_MT CP850"
|
|
||||||
# ISO-8859-5 languages
|
|
||||||
echo "be CP866"
|
|
||||||
echo "be_BE CP866"
|
|
||||||
echo "bg CP866" # not CP855 ??
|
|
||||||
echo "bg_BG CP866" # not CP855 ??
|
|
||||||
echo "mk CP866" # not CP855 ??
|
|
||||||
echo "mk_MK CP866" # not CP855 ??
|
|
||||||
echo "ru KOI8-R" # not CP866 ??
|
|
||||||
echo "ru_RU KOI8-R" # not CP866 ??
|
|
||||||
# ISO-8859-6 languages
|
|
||||||
echo "ar CP864"
|
|
||||||
echo "ar_AE CP864"
|
|
||||||
echo "ar_DZ CP864"
|
|
||||||
echo "ar_EG CP864"
|
|
||||||
echo "ar_IQ CP864"
|
|
||||||
echo "ar_IR CP864"
|
|
||||||
echo "ar_JO CP864"
|
|
||||||
echo "ar_KW CP864"
|
|
||||||
echo "ar_MA CP864"
|
|
||||||
echo "ar_OM CP864"
|
|
||||||
echo "ar_QA CP864"
|
|
||||||
echo "ar_SA CP864"
|
|
||||||
echo "ar_SY CP864"
|
|
||||||
# ISO-8859-7 languages
|
|
||||||
echo "el CP869"
|
|
||||||
echo "el_GR CP869"
|
|
||||||
# ISO-8859-8 languages
|
|
||||||
echo "he CP862"
|
|
||||||
echo "he_IL CP862"
|
|
||||||
# ISO-8859-9 languages
|
|
||||||
echo "tr CP857"
|
|
||||||
echo "tr_TR CP857"
|
|
||||||
# Japanese
|
|
||||||
echo "ja CP932"
|
|
||||||
echo "ja_JP CP932"
|
|
||||||
# Chinese
|
|
||||||
echo "zh_CN GBK"
|
|
||||||
echo "zh_TW CP950" # not CP938 ??
|
|
||||||
# Korean
|
|
||||||
echo "kr CP949" # not CP934 ??
|
|
||||||
echo "kr_KR CP949" # not CP934 ??
|
|
||||||
# Thai
|
|
||||||
echo "th CP874"
|
|
||||||
echo "th_TH CP874"
|
|
||||||
# Other
|
|
||||||
echo "eo CP850"
|
|
||||||
echo "eo_EO CP850"
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -1,58 +0,0 @@
|
||||||
/* Implementation of the dcgettext(3) function.
|
|
||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "gettextP.h"
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include <libintl.h>
|
|
||||||
#else
|
|
||||||
# include "libgnuintl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
/* Names for the libintl functions are a problem. They must not clash
|
|
||||||
with existing names and they should follow ANSI C. But this source
|
|
||||||
code is also used in GNU C Library where the names have a __
|
|
||||||
prefix. So we have to make a difference here. */
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define DCGETTEXT __dcgettext
|
|
||||||
# define DCIGETTEXT __dcigettext
|
|
||||||
#else
|
|
||||||
# define DCGETTEXT dcgettext__
|
|
||||||
# define DCIGETTEXT dcigettext__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
|
||||||
locale. */
|
|
||||||
char *
|
|
||||||
DCGETTEXT (domainname, msgid, category)
|
|
||||||
const char *domainname;
|
|
||||||
const char *msgid;
|
|
||||||
int category;
|
|
||||||
{
|
|
||||||
return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* Alias for function name in GNU C Library. */
|
|
||||||
weak_alias (__dcgettext, dcgettext);
|
|
||||||
#endif
|
|
1259
intl/dcigettext.c
1259
intl/dcigettext.c
File diff suppressed because it is too large
Load diff
|
@ -1,60 +0,0 @@
|
||||||
/* Implementation of the dcngettext(3) function.
|
|
||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "gettextP.h"
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include <libintl.h>
|
|
||||||
#else
|
|
||||||
# include "libgnuintl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
/* Names for the libintl functions are a problem. They must not clash
|
|
||||||
with existing names and they should follow ANSI C. But this source
|
|
||||||
code is also used in GNU C Library where the names have a __
|
|
||||||
prefix. So we have to make a difference here. */
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define DCNGETTEXT __dcngettext
|
|
||||||
# define DCIGETTEXT __dcigettext
|
|
||||||
#else
|
|
||||||
# define DCNGETTEXT dcngettext__
|
|
||||||
# define DCIGETTEXT dcigettext__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
|
||||||
locale. */
|
|
||||||
char *
|
|
||||||
DCNGETTEXT (domainname, msgid1, msgid2, n, category)
|
|
||||||
const char *domainname;
|
|
||||||
const char *msgid1;
|
|
||||||
const char *msgid2;
|
|
||||||
unsigned long int n;
|
|
||||||
int category;
|
|
||||||
{
|
|
||||||
return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* Alias for function name in GNU C Library. */
|
|
||||||
weak_alias (__dcngettext, dcngettext);
|
|
||||||
#endif
|
|
|
@ -1,59 +0,0 @@
|
||||||
/* Implementation of the dgettext(3) function.
|
|
||||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <locale.h>
|
|
||||||
|
|
||||||
#include "gettextP.h"
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include <libintl.h>
|
|
||||||
#else
|
|
||||||
# include "libgnuintl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
/* Names for the libintl functions are a problem. They must not clash
|
|
||||||
with existing names and they should follow ANSI C. But this source
|
|
||||||
code is also used in GNU C Library where the names have a __
|
|
||||||
prefix. So we have to make a difference here. */
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define DGETTEXT __dgettext
|
|
||||||
# define DCGETTEXT __dcgettext
|
|
||||||
#else
|
|
||||||
# define DGETTEXT dgettext__
|
|
||||||
# define DCGETTEXT dcgettext__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Look up MSGID in the DOMAINNAME message catalog of the current
|
|
||||||
LC_MESSAGES locale. */
|
|
||||||
char *
|
|
||||||
DGETTEXT (domainname, msgid)
|
|
||||||
const char *domainname;
|
|
||||||
const char *msgid;
|
|
||||||
{
|
|
||||||
return DCGETTEXT (domainname, msgid, LC_MESSAGES);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* Alias for function name in GNU C Library. */
|
|
||||||
weak_alias (__dgettext, dgettext);
|
|
||||||
#endif
|
|
|
@ -1,61 +0,0 @@
|
||||||
/* Implementation of the dngettext(3) function.
|
|
||||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <locale.h>
|
|
||||||
|
|
||||||
#include "gettextP.h"
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include <libintl.h>
|
|
||||||
#else
|
|
||||||
# include "libgnuintl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
/* Names for the libintl functions are a problem. They must not clash
|
|
||||||
with existing names and they should follow ANSI C. But this source
|
|
||||||
code is also used in GNU C Library where the names have a __
|
|
||||||
prefix. So we have to make a difference here. */
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define DNGETTEXT __dngettext
|
|
||||||
# define DCNGETTEXT __dcngettext
|
|
||||||
#else
|
|
||||||
# define DNGETTEXT dngettext__
|
|
||||||
# define DCNGETTEXT dcngettext__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Look up MSGID in the DOMAINNAME message catalog of the current
|
|
||||||
LC_MESSAGES locale and skip message according to the plural form. */
|
|
||||||
char *
|
|
||||||
DNGETTEXT (domainname, msgid1, msgid2, n)
|
|
||||||
const char *domainname;
|
|
||||||
const char *msgid1;
|
|
||||||
const char *msgid2;
|
|
||||||
unsigned long int n;
|
|
||||||
{
|
|
||||||
return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* Alias for function name in GNU C Library. */
|
|
||||||
weak_alias (__dngettext, dngettext);
|
|
||||||
#endif
|
|
|
@ -1,192 +0,0 @@
|
||||||
/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include "loadinfo.h"
|
|
||||||
|
|
||||||
/* On some strange systems still no definition of NULL is found. Sigh! */
|
|
||||||
#ifndef NULL
|
|
||||||
# if defined __STDC__ && __STDC__
|
|
||||||
# define NULL ((void *) 0)
|
|
||||||
# else
|
|
||||||
# define NULL 0
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
char *
|
|
||||||
_nl_find_language (name)
|
|
||||||
const char *name;
|
|
||||||
{
|
|
||||||
while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
|
|
||||||
&& name[0] != '+' && name[0] != ',')
|
|
||||||
++name;
|
|
||||||
|
|
||||||
return (char *) name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
_nl_explode_name (name, language, modifier, territory, codeset,
|
|
||||||
normalized_codeset, special, sponsor, revision)
|
|
||||||
char *name;
|
|
||||||
const char **language;
|
|
||||||
const char **modifier;
|
|
||||||
const char **territory;
|
|
||||||
const char **codeset;
|
|
||||||
const char **normalized_codeset;
|
|
||||||
const char **special;
|
|
||||||
const char **sponsor;
|
|
||||||
const char **revision;
|
|
||||||
{
|
|
||||||
enum { undecided, xpg, cen } syntax;
|
|
||||||
char *cp;
|
|
||||||
int mask;
|
|
||||||
|
|
||||||
*modifier = NULL;
|
|
||||||
*territory = NULL;
|
|
||||||
*codeset = NULL;
|
|
||||||
*normalized_codeset = NULL;
|
|
||||||
*special = NULL;
|
|
||||||
*sponsor = NULL;
|
|
||||||
*revision = NULL;
|
|
||||||
|
|
||||||
/* Now we determine the single parts of the locale name. First
|
|
||||||
look for the language. Termination symbols are `_' and `@' if
|
|
||||||
we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
|
|
||||||
mask = 0;
|
|
||||||
syntax = undecided;
|
|
||||||
*language = cp = name;
|
|
||||||
cp = _nl_find_language (*language);
|
|
||||||
|
|
||||||
if (*language == cp)
|
|
||||||
/* This does not make sense: language has to be specified. Use
|
|
||||||
this entry as it is without exploding. Perhaps it is an alias. */
|
|
||||||
cp = strchr (*language, '\0');
|
|
||||||
else if (cp[0] == '_')
|
|
||||||
{
|
|
||||||
/* Next is the territory. */
|
|
||||||
cp[0] = '\0';
|
|
||||||
*territory = ++cp;
|
|
||||||
|
|
||||||
while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
|
|
||||||
&& cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
|
|
||||||
++cp;
|
|
||||||
|
|
||||||
mask |= TERRITORY;
|
|
||||||
|
|
||||||
if (cp[0] == '.')
|
|
||||||
{
|
|
||||||
/* Next is the codeset. */
|
|
||||||
syntax = xpg;
|
|
||||||
cp[0] = '\0';
|
|
||||||
*codeset = ++cp;
|
|
||||||
|
|
||||||
while (cp[0] != '\0' && cp[0] != '@')
|
|
||||||
++cp;
|
|
||||||
|
|
||||||
mask |= XPG_CODESET;
|
|
||||||
|
|
||||||
if (*codeset != cp && (*codeset)[0] != '\0')
|
|
||||||
{
|
|
||||||
*normalized_codeset = _nl_normalize_codeset (*codeset,
|
|
||||||
cp - *codeset);
|
|
||||||
if (strcmp (*codeset, *normalized_codeset) == 0)
|
|
||||||
free ((char *) *normalized_codeset);
|
|
||||||
else
|
|
||||||
mask |= XPG_NORM_CODESET;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
|
|
||||||
{
|
|
||||||
/* Next is the modifier. */
|
|
||||||
syntax = cp[0] == '@' ? xpg : cen;
|
|
||||||
cp[0] = '\0';
|
|
||||||
*modifier = ++cp;
|
|
||||||
|
|
||||||
while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
|
|
||||||
&& cp[0] != ',' && cp[0] != '_')
|
|
||||||
++cp;
|
|
||||||
|
|
||||||
mask |= XPG_MODIFIER | CEN_AUDIENCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
|
|
||||||
{
|
|
||||||
syntax = cen;
|
|
||||||
|
|
||||||
if (cp[0] == '+')
|
|
||||||
{
|
|
||||||
/* Next is special application (CEN syntax). */
|
|
||||||
cp[0] = '\0';
|
|
||||||
*special = ++cp;
|
|
||||||
|
|
||||||
while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
|
|
||||||
++cp;
|
|
||||||
|
|
||||||
mask |= CEN_SPECIAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cp[0] == ',')
|
|
||||||
{
|
|
||||||
/* Next is sponsor (CEN syntax). */
|
|
||||||
cp[0] = '\0';
|
|
||||||
*sponsor = ++cp;
|
|
||||||
|
|
||||||
while (cp[0] != '\0' && cp[0] != '_')
|
|
||||||
++cp;
|
|
||||||
|
|
||||||
mask |= CEN_SPONSOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cp[0] == '_')
|
|
||||||
{
|
|
||||||
/* Next is revision (CEN syntax). */
|
|
||||||
cp[0] = '\0';
|
|
||||||
*revision = ++cp;
|
|
||||||
|
|
||||||
mask |= CEN_REVISION;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* For CEN syntax values it might be important to have the
|
|
||||||
separator character in the file name, not for XPG syntax. */
|
|
||||||
if (syntax == xpg)
|
|
||||||
{
|
|
||||||
if (*territory != NULL && (*territory)[0] == '\0')
|
|
||||||
mask &= ~TERRITORY;
|
|
||||||
|
|
||||||
if (*codeset != NULL && (*codeset)[0] == '\0')
|
|
||||||
mask &= ~XPG_CODESET;
|
|
||||||
|
|
||||||
if (*modifier != NULL && (*modifier)[0] == '\0')
|
|
||||||
mask &= ~XPG_MODIFIER;
|
|
||||||
}
|
|
||||||
|
|
||||||
return mask;
|
|
||||||
}
|
|
|
@ -1,198 +0,0 @@
|
||||||
/* Handle list of needed message catalogs
|
|
||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#if defined HAVE_UNISTD_H || defined _LIBC
|
|
||||||
# include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "gettextP.h"
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include <libintl.h>
|
|
||||||
#else
|
|
||||||
# include "libgnuintl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
/* List of already loaded domains. */
|
|
||||||
static struct loaded_l10nfile *_nl_loaded_domains;
|
|
||||||
|
|
||||||
|
|
||||||
/* Return a data structure describing the message catalog described by
|
|
||||||
the DOMAINNAME and CATEGORY parameters with respect to the currently
|
|
||||||
established bindings. */
|
|
||||||
struct loaded_l10nfile *
|
|
||||||
internal_function
|
|
||||||
_nl_find_domain (dirname, locale, domainname, domainbinding)
|
|
||||||
const char *dirname;
|
|
||||||
char *locale;
|
|
||||||
const char *domainname;
|
|
||||||
struct binding *domainbinding;
|
|
||||||
{
|
|
||||||
struct loaded_l10nfile *retval;
|
|
||||||
const char *language;
|
|
||||||
const char *modifier;
|
|
||||||
const char *territory;
|
|
||||||
const char *codeset;
|
|
||||||
const char *normalized_codeset;
|
|
||||||
const char *special;
|
|
||||||
const char *sponsor;
|
|
||||||
const char *revision;
|
|
||||||
const char *alias_value;
|
|
||||||
int mask;
|
|
||||||
|
|
||||||
/* LOCALE can consist of up to four recognized parts for the XPG syntax:
|
|
||||||
|
|
||||||
language[_territory[.codeset]][@modifier]
|
|
||||||
|
|
||||||
and six parts for the CEN syntax:
|
|
||||||
|
|
||||||
language[_territory][+audience][+special][,[sponsor][_revision]]
|
|
||||||
|
|
||||||
Beside the first part all of them are allowed to be missing. If
|
|
||||||
the full specified locale is not found, the less specific one are
|
|
||||||
looked for. The various parts will be stripped off according to
|
|
||||||
the following order:
|
|
||||||
(1) revision
|
|
||||||
(2) sponsor
|
|
||||||
(3) special
|
|
||||||
(4) codeset
|
|
||||||
(5) normalized codeset
|
|
||||||
(6) territory
|
|
||||||
(7) audience/modifier
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* If we have already tested for this locale entry there has to
|
|
||||||
be one data set in the list of loaded domains. */
|
|
||||||
retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
|
|
||||||
strlen (dirname) + 1, 0, locale, NULL, NULL,
|
|
||||||
NULL, NULL, NULL, NULL, NULL, domainname, 0);
|
|
||||||
if (retval != NULL)
|
|
||||||
{
|
|
||||||
/* We know something about this locale. */
|
|
||||||
int cnt;
|
|
||||||
|
|
||||||
if (retval->decided == 0)
|
|
||||||
_nl_load_domain (retval, domainbinding);
|
|
||||||
|
|
||||||
if (retval->data != NULL)
|
|
||||||
return retval;
|
|
||||||
|
|
||||||
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
|
|
||||||
{
|
|
||||||
if (retval->successor[cnt]->decided == 0)
|
|
||||||
_nl_load_domain (retval->successor[cnt], domainbinding);
|
|
||||||
|
|
||||||
if (retval->successor[cnt]->data != NULL)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return cnt >= 0 ? retval : NULL;
|
|
||||||
/* NOTREACHED */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* See whether the locale value is an alias. If yes its value
|
|
||||||
*overwrites* the alias name. No test for the original value is
|
|
||||||
done. */
|
|
||||||
alias_value = _nl_expand_alias (locale);
|
|
||||||
if (alias_value != NULL)
|
|
||||||
{
|
|
||||||
#if defined _LIBC || defined HAVE_STRDUP
|
|
||||||
locale = strdup (alias_value);
|
|
||||||
if (locale == NULL)
|
|
||||||
return NULL;
|
|
||||||
#else
|
|
||||||
size_t len = strlen (alias_value) + 1;
|
|
||||||
locale = (char *) malloc (len);
|
|
||||||
if (locale == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
memcpy (locale, alias_value, len);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now we determine the single parts of the locale name. First
|
|
||||||
look for the language. Termination symbols are `_' and `@' if
|
|
||||||
we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
|
|
||||||
mask = _nl_explode_name (locale, &language, &modifier, &territory,
|
|
||||||
&codeset, &normalized_codeset, &special,
|
|
||||||
&sponsor, &revision);
|
|
||||||
|
|
||||||
/* Create all possible locale entries which might be interested in
|
|
||||||
generalization. */
|
|
||||||
retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
|
|
||||||
strlen (dirname) + 1, mask, language, territory,
|
|
||||||
codeset, normalized_codeset, modifier, special,
|
|
||||||
sponsor, revision, domainname, 1);
|
|
||||||
if (retval == NULL)
|
|
||||||
/* This means we are out of core. */
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if (retval->decided == 0)
|
|
||||||
_nl_load_domain (retval, domainbinding);
|
|
||||||
if (retval->data == NULL)
|
|
||||||
{
|
|
||||||
int cnt;
|
|
||||||
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
|
|
||||||
{
|
|
||||||
if (retval->successor[cnt]->decided == 0)
|
|
||||||
_nl_load_domain (retval->successor[cnt], domainbinding);
|
|
||||||
if (retval->successor[cnt]->data != NULL)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The room for an alias was dynamically allocated. Free it now. */
|
|
||||||
if (alias_value != NULL)
|
|
||||||
free (locale);
|
|
||||||
|
|
||||||
/* The space for normalized_codeset is dynamically allocated. Free it. */
|
|
||||||
if (mask & XPG_NORM_CODESET)
|
|
||||||
free ((void *) normalized_codeset);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
static void __attribute__ ((unused))
|
|
||||||
free_mem (void)
|
|
||||||
{
|
|
||||||
struct loaded_l10nfile *runp = _nl_loaded_domains;
|
|
||||||
|
|
||||||
while (runp != NULL)
|
|
||||||
{
|
|
||||||
struct loaded_l10nfile *here = runp;
|
|
||||||
if (runp->data != NULL)
|
|
||||||
_nl_unload_domain ((struct loaded_domain *) runp->data);
|
|
||||||
runp = runp->next;
|
|
||||||
free ((char *) here->filename);
|
|
||||||
free (here);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
text_set_element (__libc_subfreeres, free_mem);
|
|
||||||
#endif
|
|
|
@ -1,64 +0,0 @@
|
||||||
/* Implementation of gettext(3) function.
|
|
||||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define __need_NULL
|
|
||||||
# include <stddef.h>
|
|
||||||
#else
|
|
||||||
# include <stdlib.h> /* Just for NULL. */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "gettextP.h"
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include <libintl.h>
|
|
||||||
#else
|
|
||||||
# include "libgnuintl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
/* Names for the libintl functions are a problem. They must not clash
|
|
||||||
with existing names and they should follow ANSI C. But this source
|
|
||||||
code is also used in GNU C Library where the names have a __
|
|
||||||
prefix. So we have to make a difference here. */
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define GETTEXT __gettext
|
|
||||||
# define DCGETTEXT __dcgettext
|
|
||||||
#else
|
|
||||||
# define GETTEXT gettext__
|
|
||||||
# define DCGETTEXT dcgettext__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Look up MSGID in the current default message catalog for the current
|
|
||||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
|
||||||
text). */
|
|
||||||
char *
|
|
||||||
GETTEXT (msgid)
|
|
||||||
const char *msgid;
|
|
||||||
{
|
|
||||||
return DCGETTEXT (NULL, msgid, LC_MESSAGES);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* Alias for function name in GNU C Library. */
|
|
||||||
weak_alias (__gettext, gettext);
|
|
||||||
#endif
|
|
102
intl/gettext.h
102
intl/gettext.h
|
@ -1,102 +0,0 @@
|
||||||
/* Description of GNU message catalog format: general file layout.
|
|
||||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifndef _GETTEXT_H
|
|
||||||
#define _GETTEXT_H 1
|
|
||||||
|
|
||||||
#if HAVE_LIMITS_H || _LIBC
|
|
||||||
# include <limits.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
/* The magic number of the GNU message catalog format. */
|
|
||||||
#define _MAGIC 0x950412de
|
|
||||||
#define _MAGIC_SWAPPED 0xde120495
|
|
||||||
|
|
||||||
/* Revision number of the currently used .mo (binary) file format. */
|
|
||||||
#define MO_REVISION_NUMBER 0
|
|
||||||
|
|
||||||
/* The following contortions are an attempt to use the C preprocessor
|
|
||||||
to determine an unsigned integral type that is 32 bits wide. An
|
|
||||||
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
|
|
||||||
as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
|
|
||||||
when cross-compiling. */
|
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
# define UINT_MAX_32_BITS 4294967295U
|
|
||||||
#else
|
|
||||||
# define UINT_MAX_32_BITS 0xFFFFFFFF
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If UINT_MAX isn't defined, assume it's a 32-bit type.
|
|
||||||
This should be valid for all systems GNU cares about because
|
|
||||||
that doesn't include 16-bit systems, and only modern systems
|
|
||||||
(that certainly have <limits.h>) have 64+-bit integral types. */
|
|
||||||
|
|
||||||
#ifndef UINT_MAX
|
|
||||||
# define UINT_MAX UINT_MAX_32_BITS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if UINT_MAX == UINT_MAX_32_BITS
|
|
||||||
typedef unsigned nls_uint32;
|
|
||||||
#else
|
|
||||||
# if USHRT_MAX == UINT_MAX_32_BITS
|
|
||||||
typedef unsigned short nls_uint32;
|
|
||||||
# else
|
|
||||||
# if ULONG_MAX == UINT_MAX_32_BITS
|
|
||||||
typedef unsigned long nls_uint32;
|
|
||||||
# else
|
|
||||||
/* The following line is intended to throw an error. Using #error is
|
|
||||||
not portable enough. */
|
|
||||||
"Cannot determine unsigned 32-bit data type."
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Header for binary .mo file format. */
|
|
||||||
struct mo_file_header
|
|
||||||
{
|
|
||||||
/* The magic number. */
|
|
||||||
nls_uint32 magic;
|
|
||||||
/* The revision number of the file format. */
|
|
||||||
nls_uint32 revision;
|
|
||||||
/* The number of strings pairs. */
|
|
||||||
nls_uint32 nstrings;
|
|
||||||
/* Offset of table with start offsets of original strings. */
|
|
||||||
nls_uint32 orig_tab_offset;
|
|
||||||
/* Offset of table with start offsets of translation strings. */
|
|
||||||
nls_uint32 trans_tab_offset;
|
|
||||||
/* Size of hashing table. */
|
|
||||||
nls_uint32 hash_tab_size;
|
|
||||||
/* Offset of first hashing entry. */
|
|
||||||
nls_uint32 hash_tab_offset;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct string_desc
|
|
||||||
{
|
|
||||||
/* Length of addressed string. */
|
|
||||||
nls_uint32 length;
|
|
||||||
/* Offset of string in file. */
|
|
||||||
nls_uint32 offset;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* @@ begin of epilog @@ */
|
|
||||||
|
|
||||||
#endif /* gettext.h */
|
|
252
intl/gettextP.h
252
intl/gettextP.h
|
@ -1,252 +0,0 @@
|
||||||
/* Header describing internals of libintl library.
|
|
||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifndef _GETTEXTP_H
|
|
||||||
#define _GETTEXTP_H
|
|
||||||
|
|
||||||
#include <stddef.h> /* Get size_t. */
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include "../iconv/gconv_int.h"
|
|
||||||
#else
|
|
||||||
# if HAVE_ICONV
|
|
||||||
# include <iconv.h>
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "loadinfo.h"
|
|
||||||
|
|
||||||
#include "gettext.h" /* Get nls_uint32. */
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
#ifndef PARAMS
|
|
||||||
# if __STDC__
|
|
||||||
# define PARAMS(args) args
|
|
||||||
# else
|
|
||||||
# define PARAMS(args) ()
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef internal_function
|
|
||||||
# define internal_function
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Tell the compiler when a conditional or integer expression is
|
|
||||||
almost always true or almost always false. */
|
|
||||||
#ifndef HAVE_BUILTIN_EXPECT
|
|
||||||
# define __builtin_expect(expr, val) (expr)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef W
|
|
||||||
# define W(flag, data) ((flag) ? SWAP (data) : (data))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include <byteswap.h>
|
|
||||||
# define SWAP(i) bswap_32 (i)
|
|
||||||
#else
|
|
||||||
static inline nls_uint32
|
|
||||||
SWAP (i)
|
|
||||||
nls_uint32 i;
|
|
||||||
{
|
|
||||||
return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* This is the representation of the expressions to determine the
|
|
||||||
plural form. */
|
|
||||||
struct expression
|
|
||||||
{
|
|
||||||
int nargs; /* Number of arguments. */
|
|
||||||
enum operator
|
|
||||||
{
|
|
||||||
/* Without arguments: */
|
|
||||||
var, /* The variable "n". */
|
|
||||||
num, /* Decimal number. */
|
|
||||||
/* Unary operators: */
|
|
||||||
lnot, /* Logical NOT. */
|
|
||||||
/* Binary operators: */
|
|
||||||
mult, /* Multiplication. */
|
|
||||||
divide, /* Division. */
|
|
||||||
module, /* Module operation. */
|
|
||||||
plus, /* Addition. */
|
|
||||||
minus, /* Subtraction. */
|
|
||||||
less_than, /* Comparison. */
|
|
||||||
greater_than, /* Comparison. */
|
|
||||||
less_or_equal, /* Comparison. */
|
|
||||||
greater_or_equal, /* Comparison. */
|
|
||||||
equal, /* Comparision for equality. */
|
|
||||||
not_equal, /* Comparision for inequality. */
|
|
||||||
land, /* Logical AND. */
|
|
||||||
lor, /* Logical OR. */
|
|
||||||
/* Ternary operators: */
|
|
||||||
qmop /* Question mark operator. */
|
|
||||||
} operation;
|
|
||||||
union
|
|
||||||
{
|
|
||||||
unsigned long int num; /* Number value for `num'. */
|
|
||||||
struct expression *args[3]; /* Up to three arguments. */
|
|
||||||
} val;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* This is the data structure to pass information to the parser and get
|
|
||||||
the result in a thread-safe way. */
|
|
||||||
struct parse_args
|
|
||||||
{
|
|
||||||
const char *cp;
|
|
||||||
struct expression *res;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* The representation of an opened message catalog. */
|
|
||||||
struct loaded_domain
|
|
||||||
{
|
|
||||||
const char *data;
|
|
||||||
int use_mmap;
|
|
||||||
size_t mmap_size;
|
|
||||||
int must_swap;
|
|
||||||
nls_uint32 nstrings;
|
|
||||||
struct string_desc *orig_tab;
|
|
||||||
struct string_desc *trans_tab;
|
|
||||||
nls_uint32 hash_size;
|
|
||||||
nls_uint32 *hash_tab;
|
|
||||||
int codeset_cntr;
|
|
||||||
#ifdef _LIBC
|
|
||||||
__gconv_t conv;
|
|
||||||
#else
|
|
||||||
# if HAVE_ICONV
|
|
||||||
iconv_t conv;
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
char **conv_tab;
|
|
||||||
|
|
||||||
struct expression *plural;
|
|
||||||
unsigned long int nplurals;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* We want to allocate a string at the end of the struct. But ISO C
|
|
||||||
doesn't allow zero sized arrays. */
|
|
||||||
#ifdef __GNUC__
|
|
||||||
# define ZERO 0
|
|
||||||
#else
|
|
||||||
# define ZERO 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* A set of settings bound to a message domain. Used to store settings
|
|
||||||
from bindtextdomain() and bind_textdomain_codeset(). */
|
|
||||||
struct binding
|
|
||||||
{
|
|
||||||
struct binding *next;
|
|
||||||
char *dirname;
|
|
||||||
int codeset_cntr; /* Incremented each time codeset changes. */
|
|
||||||
char *codeset;
|
|
||||||
char domainname[ZERO];
|
|
||||||
};
|
|
||||||
|
|
||||||
/* A counter which is incremented each time some previous translations
|
|
||||||
become invalid.
|
|
||||||
This variable is part of the external ABI of the GNU libintl. */
|
|
||||||
extern int _nl_msg_cat_cntr;
|
|
||||||
|
|
||||||
struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
|
|
||||||
char *__locale,
|
|
||||||
const char *__domainname,
|
|
||||||
struct binding *__domainbinding))
|
|
||||||
internal_function;
|
|
||||||
void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain,
|
|
||||||
struct binding *__domainbinding))
|
|
||||||
internal_function;
|
|
||||||
void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
|
|
||||||
internal_function;
|
|
||||||
const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file,
|
|
||||||
struct loaded_domain *__domain,
|
|
||||||
struct binding *__domainbinding))
|
|
||||||
internal_function;
|
|
||||||
void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain))
|
|
||||||
internal_function;
|
|
||||||
|
|
||||||
char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
|
|
||||||
struct binding *domainbinding,
|
|
||||||
const char *msgid, size_t *lengthp))
|
|
||||||
internal_function;
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
extern char *__gettext PARAMS ((const char *__msgid));
|
|
||||||
extern char *__dgettext PARAMS ((const char *__domainname,
|
|
||||||
const char *__msgid));
|
|
||||||
extern char *__dcgettext PARAMS ((const char *__domainname,
|
|
||||||
const char *__msgid, int __category));
|
|
||||||
extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
|
|
||||||
unsigned long int __n));
|
|
||||||
extern char *__dngettext PARAMS ((const char *__domainname,
|
|
||||||
const char *__msgid1, const char *__msgid2,
|
|
||||||
unsigned long int n));
|
|
||||||
extern char *__dcngettext PARAMS ((const char *__domainname,
|
|
||||||
const char *__msgid1, const char *__msgid2,
|
|
||||||
unsigned long int __n, int __category));
|
|
||||||
extern char *__dcigettext PARAMS ((const char *__domainname,
|
|
||||||
const char *__msgid1, const char *__msgid2,
|
|
||||||
int __plural, unsigned long int __n,
|
|
||||||
int __category));
|
|
||||||
extern char *__textdomain PARAMS ((const char *__domainname));
|
|
||||||
extern char *__bindtextdomain PARAMS ((const char *__domainname,
|
|
||||||
const char *__dirname));
|
|
||||||
extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
|
|
||||||
const char *__codeset));
|
|
||||||
#else
|
|
||||||
extern char *gettext__ PARAMS ((const char *__msgid));
|
|
||||||
extern char *dgettext__ PARAMS ((const char *__domainname,
|
|
||||||
const char *__msgid));
|
|
||||||
extern char *dcgettext__ PARAMS ((const char *__domainname,
|
|
||||||
const char *__msgid, int __category));
|
|
||||||
extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
|
|
||||||
unsigned long int __n));
|
|
||||||
extern char *dngettext__ PARAMS ((const char *__domainname,
|
|
||||||
const char *__msgid1, const char *__msgid2,
|
|
||||||
unsigned long int __n));
|
|
||||||
extern char *dcngettext__ PARAMS ((const char *__domainname,
|
|
||||||
const char *__msgid1, const char *__msgid2,
|
|
||||||
unsigned long int __n, int __category));
|
|
||||||
extern char *dcigettext__ PARAMS ((const char *__domainname,
|
|
||||||
const char *__msgid1, const char *__msgid2,
|
|
||||||
int __plural, unsigned long int __n,
|
|
||||||
int __category));
|
|
||||||
extern char *textdomain__ PARAMS ((const char *__domainname));
|
|
||||||
extern char *bindtextdomain__ PARAMS ((const char *__domainname,
|
|
||||||
const char *__dirname));
|
|
||||||
extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
|
|
||||||
const char *__codeset));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
extern void __gettext_free_exp PARAMS ((struct expression *exp))
|
|
||||||
internal_function;
|
|
||||||
extern int __gettextparse PARAMS ((void *arg));
|
|
||||||
#else
|
|
||||||
extern void gettext_free_exp__ PARAMS ((struct expression *exp))
|
|
||||||
internal_function;
|
|
||||||
extern int gettextparse__ PARAMS ((void *arg));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ begin of epilog @@ */
|
|
||||||
|
|
||||||
#endif /* gettextP.h */
|
|
|
@ -1,59 +0,0 @@
|
||||||
/* Description of GNU message catalog format: string hashing function.
|
|
||||||
Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
#ifndef PARAMS
|
|
||||||
# if __STDC__
|
|
||||||
# define PARAMS(Args) Args
|
|
||||||
# else
|
|
||||||
# define PARAMS(Args) ()
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* We assume to have `unsigned long int' value with at least 32 bits. */
|
|
||||||
#define HASHWORDBITS 32
|
|
||||||
|
|
||||||
|
|
||||||
/* Defines the so called `hashpjw' function by P.J. Weinberger
|
|
||||||
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
|
|
||||||
1986, 1987 Bell Telephone Laboratories, Inc.] */
|
|
||||||
static unsigned long int hash_string PARAMS ((const char *__str_param));
|
|
||||||
|
|
||||||
static inline unsigned long int
|
|
||||||
hash_string (str_param)
|
|
||||||
const char *str_param;
|
|
||||||
{
|
|
||||||
unsigned long int hval, g;
|
|
||||||
const char *str = str_param;
|
|
||||||
|
|
||||||
/* Compute the hash value for the given string. */
|
|
||||||
hval = 0;
|
|
||||||
while (*str != '\0')
|
|
||||||
{
|
|
||||||
hval <<= 4;
|
|
||||||
hval += (unsigned long int) *str++;
|
|
||||||
g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
|
|
||||||
if (g != 0)
|
|
||||||
{
|
|
||||||
hval ^= g >> (HASHWORDBITS - 8);
|
|
||||||
hval ^= g;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return hval;
|
|
||||||
}
|
|
|
@ -1,166 +0,0 @@
|
||||||
/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
|
|
||||||
Library.
|
|
||||||
Copyright (C) 1995, 2000, 2001 Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "libgnuintl.h"
|
|
||||||
#include "gettextP.h"
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
/* This file redirects the gettext functions (without prefix or suffix) to
|
|
||||||
those defined in the included GNU gettext library (with "__" suffix).
|
|
||||||
It is compiled into libintl when the included GNU gettext library is
|
|
||||||
configured --with-included-gettext.
|
|
||||||
|
|
||||||
This redirection works also in the case that the system C library or
|
|
||||||
the system libintl library contain gettext/textdomain/... functions.
|
|
||||||
If it didn't, we would need to add preprocessor level redirections to
|
|
||||||
libgnuintl.h of the following form:
|
|
||||||
|
|
||||||
# define gettext gettext__
|
|
||||||
# define dgettext dgettext__
|
|
||||||
# define dcgettext dcgettext__
|
|
||||||
# define ngettext ngettext__
|
|
||||||
# define dngettext dngettext__
|
|
||||||
# define dcngettext dcngettext__
|
|
||||||
# define textdomain textdomain__
|
|
||||||
# define bindtextdomain bindtextdomain__
|
|
||||||
# define bind_textdomain_codeset bind_textdomain_codeset__
|
|
||||||
|
|
||||||
How does this redirection work? There are two cases.
|
|
||||||
A. When libintl.a is linked into an executable, it works because
|
|
||||||
functions defined in the executable always override functions in
|
|
||||||
the shared libraries.
|
|
||||||
B. When libintl.so is used, it works because
|
|
||||||
1. those systems defining gettext/textdomain/... in the C library
|
|
||||||
(namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer) are
|
|
||||||
ELF systems and define these symbols as weak, thus explicitly
|
|
||||||
letting other shared libraries override it.
|
|
||||||
2. those systems defining gettext/textdomain/... in a standalone
|
|
||||||
libintl.so library (namely, Solaris 2.3 and newer) have this
|
|
||||||
shared library in /usr/lib, and the linker will search /usr/lib
|
|
||||||
*after* the directory where the GNU gettext library is installed.
|
|
||||||
|
|
||||||
A third case, namely when libintl.a is linked into a shared library
|
|
||||||
whose name is not libintl.so, is not supported. In this case, on
|
|
||||||
Solaris, when -lintl precedes the linker option for the shared library
|
|
||||||
containing GNU gettext, the system's gettext would indeed override
|
|
||||||
the GNU gettext. Anyone doing this kind of stuff must be clever enough
|
|
||||||
to 1. compile libintl.a with -fPIC, 2. remove -lintl from his linker
|
|
||||||
command line. */
|
|
||||||
|
|
||||||
|
|
||||||
#undef gettext
|
|
||||||
#undef dgettext
|
|
||||||
#undef dcgettext
|
|
||||||
#undef ngettext
|
|
||||||
#undef dngettext
|
|
||||||
#undef dcngettext
|
|
||||||
#undef textdomain
|
|
||||||
#undef bindtextdomain
|
|
||||||
#undef bind_textdomain_codeset
|
|
||||||
|
|
||||||
|
|
||||||
char *
|
|
||||||
gettext (msgid)
|
|
||||||
const char *msgid;
|
|
||||||
{
|
|
||||||
return gettext__ (msgid);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char *
|
|
||||||
dgettext (domainname, msgid)
|
|
||||||
const char *domainname;
|
|
||||||
const char *msgid;
|
|
||||||
{
|
|
||||||
return dgettext__ (domainname, msgid);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char *
|
|
||||||
dcgettext (domainname, msgid, category)
|
|
||||||
const char *domainname;
|
|
||||||
const char *msgid;
|
|
||||||
int category;
|
|
||||||
{
|
|
||||||
return dcgettext__ (domainname, msgid, category);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char *
|
|
||||||
ngettext (msgid1, msgid2, n)
|
|
||||||
const char *msgid1;
|
|
||||||
const char *msgid2;
|
|
||||||
unsigned long int n;
|
|
||||||
{
|
|
||||||
return ngettext__ (msgid1, msgid2, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char *
|
|
||||||
dngettext (domainname, msgid1, msgid2, n)
|
|
||||||
const char *domainname;
|
|
||||||
const char *msgid1;
|
|
||||||
const char *msgid2;
|
|
||||||
unsigned long int n;
|
|
||||||
{
|
|
||||||
return dngettext__ (domainname, msgid1, msgid2, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char *
|
|
||||||
dcngettext (domainname, msgid1, msgid2, n, category)
|
|
||||||
const char *domainname;
|
|
||||||
const char *msgid1;
|
|
||||||
const char *msgid2;
|
|
||||||
unsigned long int n;
|
|
||||||
int category;
|
|
||||||
{
|
|
||||||
return dcngettext__ (domainname, msgid1, msgid2, n, category);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char *
|
|
||||||
textdomain (domainname)
|
|
||||||
const char *domainname;
|
|
||||||
{
|
|
||||||
return textdomain__ (domainname);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char *
|
|
||||||
bindtextdomain (domainname, dirname)
|
|
||||||
const char *domainname;
|
|
||||||
const char *dirname;
|
|
||||||
{
|
|
||||||
return bindtextdomain__ (domainname, dirname);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char *
|
|
||||||
bind_textdomain_codeset (domainname, codeset)
|
|
||||||
const char *domainname;
|
|
||||||
const char *codeset;
|
|
||||||
{
|
|
||||||
return bind_textdomain_codeset__ (domainname, codeset);
|
|
||||||
}
|
|
405
intl/l10nflist.c
405
intl/l10nflist.c
|
@ -1,405 +0,0 @@
|
||||||
/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
/* Tell glibc's <string.h> to provide a prototype for stpcpy().
|
|
||||||
This must come before <config.h> because <config.h> may include
|
|
||||||
<features.h>, and once <features.h> has been included, it's too late. */
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
# define _GNU_SOURCE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#if !HAVE_STRCHR && !defined _LIBC
|
|
||||||
# ifndef strchr
|
|
||||||
# define strchr index
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined _LIBC || defined HAVE_ARGZ_H
|
|
||||||
# include <argz.h>
|
|
||||||
#endif
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "loadinfo.h"
|
|
||||||
|
|
||||||
/* On some strange systems still no definition of NULL is found. Sigh! */
|
|
||||||
#ifndef NULL
|
|
||||||
# if defined __STDC__ && __STDC__
|
|
||||||
# define NULL ((void *) 0)
|
|
||||||
# else
|
|
||||||
# define NULL 0
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* Rename the non ANSI C functions. This is required by the standard
|
|
||||||
because some ANSI C functions will require linking with this object
|
|
||||||
file and the name space must not be polluted. */
|
|
||||||
# ifndef stpcpy
|
|
||||||
# define stpcpy(dest, src) __stpcpy(dest, src)
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# ifndef HAVE_STPCPY
|
|
||||||
static char *stpcpy PARAMS ((char *dest, const char *src));
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define function which are usually not available. */
|
|
||||||
|
|
||||||
#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
|
|
||||||
/* Returns the number of strings in ARGZ. */
|
|
||||||
static size_t argz_count__ PARAMS ((const char *argz, size_t len));
|
|
||||||
|
|
||||||
static size_t
|
|
||||||
argz_count__ (argz, len)
|
|
||||||
const char *argz;
|
|
||||||
size_t len;
|
|
||||||
{
|
|
||||||
size_t count = 0;
|
|
||||||
while (len > 0)
|
|
||||||
{
|
|
||||||
size_t part_len = strlen (argz);
|
|
||||||
argz += part_len + 1;
|
|
||||||
len -= part_len + 1;
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
# undef __argz_count
|
|
||||||
# define __argz_count(argz, len) argz_count__ (argz, len)
|
|
||||||
#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
|
|
||||||
|
|
||||||
#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
|
|
||||||
/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
|
|
||||||
except the last into the character SEP. */
|
|
||||||
static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
|
|
||||||
|
|
||||||
static void
|
|
||||||
argz_stringify__ (argz, len, sep)
|
|
||||||
char *argz;
|
|
||||||
size_t len;
|
|
||||||
int sep;
|
|
||||||
{
|
|
||||||
while (len > 0)
|
|
||||||
{
|
|
||||||
size_t part_len = strlen (argz);
|
|
||||||
argz += part_len;
|
|
||||||
len -= part_len + 1;
|
|
||||||
if (len > 0)
|
|
||||||
*argz++ = sep;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# undef __argz_stringify
|
|
||||||
# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
|
|
||||||
#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
|
|
||||||
|
|
||||||
#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
|
|
||||||
static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
|
|
||||||
const char *entry));
|
|
||||||
|
|
||||||
static char *
|
|
||||||
argz_next__ (argz, argz_len, entry)
|
|
||||||
char *argz;
|
|
||||||
size_t argz_len;
|
|
||||||
const char *entry;
|
|
||||||
{
|
|
||||||
if (entry)
|
|
||||||
{
|
|
||||||
if (entry < argz + argz_len)
|
|
||||||
entry = strchr (entry, '\0') + 1;
|
|
||||||
|
|
||||||
return entry >= argz + argz_len ? NULL : (char *) entry;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (argz_len > 0)
|
|
||||||
return argz;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
# undef __argz_next
|
|
||||||
# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
|
|
||||||
#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
|
|
||||||
|
|
||||||
|
|
||||||
/* Return number of bits set in X. */
|
|
||||||
static int pop PARAMS ((int x));
|
|
||||||
|
|
||||||
static inline int
|
|
||||||
pop (x)
|
|
||||||
int x;
|
|
||||||
{
|
|
||||||
/* We assume that no more than 16 bits are used. */
|
|
||||||
x = ((x & ~0x5555) >> 1) + (x & 0x5555);
|
|
||||||
x = ((x & ~0x3333) >> 2) + (x & 0x3333);
|
|
||||||
x = ((x >> 4) + x) & 0x0f0f;
|
|
||||||
x = ((x >> 8) + x) & 0xff;
|
|
||||||
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
struct loaded_l10nfile *
|
|
||||||
_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
|
|
||||||
territory, codeset, normalized_codeset, modifier, special,
|
|
||||||
sponsor, revision, filename, do_allocate)
|
|
||||||
struct loaded_l10nfile **l10nfile_list;
|
|
||||||
const char *dirlist;
|
|
||||||
size_t dirlist_len;
|
|
||||||
int mask;
|
|
||||||
const char *language;
|
|
||||||
const char *territory;
|
|
||||||
const char *codeset;
|
|
||||||
const char *normalized_codeset;
|
|
||||||
const char *modifier;
|
|
||||||
const char *special;
|
|
||||||
const char *sponsor;
|
|
||||||
const char *revision;
|
|
||||||
const char *filename;
|
|
||||||
int do_allocate;
|
|
||||||
{
|
|
||||||
char *abs_filename;
|
|
||||||
struct loaded_l10nfile *last = NULL;
|
|
||||||
struct loaded_l10nfile *retval;
|
|
||||||
char *cp;
|
|
||||||
size_t entries;
|
|
||||||
int cnt;
|
|
||||||
|
|
||||||
/* Allocate room for the full file name. */
|
|
||||||
abs_filename = (char *) malloc (dirlist_len
|
|
||||||
+ strlen (language)
|
|
||||||
+ ((mask & TERRITORY) != 0
|
|
||||||
? strlen (territory) + 1 : 0)
|
|
||||||
+ ((mask & XPG_CODESET) != 0
|
|
||||||
? strlen (codeset) + 1 : 0)
|
|
||||||
+ ((mask & XPG_NORM_CODESET) != 0
|
|
||||||
? strlen (normalized_codeset) + 1 : 0)
|
|
||||||
+ (((mask & XPG_MODIFIER) != 0
|
|
||||||
|| (mask & CEN_AUDIENCE) != 0)
|
|
||||||
? strlen (modifier) + 1 : 0)
|
|
||||||
+ ((mask & CEN_SPECIAL) != 0
|
|
||||||
? strlen (special) + 1 : 0)
|
|
||||||
+ (((mask & CEN_SPONSOR) != 0
|
|
||||||
|| (mask & CEN_REVISION) != 0)
|
|
||||||
? (1 + ((mask & CEN_SPONSOR) != 0
|
|
||||||
? strlen (sponsor) + 1 : 0)
|
|
||||||
+ ((mask & CEN_REVISION) != 0
|
|
||||||
? strlen (revision) + 1 : 0)) : 0)
|
|
||||||
+ 1 + strlen (filename) + 1);
|
|
||||||
|
|
||||||
if (abs_filename == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
retval = NULL;
|
|
||||||
last = NULL;
|
|
||||||
|
|
||||||
/* Construct file name. */
|
|
||||||
memcpy (abs_filename, dirlist, dirlist_len);
|
|
||||||
__argz_stringify (abs_filename, dirlist_len, PATH_SEPARATOR);
|
|
||||||
cp = abs_filename + (dirlist_len - 1);
|
|
||||||
*cp++ = '/';
|
|
||||||
cp = stpcpy (cp, language);
|
|
||||||
|
|
||||||
if ((mask & TERRITORY) != 0)
|
|
||||||
{
|
|
||||||
*cp++ = '_';
|
|
||||||
cp = stpcpy (cp, territory);
|
|
||||||
}
|
|
||||||
if ((mask & XPG_CODESET) != 0)
|
|
||||||
{
|
|
||||||
*cp++ = '.';
|
|
||||||
cp = stpcpy (cp, codeset);
|
|
||||||
}
|
|
||||||
if ((mask & XPG_NORM_CODESET) != 0)
|
|
||||||
{
|
|
||||||
*cp++ = '.';
|
|
||||||
cp = stpcpy (cp, normalized_codeset);
|
|
||||||
}
|
|
||||||
if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
|
|
||||||
{
|
|
||||||
/* This component can be part of both syntaces but has different
|
|
||||||
leading characters. For CEN we use `+', else `@'. */
|
|
||||||
*cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
|
|
||||||
cp = stpcpy (cp, modifier);
|
|
||||||
}
|
|
||||||
if ((mask & CEN_SPECIAL) != 0)
|
|
||||||
{
|
|
||||||
*cp++ = '+';
|
|
||||||
cp = stpcpy (cp, special);
|
|
||||||
}
|
|
||||||
if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
|
|
||||||
{
|
|
||||||
*cp++ = ',';
|
|
||||||
if ((mask & CEN_SPONSOR) != 0)
|
|
||||||
cp = stpcpy (cp, sponsor);
|
|
||||||
if ((mask & CEN_REVISION) != 0)
|
|
||||||
{
|
|
||||||
*cp++ = '_';
|
|
||||||
cp = stpcpy (cp, revision);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
*cp++ = '/';
|
|
||||||
stpcpy (cp, filename);
|
|
||||||
|
|
||||||
/* Look in list of already loaded domains whether it is already
|
|
||||||
available. */
|
|
||||||
last = NULL;
|
|
||||||
for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
|
|
||||||
if (retval->filename != NULL)
|
|
||||||
{
|
|
||||||
int compare = strcmp (retval->filename, abs_filename);
|
|
||||||
if (compare == 0)
|
|
||||||
/* We found it! */
|
|
||||||
break;
|
|
||||||
if (compare < 0)
|
|
||||||
{
|
|
||||||
/* It's not in the list. */
|
|
||||||
retval = NULL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
last = retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (retval != NULL || do_allocate == 0)
|
|
||||||
{
|
|
||||||
free (abs_filename);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
retval = (struct loaded_l10nfile *)
|
|
||||||
malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
|
|
||||||
* (1 << pop (mask))
|
|
||||||
* sizeof (struct loaded_l10nfile *)));
|
|
||||||
if (retval == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
retval->filename = abs_filename;
|
|
||||||
retval->decided = (__argz_count (dirlist, dirlist_len) != 1
|
|
||||||
|| ((mask & XPG_CODESET) != 0
|
|
||||||
&& (mask & XPG_NORM_CODESET) != 0));
|
|
||||||
retval->data = NULL;
|
|
||||||
|
|
||||||
if (last == NULL)
|
|
||||||
{
|
|
||||||
retval->next = *l10nfile_list;
|
|
||||||
*l10nfile_list = retval;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
retval->next = last->next;
|
|
||||||
last->next = retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
entries = 0;
|
|
||||||
/* If the DIRLIST is a real list the RETVAL entry corresponds not to
|
|
||||||
a real file. So we have to use the DIRLIST separation mechanism
|
|
||||||
of the inner loop. */
|
|
||||||
cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
|
|
||||||
for (; cnt >= 0; --cnt)
|
|
||||||
if ((cnt & ~mask) == 0
|
|
||||||
&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
|
|
||||||
&& ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
|
|
||||||
{
|
|
||||||
/* Iterate over all elements of the DIRLIST. */
|
|
||||||
char *dir = NULL;
|
|
||||||
|
|
||||||
while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
|
|
||||||
!= NULL)
|
|
||||||
retval->successor[entries++]
|
|
||||||
= _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
|
|
||||||
language, territory, codeset,
|
|
||||||
normalized_codeset, modifier, special,
|
|
||||||
sponsor, revision, filename, 1);
|
|
||||||
}
|
|
||||||
retval->successor[entries] = NULL;
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Normalize codeset name. There is no standard for the codeset
|
|
||||||
names. Normalization allows the user to use any of the common
|
|
||||||
names. The return value is dynamically allocated and has to be
|
|
||||||
freed by the caller. */
|
|
||||||
const char *
|
|
||||||
_nl_normalize_codeset (codeset, name_len)
|
|
||||||
const char *codeset;
|
|
||||||
size_t name_len;
|
|
||||||
{
|
|
||||||
int len = 0;
|
|
||||||
int only_digit = 1;
|
|
||||||
char *retval;
|
|
||||||
char *wp;
|
|
||||||
size_t cnt;
|
|
||||||
|
|
||||||
for (cnt = 0; cnt < name_len; ++cnt)
|
|
||||||
if (isalnum (codeset[cnt]))
|
|
||||||
{
|
|
||||||
++len;
|
|
||||||
|
|
||||||
if (isalpha (codeset[cnt]))
|
|
||||||
only_digit = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
|
|
||||||
|
|
||||||
if (retval != NULL)
|
|
||||||
{
|
|
||||||
if (only_digit)
|
|
||||||
wp = stpcpy (retval, "iso");
|
|
||||||
else
|
|
||||||
wp = retval;
|
|
||||||
|
|
||||||
for (cnt = 0; cnt < name_len; ++cnt)
|
|
||||||
if (isalpha (codeset[cnt]))
|
|
||||||
*wp++ = tolower (codeset[cnt]);
|
|
||||||
else if (isdigit (codeset[cnt]))
|
|
||||||
*wp++ = codeset[cnt];
|
|
||||||
|
|
||||||
*wp = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
return (const char *) retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* @@ begin of epilog @@ */
|
|
||||||
|
|
||||||
/* We don't want libintl.a to depend on any other library. So we
|
|
||||||
avoid the non-standard function stpcpy. In GNU C Library this
|
|
||||||
function is available, though. Also allow the symbol HAVE_STPCPY
|
|
||||||
to be defined. */
|
|
||||||
#if !_LIBC && !HAVE_STPCPY
|
|
||||||
static char *
|
|
||||||
stpcpy (dest, src)
|
|
||||||
char *dest;
|
|
||||||
const char *src;
|
|
||||||
{
|
|
||||||
while ((*dest++ = *src++) != '\0')
|
|
||||||
/* Do nothing. */ ;
|
|
||||||
return dest - 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
|
@ -1,49 +0,0 @@
|
||||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
|
||||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
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 <libintl.h>
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
# define gettext(Msgid) (Msgid)
|
|
||||||
# define dgettext(Domainname, Msgid) (Msgid)
|
|
||||||
# define dcgettext(Domainname, Msgid, Category) (Msgid)
|
|
||||||
# define ngettext(Msgid1, Msgid2, N) \
|
|
||||||
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
|
|
||||||
# define dngettext(Domainname, Msgid1, Msgid2, N) \
|
|
||||||
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
|
|
||||||
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
|
|
||||||
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
|
|
||||||
# define textdomain(Domainname) ((char *) (Domainname))
|
|
||||||
# define bindtextdomain(Domainname, Dirname) ((char *) (Dirname))
|
|
||||||
# define bind_textdomain_codeset(Domainname, Codeset) ((char *) (Codeset))
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* For automatical extraction of messages sometimes no real
|
|
||||||
translation is needed. Instead the string itself is the result. */
|
|
||||||
#define gettext_noop(Str) (Str)
|
|
||||||
|
|
||||||
#endif /* _LIBGETTEXT_H */
|
|
|
@ -1,128 +0,0 @@
|
||||||
/* Message catalogs for internationalization.
|
|
||||||
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifndef _LIBINTL_H
|
|
||||||
#define _LIBINTL_H 1
|
|
||||||
|
|
||||||
#include <locale.h>
|
|
||||||
|
|
||||||
/* The LC_MESSAGES locale category is the category used by the functions
|
|
||||||
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
|
|
||||||
On systems that don't define it, use an arbitrary value instead.
|
|
||||||
On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
|
|
||||||
this file!) and then only defines LC_MESSAGES. To avoid a redefinition
|
|
||||||
warning, don't define LC_MESSAGES in this case. */
|
|
||||||
#if !defined LC_MESSAGES && !defined __LOCALE_H
|
|
||||||
# define LC_MESSAGES 1729
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* We define an additional symbol to signal that we use the GNU
|
|
||||||
implementation of gettext. */
|
|
||||||
#define __USE_GNU_GETTEXT 1
|
|
||||||
|
|
||||||
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
|
|
||||||
precedence over _conio_gettext. */
|
|
||||||
#ifdef __DJGPP__
|
|
||||||
# undef gettext
|
|
||||||
# define gettext gettext
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef PARAMS
|
|
||||||
# if __STDC__ || defined __cplusplus
|
|
||||||
# define PARAMS(args) args
|
|
||||||
# else
|
|
||||||
# define PARAMS(args) ()
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Look up MSGID in the current default message catalog for the current
|
|
||||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
|
||||||
text). */
|
|
||||||
extern char *gettext PARAMS ((const char *__msgid));
|
|
||||||
|
|
||||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
|
||||||
LC_MESSAGES locale. */
|
|
||||||
extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
|
|
||||||
|
|
||||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
|
||||||
locale. */
|
|
||||||
extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
|
|
||||||
int __category));
|
|
||||||
|
|
||||||
|
|
||||||
/* Similar to `gettext' but select the plural form corresponding to the
|
|
||||||
number N. */
|
|
||||||
extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
|
|
||||||
unsigned long int __n));
|
|
||||||
|
|
||||||
/* Similar to `dgettext' but select the plural form corresponding to the
|
|
||||||
number N. */
|
|
||||||
extern char *dngettext PARAMS ((const char *__domainname, const char *__msgid1,
|
|
||||||
const char *__msgid2, unsigned long int __n));
|
|
||||||
|
|
||||||
/* Similar to `dcgettext' but select the plural form corresponding to the
|
|
||||||
number N. */
|
|
||||||
extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
|
|
||||||
const char *__msgid2, unsigned long int __n,
|
|
||||||
int __category));
|
|
||||||
|
|
||||||
|
|
||||||
/* Set the current default message catalog to DOMAINNAME.
|
|
||||||
If DOMAINNAME is null, return the current default.
|
|
||||||
If DOMAINNAME is "", reset to the default of "messages". */
|
|
||||||
extern char *textdomain PARAMS ((const char *__domainname));
|
|
||||||
|
|
||||||
/* Specify that the DOMAINNAME message catalog will be found
|
|
||||||
in DIRNAME rather than in the system locale data base. */
|
|
||||||
extern char *bindtextdomain PARAMS ((const char *__domainname,
|
|
||||||
const char *__dirname));
|
|
||||||
|
|
||||||
/* Specify the character encoding in which the messages from the
|
|
||||||
DOMAINNAME message catalog will be returned. */
|
|
||||||
extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
|
|
||||||
const char *__codeset));
|
|
||||||
|
|
||||||
|
|
||||||
/* Optimized version of the functions above. */
|
|
||||||
#if defined __OPTIMIZED
|
|
||||||
/* These are macros, but could also be inline functions. */
|
|
||||||
|
|
||||||
# define gettext(msgid) \
|
|
||||||
dgettext (NULL, msgid)
|
|
||||||
|
|
||||||
# define dgettext(domainname, msgid) \
|
|
||||||
dcgettext (domainname, msgid, LC_MESSAGES)
|
|
||||||
|
|
||||||
# define ngettext(msgid1, msgid2, n) \
|
|
||||||
dngettext (NULL, msgid1, msgid2, n)
|
|
||||||
|
|
||||||
# define dngettext(domainname, msgid1, msgid2, n) \
|
|
||||||
dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
|
|
||||||
|
|
||||||
#endif /* Optimizing. */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* libintl.h */
|
|
109
intl/loadinfo.h
109
intl/loadinfo.h
|
@ -1,109 +0,0 @@
|
||||||
/* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifndef _LOADINFO_H
|
|
||||||
#define _LOADINFO_H 1
|
|
||||||
|
|
||||||
#ifndef PARAMS
|
|
||||||
# if __STDC__
|
|
||||||
# define PARAMS(args) args
|
|
||||||
# else
|
|
||||||
# define PARAMS(args) ()
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef internal_function
|
|
||||||
# define internal_function
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Tell the compiler when a conditional or integer expression is
|
|
||||||
almost always true or almost always false. */
|
|
||||||
#ifndef HAVE_BUILTIN_EXPECT
|
|
||||||
# define __builtin_expect(expr, val) (expr)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Separator in PATH like lists of pathnames. */
|
|
||||||
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
|
|
||||||
/* Win32, OS/2, DOS */
|
|
||||||
# define PATH_SEPARATOR ';'
|
|
||||||
#else
|
|
||||||
/* Unix */
|
|
||||||
# define PATH_SEPARATOR ':'
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Encoding of locale name parts. */
|
|
||||||
#define CEN_REVISION 1
|
|
||||||
#define CEN_SPONSOR 2
|
|
||||||
#define CEN_SPECIAL 4
|
|
||||||
#define XPG_NORM_CODESET 8
|
|
||||||
#define XPG_CODESET 16
|
|
||||||
#define TERRITORY 32
|
|
||||||
#define CEN_AUDIENCE 64
|
|
||||||
#define XPG_MODIFIER 128
|
|
||||||
|
|
||||||
#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
|
|
||||||
#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
|
|
||||||
|
|
||||||
|
|
||||||
struct loaded_l10nfile
|
|
||||||
{
|
|
||||||
const char *filename;
|
|
||||||
int decided;
|
|
||||||
|
|
||||||
const void *data;
|
|
||||||
|
|
||||||
struct loaded_l10nfile *next;
|
|
||||||
struct loaded_l10nfile *successor[1];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Normalize codeset name. There is no standard for the codeset
|
|
||||||
names. Normalization allows the user to use any of the common
|
|
||||||
names. The return value is dynamically allocated and has to be
|
|
||||||
freed by the caller. */
|
|
||||||
extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
|
|
||||||
size_t name_len));
|
|
||||||
|
|
||||||
extern struct loaded_l10nfile *
|
|
||||||
_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
|
|
||||||
const char *dirlist, size_t dirlist_len, int mask,
|
|
||||||
const char *language, const char *territory,
|
|
||||||
const char *codeset,
|
|
||||||
const char *normalized_codeset,
|
|
||||||
const char *modifier, const char *special,
|
|
||||||
const char *sponsor, const char *revision,
|
|
||||||
const char *filename, int do_allocate));
|
|
||||||
|
|
||||||
|
|
||||||
extern const char *_nl_expand_alias PARAMS ((const char *name));
|
|
||||||
|
|
||||||
/* normalized_codeset is dynamically allocated and has to be freed by
|
|
||||||
the caller. */
|
|
||||||
extern int _nl_explode_name PARAMS ((char *name, const char **language,
|
|
||||||
const char **modifier,
|
|
||||||
const char **territory,
|
|
||||||
const char **codeset,
|
|
||||||
const char **normalized_codeset,
|
|
||||||
const char **special,
|
|
||||||
const char **sponsor,
|
|
||||||
const char **revision));
|
|
||||||
|
|
||||||
extern char *_nl_find_language PARAMS ((const char *name));
|
|
||||||
|
|
||||||
#endif /* loadinfo.h */
|
|
|
@ -1,567 +0,0 @@
|
||||||
/* Load needed message catalogs.
|
|
||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
|
||||||
This must come before <config.h> because <config.h> may include
|
|
||||||
<features.h>, and once <features.h> has been included, it's too late. */
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
# define _GNU_SOURCE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
# define alloca __builtin_alloca
|
|
||||||
# define HAVE_ALLOCA 1
|
|
||||||
#else
|
|
||||||
# if defined HAVE_ALLOCA_H || defined _LIBC
|
|
||||||
# include <alloca.h>
|
|
||||||
# else
|
|
||||||
# ifdef _AIX
|
|
||||||
#pragma alloca
|
|
||||||
# else
|
|
||||||
# ifndef alloca
|
|
||||||
char *alloca ();
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#if defined HAVE_UNISTD_H || defined _LIBC
|
|
||||||
# include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include <langinfo.h>
|
|
||||||
# include <locale.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|
|
||||||
|| (defined _LIBC && defined _POSIX_MAPPED_FILES)
|
|
||||||
# include <sys/mman.h>
|
|
||||||
# undef HAVE_MMAP
|
|
||||||
# define HAVE_MMAP 1
|
|
||||||
#else
|
|
||||||
# undef HAVE_MMAP
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "gettext.h"
|
|
||||||
#include "gettextP.h"
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include "../locale/localeinfo.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* Rename the non ISO C functions. This is required by the standard
|
|
||||||
because some ISO C functions will require linking with this object
|
|
||||||
file and the name space must not be polluted. */
|
|
||||||
# define open __open
|
|
||||||
# define close __close
|
|
||||||
# define read __read
|
|
||||||
# define mmap __mmap
|
|
||||||
# define munmap __munmap
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Names for the libintl functions are a problem. They must not clash
|
|
||||||
with existing names and they should follow ANSI C. But this source
|
|
||||||
code is also used in GNU C Library where the names have a __
|
|
||||||
prefix. So we have to make a difference here. */
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define PLURAL_PARSE __gettextparse
|
|
||||||
#else
|
|
||||||
# define PLURAL_PARSE gettextparse__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* For those losing systems which don't have `alloca' we have to add
|
|
||||||
some additional code emulating it. */
|
|
||||||
#ifdef HAVE_ALLOCA
|
|
||||||
# define freea(p) /* nothing */
|
|
||||||
#else
|
|
||||||
# define alloca(n) malloc (n)
|
|
||||||
# define freea(p) free (p)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* For systems that distinguish between text and binary I/O.
|
|
||||||
O_BINARY is usually declared in <fcntl.h>. */
|
|
||||||
#if !defined O_BINARY && defined _O_BINARY
|
|
||||||
/* For MSC-compatible compilers. */
|
|
||||||
# define O_BINARY _O_BINARY
|
|
||||||
# define O_TEXT _O_TEXT
|
|
||||||
#endif
|
|
||||||
#ifdef __BEOS__
|
|
||||||
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
|
|
||||||
# undef O_BINARY
|
|
||||||
# undef O_TEXT
|
|
||||||
#endif
|
|
||||||
/* On reasonable systems, binary I/O is the default. */
|
|
||||||
#ifndef O_BINARY
|
|
||||||
# define O_BINARY 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* We need a sign, whether a new catalog was loaded, which can be associated
|
|
||||||
with all translations. This is important if the translations are
|
|
||||||
cached by one of GCC's features. */
|
|
||||||
int _nl_msg_cat_cntr;
|
|
||||||
|
|
||||||
#if (defined __GNUC__ && !defined __APPLE_CC__) \
|
|
||||||
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
|
|
||||||
|
|
||||||
/* These structs are the constant expression for the germanic plural
|
|
||||||
form determination. It represents the expression "n != 1". */
|
|
||||||
static const struct expression plvar =
|
|
||||||
{
|
|
||||||
.nargs = 0,
|
|
||||||
.operation = var,
|
|
||||||
};
|
|
||||||
static const struct expression plone =
|
|
||||||
{
|
|
||||||
.nargs = 0,
|
|
||||||
.operation = num,
|
|
||||||
.val =
|
|
||||||
{
|
|
||||||
.num = 1
|
|
||||||
}
|
|
||||||
};
|
|
||||||
static struct expression germanic_plural =
|
|
||||||
{
|
|
||||||
.nargs = 2,
|
|
||||||
.operation = not_equal,
|
|
||||||
.val =
|
|
||||||
{
|
|
||||||
.args =
|
|
||||||
{
|
|
||||||
[0] = (struct expression *) &plvar,
|
|
||||||
[1] = (struct expression *) &plone
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
# define INIT_GERMANIC_PLURAL()
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/* For compilers without support for ISO C 99 struct/union initializers:
|
|
||||||
Initialization at run-time. */
|
|
||||||
|
|
||||||
static struct expression plvar;
|
|
||||||
static struct expression plone;
|
|
||||||
static struct expression germanic_plural;
|
|
||||||
|
|
||||||
static void
|
|
||||||
init_germanic_plural ()
|
|
||||||
{
|
|
||||||
if (plone.val.num == 0)
|
|
||||||
{
|
|
||||||
plvar.nargs = 0;
|
|
||||||
plvar.operation = var;
|
|
||||||
|
|
||||||
plone.nargs = 0;
|
|
||||||
plone.operation = num;
|
|
||||||
plone.val.num = 1;
|
|
||||||
|
|
||||||
germanic_plural.nargs = 2;
|
|
||||||
germanic_plural.operation = not_equal;
|
|
||||||
germanic_plural.val.args[0] = &plvar;
|
|
||||||
germanic_plural.val.args[1] = &plone;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Initialize the codeset dependent parts of an opened message catalog.
|
|
||||||
Return the header entry. */
|
|
||||||
const char *
|
|
||||||
internal_function
|
|
||||||
_nl_init_domain_conv (domain_file, domain, domainbinding)
|
|
||||||
struct loaded_l10nfile *domain_file;
|
|
||||||
struct loaded_domain *domain;
|
|
||||||
struct binding *domainbinding;
|
|
||||||
{
|
|
||||||
/* Find out about the character set the file is encoded with.
|
|
||||||
This can be found (in textual form) in the entry "". If this
|
|
||||||
entry does not exist or if this does not contain the `charset='
|
|
||||||
information, we will assume the charset matches the one the
|
|
||||||
current locale and we don't have to perform any conversion. */
|
|
||||||
char *nullentry;
|
|
||||||
size_t nullentrylen;
|
|
||||||
|
|
||||||
/* Preinitialize fields, to avoid recursion during _nl_find_msg. */
|
|
||||||
domain->codeset_cntr =
|
|
||||||
(domainbinding != NULL ? domainbinding->codeset_cntr : 0);
|
|
||||||
#ifdef _LIBC
|
|
||||||
domain->conv = (__gconv_t) -1;
|
|
||||||
#else
|
|
||||||
# if HAVE_ICONV
|
|
||||||
domain->conv = (iconv_t) -1;
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
domain->conv_tab = NULL;
|
|
||||||
|
|
||||||
/* Get the header entry. */
|
|
||||||
nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
|
|
||||||
|
|
||||||
if (nullentry != NULL)
|
|
||||||
{
|
|
||||||
#if defined _LIBC || HAVE_ICONV
|
|
||||||
const char *charsetstr;
|
|
||||||
|
|
||||||
charsetstr = strstr (nullentry, "charset=");
|
|
||||||
if (charsetstr != NULL)
|
|
||||||
{
|
|
||||||
size_t len;
|
|
||||||
char *charset;
|
|
||||||
const char *outcharset;
|
|
||||||
|
|
||||||
charsetstr += strlen ("charset=");
|
|
||||||
len = strcspn (charsetstr, " \t\n");
|
|
||||||
|
|
||||||
charset = (char *) alloca (len + 1);
|
|
||||||
# if defined _LIBC || HAVE_MEMPCPY
|
|
||||||
*((char *) mempcpy (charset, charsetstr, len)) = '\0';
|
|
||||||
# else
|
|
||||||
memcpy (charset, charsetstr, len);
|
|
||||||
charset[len] = '\0';
|
|
||||||
# endif
|
|
||||||
|
|
||||||
/* The output charset should normally be determined by the
|
|
||||||
locale. But sometimes the locale is not used or not correctly
|
|
||||||
set up, so we provide a possibility for the user to override
|
|
||||||
this. Moreover, the value specified through
|
|
||||||
bind_textdomain_codeset overrides both. */
|
|
||||||
if (domainbinding != NULL && domainbinding->codeset != NULL)
|
|
||||||
outcharset = domainbinding->codeset;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
outcharset = getenv ("OUTPUT_CHARSET");
|
|
||||||
if (outcharset == NULL || outcharset[0] == '\0')
|
|
||||||
{
|
|
||||||
# ifdef _LIBC
|
|
||||||
outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
|
|
||||||
# else
|
|
||||||
# if HAVE_ICONV
|
|
||||||
extern const char *locale_charset (void);
|
|
||||||
outcharset = locale_charset ();
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# ifdef _LIBC
|
|
||||||
/* We always want to use transliteration. */
|
|
||||||
outcharset = norm_add_slashes (outcharset, "TRANSLIT");
|
|
||||||
charset = norm_add_slashes (charset, NULL);
|
|
||||||
if (__gconv_open (outcharset, charset, &domain->conv,
|
|
||||||
GCONV_AVOID_NOCONV)
|
|
||||||
!= __GCONV_OK)
|
|
||||||
domain->conv = (__gconv_t) -1;
|
|
||||||
# else
|
|
||||||
# if HAVE_ICONV
|
|
||||||
/* When using GNU libiconv, we want to use transliteration. */
|
|
||||||
# if _LIBICONV_VERSION >= 0x0105
|
|
||||||
len = strlen (outcharset);
|
|
||||||
{
|
|
||||||
char *tmp = (char *) alloca (len + 10 + 1);
|
|
||||||
memcpy (tmp, outcharset, len);
|
|
||||||
memcpy (tmp + len, "//TRANSLIT", 10 + 1);
|
|
||||||
outcharset = tmp;
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
domain->conv = iconv_open (outcharset, charset);
|
|
||||||
# if _LIBICONV_VERSION >= 0x0105
|
|
||||||
freea (outcharset);
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
|
|
||||||
freea (charset);
|
|
||||||
}
|
|
||||||
#endif /* _LIBC || HAVE_ICONV */
|
|
||||||
}
|
|
||||||
|
|
||||||
return nullentry;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Frees the codeset dependent parts of an opened message catalog. */
|
|
||||||
void
|
|
||||||
internal_function
|
|
||||||
_nl_free_domain_conv (domain)
|
|
||||||
struct loaded_domain *domain;
|
|
||||||
{
|
|
||||||
if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
|
|
||||||
free (domain->conv_tab);
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
if (domain->conv != (__gconv_t) -1)
|
|
||||||
__gconv_close (domain->conv);
|
|
||||||
#else
|
|
||||||
# if HAVE_ICONV
|
|
||||||
if (domain->conv != (iconv_t) -1)
|
|
||||||
iconv_close (domain->conv);
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Load the message catalogs specified by FILENAME. If it is no valid
|
|
||||||
message catalog do nothing. */
|
|
||||||
void
|
|
||||||
internal_function
|
|
||||||
_nl_load_domain (domain_file, domainbinding)
|
|
||||||
struct loaded_l10nfile *domain_file;
|
|
||||||
struct binding *domainbinding;
|
|
||||||
{
|
|
||||||
int fd;
|
|
||||||
size_t size;
|
|
||||||
#ifdef _LIBC
|
|
||||||
struct stat64 st;
|
|
||||||
#else
|
|
||||||
struct stat st;
|
|
||||||
#endif
|
|
||||||
struct mo_file_header *data = (struct mo_file_header *) -1;
|
|
||||||
int use_mmap = 0;
|
|
||||||
struct loaded_domain *domain;
|
|
||||||
const char *nullentry;
|
|
||||||
|
|
||||||
domain_file->decided = 1;
|
|
||||||
domain_file->data = NULL;
|
|
||||||
|
|
||||||
/* Note that it would be useless to store domainbinding in domain_file
|
|
||||||
because domainbinding might be == NULL now but != NULL later (after
|
|
||||||
a call to bind_textdomain_codeset). */
|
|
||||||
|
|
||||||
/* If the record does not represent a valid locale the FILENAME
|
|
||||||
might be NULL. This can happen when according to the given
|
|
||||||
specification the locale file name is different for XPG and CEN
|
|
||||||
syntax. */
|
|
||||||
if (domain_file->filename == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Try to open the addressed file. */
|
|
||||||
fd = open (domain_file->filename, O_RDONLY | O_BINARY);
|
|
||||||
if (fd == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* We must know about the size of the file. */
|
|
||||||
if (
|
|
||||||
#ifdef _LIBC
|
|
||||||
__builtin_expect (fstat64 (fd, &st) != 0, 0)
|
|
||||||
#else
|
|
||||||
__builtin_expect (fstat (fd, &st) != 0, 0)
|
|
||||||
#endif
|
|
||||||
|| __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
|
|
||||||
|| __builtin_expect (size < sizeof (struct mo_file_header), 0))
|
|
||||||
{
|
|
||||||
/* Something went wrong. */
|
|
||||||
close (fd);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_MMAP
|
|
||||||
/* Now we are ready to load the file. If mmap() is available we try
|
|
||||||
this first. If not available or it failed we try to load it. */
|
|
||||||
data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
|
|
||||||
MAP_PRIVATE, fd, 0);
|
|
||||||
|
|
||||||
if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
|
|
||||||
{
|
|
||||||
/* mmap() call was successful. */
|
|
||||||
close (fd);
|
|
||||||
use_mmap = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If the data is not yet available (i.e. mmap'ed) we try to load
|
|
||||||
it manually. */
|
|
||||||
if (data == (struct mo_file_header *) -1)
|
|
||||||
{
|
|
||||||
size_t to_read;
|
|
||||||
char *read_ptr;
|
|
||||||
|
|
||||||
data = (struct mo_file_header *) malloc (size);
|
|
||||||
if (data == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
to_read = size;
|
|
||||||
read_ptr = (char *) data;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
long int nb = (long int) read (fd, read_ptr, to_read);
|
|
||||||
if (nb <= 0)
|
|
||||||
{
|
|
||||||
#ifdef EINTR
|
|
||||||
if (nb == -1 && errno == EINTR)
|
|
||||||
continue;
|
|
||||||
#endif
|
|
||||||
close (fd);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
read_ptr += nb;
|
|
||||||
to_read -= nb;
|
|
||||||
}
|
|
||||||
while (to_read > 0);
|
|
||||||
|
|
||||||
close (fd);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Using the magic number we can test whether it really is a message
|
|
||||||
catalog file. */
|
|
||||||
if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
|
|
||||||
0))
|
|
||||||
{
|
|
||||||
/* The magic number is wrong: not a message catalog file. */
|
|
||||||
#ifdef HAVE_MMAP
|
|
||||||
if (use_mmap)
|
|
||||||
munmap ((caddr_t) data, size);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
free (data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
|
|
||||||
if (domain == NULL)
|
|
||||||
return;
|
|
||||||
domain_file->data = domain;
|
|
||||||
|
|
||||||
domain->data = (char *) data;
|
|
||||||
domain->use_mmap = use_mmap;
|
|
||||||
domain->mmap_size = size;
|
|
||||||
domain->must_swap = data->magic != _MAGIC;
|
|
||||||
|
|
||||||
/* Fill in the information about the available tables. */
|
|
||||||
switch (W (domain->must_swap, data->revision))
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
domain->nstrings = W (domain->must_swap, data->nstrings);
|
|
||||||
domain->orig_tab = (struct string_desc *)
|
|
||||||
((char *) data + W (domain->must_swap, data->orig_tab_offset));
|
|
||||||
domain->trans_tab = (struct string_desc *)
|
|
||||||
((char *) data + W (domain->must_swap, data->trans_tab_offset));
|
|
||||||
domain->hash_size = W (domain->must_swap, data->hash_tab_size);
|
|
||||||
domain->hash_tab = (nls_uint32 *)
|
|
||||||
((char *) data + W (domain->must_swap, data->hash_tab_offset));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
/* This is an invalid revision. */
|
|
||||||
#ifdef HAVE_MMAP
|
|
||||||
if (use_mmap)
|
|
||||||
munmap ((caddr_t) data, size);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
free (data);
|
|
||||||
free (domain);
|
|
||||||
domain_file->data = NULL;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now initialize the character set converter from the character set
|
|
||||||
the file is encoded with (found in the header entry) to the domain's
|
|
||||||
specified character set or the locale's character set. */
|
|
||||||
nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
|
|
||||||
|
|
||||||
/* Also look for a plural specification. */
|
|
||||||
if (nullentry != NULL)
|
|
||||||
{
|
|
||||||
const char *plural;
|
|
||||||
const char *nplurals;
|
|
||||||
|
|
||||||
plural = strstr (nullentry, "plural=");
|
|
||||||
nplurals = strstr (nullentry, "nplurals=");
|
|
||||||
if (plural == NULL || nplurals == NULL)
|
|
||||||
goto no_plural;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* First get the number. */
|
|
||||||
char *endp;
|
|
||||||
unsigned long int n;
|
|
||||||
struct parse_args args;
|
|
||||||
|
|
||||||
nplurals += 9;
|
|
||||||
while (*nplurals != '\0' && isspace (*nplurals))
|
|
||||||
++nplurals;
|
|
||||||
#if defined HAVE_STRTOUL || defined _LIBC
|
|
||||||
n = strtoul (nplurals, &endp, 10);
|
|
||||||
#else
|
|
||||||
for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
|
|
||||||
n = n * 10 + (*endp - '0');
|
|
||||||
#endif
|
|
||||||
domain->nplurals = n;
|
|
||||||
if (nplurals == endp)
|
|
||||||
goto no_plural;
|
|
||||||
|
|
||||||
/* Due to the restrictions bison imposes onto the interface of the
|
|
||||||
scanner function we have to put the input string and the result
|
|
||||||
passed up from the parser into the same structure which address
|
|
||||||
is passed down to the parser. */
|
|
||||||
plural += 7;
|
|
||||||
args.cp = plural;
|
|
||||||
if (PLURAL_PARSE (&args) != 0)
|
|
||||||
goto no_plural;
|
|
||||||
domain->plural = args.res;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* By default we are using the Germanic form: singular form only
|
|
||||||
for `one', the plural form otherwise. Yes, this is also what
|
|
||||||
English is using since English is a Germanic language. */
|
|
||||||
no_plural:
|
|
||||||
INIT_GERMANIC_PLURAL ();
|
|
||||||
domain->plural = &germanic_plural;
|
|
||||||
domain->nplurals = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
void
|
|
||||||
internal_function
|
|
||||||
_nl_unload_domain (domain)
|
|
||||||
struct loaded_domain *domain;
|
|
||||||
{
|
|
||||||
if (domain->plural != &germanic_plural)
|
|
||||||
__gettext_free_exp (domain->plural);
|
|
||||||
|
|
||||||
_nl_free_domain_conv (domain);
|
|
||||||
|
|
||||||
# ifdef _POSIX_MAPPED_FILES
|
|
||||||
if (domain->use_mmap)
|
|
||||||
munmap ((caddr_t) domain->data, domain->mmap_size);
|
|
||||||
else
|
|
||||||
# endif /* _POSIX_MAPPED_FILES */
|
|
||||||
free ((void *) domain->data);
|
|
||||||
|
|
||||||
free (domain);
|
|
||||||
}
|
|
||||||
#endif
|
|
|
@ -1,271 +0,0 @@
|
||||||
/* Determine a canonical name for the current locale's character encoding.
|
|
||||||
|
|
||||||
Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
/* Written by Bruno Haible <haible@clisp.cons.org>. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_STDDEF_H
|
|
||||||
# include <stddef.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#if HAVE_STRING_H
|
|
||||||
# include <string.h>
|
|
||||||
#else
|
|
||||||
# include <strings.h>
|
|
||||||
#endif
|
|
||||||
#if HAVE_STDLIB_H
|
|
||||||
# include <stdlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined _WIN32 || defined __WIN32__
|
|
||||||
# undef WIN32 /* avoid warning on mingw32 */
|
|
||||||
# define WIN32
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
# if HAVE_LANGINFO_CODESET
|
|
||||||
# include <langinfo.h>
|
|
||||||
# else
|
|
||||||
# if HAVE_SETLOCALE
|
|
||||||
# include <locale.h>
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#else /* WIN32 */
|
|
||||||
# define WIN32_LEAN_AND_MEAN
|
|
||||||
# include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef DIRECTORY_SEPARATOR
|
|
||||||
# define DIRECTORY_SEPARATOR '/'
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ISSLASH
|
|
||||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The following static variable is declared 'volatile' to avoid a
|
|
||||||
possible multithread problem in the function get_charset_aliases. If we
|
|
||||||
are running in a threaded environment, and if two threads initialize
|
|
||||||
'charset_aliases' simultaneously, both will produce the same value,
|
|
||||||
and everything will be ok if the two assignments to 'charset_aliases'
|
|
||||||
are atomic. But I don't know what will happen if the two assignments mix. */
|
|
||||||
#if __STDC__ != 1
|
|
||||||
# define volatile /* empty */
|
|
||||||
#endif
|
|
||||||
/* Pointer to the contents of the charset.alias file, if it has already been
|
|
||||||
read, else NULL. Its format is:
|
|
||||||
ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
|
|
||||||
static const char * volatile charset_aliases;
|
|
||||||
|
|
||||||
/* Return a pointer to the contents of the charset.alias file. */
|
|
||||||
static const char *
|
|
||||||
get_charset_aliases ()
|
|
||||||
{
|
|
||||||
const char *cp;
|
|
||||||
|
|
||||||
cp = charset_aliases;
|
|
||||||
if (cp == NULL)
|
|
||||||
{
|
|
||||||
#ifndef WIN32
|
|
||||||
FILE *fp;
|
|
||||||
const char *dir = LIBDIR;
|
|
||||||
const char *base = "charset.alias";
|
|
||||||
char *file_name;
|
|
||||||
|
|
||||||
/* Concatenate dir and base into freshly allocated file_name. */
|
|
||||||
{
|
|
||||||
size_t dir_len = strlen (dir);
|
|
||||||
size_t base_len = strlen (base);
|
|
||||||
int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
|
|
||||||
file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
|
|
||||||
if (file_name != NULL)
|
|
||||||
{
|
|
||||||
memcpy (file_name, dir, dir_len);
|
|
||||||
if (add_slash)
|
|
||||||
file_name[dir_len] = DIRECTORY_SEPARATOR;
|
|
||||||
memcpy (file_name + dir_len + add_slash, base, base_len + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
|
|
||||||
/* Out of memory or file not found, treat it as empty. */
|
|
||||||
cp = "";
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parse the file's contents. */
|
|
||||||
int c;
|
|
||||||
char buf1[50+1];
|
|
||||||
char buf2[50+1];
|
|
||||||
char *res_ptr = NULL;
|
|
||||||
size_t res_size = 0;
|
|
||||||
size_t l1, l2;
|
|
||||||
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
c = getc (fp);
|
|
||||||
if (c == EOF)
|
|
||||||
break;
|
|
||||||
if (c == '\n' || c == ' ' || c == '\t')
|
|
||||||
continue;
|
|
||||||
if (c == '#')
|
|
||||||
{
|
|
||||||
/* Skip comment, to end of line. */
|
|
||||||
do
|
|
||||||
c = getc (fp);
|
|
||||||
while (!(c == EOF || c == '\n'));
|
|
||||||
if (c == EOF)
|
|
||||||
break;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
ungetc (c, fp);
|
|
||||||
if (fscanf(fp, "%50s %50s", buf1, buf2) < 2)
|
|
||||||
break;
|
|
||||||
l1 = strlen (buf1);
|
|
||||||
l2 = strlen (buf2);
|
|
||||||
if (res_size == 0)
|
|
||||||
{
|
|
||||||
res_size = l1 + 1 + l2 + 1;
|
|
||||||
res_ptr = malloc (res_size + 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
res_size += l1 + 1 + l2 + 1;
|
|
||||||
res_ptr = realloc (res_ptr, res_size + 1);
|
|
||||||
}
|
|
||||||
if (res_ptr == NULL)
|
|
||||||
{
|
|
||||||
/* Out of memory. */
|
|
||||||
res_size = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
|
|
||||||
strcpy (res_ptr + res_size - (l2 + 1), buf2);
|
|
||||||
}
|
|
||||||
fclose (fp);
|
|
||||||
if (res_size == 0)
|
|
||||||
cp = "";
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*(res_ptr + res_size) = '\0';
|
|
||||||
cp = res_ptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_name != NULL)
|
|
||||||
free (file_name);
|
|
||||||
|
|
||||||
#else /* WIN32 */
|
|
||||||
|
|
||||||
/* To avoid the troubles of installing a separate file in the same
|
|
||||||
directory as the DLL and of retrieving the DLL's directory at
|
|
||||||
runtime, simply inline the aliases here. */
|
|
||||||
|
|
||||||
cp = "CP936" "\0" "GBK" "\0"
|
|
||||||
"CP1361" "\0" "JOHAB" "\0";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
charset_aliases = cp;
|
|
||||||
}
|
|
||||||
|
|
||||||
return cp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Determine the current locale's character encoding, and canonicalize it
|
|
||||||
into one of the canonical names listed in config.charset.
|
|
||||||
The result must not be freed; it is statically allocated.
|
|
||||||
If the canonical name cannot be determined, the result is a non-canonical
|
|
||||||
name. */
|
|
||||||
|
|
||||||
#ifdef STATIC
|
|
||||||
STATIC
|
|
||||||
#endif
|
|
||||||
const char *
|
|
||||||
locale_charset ()
|
|
||||||
{
|
|
||||||
const char *codeset;
|
|
||||||
const char *aliases;
|
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
|
|
||||||
# if HAVE_LANGINFO_CODESET
|
|
||||||
|
|
||||||
/* Most systems support nl_langinfo (CODESET) nowadays. */
|
|
||||||
codeset = nl_langinfo (CODESET);
|
|
||||||
|
|
||||||
# else
|
|
||||||
|
|
||||||
/* On old systems which lack it, use setlocale or getenv. */
|
|
||||||
const char *locale = NULL;
|
|
||||||
|
|
||||||
/* But most old systems don't have a complete set of locales. Some
|
|
||||||
(like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
|
|
||||||
use setlocale here; it would return "C" when it doesn't support the
|
|
||||||
locale name the user has set. */
|
|
||||||
# if HAVE_SETLOCALE && 0
|
|
||||||
locale = setlocale (LC_CTYPE, NULL);
|
|
||||||
# endif
|
|
||||||
if (locale == NULL || locale[0] == '\0')
|
|
||||||
{
|
|
||||||
locale = getenv ("LC_ALL");
|
|
||||||
if (locale == NULL || locale[0] == '\0')
|
|
||||||
{
|
|
||||||
locale = getenv ("LC_CTYPE");
|
|
||||||
if (locale == NULL || locale[0] == '\0')
|
|
||||||
locale = getenv ("LANG");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* On some old systems, one used to set locale = "iso8859_1". On others,
|
|
||||||
you set it to "language_COUNTRY.charset". In any case, we resolve it
|
|
||||||
through the charset.alias file. */
|
|
||||||
codeset = locale;
|
|
||||||
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#else /* WIN32 */
|
|
||||||
|
|
||||||
static char buf[2 + 10 + 1];
|
|
||||||
|
|
||||||
/* Win32 has a function returning the locale's codepage as a number. */
|
|
||||||
sprintf (buf, "CP%u", GetACP ());
|
|
||||||
codeset = buf;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (codeset == NULL)
|
|
||||||
/* The canonical name cannot be determined. */
|
|
||||||
codeset = "";
|
|
||||||
|
|
||||||
/* Resolve alias. */
|
|
||||||
for (aliases = get_charset_aliases ();
|
|
||||||
*aliases != '\0';
|
|
||||||
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
|
|
||||||
if (strcmp (codeset, aliases) == 0
|
|
||||||
|| (aliases[0] == '*' && aliases[1] == '\0'))
|
|
||||||
{
|
|
||||||
codeset = aliases + strlen (aliases) + 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return codeset;
|
|
||||||
}
|
|
|
@ -1,78 +0,0 @@
|
||||||
# Locale name alias data base.
|
|
||||||
# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU Library General Public License as published
|
|
||||||
# by the Free Software Foundation; either version 2, 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
|
|
||||||
# Library General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Library General Public
|
|
||||||
# License along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
# USA.
|
|
||||||
|
|
||||||
# The format of this file is the same as for the corresponding file of
|
|
||||||
# the X Window System, which normally can be found in
|
|
||||||
# /usr/lib/X11/locale/locale.alias
|
|
||||||
# A single line contains two fields: an alias and a substitution value.
|
|
||||||
# All entries are case independent.
|
|
||||||
|
|
||||||
# Note: This file is far from being complete. If you have a value for
|
|
||||||
# your own site which you think might be useful for others too, share
|
|
||||||
# it with the rest of us. Send it using the `glibcbug' script to
|
|
||||||
# bugs@gnu.org.
|
|
||||||
|
|
||||||
# Packages using this file:
|
|
||||||
|
|
||||||
bokmal no_NO.ISO-8859-1
|
|
||||||
bokmål no_NO.ISO-8859-1
|
|
||||||
catalan ca_ES.ISO-8859-1
|
|
||||||
croatian hr_HR.ISO-8859-2
|
|
||||||
czech cs_CZ.ISO-8859-2
|
|
||||||
danish da_DK.ISO-8859-1
|
|
||||||
dansk da_DK.ISO-8859-1
|
|
||||||
deutsch de_DE.ISO-8859-1
|
|
||||||
dutch nl_NL.ISO-8859-1
|
|
||||||
eesti et_EE.ISO-8859-1
|
|
||||||
estonian et_EE.ISO-8859-1
|
|
||||||
finnish fi_FI.ISO-8859-1
|
|
||||||
français fr_FR.ISO-8859-1
|
|
||||||
french fr_FR.ISO-8859-1
|
|
||||||
galego gl_ES.ISO-8859-1
|
|
||||||
galician gl_ES.ISO-8859-1
|
|
||||||
german de_DE.ISO-8859-1
|
|
||||||
greek el_GR.ISO-8859-7
|
|
||||||
hebrew he_IL.ISO-8859-8
|
|
||||||
hrvatski hr_HR.ISO-8859-2
|
|
||||||
hungarian hu_HU.ISO-8859-2
|
|
||||||
icelandic is_IS.ISO-8859-1
|
|
||||||
italian it_IT.ISO-8859-1
|
|
||||||
japanese ja_JP.eucJP
|
|
||||||
japanese.euc ja_JP.eucJP
|
|
||||||
ja_JP ja_JP.eucJP
|
|
||||||
ja_JP.ujis ja_JP.eucJP
|
|
||||||
japanese.sjis ja_JP.SJIS
|
|
||||||
korean ko_KR.eucKR
|
|
||||||
korean.euc ko_KR.eucKR
|
|
||||||
ko_KR ko_KR.eucKR
|
|
||||||
lithuanian lt_LT.ISO-8859-13
|
|
||||||
nb_NO no_NO.ISO-8859-1
|
|
||||||
nb_NO.ISO-8859-1 no_NO.ISO-8859-1
|
|
||||||
norwegian no_NO.ISO-8859-1
|
|
||||||
nynorsk nn_NO.ISO-8859-1
|
|
||||||
polish pl_PL.ISO-8859-2
|
|
||||||
portuguese pt_PT.ISO-8859-1
|
|
||||||
romanian ro_RO.ISO-8859-2
|
|
||||||
russian ru_RU.ISO-8859-5
|
|
||||||
slovak sk_SK.ISO-8859-2
|
|
||||||
slovene sl_SI.ISO-8859-2
|
|
||||||
slovenian sl_SI.ISO-8859-2
|
|
||||||
spanish es_ES.ISO-8859-1
|
|
||||||
swedish sv_SE.ISO-8859-1
|
|
||||||
thai th_TH.TIS-620
|
|
||||||
turkish tr_TR.ISO-8859-9
|
|
|
@ -1,404 +0,0 @@
|
||||||
/* Handle aliases for locale names.
|
|
||||||
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
|
||||||
This must come before <config.h> because <config.h> may include
|
|
||||||
<features.h>, and once <features.h> has been included, it's too late. */
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
# define _GNU_SOURCE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
# define alloca __builtin_alloca
|
|
||||||
# define HAVE_ALLOCA 1
|
|
||||||
#else
|
|
||||||
# if defined HAVE_ALLOCA_H || defined _LIBC
|
|
||||||
# include <alloca.h>
|
|
||||||
# else
|
|
||||||
# ifdef _AIX
|
|
||||||
#pragma alloca
|
|
||||||
# else
|
|
||||||
# ifndef alloca
|
|
||||||
char *alloca ();
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#if !HAVE_STRCHR && !defined _LIBC
|
|
||||||
# ifndef strchr
|
|
||||||
# define strchr index
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "gettextP.h"
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* Rename the non ANSI C functions. This is required by the standard
|
|
||||||
because some ANSI C functions will require linking with this object
|
|
||||||
file and the name space must not be polluted. */
|
|
||||||
# define strcasecmp __strcasecmp
|
|
||||||
|
|
||||||
# ifndef mempcpy
|
|
||||||
# define mempcpy __mempcpy
|
|
||||||
# endif
|
|
||||||
# define HAVE_MEMPCPY 1
|
|
||||||
|
|
||||||
/* We need locking here since we can be called from different places. */
|
|
||||||
# include <bits/libc-lock.h>
|
|
||||||
|
|
||||||
__libc_lock_define_initialized (static, lock);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef internal_function
|
|
||||||
# define internal_function
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* For those losing systems which don't have `alloca' we have to add
|
|
||||||
some additional code emulating it. */
|
|
||||||
#ifdef HAVE_ALLOCA
|
|
||||||
# define freea(p) /* nothing */
|
|
||||||
#else
|
|
||||||
# define alloca(n) malloc (n)
|
|
||||||
# define freea(p) free (p)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
|
|
||||||
# undef fgets
|
|
||||||
# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
|
|
||||||
#endif
|
|
||||||
#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
|
|
||||||
# undef feof
|
|
||||||
# define feof(s) feof_unlocked (s)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
struct alias_map
|
|
||||||
{
|
|
||||||
const char *alias;
|
|
||||||
const char *value;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static char *string_space;
|
|
||||||
static size_t string_space_act;
|
|
||||||
static size_t string_space_max;
|
|
||||||
static struct alias_map *map;
|
|
||||||
static size_t nmap;
|
|
||||||
static size_t maxmap;
|
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for local functions. */
|
|
||||||
static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
|
|
||||||
internal_function;
|
|
||||||
static int extend_alias_table PARAMS ((void));
|
|
||||||
static int alias_compare PARAMS ((const struct alias_map *map1,
|
|
||||||
const struct alias_map *map2));
|
|
||||||
|
|
||||||
|
|
||||||
const char *
|
|
||||||
_nl_expand_alias (name)
|
|
||||||
const char *name;
|
|
||||||
{
|
|
||||||
static const char *locale_alias_path = LOCALE_ALIAS_PATH;
|
|
||||||
struct alias_map *retval;
|
|
||||||
const char *result = NULL;
|
|
||||||
size_t added;
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
__libc_lock_lock (lock);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
struct alias_map item;
|
|
||||||
|
|
||||||
item.alias = name;
|
|
||||||
|
|
||||||
if (nmap > 0)
|
|
||||||
retval = (struct alias_map *) bsearch (&item, map, nmap,
|
|
||||||
sizeof (struct alias_map),
|
|
||||||
(int (*) PARAMS ((const void *,
|
|
||||||
const void *))
|
|
||||||
) alias_compare);
|
|
||||||
else
|
|
||||||
retval = NULL;
|
|
||||||
|
|
||||||
/* We really found an alias. Return the value. */
|
|
||||||
if (retval != NULL)
|
|
||||||
{
|
|
||||||
result = retval->value;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Perhaps we can find another alias file. */
|
|
||||||
added = 0;
|
|
||||||
while (added == 0 && locale_alias_path[0] != '\0')
|
|
||||||
{
|
|
||||||
const char *start;
|
|
||||||
|
|
||||||
while (locale_alias_path[0] == PATH_SEPARATOR)
|
|
||||||
++locale_alias_path;
|
|
||||||
start = locale_alias_path;
|
|
||||||
|
|
||||||
while (locale_alias_path[0] != '\0'
|
|
||||||
&& locale_alias_path[0] != PATH_SEPARATOR)
|
|
||||||
++locale_alias_path;
|
|
||||||
|
|
||||||
if (start < locale_alias_path)
|
|
||||||
added = read_alias_file (start, locale_alias_path - start);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (added != 0);
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
__libc_lock_unlock (lock);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static size_t
|
|
||||||
internal_function
|
|
||||||
read_alias_file (fname, fname_len)
|
|
||||||
const char *fname;
|
|
||||||
int fname_len;
|
|
||||||
{
|
|
||||||
FILE *fp;
|
|
||||||
char *full_fname;
|
|
||||||
size_t added;
|
|
||||||
static const char aliasfile[] = "/locale.alias";
|
|
||||||
|
|
||||||
full_fname = (char *) alloca (fname_len + sizeof aliasfile);
|
|
||||||
#ifdef HAVE_MEMPCPY
|
|
||||||
mempcpy (mempcpy (full_fname, fname, fname_len),
|
|
||||||
aliasfile, sizeof aliasfile);
|
|
||||||
#else
|
|
||||||
memcpy (full_fname, fname, fname_len);
|
|
||||||
memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
fp = fopen (full_fname, "r");
|
|
||||||
freea (full_fname);
|
|
||||||
if (fp == NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
added = 0;
|
|
||||||
while (!feof (fp))
|
|
||||||
{
|
|
||||||
/* It is a reasonable approach to use a fix buffer here because
|
|
||||||
a) we are only interested in the first two fields
|
|
||||||
b) these fields must be usable as file names and so must not
|
|
||||||
be that long
|
|
||||||
*/
|
|
||||||
char buf[BUFSIZ];
|
|
||||||
char *alias;
|
|
||||||
char *value;
|
|
||||||
char *cp;
|
|
||||||
|
|
||||||
if (fgets (buf, sizeof buf, fp) == NULL)
|
|
||||||
/* EOF reached. */
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* Possibly not the whole line fits into the buffer. Ignore
|
|
||||||
the rest of the line. */
|
|
||||||
if (strchr (buf, '\n') == NULL)
|
|
||||||
{
|
|
||||||
char altbuf[BUFSIZ];
|
|
||||||
do
|
|
||||||
if (fgets (altbuf, sizeof altbuf, fp) == NULL)
|
|
||||||
/* Make sure the inner loop will be left. The outer loop
|
|
||||||
will exit at the `feof' test. */
|
|
||||||
break;
|
|
||||||
while (strchr (altbuf, '\n') == NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
cp = buf;
|
|
||||||
/* Ignore leading white space. */
|
|
||||||
while (isspace (cp[0]))
|
|
||||||
++cp;
|
|
||||||
|
|
||||||
/* A leading '#' signals a comment line. */
|
|
||||||
if (cp[0] != '\0' && cp[0] != '#')
|
|
||||||
{
|
|
||||||
alias = cp++;
|
|
||||||
while (cp[0] != '\0' && !isspace (cp[0]))
|
|
||||||
++cp;
|
|
||||||
/* Terminate alias name. */
|
|
||||||
if (cp[0] != '\0')
|
|
||||||
*cp++ = '\0';
|
|
||||||
|
|
||||||
/* Now look for the beginning of the value. */
|
|
||||||
while (isspace (cp[0]))
|
|
||||||
++cp;
|
|
||||||
|
|
||||||
if (cp[0] != '\0')
|
|
||||||
{
|
|
||||||
size_t alias_len;
|
|
||||||
size_t value_len;
|
|
||||||
|
|
||||||
value = cp++;
|
|
||||||
while (cp[0] != '\0' && !isspace (cp[0]))
|
|
||||||
++cp;
|
|
||||||
/* Terminate value. */
|
|
||||||
if (cp[0] == '\n')
|
|
||||||
{
|
|
||||||
/* This has to be done to make the following test
|
|
||||||
for the end of line possible. We are looking for
|
|
||||||
the terminating '\n' which do not overwrite here. */
|
|
||||||
*cp++ = '\0';
|
|
||||||
*cp = '\n';
|
|
||||||
}
|
|
||||||
else if (cp[0] != '\0')
|
|
||||||
*cp++ = '\0';
|
|
||||||
|
|
||||||
if (nmap >= maxmap)
|
|
||||||
if (__builtin_expect (extend_alias_table (), 0))
|
|
||||||
return added;
|
|
||||||
|
|
||||||
alias_len = strlen (alias) + 1;
|
|
||||||
value_len = strlen (value) + 1;
|
|
||||||
|
|
||||||
if (string_space_act + alias_len + value_len > string_space_max)
|
|
||||||
{
|
|
||||||
/* Increase size of memory pool. */
|
|
||||||
size_t new_size = (string_space_max
|
|
||||||
+ (alias_len + value_len > 1024
|
|
||||||
? alias_len + value_len : 1024));
|
|
||||||
char *new_pool = (char *) realloc (string_space, new_size);
|
|
||||||
if (new_pool == NULL)
|
|
||||||
return added;
|
|
||||||
|
|
||||||
if (__builtin_expect (string_space != new_pool, 0))
|
|
||||||
{
|
|
||||||
size_t i;
|
|
||||||
|
|
||||||
for (i = 0; i < nmap; i++)
|
|
||||||
{
|
|
||||||
map[i].alias += new_pool - string_space;
|
|
||||||
map[i].value += new_pool - string_space;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string_space = new_pool;
|
|
||||||
string_space_max = new_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
map[nmap].alias = memcpy (&string_space[string_space_act],
|
|
||||||
alias, alias_len);
|
|
||||||
string_space_act += alias_len;
|
|
||||||
|
|
||||||
map[nmap].value = memcpy (&string_space[string_space_act],
|
|
||||||
value, value_len);
|
|
||||||
string_space_act += value_len;
|
|
||||||
|
|
||||||
++nmap;
|
|
||||||
++added;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Should we test for ferror()? I think we have to silently ignore
|
|
||||||
errors. --drepper */
|
|
||||||
fclose (fp);
|
|
||||||
|
|
||||||
if (added > 0)
|
|
||||||
qsort (map, nmap, sizeof (struct alias_map),
|
|
||||||
(int (*) PARAMS ((const void *, const void *))) alias_compare);
|
|
||||||
|
|
||||||
return added;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
extend_alias_table ()
|
|
||||||
{
|
|
||||||
size_t new_size;
|
|
||||||
struct alias_map *new_map;
|
|
||||||
|
|
||||||
new_size = maxmap == 0 ? 100 : 2 * maxmap;
|
|
||||||
new_map = (struct alias_map *) realloc (map, (new_size
|
|
||||||
* sizeof (struct alias_map)));
|
|
||||||
if (new_map == NULL)
|
|
||||||
/* Simply don't extend: we don't have any more core. */
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
map = new_map;
|
|
||||||
maxmap = new_size;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
static void __attribute__ ((unused))
|
|
||||||
free_mem (void)
|
|
||||||
{
|
|
||||||
if (string_space != NULL)
|
|
||||||
free (string_space);
|
|
||||||
if (map != NULL)
|
|
||||||
free (map);
|
|
||||||
}
|
|
||||||
text_set_element (__libc_subfreeres, free_mem);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
alias_compare (map1, map2)
|
|
||||||
const struct alias_map *map1;
|
|
||||||
const struct alias_map *map2;
|
|
||||||
{
|
|
||||||
#if defined _LIBC || defined HAVE_STRCASECMP
|
|
||||||
return strcasecmp (map1->alias, map2->alias);
|
|
||||||
#else
|
|
||||||
const unsigned char *p1 = (const unsigned char *) map1->alias;
|
|
||||||
const unsigned char *p2 = (const unsigned char *) map2->alias;
|
|
||||||
unsigned char c1, c2;
|
|
||||||
|
|
||||||
if (p1 == p2)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
/* I know this seems to be odd but the tolower() function in
|
|
||||||
some systems libc cannot handle nonalpha characters. */
|
|
||||||
c1 = isupper (*p1) ? tolower (*p1) : *p1;
|
|
||||||
c2 = isupper (*p2) ? tolower (*p2) : *p2;
|
|
||||||
if (c1 == '\0')
|
|
||||||
break;
|
|
||||||
++p1;
|
|
||||||
++p2;
|
|
||||||
}
|
|
||||||
while (c1 == c2);
|
|
||||||
|
|
||||||
return c1 - c2;
|
|
||||||
#endif
|
|
||||||
}
|
|
|
@ -1,68 +0,0 @@
|
||||||
/* Implementation of ngettext(3) function.
|
|
||||||
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define __need_NULL
|
|
||||||
# include <stddef.h>
|
|
||||||
#else
|
|
||||||
# include <stdlib.h> /* Just for NULL. */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "gettextP.h"
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include <libintl.h>
|
|
||||||
#else
|
|
||||||
# include "libgnuintl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <locale.h>
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
/* Names for the libintl functions are a problem. They must not clash
|
|
||||||
with existing names and they should follow ANSI C. But this source
|
|
||||||
code is also used in GNU C Library where the names have a __
|
|
||||||
prefix. So we have to make a difference here. */
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define NGETTEXT __ngettext
|
|
||||||
# define DCNGETTEXT __dcngettext
|
|
||||||
#else
|
|
||||||
# define NGETTEXT ngettext__
|
|
||||||
# define DCNGETTEXT dcngettext__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Look up MSGID in the current default message catalog for the current
|
|
||||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
|
||||||
text). */
|
|
||||||
char *
|
|
||||||
NGETTEXT (msgid1, msgid2, n)
|
|
||||||
const char *msgid1;
|
|
||||||
const char *msgid2;
|
|
||||||
unsigned long int n;
|
|
||||||
{
|
|
||||||
return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* Alias for function name in GNU C Library. */
|
|
||||||
weak_alias (__ngettext, ngettext);
|
|
||||||
#endif
|
|
1326
intl/plural.c
1326
intl/plural.c
File diff suppressed because it is too large
Load diff
413
intl/plural.y
413
intl/plural.y
|
@ -1,413 +0,0 @@
|
||||||
%{
|
|
||||||
/* Expression parsing for plural form selection.
|
|
||||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
/* The bison generated parser uses alloca. AIX 3 forces us to put this
|
|
||||||
declaration at the beginning of the file. The declaration in bison's
|
|
||||||
skeleton file comes too late. This must come before <config.h>
|
|
||||||
because <config.h> may include arbitrary system headers. */
|
|
||||||
#if defined _AIX && !defined __GNUC__
|
|
||||||
#pragma alloca
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "gettextP.h"
|
|
||||||
|
|
||||||
/* Names for the libintl functions are a problem. They must not clash
|
|
||||||
with existing names and they should follow ANSI C. But this source
|
|
||||||
code is also used in GNU C Library where the names have a __
|
|
||||||
prefix. So we have to make a difference here. */
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define FREE_EXPRESSION __gettext_free_exp
|
|
||||||
#else
|
|
||||||
# define FREE_EXPRESSION gettext_free_exp__
|
|
||||||
# define __gettextparse gettextparse__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
|
|
||||||
#define YYPARSE_PARAM arg
|
|
||||||
%}
|
|
||||||
%pure_parser
|
|
||||||
%expect 10
|
|
||||||
|
|
||||||
%union {
|
|
||||||
unsigned long int num;
|
|
||||||
enum operator op;
|
|
||||||
struct expression *exp;
|
|
||||||
}
|
|
||||||
|
|
||||||
%{
|
|
||||||
/* Prototypes for local functions. */
|
|
||||||
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
|
|
||||||
struct expression * const *args));
|
|
||||||
static inline struct expression *new_exp_0 PARAMS ((enum operator op));
|
|
||||||
static inline struct expression *new_exp_1 PARAMS ((enum operator op,
|
|
||||||
struct expression *right));
|
|
||||||
static struct expression *new_exp_2 PARAMS ((enum operator op,
|
|
||||||
struct expression *left,
|
|
||||||
struct expression *right));
|
|
||||||
static inline struct expression *new_exp_3 PARAMS ((enum operator op,
|
|
||||||
struct expression *bexp,
|
|
||||||
struct expression *tbranch,
|
|
||||||
struct expression *fbranch));
|
|
||||||
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
|
|
||||||
static void yyerror PARAMS ((const char *str));
|
|
||||||
|
|
||||||
/* Allocation of expressions. */
|
|
||||||
|
|
||||||
static struct expression *
|
|
||||||
new_exp (nargs, op, args)
|
|
||||||
int nargs;
|
|
||||||
enum operator op;
|
|
||||||
struct expression * const *args;
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
struct expression *newp;
|
|
||||||
|
|
||||||
/* If any of the argument could not be malloc'ed, just return NULL. */
|
|
||||||
for (i = nargs - 1; i >= 0; i--)
|
|
||||||
if (args[i] == NULL)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
/* Allocate a new expression. */
|
|
||||||
newp = (struct expression *) malloc (sizeof (*newp));
|
|
||||||
if (newp != NULL)
|
|
||||||
{
|
|
||||||
newp->nargs = nargs;
|
|
||||||
newp->operation = op;
|
|
||||||
for (i = nargs - 1; i >= 0; i--)
|
|
||||||
newp->val.args[i] = args[i];
|
|
||||||
return newp;
|
|
||||||
}
|
|
||||||
|
|
||||||
fail:
|
|
||||||
for (i = nargs - 1; i >= 0; i--)
|
|
||||||
FREE_EXPRESSION (args[i]);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline struct expression *
|
|
||||||
new_exp_0 (op)
|
|
||||||
enum operator op;
|
|
||||||
{
|
|
||||||
return new_exp (0, op, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline struct expression *
|
|
||||||
new_exp_1 (op, right)
|
|
||||||
enum operator op;
|
|
||||||
struct expression *right;
|
|
||||||
{
|
|
||||||
struct expression *args[1];
|
|
||||||
|
|
||||||
args[0] = right;
|
|
||||||
return new_exp (1, op, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct expression *
|
|
||||||
new_exp_2 (op, left, right)
|
|
||||||
enum operator op;
|
|
||||||
struct expression *left;
|
|
||||||
struct expression *right;
|
|
||||||
{
|
|
||||||
struct expression *args[2];
|
|
||||||
|
|
||||||
args[0] = left;
|
|
||||||
args[1] = right;
|
|
||||||
return new_exp (2, op, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline struct expression *
|
|
||||||
new_exp_3 (op, bexp, tbranch, fbranch)
|
|
||||||
enum operator op;
|
|
||||||
struct expression *bexp;
|
|
||||||
struct expression *tbranch;
|
|
||||||
struct expression *fbranch;
|
|
||||||
{
|
|
||||||
struct expression *args[3];
|
|
||||||
|
|
||||||
args[0] = bexp;
|
|
||||||
args[1] = tbranch;
|
|
||||||
args[2] = fbranch;
|
|
||||||
return new_exp (3, op, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
%}
|
|
||||||
|
|
||||||
/* This declares that all operators have the same associativity and the
|
|
||||||
precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
|
|
||||||
There is no unary minus and no bitwise operators.
|
|
||||||
Operators with the same syntactic behaviour have been merged into a single
|
|
||||||
token, to save space in the array generated by bison. */
|
|
||||||
%right '?' /* ? */
|
|
||||||
%left '|' /* || */
|
|
||||||
%left '&' /* && */
|
|
||||||
%left EQUOP2 /* == != */
|
|
||||||
%left CMPOP2 /* < > <= >= */
|
|
||||||
%left ADDOP2 /* + - */
|
|
||||||
%left MULOP2 /* * / % */
|
|
||||||
%right '!' /* ! */
|
|
||||||
|
|
||||||
%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
|
|
||||||
%token <num> NUMBER
|
|
||||||
%type <exp> exp
|
|
||||||
|
|
||||||
%%
|
|
||||||
|
|
||||||
start: exp
|
|
||||||
{
|
|
||||||
if ($1 == NULL)
|
|
||||||
YYABORT;
|
|
||||||
((struct parse_args *) arg)->res = $1;
|
|
||||||
}
|
|
||||||
;
|
|
||||||
|
|
||||||
exp: exp '?' exp ':' exp
|
|
||||||
{
|
|
||||||
$$ = new_exp_3 (qmop, $1, $3, $5);
|
|
||||||
}
|
|
||||||
| exp '|' exp
|
|
||||||
{
|
|
||||||
$$ = new_exp_2 (lor, $1, $3);
|
|
||||||
}
|
|
||||||
| exp '&' exp
|
|
||||||
{
|
|
||||||
$$ = new_exp_2 (land, $1, $3);
|
|
||||||
}
|
|
||||||
| exp EQUOP2 exp
|
|
||||||
{
|
|
||||||
$$ = new_exp_2 ($2, $1, $3);
|
|
||||||
}
|
|
||||||
| exp CMPOP2 exp
|
|
||||||
{
|
|
||||||
$$ = new_exp_2 ($2, $1, $3);
|
|
||||||
}
|
|
||||||
| exp ADDOP2 exp
|
|
||||||
{
|
|
||||||
$$ = new_exp_2 ($2, $1, $3);
|
|
||||||
}
|
|
||||||
| exp MULOP2 exp
|
|
||||||
{
|
|
||||||
$$ = new_exp_2 ($2, $1, $3);
|
|
||||||
}
|
|
||||||
| '!' exp
|
|
||||||
{
|
|
||||||
$$ = new_exp_1 (lnot, $2);
|
|
||||||
}
|
|
||||||
| 'n'
|
|
||||||
{
|
|
||||||
$$ = new_exp_0 (var);
|
|
||||||
}
|
|
||||||
| NUMBER
|
|
||||||
{
|
|
||||||
if (($$ = new_exp_0 (num)) != NULL)
|
|
||||||
$$->val.num = $1;
|
|
||||||
}
|
|
||||||
| '(' exp ')'
|
|
||||||
{
|
|
||||||
$$ = $2;
|
|
||||||
}
|
|
||||||
;
|
|
||||||
|
|
||||||
%%
|
|
||||||
|
|
||||||
void
|
|
||||||
internal_function
|
|
||||||
FREE_EXPRESSION (exp)
|
|
||||||
struct expression *exp;
|
|
||||||
{
|
|
||||||
if (exp == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Handle the recursive case. */
|
|
||||||
switch (exp->nargs)
|
|
||||||
{
|
|
||||||
case 3:
|
|
||||||
FREE_EXPRESSION (exp->val.args[2]);
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
case 2:
|
|
||||||
FREE_EXPRESSION (exp->val.args[1]);
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
case 1:
|
|
||||||
FREE_EXPRESSION (exp->val.args[0]);
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
free (exp);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
yylex (lval, pexp)
|
|
||||||
YYSTYPE *lval;
|
|
||||||
const char **pexp;
|
|
||||||
{
|
|
||||||
const char *exp = *pexp;
|
|
||||||
int result;
|
|
||||||
|
|
||||||
while (1)
|
|
||||||
{
|
|
||||||
if (exp[0] == '\0')
|
|
||||||
{
|
|
||||||
*pexp = exp;
|
|
||||||
return YYEOF;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (exp[0] != ' ' && exp[0] != '\t')
|
|
||||||
break;
|
|
||||||
|
|
||||||
++exp;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = *exp++;
|
|
||||||
switch (result)
|
|
||||||
{
|
|
||||||
case '0': case '1': case '2': case '3': case '4':
|
|
||||||
case '5': case '6': case '7': case '8': case '9':
|
|
||||||
{
|
|
||||||
unsigned long int n = result - '0';
|
|
||||||
while (exp[0] >= '0' && exp[0] <= '9')
|
|
||||||
{
|
|
||||||
n *= 10;
|
|
||||||
n += exp[0] - '0';
|
|
||||||
++exp;
|
|
||||||
}
|
|
||||||
lval->num = n;
|
|
||||||
result = NUMBER;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '=':
|
|
||||||
if (exp[0] == '=')
|
|
||||||
{
|
|
||||||
++exp;
|
|
||||||
lval->op = equal;
|
|
||||||
result = EQUOP2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
result = YYERRCODE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '!':
|
|
||||||
if (exp[0] == '=')
|
|
||||||
{
|
|
||||||
++exp;
|
|
||||||
lval->op = not_equal;
|
|
||||||
result = EQUOP2;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '&':
|
|
||||||
case '|':
|
|
||||||
if (exp[0] == result)
|
|
||||||
++exp;
|
|
||||||
else
|
|
||||||
result = YYERRCODE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '<':
|
|
||||||
if (exp[0] == '=')
|
|
||||||
{
|
|
||||||
++exp;
|
|
||||||
lval->op = less_or_equal;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
lval->op = less_than;
|
|
||||||
result = CMPOP2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '>':
|
|
||||||
if (exp[0] == '=')
|
|
||||||
{
|
|
||||||
++exp;
|
|
||||||
lval->op = greater_or_equal;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
lval->op = greater_than;
|
|
||||||
result = CMPOP2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '*':
|
|
||||||
lval->op = mult;
|
|
||||||
result = MULOP2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '/':
|
|
||||||
lval->op = divide;
|
|
||||||
result = MULOP2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '%':
|
|
||||||
lval->op = module;
|
|
||||||
result = MULOP2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '+':
|
|
||||||
lval->op = plus;
|
|
||||||
result = ADDOP2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '-':
|
|
||||||
lval->op = minus;
|
|
||||||
result = ADDOP2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'n':
|
|
||||||
case '?':
|
|
||||||
case ':':
|
|
||||||
case '(':
|
|
||||||
case ')':
|
|
||||||
/* Nothing, just return the character. */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ';':
|
|
||||||
case '\n':
|
|
||||||
case '\0':
|
|
||||||
/* Be safe and let the user call this function again. */
|
|
||||||
--exp;
|
|
||||||
result = YYEOF;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
result = YYERRCODE;
|
|
||||||
#if YYDEBUG != 0
|
|
||||||
--exp;
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
*pexp = exp;
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
yyerror (str)
|
|
||||||
const char *str;
|
|
||||||
{
|
|
||||||
/* Do nothing. We don't print error messages here. */
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
# Add this package to a list of references stored in a text file.
|
|
||||||
#
|
|
||||||
# Copyright (C) 2000 Free Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU Library General Public License as published
|
|
||||||
# by the Free Software Foundation; either version 2, 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
|
|
||||||
# Library General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Library General Public
|
|
||||||
# License along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
# USA.
|
|
||||||
#
|
|
||||||
# Written by Bruno Haible <haible@clisp.cons.org>.
|
|
||||||
#
|
|
||||||
/^# Packages using this file: / {
|
|
||||||
s/# Packages using this file://
|
|
||||||
ta
|
|
||||||
:a
|
|
||||||
s/ @PACKAGE@ / @PACKAGE@ /
|
|
||||||
tb
|
|
||||||
s/ $/ @PACKAGE@ /
|
|
||||||
:b
|
|
||||||
s/^/# Packages using this file:/
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
# Remove this package from a list of references stored in a text file.
|
|
||||||
#
|
|
||||||
# Copyright (C) 2000 Free Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU Library General Public License as published
|
|
||||||
# by the Free Software Foundation; either version 2, 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
|
|
||||||
# Library General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Library General Public
|
|
||||||
# License along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
# USA.
|
|
||||||
#
|
|
||||||
# Written by Bruno Haible <haible@clisp.cons.org>.
|
|
||||||
#
|
|
||||||
/^# Packages using this file: / {
|
|
||||||
s/# Packages using this file://
|
|
||||||
s/ @PACKAGE@ / /
|
|
||||||
s/^/# Packages using this file:/
|
|
||||||
}
|
|
|
@ -1,142 +0,0 @@
|
||||||
/* Implementation of the textdomain(3) function.
|
|
||||||
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public License as published
|
|
||||||
by the Free Software Foundation; either version 2, 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
|
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
|
||||||
License along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
# include <libintl.h>
|
|
||||||
#else
|
|
||||||
# include "libgnuintl.h"
|
|
||||||
#endif
|
|
||||||
#include "gettextP.h"
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* We have to handle multi-threaded applications. */
|
|
||||||
# include <bits/libc-lock.h>
|
|
||||||
#else
|
|
||||||
/* Provide dummy implementation if this is outside glibc. */
|
|
||||||
# define __libc_rwlock_define(CLASS, NAME)
|
|
||||||
# define __libc_rwlock_wrlock(NAME)
|
|
||||||
# define __libc_rwlock_unlock(NAME)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The internal variables in the standalone libintl.a must have different
|
|
||||||
names than the internal variables in GNU libc, otherwise programs
|
|
||||||
using libintl.a cannot be linked statically. */
|
|
||||||
#if !defined _LIBC
|
|
||||||
# define _nl_default_default_domain _nl_default_default_domain__
|
|
||||||
# define _nl_current_default_domain _nl_current_default_domain__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
|
||||||
|
|
||||||
/* Name of the default text domain. */
|
|
||||||
extern const char _nl_default_default_domain[];
|
|
||||||
|
|
||||||
/* Default text domain in which entries for gettext(3) are to be found. */
|
|
||||||
extern const char *_nl_current_default_domain;
|
|
||||||
|
|
||||||
|
|
||||||
/* Names for the libintl functions are a problem. They must not clash
|
|
||||||
with existing names and they should follow ANSI C. But this source
|
|
||||||
code is also used in GNU C Library where the names have a __
|
|
||||||
prefix. So we have to make a difference here. */
|
|
||||||
#ifdef _LIBC
|
|
||||||
# define TEXTDOMAIN __textdomain
|
|
||||||
# ifndef strdup
|
|
||||||
# define strdup(str) __strdup (str)
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define TEXTDOMAIN textdomain__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Lock variable to protect the global data in the gettext implementation. */
|
|
||||||
__libc_rwlock_define (extern, _nl_state_lock)
|
|
||||||
|
|
||||||
/* Set the current default message catalog to DOMAINNAME.
|
|
||||||
If DOMAINNAME is null, return the current default.
|
|
||||||
If DOMAINNAME is "", reset to the default of "messages". */
|
|
||||||
char *
|
|
||||||
TEXTDOMAIN (domainname)
|
|
||||||
const char *domainname;
|
|
||||||
{
|
|
||||||
char *new_domain;
|
|
||||||
char *old_domain;
|
|
||||||
|
|
||||||
/* A NULL pointer requests the current setting. */
|
|
||||||
if (domainname == NULL)
|
|
||||||
return (char *) _nl_current_default_domain;
|
|
||||||
|
|
||||||
__libc_rwlock_wrlock (_nl_state_lock);
|
|
||||||
|
|
||||||
old_domain = (char *) _nl_current_default_domain;
|
|
||||||
|
|
||||||
/* If domain name is the null string set to default domain "messages". */
|
|
||||||
if (domainname[0] == '\0'
|
|
||||||
|| strcmp (domainname, _nl_default_default_domain) == 0)
|
|
||||||
{
|
|
||||||
_nl_current_default_domain = _nl_default_default_domain;
|
|
||||||
new_domain = (char *) _nl_current_default_domain;
|
|
||||||
}
|
|
||||||
else if (strcmp (domainname, old_domain) == 0)
|
|
||||||
/* This can happen and people will use it to signal that some
|
|
||||||
environment variable changed. */
|
|
||||||
new_domain = old_domain;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* If the following malloc fails `_nl_current_default_domain'
|
|
||||||
will be NULL. This value will be returned and so signals we
|
|
||||||
are out of core. */
|
|
||||||
#if defined _LIBC || defined HAVE_STRDUP
|
|
||||||
new_domain = strdup (domainname);
|
|
||||||
#else
|
|
||||||
size_t len = strlen (domainname) + 1;
|
|
||||||
new_domain = (char *) malloc (len);
|
|
||||||
if (new_domain != NULL)
|
|
||||||
memcpy (new_domain, domainname, len);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (new_domain != NULL)
|
|
||||||
_nl_current_default_domain = new_domain;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We use this possibility to signal a change of the loaded catalogs
|
|
||||||
since this is most likely the case and there is no other easy we
|
|
||||||
to do it. Do it only when the call was successful. */
|
|
||||||
if (new_domain != NULL)
|
|
||||||
{
|
|
||||||
++_nl_msg_cat_cntr;
|
|
||||||
|
|
||||||
if (old_domain != new_domain && old_domain != _nl_default_default_domain)
|
|
||||||
free (old_domain);
|
|
||||||
}
|
|
||||||
|
|
||||||
__libc_rwlock_unlock (_nl_state_lock);
|
|
||||||
|
|
||||||
return new_domain;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
|
||||||
/* Alias for function name in GNU C Library. */
|
|
||||||
weak_alias (__textdomain, textdomain);
|
|
||||||
#endif
|
|
|
@ -1,15 +1,15 @@
|
||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
# $Id: Makefile.am,v 1.2.4.7 2001/02/11 11:50:09 guus Exp $
|
# $Id: Makefile.am 1374 2004-03-21 14:21:22Z guus $
|
||||||
|
|
||||||
noinst_LIBRARIES = libvpn.a
|
noinst_LIBRARIES = libvpn.a
|
||||||
|
|
||||||
INCLUDES = @INCLUDES@ -I. -I$(top_builddir) -I$(top_srcdir)/intl
|
INCLUDES = @INCLUDES@ -I. -I$(top_builddir)
|
||||||
|
|
||||||
libvpn_a_SOURCES = xmalloc.c pidfile.c utils.c getopt.c getopt1.c list.c avl_tree.c dropin.c
|
libvpn_a_SOURCES = xmalloc.c pidfile.c utils.c getopt.c getopt1.c list.c avl_tree.c dropin.c fake-getaddrinfo.c fake-getnameinfo.c
|
||||||
|
|
||||||
libvpn_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
libvpn_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||||
libvpn_a_DEPENDENCIES = $(libvpn_a_LIBADD)
|
libvpn_a_DEPENDENCIES = $(libvpn_a_LIBADD)
|
||||||
|
|
||||||
noinst_HEADERS = xalloc.h pidfile.h utils.h getopt.h list.h avl_tree.h dropin.h
|
noinst_HEADERS = xalloc.h pidfile.h utils.h getopt.h list.h avl_tree.h dropin.h fake-getaddrinfo.h fake-getnameinfo.h fake-gai-errnos.h gettext.h ipv6.h ipv4.h ethernet.h
|
||||||
|
|
||||||
EXTRA_DIST = README
|
EXTRA_DIST =
|
||||||
|
|
426
lib/Makefile.in
426
lib/Makefile.in
|
@ -1,7 +1,8 @@
|
||||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
# Free Software Foundation, Inc.
|
# 2003, 2004 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
@ -13,152 +14,218 @@
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
# $Id: Makefile.am,v 1.2.4.7 2001/02/11 11:50:09 guus Exp $
|
# $Id: Makefile.am 1374 2004-03-21 14:21:22Z guus $
|
||||||
|
|
||||||
SHELL = @SHELL@
|
|
||||||
|
SOURCES = $(libvpn_a_SOURCES)
|
||||||
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
prefix = @prefix@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
|
|
||||||
bindir = @bindir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
datadir = @datadir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
libdir = @libdir@
|
|
||||||
infodir = @infodir@
|
|
||||||
mandir = @mandir@
|
|
||||||
includedir = @includedir@
|
|
||||||
oldincludedir = /usr/include
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
top_builddir = ..
|
top_builddir = ..
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
INSTALL_HEADER = $(INSTALL_DATA)
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
transform = @program_transform_name@
|
transform = $(program_transform_name)
|
||||||
NORMAL_INSTALL = :
|
NORMAL_INSTALL = :
|
||||||
PRE_INSTALL = :
|
PRE_INSTALL = :
|
||||||
POST_INSTALL = :
|
POST_INSTALL = :
|
||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
host_alias = @host_alias@
|
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
AMTAR = @AMTAR@
|
|
||||||
AWK = @AWK@
|
|
||||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
|
||||||
CATALOGS = @CATALOGS@
|
|
||||||
CATOBJEXT = @CATOBJEXT@
|
|
||||||
CC = @CC@
|
|
||||||
CPP = @CPP@
|
|
||||||
DATADIRNAME = @DATADIRNAME@
|
|
||||||
DEPDIR = @DEPDIR@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
GENCAT = @GENCAT@
|
|
||||||
GLIBC21 = @GLIBC21@
|
|
||||||
GMOFILES = @GMOFILES@
|
|
||||||
GMSGFMT = @GMSGFMT@
|
|
||||||
HAVE_TUNTAP = @HAVE_TUNTAP@
|
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
|
||||||
INTLBISON = @INTLBISON@
|
|
||||||
INTLLIBS = @INTLLIBS@
|
|
||||||
INTLOBJS = @INTLOBJS@
|
|
||||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
|
||||||
LIBICONV = @LIBICONV@
|
|
||||||
LINUX_IF_TUN_H = @LINUX_IF_TUN_H@
|
|
||||||
LN_S = @LN_S@
|
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
|
||||||
MSGFMT = @MSGFMT@
|
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
PACKAGE = @PACKAGE@
|
|
||||||
PERL = @PERL@
|
|
||||||
POFILES = @POFILES@
|
|
||||||
POSUB = @POSUB@
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
|
||||||
USE_NLS = @USE_NLS@
|
|
||||||
VERSION = @VERSION@
|
|
||||||
am__include = @am__include@
|
|
||||||
am__quote = @am__quote@
|
|
||||||
install_sh = @install_sh@
|
|
||||||
|
|
||||||
INCLUDES = @INCLUDES@ -I. -I$(top_builddir) -I$(top_srcdir)/intl
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libvpn.a
|
|
||||||
|
|
||||||
libvpn_a_SOURCES = xmalloc.c pidfile.c utils.c getopt.c getopt1.c list.c avl_tree.c dropin.c
|
|
||||||
|
|
||||||
libvpn_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
|
||||||
libvpn_a_DEPENDENCIES = $(libvpn_a_LIBADD)
|
|
||||||
|
|
||||||
noinst_HEADERS = xalloc.h pidfile.h utils.h getopt.h list.h avl_tree.h dropin.h
|
|
||||||
|
|
||||||
EXTRA_DIST = README
|
|
||||||
subdir = lib
|
subdir = lib
|
||||||
|
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/Makefile.in alloca.c malloc.c memcmp.c realloc.c
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal-include.m4 \
|
||||||
|
$(top_srcdir)/m4/attribute.m4 $(top_srcdir)/m4/gettext.m4 \
|
||||||
|
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||||
|
$(top_srcdir)/m4/lzo.m4 $(top_srcdir)/m4/malloc.m4 \
|
||||||
|
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/openssl.m4 \
|
||||||
|
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||||
|
$(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/tuntap.m4 \
|
||||||
|
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.in
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
LIBRARIES = $(noinst_LIBRARIES)
|
LIBRARIES = $(noinst_LIBRARIES)
|
||||||
|
AR = ar
|
||||||
libvpn_a_AR = $(AR) cru
|
ARFLAGS = cru
|
||||||
|
libvpn_a_AR = $(AR) $(ARFLAGS)
|
||||||
am_libvpn_a_OBJECTS = xmalloc.$(OBJEXT) pidfile.$(OBJEXT) \
|
am_libvpn_a_OBJECTS = xmalloc.$(OBJEXT) pidfile.$(OBJEXT) \
|
||||||
utils.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) \
|
utils.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) \
|
||||||
list.$(OBJEXT) avl_tree.$(OBJEXT) dropin.$(OBJEXT)
|
list.$(OBJEXT) avl_tree.$(OBJEXT) dropin.$(OBJEXT) \
|
||||||
|
fake-getaddrinfo.$(OBJEXT) fake-getnameinfo.$(OBJEXT)
|
||||||
libvpn_a_OBJECTS = $(am_libvpn_a_OBJECTS)
|
libvpn_a_OBJECTS = $(am_libvpn_a_OBJECTS)
|
||||||
|
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||||
DEFS = @DEFS@
|
|
||||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
LIBS = @LIBS@
|
|
||||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/alloca.Po $(DEPDIR)/avl_tree.Po \
|
am__depfiles_maybe = depfiles
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/dropin.Po $(DEPDIR)/getopt.Po \
|
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/alloca.Po $(DEPDIR)/malloc.Po \
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/getopt1.Po $(DEPDIR)/list.Po \
|
@AMDEP_TRUE@ $(DEPDIR)/memcmp.Po $(DEPDIR)/realloc.Po \
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/malloc.Po $(DEPDIR)/memcmp.Po \
|
@AMDEP_TRUE@ ./$(DEPDIR)/avl_tree.Po ./$(DEPDIR)/dropin.Po \
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/pidfile.Po $(DEPDIR)/realloc.Po \
|
@AMDEP_TRUE@ ./$(DEPDIR)/fake-getaddrinfo.Po \
|
||||||
@AMDEP_TRUE@ $(DEPDIR)/utils.Po $(DEPDIR)/xmalloc.Po
|
@AMDEP_TRUE@ ./$(DEPDIR)/fake-getnameinfo.Po \
|
||||||
|
@AMDEP_TRUE@ ./$(DEPDIR)/getopt.Po ./$(DEPDIR)/getopt1.Po \
|
||||||
|
@AMDEP_TRUE@ ./$(DEPDIR)/list.Po ./$(DEPDIR)/pidfile.Po \
|
||||||
|
@AMDEP_TRUE@ ./$(DEPDIR)/utils.Po ./$(DEPDIR)/xmalloc.Po
|
||||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
CCLD = $(CC)
|
CCLD = $(CC)
|
||||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||||
CFLAGS = @CFLAGS@
|
SOURCES = $(libvpn_a_SOURCES)
|
||||||
DIST_SOURCES = $(libvpn_a_SOURCES)
|
DIST_SOURCES = $(libvpn_a_SOURCES)
|
||||||
HEADERS = $(noinst_HEADERS)
|
HEADERS = $(noinst_HEADERS)
|
||||||
|
ETAGS = etags
|
||||||
DIST_COMMON = README $(noinst_HEADERS) Makefile.am Makefile.in alloca.c \
|
CTAGS = ctags
|
||||||
malloc.c memcmp.c realloc.c
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
SOURCES = $(libvpn_a_SOURCES)
|
ACLOCAL = @ACLOCAL@
|
||||||
|
ALLOCA = @ALLOCA@
|
||||||
|
AMDEP_FALSE = @AMDEP_FALSE@
|
||||||
|
AMDEP_TRUE = @AMDEP_TRUE@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
GMSGFMT = @GMSGFMT@
|
||||||
|
HAVE_TUNTAP = @HAVE_TUNTAP@
|
||||||
|
INCLUDES = @INCLUDES@ -I. -I$(top_builddir)
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
INTLLIBS = @INTLLIBS@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBICONV = @LIBICONV@
|
||||||
|
LIBINTL = @LIBINTL@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LINUX_IF_TUN_H = @LINUX_IF_TUN_H@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBICONV = @LTLIBICONV@
|
||||||
|
LTLIBINTL = @LTLIBINTL@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||||
|
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
|
MSGFMT = @MSGFMT@
|
||||||
|
MSGMERGE = @MSGMERGE@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
POSUB = @POSUB@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USE_NLS = @USE_NLS@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
XGETTEXT = @XGETTEXT@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||||
|
ac_ct_STRIP = @ac_ct_STRIP@
|
||||||
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
datadir = @datadir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
noinst_LIBRARIES = libvpn.a
|
||||||
|
libvpn_a_SOURCES = xmalloc.c pidfile.c utils.c getopt.c getopt1.c list.c avl_tree.c dropin.c fake-getaddrinfo.c fake-getnameinfo.c
|
||||||
|
libvpn_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||||
|
libvpn_a_DEPENDENCIES = $(libvpn_a_LIBADD)
|
||||||
|
noinst_HEADERS = xalloc.h pidfile.h utils.h getopt.h list.h avl_tree.h dropin.h fake-getaddrinfo.h fake-getnameinfo.h fake-gai-errnos.h gettext.h ipv6.h ipv4.h ethernet.h
|
||||||
|
EXTRA_DIST =
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .o .obj
|
.SUFFIXES: .c .o .obj
|
||||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
|
||||||
cd $(top_srcdir) && \
|
cd $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu lib/Makefile
|
$(AUTOMAKE) --gnu lib/Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
.PRECIOUS: Makefile
|
||||||
cd $(top_builddir) && \
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
@case '$?' in \
|
||||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
*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;
|
||||||
|
|
||||||
AR = ar
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
clean-noinstLIBRARIES:
|
clean-noinstLIBRARIES:
|
||||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||||
|
@ -168,88 +235,112 @@ libvpn.a: $(libvpn_a_OBJECTS) $(libvpn_a_DEPENDENCIES)
|
||||||
$(RANLIB) libvpn.a
|
$(RANLIB) libvpn.a
|
||||||
|
|
||||||
mostlyclean-compile:
|
mostlyclean-compile:
|
||||||
-rm -f *.$(OBJEXT) core *.core
|
-rm -f *.$(OBJEXT)
|
||||||
|
|
||||||
distclean-compile:
|
distclean-compile:
|
||||||
-rm -f *.tab.c
|
-rm -f *.tab.c
|
||||||
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/avl_tree.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dropin.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/list.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memcmp.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memcmp.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pidfile.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/utils.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl_tree.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xmalloc.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dropin.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-getaddrinfo.Po@am__quote@
|
||||||
distclean-depend:
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-getnameinfo.Po@am__quote@
|
||||||
-rm -rf $(DEPDIR)
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pidfile.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||||
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||||
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||||
|
|
||||||
.c.obj:
|
.c.obj:
|
||||||
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||||
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||||
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
$(COMPILE) -c `cygpath -w $<`
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||||
CCDEPMODE = @CCDEPMODE@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||||
uninstall-info-am:
|
uninstall-info-am:
|
||||||
|
|
||||||
tags: TAGS
|
|
||||||
|
|
||||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | \
|
done | \
|
||||||
$(AWK) ' { files[$$0] = 1; } \
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
END { for (i in files) print i; }'`; \
|
END { for (i in files) print i; }'`; \
|
||||||
mkid -fID $$unique $(LISP)
|
mkid -fID $$unique
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
$(TAGS_FILES) $(LISP)
|
$(TAGS_FILES) $(LISP)
|
||||||
tags=; \
|
tags=; \
|
||||||
here=`pwd`; \
|
here=`pwd`; \
|
||||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | \
|
done | \
|
||||||
$(AWK) ' { files[$$0] = 1; } \
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
END { for (i in files) print i; }'`; \
|
END { for (i in files) print i; }'`; \
|
||||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||||
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$tags $$unique; \
|
||||||
|
fi
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
tags=; \
|
||||||
|
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; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$tags $$unique
|
||||||
|
|
||||||
GTAGS:
|
GTAGS:
|
||||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
&& cd $(top_srcdir) \
|
&& cd $(top_srcdir) \
|
||||||
&& gtags -i $(GTAGS_ARGS) $$here
|
&& gtags -i $(GTAGS_ARGS) $$here
|
||||||
|
|
||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
|
|
||||||
top_distdir = ..
|
|
||||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
distdir: $(DISTFILES)
|
||||||
@for file in $(DISTFILES); do \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
list='$(DISTFILES)'; for file in $$list; do \
|
||||||
|
case $$file in \
|
||||||
|
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||||
|
esac; \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
dir="/$$dir"; \
|
||||||
|
$(mkdir_p) "$(distdir)$$dir"; \
|
||||||
|
else \
|
||||||
|
dir=''; \
|
||||||
fi; \
|
fi; \
|
||||||
if test -d $$d/$$file; then \
|
if test -d $$d/$$file; then \
|
||||||
cp -pR $$d/$$file $(distdir) \
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|| exit 1; \
|
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
fi; \
|
||||||
|
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||||
else \
|
else \
|
||||||
test -f $(distdir)/$$file \
|
test -f $(distdir)/$$file \
|
||||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||||
|
@ -259,9 +350,7 @@ distdir: $(DISTFILES)
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-am
|
check: check-am
|
||||||
all-am: Makefile $(LIBRARIES) $(HEADERS)
|
all-am: Makefile $(LIBRARIES) $(HEADERS)
|
||||||
|
|
||||||
installdirs:
|
installdirs:
|
||||||
|
|
||||||
install: install-am
|
install: install-am
|
||||||
install-exec: install-exec-am
|
install-exec: install-exec-am
|
||||||
install-data: install-data-am
|
install-data: install-data-am
|
||||||
|
@ -273,6 +362,7 @@ install-am: all-am
|
||||||
installcheck: installcheck-am
|
installcheck: installcheck-am
|
||||||
install-strip:
|
install-strip:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
`test -z '$(STRIP)' || \
|
`test -z '$(STRIP)' || \
|
||||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
@ -280,7 +370,7 @@ mostlyclean-generic:
|
||||||
clean-generic:
|
clean-generic:
|
||||||
|
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
-rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@ -290,14 +380,17 @@ clean: clean-am
|
||||||
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
|
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-am
|
||||||
|
-rm -rf $(DEPDIR) ./$(DEPDIR)
|
||||||
distclean-am: clean-am distclean-compile distclean-depend \
|
-rm -f Makefile
|
||||||
distclean-generic distclean-tags
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
|
distclean-tags
|
||||||
|
|
||||||
dvi: dvi-am
|
dvi: dvi-am
|
||||||
|
|
||||||
dvi-am:
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
info: info-am
|
info: info-am
|
||||||
|
|
||||||
info-am:
|
info-am:
|
||||||
|
@ -313,25 +406,34 @@ install-man:
|
||||||
installcheck-am:
|
installcheck-am:
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -rf $(DEPDIR) ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
mostlyclean: mostlyclean-am
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
uninstall-am: uninstall-info-am
|
uninstall-am: uninstall-info-am
|
||||||
|
|
||||||
.PHONY: GTAGS all all-am check check-am clean clean-generic \
|
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||||
clean-noinstLIBRARIES distclean distclean-compile \
|
clean-noinstLIBRARIES ctags distclean distclean-compile \
|
||||||
distclean-depend distclean-generic distclean-tags distdir dvi \
|
distclean-generic distclean-tags distdir dvi dvi-am html \
|
||||||
dvi-am info info-am install install-am install-data \
|
html-am info info-am install install-am install-data \
|
||||||
install-data-am install-exec install-exec-am install-info \
|
install-data-am install-exec install-exec-am install-info \
|
||||||
install-info-am install-man install-strip installcheck \
|
install-info-am install-man install-strip installcheck \
|
||||||
installcheck-am installdirs maintainer-clean \
|
installcheck-am installdirs maintainer-clean \
|
||||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||||
mostlyclean-generic tags uninstall uninstall-am \
|
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||||
uninstall-info-am
|
uninstall-am uninstall-info-am
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# 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.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
The files in this directory were merely copied from fileutils 4.0.
|
|
888
lib/avl_tree.c
888
lib/avl_tree.c
File diff suppressed because it is too large
Load diff
|
@ -1,9 +1,9 @@
|
||||||
/*
|
/*
|
||||||
avl_tree.h -- header file for avl_tree.c
|
avl_tree.h -- header file for avl_tree.c
|
||||||
Copyright (C) 1998 Michael H. Buselli
|
Copyright (C) 1998 Michael H. Buselli
|
||||||
2000,2001 Ivo Timmermans <itimmermans@bigfoot.com>,
|
2000-2004 Ivo Timmermans <ivo@tinc-vpn.org>,
|
||||||
2000,2001 Guus Sliepen <guus@sliepen.warande.net>
|
2000-2004 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
2000,2001 Wessel Dankers <wsl@nl.linux.org>
|
2000-2004 Wessel Dankers <wsl@tinc-vpn.org>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
Original AVL tree library by Michael H. Buselli <cosine@cosine.org>.
|
Original AVL tree library by Michael H. Buselli <cosine@cosine.org>.
|
||||||
|
|
||||||
Modified 2000-11-28 by Wessel Dankers <wsl@nl.linux.org> to use counts
|
Modified 2000-11-28 by Wessel Dankers <wsl@tinc-vpn.org> to use counts
|
||||||
instead of depths, to add the ->next and ->prev and to generally obfuscate
|
instead of depths, to add the ->next and ->prev and to generally obfuscate
|
||||||
the code. Mail me if you found a bug.
|
the code. Mail me if you found a bug.
|
||||||
|
|
||||||
Cleaned up and incorporated some of the ideas from the red-black tree
|
Cleaned up and incorporated some of the ideas from the red-black tree
|
||||||
library for inclusion into tinc (http://tinc.nl.linux.org/) by
|
library for inclusion into tinc (http://www.tinc-vpn.org/) by
|
||||||
Guus Sliepen <guus@sliepen.warande.net>.
|
Guus Sliepen <guus@tinc-vpn.org>.
|
||||||
|
|
||||||
$Id: avl_tree.h,v 1.1.2.4 2001/02/06 10:13:22 guus Exp $
|
$Id: avl_tree.h 1374 2004-03-21 14:21:22Z guus $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,54 +37,54 @@
|
||||||
#define __AVL_TREE_H__
|
#define __AVL_TREE_H__
|
||||||
|
|
||||||
#ifndef AVL_DEPTH
|
#ifndef AVL_DEPTH
|
||||||
#ifndef AVL_COUNT
|
#ifndef AVL_COUNT
|
||||||
#define AVL_DEPTH
|
#define AVL_DEPTH
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct avl_node_t {
|
typedef struct avl_node_t {
|
||||||
|
|
||||||
/* Linked list part */
|
/* Linked list part */
|
||||||
|
|
||||||
struct avl_node_t *next;
|
struct avl_node_t *next;
|
||||||
struct avl_node_t *prev;
|
struct avl_node_t *prev;
|
||||||
|
|
||||||
/* Tree part */
|
/* Tree part */
|
||||||
|
|
||||||
struct avl_node_t *parent;
|
struct avl_node_t *parent;
|
||||||
struct avl_node_t *left;
|
struct avl_node_t *left;
|
||||||
struct avl_node_t *right;
|
struct avl_node_t *right;
|
||||||
|
|
||||||
#ifdef AVL_COUNT
|
#ifdef AVL_COUNT
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
#endif
|
#endif
|
||||||
#ifdef AVL_DEPTH
|
#ifdef AVL_DEPTH
|
||||||
unsigned char depth;
|
unsigned char depth;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Payload */
|
/* Payload */
|
||||||
|
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
} avl_node_t;
|
} avl_node_t;
|
||||||
|
|
||||||
typedef int (*avl_compare_t) (const void *, const void *);
|
typedef int (*avl_compare_t)(const void *, const void *);
|
||||||
typedef void (*avl_action_t) (const void *);
|
typedef void (*avl_action_t)(const void *);
|
||||||
typedef void (*avl_action_node_t) (const avl_node_t *);
|
typedef void (*avl_action_node_t)(const avl_node_t *);
|
||||||
|
|
||||||
typedef struct avl_tree_t {
|
typedef struct avl_tree_t {
|
||||||
|
|
||||||
/* Linked list part */
|
/* Linked list part */
|
||||||
|
|
||||||
avl_node_t *head;
|
avl_node_t *head;
|
||||||
avl_node_t *tail;
|
avl_node_t *tail;
|
||||||
|
|
||||||
/* Tree part */
|
/* Tree part */
|
||||||
|
|
||||||
avl_node_t *root;
|
avl_node_t *root;
|
||||||
|
|
||||||
avl_compare_t compare;
|
avl_compare_t compare;
|
||||||
avl_action_t delete;
|
avl_action_t delete;
|
||||||
|
|
||||||
} avl_tree_t;
|
} avl_tree_t;
|
||||||
|
|
||||||
|
@ -128,18 +128,18 @@ extern avl_node_t *avl_search_closest_greater_node(const avl_tree_t *, const voi
|
||||||
|
|
||||||
/* Tree walking */
|
/* Tree walking */
|
||||||
|
|
||||||
extern void avl_foreach(avl_tree_t *, avl_action_t);
|
extern void avl_foreach(const avl_tree_t *, avl_action_t);
|
||||||
extern void avl_foreach_node(avl_tree_t *, avl_action_t);
|
extern void avl_foreach_node(const avl_tree_t *, avl_action_t);
|
||||||
|
|
||||||
/* Indexing */
|
/* Indexing */
|
||||||
|
|
||||||
#ifdef AVL_COUNT
|
#ifdef AVL_COUNT
|
||||||
extern unsigned int avl_count(avl_tree_t *);
|
extern unsigned int avl_count(const avl_tree_t *);
|
||||||
extern avl_node_t *avl_get_node(const avl_tree_t *, unsigned int);
|
extern avl_node_t *avl_get_node(const avl_tree_t *, unsigned int);
|
||||||
extern unsigned int avl_index(const avl_node_t *);
|
extern unsigned int avl_index(const avl_node_t *);
|
||||||
#endif
|
#endif
|
||||||
#ifdef AVL_DEPTH
|
#ifdef AVL_DEPTH
|
||||||
extern unsigned int avl_depth(avl_tree_t *);
|
extern unsigned int avl_depth(const avl_tree_t *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __AVL_TREE_H__ */
|
#endif /* __AVL_TREE_H__ */
|
||||||
|
|
196
lib/dropin.c
196
lib/dropin.c
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
dropin.c -- a set of drop-in replacements for libc functions
|
dropin.c -- a set of drop-in replacements for libc functions
|
||||||
Copyright (C) 2000,2001 Ivo Timmermans <itimmermans@bigfoot.com>,
|
Copyright (C) 2000-2004 Ivo Timmermans <ivo@tinc-vpn.org>,
|
||||||
2000,2001 Guus Sliepen <guus@sliepen.warande.net>
|
2000-2004 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -17,23 +17,12 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: dropin.c,v 1.1.2.8 2002/02/10 21:57:51 guus Exp $
|
$Id: dropin.c 1374 2004-03-21 14:21:22Z guus $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "system.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include "xalloc.h"
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#include <xalloc.h>
|
|
||||||
|
|
||||||
#include <system.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#ifndef HAVE_DAEMON
|
#ifndef HAVE_DAEMON
|
||||||
/*
|
/*
|
||||||
|
@ -51,61 +40,55 @@
|
||||||
*/
|
*/
|
||||||
int daemon(int nochdir, int noclose)
|
int daemon(int nochdir, int noclose)
|
||||||
{
|
{
|
||||||
pid_t pid;
|
#ifdef HAVE_FORK
|
||||||
int fd;
|
pid_t pid;
|
||||||
|
int fd;
|
||||||
|
|
||||||
pid = fork();
|
pid = fork();
|
||||||
|
|
||||||
/* Check if forking failed */
|
/* Check if forking failed */
|
||||||
if(pid < 0)
|
if(pid < 0) {
|
||||||
{
|
perror("fork");
|
||||||
perror("fork");
|
exit(-1);
|
||||||
exit(-1);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* If we are the parent, terminate */
|
/* If we are the parent, terminate */
|
||||||
if(pid)
|
if(pid)
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
/* Detach by becoming the new process group leader */
|
/* Detach by becoming the new process group leader */
|
||||||
if(setsid() < 0)
|
if(setsid() < 0) {
|
||||||
{
|
perror("setsid");
|
||||||
perror("setsid");
|
return -1;
|
||||||
return -1;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Change working directory to the root (to avoid keeping mount
|
/* Change working directory to the root (to avoid keeping mount
|
||||||
points busy) */
|
points busy) */
|
||||||
if(!nochdir)
|
if(!nochdir) {
|
||||||
{
|
chdir("/");
|
||||||
chdir("/");
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Redirect stdin/out/err to /dev/null */
|
/* Redirect stdin/out/err to /dev/null */
|
||||||
if(!noclose)
|
if(!noclose) {
|
||||||
{
|
fd = open("/dev/null", O_RDWR);
|
||||||
fd = open("/dev/null", O_RDWR);
|
|
||||||
|
|
||||||
if(fd < 0)
|
if(fd < 0) {
|
||||||
{
|
perror("opening /dev/null");
|
||||||
perror("opening /dev/null");
|
return -1;
|
||||||
return -1;
|
} else {
|
||||||
}
|
dup2(fd, 0);
|
||||||
else
|
dup2(fd, 1);
|
||||||
{
|
dup2(fd, 2);
|
||||||
dup2(fd, 0);
|
}
|
||||||
dup2(fd, 1);
|
}
|
||||||
dup2(fd, 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
#else
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef HAVE_GET_CURRENT_DIR_NAME
|
#ifndef HAVE_GET_CURRENT_DIR_NAME
|
||||||
/*
|
/*
|
||||||
Replacement for the GNU get_current_dir_name function:
|
Replacement for the GNU get_current_dir_name function:
|
||||||
|
@ -116,56 +99,75 @@ int daemon(int nochdir, int noclose)
|
||||||
*/
|
*/
|
||||||
char *get_current_dir_name(void)
|
char *get_current_dir_name(void)
|
||||||
{
|
{
|
||||||
size_t size;
|
size_t size;
|
||||||
char *buf;
|
char *buf;
|
||||||
char *r;
|
char *r;
|
||||||
|
|
||||||
/* Start with 100 bytes. If this turns out to be insufficient to
|
/* Start with 100 bytes. If this turns out to be insufficient to
|
||||||
contain the working directory, double the size. */
|
contain the working directory, double the size. */
|
||||||
size = 100;
|
size = 100;
|
||||||
buf = xmalloc(size);
|
buf = xmalloc(size);
|
||||||
|
|
||||||
errno = 0; /* Success */
|
errno = 0; /* Success */
|
||||||
r = getcwd(buf, size);
|
r = getcwd(buf, size);
|
||||||
/* getcwd returns NULL and sets errno to ERANGE if the bufferspace
|
|
||||||
is insufficient to contain the entire working directory. */
|
|
||||||
while(r == NULL && errno == ERANGE)
|
|
||||||
{
|
|
||||||
free(buf);
|
|
||||||
size <<= 1; /* double the size */
|
|
||||||
buf = xmalloc(size);
|
|
||||||
r = getcwd(buf, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
return buf;
|
/* getcwd returns NULL and sets errno to ERANGE if the bufferspace
|
||||||
|
is insufficient to contain the entire working directory. */
|
||||||
|
while(r == NULL && errno == ERANGE) {
|
||||||
|
free(buf);
|
||||||
|
size <<= 1; /* double the size */
|
||||||
|
buf = xmalloc(size);
|
||||||
|
r = getcwd(buf, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
return buf;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_ASPRINTF
|
#ifndef HAVE_ASPRINTF
|
||||||
int asprintf(char **buf, const char *fmt, ...)
|
int asprintf(char **buf, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
len = 4096;
|
len = 4096;
|
||||||
*buf = xmalloc(len);
|
*buf = xmalloc(len);
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
status = vsnprintf (*buf, len, fmt, ap);
|
status = vsnprintf(*buf, len, fmt, ap);
|
||||||
va_end (ap);
|
va_end(ap);
|
||||||
|
|
||||||
if(status >= 0)
|
if(status >= 0)
|
||||||
*buf = xrealloc(*buf, status);
|
*buf = xrealloc(*buf, status + 1);
|
||||||
|
|
||||||
if(status > len-1)
|
if(status > len - 1) {
|
||||||
{
|
len = status;
|
||||||
len = status;
|
va_start(ap, fmt);
|
||||||
va_start(ap, fmt);
|
status = vsnprintf(*buf, len, fmt, ap);
|
||||||
status = vsnprintf (*buf, len, fmt, ap);
|
va_end(ap);
|
||||||
va_end (ap);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_GETTIMEOFDAY
|
||||||
|
int gettimeofday(struct timeval *tv, void *tz) {
|
||||||
|
tv->tv_sec = time(NULL);
|
||||||
|
tv->tv_usec = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_RANDOM
|
||||||
|
#include <openssl/rand.h>
|
||||||
|
|
||||||
|
long int random(void) {
|
||||||
|
long int x;
|
||||||
|
|
||||||
|
RAND_pseudo_bytes((unsigned char *)&x, sizeof(x));
|
||||||
|
|
||||||
|
return x;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
26
lib/dropin.h
26
lib/dropin.h
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
dropin.h -- header file for dropin.c
|
dropin.h -- header file for dropin.c
|
||||||
Copyright (C) 2000,2001 Ivo Timmermans <itimmermans@bigfoot.com>,
|
Copyright (C) 2000-2004 Ivo Timmermans <ivo@tinc-vpn.org>,
|
||||||
2000,2001 Guus Sliepen <guus@sliepen.warande.net>
|
2000-2004 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -17,22 +17,38 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: dropin.h,v 1.1.2.6 2002/02/10 21:57:51 guus Exp $
|
$Id: dropin.h 1374 2004-03-21 14:21:22Z guus $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DROPIN_H__
|
#ifndef __DROPIN_H__
|
||||||
#define __DROPIN_H__
|
#define __DROPIN_H__
|
||||||
|
|
||||||
|
#include "fake-getaddrinfo.h"
|
||||||
|
#include "fake-getnameinfo.h"
|
||||||
|
|
||||||
#ifndef HAVE_DAEMON
|
#ifndef HAVE_DAEMON
|
||||||
extern int daemon(int, int);
|
extern int daemon(int, int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_GET_CURRENT_DIR_NAME
|
#ifndef HAVE_GET_CURRENT_DIR_NAME
|
||||||
extern char* get_current_dir_name(void);
|
extern char *get_current_dir_name(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_ASPRINTF
|
#ifndef HAVE_ASPRINTF
|
||||||
extern int asprintf(char **, const char *, ...);
|
extern int asprintf(char **, const char *, ...);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __DROPIN_H__ */
|
#ifndef HAVE_GETNAMEINFO
|
||||||
|
extern int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
|
||||||
|
size_t hostlen, char *serv, size_t servlen, int flags);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_GETTIMEOFDAY
|
||||||
|
extern int gettimeofday(struct timeval *, void *);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_RANDOM
|
||||||
|
extern long int random(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __DROPIN_H__ */
|
||||||
|
|
87
lib/ethernet.h
Normal file
87
lib/ethernet.h
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
ethernet.h -- missing Ethernet related definitions
|
||||||
|
Copyright (C) 2004 Ivo Timmermans <ivo@tinc-vpn.org>
|
||||||
|
2004 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
$Id: ethernet.h 1374 2004-03-21 14:21:22Z guus $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __TINC_ETHERNET_H__
|
||||||
|
#define __TINC_ETHERNET_H__
|
||||||
|
|
||||||
|
#ifndef ETH_ALEN
|
||||||
|
#define ETH_ALEN 6
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ARPHRD_ETHER
|
||||||
|
#define ARPHRD_ETHER 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ETH_P_IP
|
||||||
|
#define ETH_P_IP 0x0800
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ETH_P_ARP
|
||||||
|
#define ETH_P_ARP 0x0806
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ETH_P_IPV6
|
||||||
|
#define ETH_P_IPV6 0x86DD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_ETHER_HEADER
|
||||||
|
struct ether_header {
|
||||||
|
uint8_t ether_dhost[ETH_ALEN];
|
||||||
|
uint8_t ether_shost[ETH_ALEN];
|
||||||
|
uint16_t ether_type;
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_ARPHDR
|
||||||
|
struct arphdr {
|
||||||
|
uint16_t ar_hrd;
|
||||||
|
uint16_t ar_pro;
|
||||||
|
uint8_t ar_hln;
|
||||||
|
uint8_t ar_pln;
|
||||||
|
uint16_t ar_op;
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
|
||||||
|
#define ARPOP_REQUEST 1
|
||||||
|
#define ARPOP_REPLY 2
|
||||||
|
#define ARPOP_RREQUEST 3
|
||||||
|
#define ARPOP_RREPLY 4
|
||||||
|
#define ARPOP_InREQUEST 8
|
||||||
|
#define ARPOP_InREPLY 9
|
||||||
|
#define ARPOP_NAK 10
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_ETHER_ARP
|
||||||
|
struct ether_arp {
|
||||||
|
struct arphdr ea_hdr;
|
||||||
|
uint8_t arp_sha[ETH_ALEN];
|
||||||
|
uint8_t arp_spa[4];
|
||||||
|
uint8_t arp_tha[ETH_ALEN];
|
||||||
|
uint8_t arp_tpa[4];
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
#define arp_hrd ea_hdr.ar_hrd
|
||||||
|
#define arp_pro ea_hdr.ar_pro
|
||||||
|
#define arp_hln ea_hdr.ar_hln
|
||||||
|
#define arp_pln ea_hdr.ar_pln
|
||||||
|
#define arp_op ea_hdr.ar_op
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __TINC_ETHERNET_H__ */
|
15
lib/fake-gai-errnos.h
Normal file
15
lib/fake-gai-errnos.h
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
/*
|
||||||
|
* fake library for ssh
|
||||||
|
*
|
||||||
|
* This file is included in getaddrinfo.c and getnameinfo.c.
|
||||||
|
* See getaddrinfo.c and getnameinfo.c.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* $Id: fake-gai-errnos.h 1374 2004-03-21 14:21:22Z guus $ */
|
||||||
|
|
||||||
|
/* for old netdb.h */
|
||||||
|
#ifndef EAI_NODATA
|
||||||
|
#define EAI_NODATA 1
|
||||||
|
#define EAI_MEMORY 2
|
||||||
|
#define EAI_FAMILY 3
|
||||||
|
#endif
|
105
lib/fake-getaddrinfo.c
Normal file
105
lib/fake-getaddrinfo.c
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
/*
|
||||||
|
* fake library for ssh
|
||||||
|
*
|
||||||
|
* This file includes getaddrinfo(), freeaddrinfo() and gai_strerror().
|
||||||
|
* These funtions are defined in rfc2133.
|
||||||
|
*
|
||||||
|
* But these functions are not implemented correctly. The minimum subset
|
||||||
|
* is implemented for ssh use only. For exapmle, this routine assumes
|
||||||
|
* that ai_family is AF_INET. Don't use it for another purpose.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "system.h"
|
||||||
|
|
||||||
|
#include "ipv4.h"
|
||||||
|
#include "ipv6.h"
|
||||||
|
#include "fake-getaddrinfo.h"
|
||||||
|
#include "xalloc.h"
|
||||||
|
|
||||||
|
#ifndef HAVE_GAI_STRERROR
|
||||||
|
char *gai_strerror(int ecode)
|
||||||
|
{
|
||||||
|
switch (ecode) {
|
||||||
|
case EAI_NODATA:
|
||||||
|
return "No address associated with hostname";
|
||||||
|
case EAI_MEMORY:
|
||||||
|
return "Memory allocation failure";
|
||||||
|
case EAI_FAMILY:
|
||||||
|
return "Address family not supported";
|
||||||
|
default:
|
||||||
|
return "Unknown error";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* !HAVE_GAI_STRERROR */
|
||||||
|
|
||||||
|
#ifndef HAVE_FREEADDRINFO
|
||||||
|
void freeaddrinfo(struct addrinfo *ai)
|
||||||
|
{
|
||||||
|
struct addrinfo *next;
|
||||||
|
|
||||||
|
while(ai) {
|
||||||
|
next = ai->ai_next;
|
||||||
|
free(ai);
|
||||||
|
ai = next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* !HAVE_FREEADDRINFO */
|
||||||
|
|
||||||
|
#ifndef HAVE_GETADDRINFO
|
||||||
|
static struct addrinfo *malloc_ai(uint16_t port, uint32_t addr)
|
||||||
|
{
|
||||||
|
struct addrinfo *ai;
|
||||||
|
|
||||||
|
ai = xmalloc_and_zero(sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
|
||||||
|
|
||||||
|
ai->ai_addr = (struct sockaddr *)(ai + 1);
|
||||||
|
ai->ai_addrlen = sizeof(struct sockaddr_in);
|
||||||
|
ai->ai_addr->sa_family = ai->ai_family = AF_INET;
|
||||||
|
|
||||||
|
((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port;
|
||||||
|
((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr;
|
||||||
|
|
||||||
|
return ai;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
|
||||||
|
{
|
||||||
|
struct addrinfo *prev = NULL;
|
||||||
|
struct hostent *hp;
|
||||||
|
struct in_addr in = {0};
|
||||||
|
int i;
|
||||||
|
uint16_t port = 0;
|
||||||
|
|
||||||
|
if(hints && hints->ai_family != AF_INET && hints->ai_family != AF_UNSPEC)
|
||||||
|
return EAI_FAMILY;
|
||||||
|
|
||||||
|
if (servname)
|
||||||
|
port = htons(atoi(servname));
|
||||||
|
|
||||||
|
if (hints && hints->ai_flags & AI_PASSIVE) {
|
||||||
|
*res = malloc_ai(port, htonl(0x00000000));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hostname) {
|
||||||
|
*res = malloc_ai(port, htonl(0x7f000001));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
hp = gethostbyname(hostname);
|
||||||
|
|
||||||
|
if(!hp || !hp->h_addr_list || !hp->h_addr_list[0])
|
||||||
|
return EAI_NODATA;
|
||||||
|
|
||||||
|
for (i = 0; hp->h_addr_list[i]; i++) {
|
||||||
|
*res = malloc_ai(port, ((struct in_addr *)hp->h_addr_list[i])->s_addr);
|
||||||
|
|
||||||
|
if(prev)
|
||||||
|
prev->ai_next = *res;
|
||||||
|
|
||||||
|
prev = *res;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* !HAVE_GETADDRINFO */
|
49
lib/fake-getaddrinfo.h
Normal file
49
lib/fake-getaddrinfo.h
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
/* $Id: fake-getaddrinfo.h 1374 2004-03-21 14:21:22Z guus $ */
|
||||||
|
|
||||||
|
#ifndef _FAKE_GETADDRINFO_H
|
||||||
|
#define _FAKE_GETADDRINFO_H
|
||||||
|
|
||||||
|
#include "fake-gai-errnos.h"
|
||||||
|
|
||||||
|
#ifndef AI_PASSIVE
|
||||||
|
# define AI_PASSIVE 1
|
||||||
|
# define AI_CANONNAME 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NI_NUMERICHOST
|
||||||
|
# define NI_NUMERICHOST 2
|
||||||
|
# define NI_NAMEREQD 4
|
||||||
|
# define NI_NUMERICSERV 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AI_NUMERICHOST
|
||||||
|
#define AI_NUMERICHOST 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_ADDRINFO
|
||||||
|
struct addrinfo {
|
||||||
|
int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
|
||||||
|
int ai_family; /* PF_xxx */
|
||||||
|
int ai_socktype; /* SOCK_xxx */
|
||||||
|
int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
|
||||||
|
size_t ai_addrlen; /* length of ai_addr */
|
||||||
|
char *ai_canonname; /* canonical name for hostname */
|
||||||
|
struct sockaddr *ai_addr; /* binary address */
|
||||||
|
struct addrinfo *ai_next; /* next structure in linked list */
|
||||||
|
};
|
||||||
|
#endif /* !HAVE_STRUCT_ADDRINFO */
|
||||||
|
|
||||||
|
#ifndef HAVE_GETADDRINFO
|
||||||
|
int getaddrinfo(const char *hostname, const char *servname,
|
||||||
|
const struct addrinfo *hints, struct addrinfo **res);
|
||||||
|
#endif /* !HAVE_GETADDRINFO */
|
||||||
|
|
||||||
|
#ifndef HAVE_GAI_STRERROR
|
||||||
|
char *gai_strerror(int ecode);
|
||||||
|
#endif /* !HAVE_GAI_STRERROR */
|
||||||
|
|
||||||
|
#ifndef HAVE_FREEADDRINFO
|
||||||
|
void freeaddrinfo(struct addrinfo *ai);
|
||||||
|
#endif /* !HAVE_FREEADDRINFO */
|
||||||
|
|
||||||
|
#endif /* _FAKE_GETADDRINFO_H */
|
55
lib/fake-getnameinfo.c
Normal file
55
lib/fake-getnameinfo.c
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* fake library for ssh
|
||||||
|
*
|
||||||
|
* This file includes getnameinfo().
|
||||||
|
* These funtions are defined in rfc2133.
|
||||||
|
*
|
||||||
|
* But these functions are not implemented correctly. The minimum subset
|
||||||
|
* is implemented for ssh use only. For exapmle, this routine assumes
|
||||||
|
* that ai_family is AF_INET. Don't use it for another purpose.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "system.h"
|
||||||
|
|
||||||
|
#include "fake-getnameinfo.h"
|
||||||
|
#include "fake-getaddrinfo.h"
|
||||||
|
|
||||||
|
#ifndef HAVE_GETNAMEINFO
|
||||||
|
|
||||||
|
int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags)
|
||||||
|
{
|
||||||
|
struct sockaddr_in *sin = (struct sockaddr_in *)sa;
|
||||||
|
struct hostent *hp;
|
||||||
|
int len;
|
||||||
|
|
||||||
|
if(sa->sa_family != AF_INET)
|
||||||
|
return EAI_FAMILY;
|
||||||
|
|
||||||
|
if(serv && servlen) {
|
||||||
|
len = snprintf(serv, servlen, "%d", ntohs(sin->sin_port));
|
||||||
|
if(len < 0 || len >= servlen)
|
||||||
|
return EAI_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!host || !hostlen)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if(flags & NI_NUMERICHOST) {
|
||||||
|
len = snprintf(host, hostlen, "%s", inet_ntoa(sin->sin_addr));
|
||||||
|
if(len < 0 || len >= hostlen)
|
||||||
|
return EAI_MEMORY;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
hp = gethostbyaddr((char *)&sin->sin_addr, sizeof(struct in_addr), AF_INET);
|
||||||
|
|
||||||
|
if(!hp || !hp->h_name || !hp->h_name[0])
|
||||||
|
return EAI_NODATA;
|
||||||
|
|
||||||
|
len = snprintf(host, hostlen, "%s", hp->h_name);
|
||||||
|
if(len < 0 || len >= hostlen)
|
||||||
|
return EAI_MEMORY;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* !HAVE_GETNAMEINFO */
|
18
lib/fake-getnameinfo.h
Normal file
18
lib/fake-getnameinfo.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/* $Id: fake-getnameinfo.h 1374 2004-03-21 14:21:22Z guus $ */
|
||||||
|
|
||||||
|
#ifndef _FAKE_GETNAMEINFO_H
|
||||||
|
#define _FAKE_GETNAMEINFO_H
|
||||||
|
|
||||||
|
#ifndef HAVE_GETNAMEINFO
|
||||||
|
int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
|
||||||
|
size_t hostlen, char *serv, size_t servlen, int flags);
|
||||||
|
#endif /* !HAVE_GETNAMEINFO */
|
||||||
|
|
||||||
|
#ifndef NI_MAXSERV
|
||||||
|
# define NI_MAXSERV 32
|
||||||
|
#endif /* !NI_MAXSERV */
|
||||||
|
#ifndef NI_MAXHOST
|
||||||
|
# define NI_MAXHOST 1025
|
||||||
|
#endif /* !NI_MAXHOST */
|
||||||
|
|
||||||
|
#endif /* _FAKE_GETNAMEINFO_H */
|
13
lib/getopt.c
13
lib/getopt.c
|
@ -85,16 +85,7 @@ USA. */
|
||||||
#define getpid() GetCurrentProcessId()
|
#define getpid() GetCurrentProcessId()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _
|
#include "gettext.h"
|
||||||
/* This is for other GNU distributions with internationalized messages.
|
|
||||||
When compiling libc, the _ macro is predefined. */
|
|
||||||
#ifdef HAVE_LIBINTL_H
|
|
||||||
# include <libintl.h>
|
|
||||||
# define _(msgid) gettext (msgid)
|
|
||||||
#else
|
|
||||||
# define _(msgid) (msgid)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This version of `getopt' appears to the caller like standard Unix `getopt'
|
/* This version of `getopt' appears to the caller like standard Unix `getopt'
|
||||||
but it behaves differently for the user, since it allows the user
|
but it behaves differently for the user, since it allows the user
|
||||||
|
@ -268,7 +259,7 @@ extern pid_t __libc_pid;
|
||||||
is valid for the getopt call we must make sure that the ARGV passed
|
is valid for the getopt call we must make sure that the ARGV passed
|
||||||
to getopt is that one passed to the process. */
|
to getopt is that one passed to the process. */
|
||||||
static void
|
static void
|
||||||
__attribute__ ((unused))
|
__attribute__ ((__unused__))
|
||||||
store_args_and_env (int argc, char *const *argv)
|
store_args_and_env (int argc, char *const *argv)
|
||||||
{
|
{
|
||||||
/* XXX This is no good solution. We should rather copy the args so
|
/* XXX This is no good solution. We should rather copy the args so
|
||||||
|
|
79
lib/gettext.h
Normal file
79
lib/gettext.h
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||||
|
Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Library General Public License as published
|
||||||
|
by the Free Software Foundation; either version 2, 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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
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 <libintl.h>
|
||||||
|
# include <locale.h>
|
||||||
|
|
||||||
|
/* Shorthand notation */
|
||||||
|
|
||||||
|
# define _(Text) gettext (Text)
|
||||||
|
|
||||||
|
#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 <locale.h> a NOP. We don't include <libintl.h>
|
||||||
|
as well because people using "gettext.h" will not include <libintl.h>,
|
||||||
|
and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
|
||||||
|
is OK. */
|
||||||
|
#if defined(__sun)
|
||||||
|
# include <locale.h>
|
||||||
|
#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". */
|
||||||
|
# define gettext(Msgid) ((const char *) (Msgid))
|
||||||
|
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
|
||||||
|
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
|
||||||
|
# define ngettext(Msgid1, Msgid2, N) \
|
||||||
|
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||||
|
# define dngettext(Domainname, Msgid1, Msgid2, N) \
|
||||||
|
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||||
|
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
|
||||||
|
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||||
|
# define textdomain(Domainname) ((const char *) (Domainname))
|
||||||
|
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
|
||||||
|
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
|
||||||
|
|
||||||
|
# define _(Text) Text
|
||||||
|
# define setlocale(Category, Locale) ((const char *) (Locale))
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
#define N_(Text) Text
|
||||||
|
|
||||||
|
#endif /* _LIBGETTEXT_H */
|
139
lib/ipv4.h
Normal file
139
lib/ipv4.h
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
/*
|
||||||
|
ipv4.h -- missing IPv4 related definitions
|
||||||
|
Copyright (C) 2004 Ivo Timmermans <ivo@tinc-vpn.org>
|
||||||
|
2004 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
$Id: ipv4.h 1412 2004-11-10 21:14:08Z guus $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __TINC_IPV4_H__
|
||||||
|
#define __TINC_IPV4_H__
|
||||||
|
|
||||||
|
#ifndef AF_INET
|
||||||
|
#define AF_INET 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef IPPROTO_ICMP
|
||||||
|
#define IPPROTO_ICMP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ICMP_DEST_UNREACH
|
||||||
|
#define ICMP_DEST_UNREACH 3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ICMP_FRAG_NEEDED
|
||||||
|
#define ICMP_FRAG_NEEDED 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ICMP_NET_UNKNOWN
|
||||||
|
#define ICMP_NET_UNKNOWN 6
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ICMP_NET_UNREACH
|
||||||
|
#define ICMP_NET_UNREACH 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef IP_MSS
|
||||||
|
#define IP_MSS 576
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_IP
|
||||||
|
struct ip {
|
||||||
|
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
|
unsigned int ip_hl:4;
|
||||||
|
unsigned int ip_v:4;
|
||||||
|
#else
|
||||||
|
unsigned int ip_v:4;
|
||||||
|
unsigned int ip_hl:4;
|
||||||
|
#endif
|
||||||
|
uint8_t ip_tos;
|
||||||
|
uint16_t ip_len;
|
||||||
|
uint16_t ip_id;
|
||||||
|
uint16_t ip_off;
|
||||||
|
#define IP_RF 0x8000
|
||||||
|
#define IP_DF 0x4000
|
||||||
|
#define IP_MF 0x2000
|
||||||
|
uint8_t ip_ttl;
|
||||||
|
uint8_t ip_p;
|
||||||
|
uint16_t ip_sum;
|
||||||
|
struct in_addr ip_src, ip_dst;
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef IP_OFFMASK
|
||||||
|
#define IP_OFFMASK 0x1fff
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_ICMP
|
||||||
|
struct icmp {
|
||||||
|
uint8_t icmp_type;
|
||||||
|
uint8_t icmp_code;
|
||||||
|
uint16_t icmp_cksum;
|
||||||
|
union {
|
||||||
|
uint8_t ih_pptr;
|
||||||
|
struct in_addr ih_gwaddr;
|
||||||
|
struct ih_idseq {
|
||||||
|
uint16_t icd_id;
|
||||||
|
uint16_t icd_seq;
|
||||||
|
} ih_idseq;
|
||||||
|
uint32_t ih_void;
|
||||||
|
|
||||||
|
|
||||||
|
struct ih_pmtu {
|
||||||
|
uint16_t ipm_void;
|
||||||
|
uint16_t ipm_nextmtu;
|
||||||
|
} ih_pmtu;
|
||||||
|
|
||||||
|
struct ih_rtradv {
|
||||||
|
uint8_t irt_num_addrs;
|
||||||
|
uint8_t irt_wpa;
|
||||||
|
uint16_t irt_lifetime;
|
||||||
|
} ih_rtradv;
|
||||||
|
} icmp_hun;
|
||||||
|
#define icmp_pptr icmp_hun.ih_pptr
|
||||||
|
#define icmp_gwaddr icmp_hun.ih_gwaddr
|
||||||
|
#define icmp_id icmp_hun.ih_idseq.icd_id
|
||||||
|
#define icmp_seq icmp_hun.ih_idseq.icd_seq
|
||||||
|
#define icmp_void icmp_hun.ih_void
|
||||||
|
#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
|
||||||
|
#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
|
||||||
|
#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
|
||||||
|
#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
|
||||||
|
#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
uint32_t its_otime;
|
||||||
|
uint32_t its_rtime;
|
||||||
|
uint32_t its_ttime;
|
||||||
|
} id_ts;
|
||||||
|
struct {
|
||||||
|
struct ip idi_ip;
|
||||||
|
} id_ip;
|
||||||
|
uint32_t id_mask;
|
||||||
|
uint8_t id_data[1];
|
||||||
|
} icmp_dun;
|
||||||
|
#define icmp_otime icmp_dun.id_ts.its_otime
|
||||||
|
#define icmp_rtime icmp_dun.id_ts.its_rtime
|
||||||
|
#define icmp_ttime icmp_dun.id_ts.its_ttime
|
||||||
|
#define icmp_ip icmp_dun.id_ip.idi_ip
|
||||||
|
#define icmp_radv icmp_dun.id_radv
|
||||||
|
#define icmp_mask icmp_dun.id_mask
|
||||||
|
#define icmp_data icmp_dun.id_data
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __TINC_IPV4_H__ */
|
129
lib/ipv6.h
Normal file
129
lib/ipv6.h
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
/*
|
||||||
|
ipv6.h -- missing IPv6 related definitions
|
||||||
|
Copyright (C) 2004 Ivo Timmermans <ivo@tinc-vpn.org>
|
||||||
|
2004 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
$Id: ipv6.h 1374 2004-03-21 14:21:22Z guus $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __TINC_IPV6_H__
|
||||||
|
#define __TINC_IPV6_H__
|
||||||
|
|
||||||
|
#ifndef AF_INET6
|
||||||
|
#define AF_INET6 10
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef IPPROTO_ICMPV6
|
||||||
|
#define IPPROTO_ICMPV6 58
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_IN6_ADDR
|
||||||
|
struct in6_addr {
|
||||||
|
union {
|
||||||
|
uint8_t u6_addr8[16];
|
||||||
|
uint16_t u6_addr16[8];
|
||||||
|
uint32_t u6_addr32[4];
|
||||||
|
} in6_u;
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
#define s6_addr in6_u.u6_addr8
|
||||||
|
#define s6_addr16 in6_u.u6_addr16
|
||||||
|
#define s6_addr32 in6_u.u6_addr32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_SOCKADDR_IN6
|
||||||
|
struct sockaddr_in6 {
|
||||||
|
uint16_t sin6_family;
|
||||||
|
uint16_t sin6_port;
|
||||||
|
uint32_t sin6_flowinfo;
|
||||||
|
struct in6_addr sin6_addr;
|
||||||
|
uint32_t sin6_scope_id;
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef IN6_IS_ADDR_V4MAPPED
|
||||||
|
#define IN6_IS_ADDR_V4MAPPED(a) \
|
||||||
|
((((__const uint32_t *) (a))[0] == 0) \
|
||||||
|
&& (((__const uint32_t *) (a))[1] == 0) \
|
||||||
|
&& (((__const uint32_t *) (a))[2] == htonl (0xffff)))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_IP6_HDR
|
||||||
|
struct ip6_hdr {
|
||||||
|
union {
|
||||||
|
struct ip6_hdrctl {
|
||||||
|
uint32_t ip6_un1_flow;
|
||||||
|
uint16_t ip6_un1_plen;
|
||||||
|
uint8_t ip6_un1_nxt;
|
||||||
|
uint8_t ip6_un1_hlim;
|
||||||
|
} ip6_un1;
|
||||||
|
uint8_t ip6_un2_vfc;
|
||||||
|
} ip6_ctlun;
|
||||||
|
struct in6_addr ip6_src;
|
||||||
|
struct in6_addr ip6_dst;
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
#define ip6_vfc ip6_ctlun.ip6_un2_vfc
|
||||||
|
#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
|
||||||
|
#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
|
||||||
|
#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
|
||||||
|
#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
|
||||||
|
#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_ICMP6_HDR
|
||||||
|
struct icmp6_hdr {
|
||||||
|
uint8_t icmp6_type;
|
||||||
|
uint8_t icmp6_code;
|
||||||
|
uint16_t icmp6_cksum;
|
||||||
|
union {
|
||||||
|
uint32_t icmp6_un_data32[1];
|
||||||
|
uint16_t icmp6_un_data16[2];
|
||||||
|
uint8_t icmp6_un_data8[4];
|
||||||
|
} icmp6_dataun;
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
#define ICMP6_DST_UNREACH_NOROUTE 0
|
||||||
|
#define ICMP6_DST_UNREACH 1
|
||||||
|
#define ICMP6_PACKET_TOO_BIG 2
|
||||||
|
#define ICMP6_DST_UNREACH_ADDR 3
|
||||||
|
#define ND_NEIGHBOR_SOLICIT 135
|
||||||
|
#define ND_NEIGHBOR_ADVERT 136
|
||||||
|
#define icmp6_data32 icmp6_dataun.icmp6_un_data32
|
||||||
|
#define icmp6_data16 icmp6_dataun.icmp6_un_data16
|
||||||
|
#define icmp6_data8 icmp6_dataun.icmp6_un_data8
|
||||||
|
#define icmp6_mtu icmp6_data32[0]
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_ND_NEIGHBOR_SOLICIT
|
||||||
|
struct nd_neighbor_solicit {
|
||||||
|
struct icmp6_hdr nd_ns_hdr;
|
||||||
|
struct in6_addr nd_ns_target;
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
#define ND_OPT_SOURCE_LINKADDR 1
|
||||||
|
#define ND_OPT_TARGET_LINKADDR 2
|
||||||
|
#define nd_ns_type nd_ns_hdr.icmp6_type
|
||||||
|
#define nd_ns_code nd_ns_hdr.icmp6_code
|
||||||
|
#define nd_ns_cksum nd_ns_hdr.icmp6_cksum
|
||||||
|
#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0]
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_ND_OPT_HDR
|
||||||
|
struct nd_opt_hdr {
|
||||||
|
uint8_t nd_opt_type;
|
||||||
|
uint8_t nd_opt_len;
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __TINC_IPV6_H__ */
|
163
lib/list.c
163
lib/list.c
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
list.c -- functions to deal with double linked lists
|
list.c -- functions to deal with double linked lists
|
||||||
Copyright (C) 2000,2001 Ivo Timmermans <itimmermans@bigfoot.com>
|
Copyright (C) 2000-2004 Ivo Timmermans <ivo@tinc-vpn.org>
|
||||||
2000,2001 Guus Sliepen <guus@sliepen.warande.net>
|
2000-2004 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -17,181 +17,170 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: list.c,v 1.1.2.10 2002/03/27 15:01:16 guus Exp $
|
$Id: list.c 1374 2004-03-21 14:21:22Z guus $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "system.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include <xalloc.h>
|
|
||||||
#include <system.h>
|
|
||||||
|
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
#include "xalloc.h"
|
||||||
|
|
||||||
/* (De)constructors */
|
/* (De)constructors */
|
||||||
|
|
||||||
list_t *list_alloc(list_action_t delete)
|
list_t *list_alloc(list_action_t delete)
|
||||||
{
|
{
|
||||||
list_t *list;
|
list_t *list;
|
||||||
|
|
||||||
list = xmalloc_and_zero(sizeof(list_t));
|
list = xmalloc_and_zero(sizeof(list_t));
|
||||||
list->delete = delete;
|
list->delete = delete;
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void list_free(list_t *list)
|
void list_free(list_t *list)
|
||||||
{
|
{
|
||||||
free(list);
|
free(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
list_node_t *list_alloc_node(void)
|
list_node_t *list_alloc_node(void)
|
||||||
{
|
{
|
||||||
list_node_t *node;
|
return xmalloc_and_zero(sizeof(list_node_t));
|
||||||
|
|
||||||
node = xmalloc_and_zero(sizeof(list_node_t));
|
|
||||||
|
|
||||||
return node;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void list_free_node(list_t *list, list_node_t *node)
|
void list_free_node(list_t *list, list_node_t *node)
|
||||||
{
|
{
|
||||||
if(node->data && list->delete)
|
if(node->data && list->delete)
|
||||||
list->delete(node->data);
|
list->delete(node->data);
|
||||||
|
|
||||||
free(node);
|
free(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Insertion and deletion */
|
/* Insertion and deletion */
|
||||||
|
|
||||||
list_node_t *list_insert_head(list_t *list, void *data)
|
list_node_t *list_insert_head(list_t *list, void *data)
|
||||||
{
|
{
|
||||||
list_node_t *node;
|
list_node_t *node;
|
||||||
|
|
||||||
node = list_alloc_node();
|
node = list_alloc_node();
|
||||||
|
|
||||||
node->data = data;
|
node->data = data;
|
||||||
node->prev = NULL;
|
node->prev = NULL;
|
||||||
node->next = list->head;
|
node->next = list->head;
|
||||||
list->head = node;
|
list->head = node;
|
||||||
|
|
||||||
if(node->next)
|
if(node->next)
|
||||||
node->next->prev = node;
|
node->next->prev = node;
|
||||||
else
|
else
|
||||||
list->tail = node;
|
list->tail = node;
|
||||||
|
|
||||||
list->count++;
|
list->count++;
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
list_node_t *list_insert_tail(list_t *list, void *data)
|
list_node_t *list_insert_tail(list_t *list, void *data)
|
||||||
{
|
{
|
||||||
list_node_t *node;
|
list_node_t *node;
|
||||||
|
|
||||||
node = list_alloc_node();
|
node = list_alloc_node();
|
||||||
|
|
||||||
node->data = data;
|
node->data = data;
|
||||||
node->next = NULL;
|
node->next = NULL;
|
||||||
node->prev = list->tail;
|
node->prev = list->tail;
|
||||||
list->tail = node;
|
list->tail = node;
|
||||||
|
|
||||||
if(node->prev)
|
if(node->prev)
|
||||||
node->prev->next = node;
|
node->prev->next = node;
|
||||||
else
|
else
|
||||||
list->head = node;
|
list->head = node;
|
||||||
|
|
||||||
list->count++;
|
list->count++;
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
void list_unlink_node(list_t *list, list_node_t *node)
|
void list_unlink_node(list_t *list, list_node_t *node)
|
||||||
{
|
{
|
||||||
if(node->prev)
|
if(node->prev)
|
||||||
node->prev->next = node->next;
|
node->prev->next = node->next;
|
||||||
else
|
else
|
||||||
list->head = node->next;
|
list->head = node->next;
|
||||||
|
|
||||||
if(node->next)
|
if(node->next)
|
||||||
node->next->prev = node->prev;
|
node->next->prev = node->prev;
|
||||||
else
|
else
|
||||||
list->tail = node->prev;
|
list->tail = node->prev;
|
||||||
|
|
||||||
list->count--;
|
list->count--;
|
||||||
}
|
}
|
||||||
|
|
||||||
void list_delete_node(list_t *list, list_node_t *node)
|
void list_delete_node(list_t *list, list_node_t *node)
|
||||||
{
|
{
|
||||||
list_unlink_node(list, node);
|
list_unlink_node(list, node);
|
||||||
list_free_node(list, node);
|
list_free_node(list, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
void list_delete_head(list_t *list)
|
void list_delete_head(list_t *list)
|
||||||
{
|
{
|
||||||
list_delete_node(list, list->head);
|
list_delete_node(list, list->head);
|
||||||
}
|
}
|
||||||
|
|
||||||
void list_delete_tail(list_t *list)
|
void list_delete_tail(list_t *list)
|
||||||
{
|
{
|
||||||
list_delete_node(list, list->tail);
|
list_delete_node(list, list->tail);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Head/tail lookup */
|
/* Head/tail lookup */
|
||||||
|
|
||||||
void *list_get_head(list_t *list)
|
void *list_get_head(list_t *list)
|
||||||
{
|
{
|
||||||
if(list->head)
|
if(list->head)
|
||||||
return list->head->data;
|
return list->head->data;
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *list_get_tail(list_t *list)
|
void *list_get_tail(list_t *list)
|
||||||
{
|
{
|
||||||
if(list->tail)
|
if(list->tail)
|
||||||
return list->tail->data;
|
return list->tail->data;
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fast list deletion */
|
/* Fast list deletion */
|
||||||
|
|
||||||
void list_delete_list(list_t *list)
|
void list_delete_list(list_t *list)
|
||||||
{
|
{
|
||||||
list_node_t *node, *next;
|
list_node_t *node, *next;
|
||||||
|
|
||||||
for(node = list->head; node; node = next)
|
for(node = list->head; node; node = next) {
|
||||||
{
|
next = node->next;
|
||||||
next = node->next;
|
list_free_node(list, node);
|
||||||
list_free_node(list, node);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
list_free(list);
|
list_free(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Traversing */
|
/* Traversing */
|
||||||
|
|
||||||
void list_foreach_node(list_t *list, list_action_node_t action)
|
void list_foreach_node(list_t *list, list_action_node_t action)
|
||||||
{
|
{
|
||||||
list_node_t *node, *next;
|
list_node_t *node, *next;
|
||||||
|
|
||||||
for(node = list->head; node; node = next)
|
for(node = list->head; node; node = next) {
|
||||||
{
|
next = node->next;
|
||||||
next = node->next;
|
action(node);
|
||||||
action(node);
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void list_foreach(list_t *list, list_action_t action)
|
void list_foreach(list_t *list, list_action_t action)
|
||||||
{
|
{
|
||||||
list_node_t *node, *next;
|
list_node_t *node, *next;
|
||||||
|
|
||||||
for(node = list->head; node; node = next)
|
for(node = list->head; node; node = next) {
|
||||||
{
|
next = node->next;
|
||||||
next = node->next;
|
if(node->data)
|
||||||
if(node->data)
|
action(node->data);
|
||||||
action(node->data);
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
38
lib/list.h
38
lib/list.h
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
list.h -- header file for list.c
|
list.h -- header file for list.c
|
||||||
Copyright (C) 2000,2001 Ivo Timmermans <itimmermans@bigfoot.com>
|
Copyright (C) 2000-2004 Ivo Timmermans <ivo@tinc-vpn.org>
|
||||||
2000,2001 Guus Sliepen <guus@sliepen.warande.net>
|
2000-2004 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -17,39 +17,37 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: list.h,v 1.1.2.5 2002/03/27 15:01:16 guus Exp $
|
$Id: list.h 1374 2004-03-21 14:21:22Z guus $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __TINC_LIST_H__
|
#ifndef __TINC_LIST_H__
|
||||||
#define __TINC_LIST_H__
|
#define __TINC_LIST_H__
|
||||||
|
|
||||||
typedef struct list_node_t
|
typedef struct list_node_t {
|
||||||
{
|
struct list_node_t *prev;
|
||||||
struct list_node_t *prev;
|
struct list_node_t *next;
|
||||||
struct list_node_t *next;
|
|
||||||
|
|
||||||
/* Payload */
|
/* Payload */
|
||||||
|
|
||||||
void *data;
|
void *data;
|
||||||
} list_node_t;
|
} list_node_t;
|
||||||
|
|
||||||
typedef void (*list_action_t) (const void *);
|
typedef void (*list_action_t)(const void *);
|
||||||
typedef void (*list_action_node_t) (const list_node_t *);
|
typedef void (*list_action_node_t)(const list_node_t *);
|
||||||
|
|
||||||
typedef struct list_t
|
typedef struct list_t {
|
||||||
{
|
list_node_t *head;
|
||||||
list_node_t *head;
|
list_node_t *tail;
|
||||||
list_node_t *tail;
|
int count;
|
||||||
int count;
|
|
||||||
|
|
||||||
/* Callbacks */
|
/* Callbacks */
|
||||||
|
|
||||||
list_action_t delete;
|
list_action_t delete;
|
||||||
} list_t;
|
} list_t;
|
||||||
|
|
||||||
/* (De)constructors */
|
/* (De)constructors */
|
||||||
|
|
||||||
extern list_t *list_alloc(list_action_t);
|
extern list_t *list_alloc(list_action_t) __attribute__ ((__malloc__));
|
||||||
extern void list_free(list_t *);
|
extern void list_free(list_t *);
|
||||||
extern list_node_t *list_alloc_node(void);
|
extern list_node_t *list_alloc_node(void);
|
||||||
extern void list_free_node(list_t *, list_node_t *);
|
extern void list_free_node(list_t *, list_node_t *);
|
||||||
|
@ -79,4 +77,4 @@ extern void list_delete_list(list_t *);
|
||||||
extern void list_foreach(list_t *, list_action_t);
|
extern void list_foreach(list_t *, list_action_t);
|
||||||
extern void list_foreach_node(list_t *, list_action_node_t);
|
extern void list_foreach_node(list_t *, list_action_node_t);
|
||||||
|
|
||||||
#endif /* __TINC_LIST_H__ */
|
#endif /* __TINC_LIST_H__ */
|
||||||
|
|
|
@ -25,30 +25,23 @@
|
||||||
* First version (v0.2) released
|
* First version (v0.2) released
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "system.h"
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/file.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
|
#ifndef HAVE_MINGW
|
||||||
/* read_pid
|
/* read_pid
|
||||||
*
|
*
|
||||||
* Reads the specified pidfile and returns the read pid.
|
* Reads the specified pidfile and returns the read pid.
|
||||||
* 0 is returned if either there's no pidfile, it's empty
|
* 0 is returned if either there's no pidfile, it's empty
|
||||||
* or no pid can be read.
|
* or no pid can be read.
|
||||||
*/
|
*/
|
||||||
int read_pid (char *pidfile)
|
pid_t read_pid (char *pidfile)
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int pid;
|
long pid;
|
||||||
|
|
||||||
if (!(f=fopen(pidfile,"r")))
|
if (!(f=fopen(pidfile,"r")))
|
||||||
return 0;
|
return 0;
|
||||||
fscanf(f,"%d", &pid);
|
fscanf(f,"%ld", &pid);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
@ -57,11 +50,11 @@ int read_pid (char *pidfile)
|
||||||
*
|
*
|
||||||
* Reads the pid using read_pid and looks up the pid in the process
|
* Reads the pid using read_pid and looks up the pid in the process
|
||||||
* table (using /proc) to determine if the process already exists. If
|
* table (using /proc) to determine if the process already exists. If
|
||||||
* so 1 is returned, otherwise 0.
|
* so the pid is returned, otherwise 0.
|
||||||
*/
|
*/
|
||||||
int check_pid (char *pidfile)
|
pid_t check_pid (char *pidfile)
|
||||||
{
|
{
|
||||||
int pid = read_pid(pidfile);
|
pid_t pid = read_pid(pidfile);
|
||||||
|
|
||||||
/* Amazing ! _I_ am already holding the pid file... */
|
/* Amazing ! _I_ am already holding the pid file... */
|
||||||
if ((!pid) || (pid == getpid ()))
|
if ((!pid) || (pid == getpid ()))
|
||||||
|
@ -75,7 +68,7 @@ int check_pid (char *pidfile)
|
||||||
/* But... errno is usually changed only on error.. */
|
/* But... errno is usually changed only on error.. */
|
||||||
errno = 0;
|
errno = 0;
|
||||||
if (kill(pid, 0) && errno == ESRCH)
|
if (kill(pid, 0) && errno == ESRCH)
|
||||||
return(0);
|
return 0;
|
||||||
|
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
@ -85,30 +78,26 @@ int check_pid (char *pidfile)
|
||||||
* Writes the pid to the specified file. If that fails 0 is
|
* Writes the pid to the specified file. If that fails 0 is
|
||||||
* returned, otherwise the pid.
|
* returned, otherwise the pid.
|
||||||
*/
|
*/
|
||||||
int write_pid (char *pidfile)
|
pid_t write_pid (char *pidfile)
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int fd;
|
int fd;
|
||||||
int pid;
|
pid_t pid;
|
||||||
|
|
||||||
if ( ((fd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1)
|
if ( ((fd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1)
|
||||||
|| ((f = fdopen(fd, "r+")) == NULL) ) {
|
|| ((f = fdopen(fd, "r+")) == NULL) ) {
|
||||||
fprintf(stderr, "Can't open or create %s.\n", pidfile);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_FLOCK
|
#ifdef HAVE_FLOCK
|
||||||
if (flock(fd, LOCK_EX|LOCK_NB) == -1) {
|
if (flock(fd, LOCK_EX|LOCK_NB) == -1) {
|
||||||
fscanf(f, "%d", &pid);
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
printf("Can't lock, lock is held by pid %d.\n", pid);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pid = getpid();
|
pid = getpid();
|
||||||
if (!fprintf(f,"%d\n", pid)) {
|
if (!fprintf(f,"%ld\n", (long)pid)) {
|
||||||
printf("Can't write pid , %s.\n", strerror(errno));
|
|
||||||
close(fd);
|
close(fd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -116,7 +105,6 @@ int write_pid (char *pidfile)
|
||||||
|
|
||||||
#ifdef HAVE_FLOCK
|
#ifdef HAVE_FLOCK
|
||||||
if (flock(fd, LOCK_UN) == -1) {
|
if (flock(fd, LOCK_UN) == -1) {
|
||||||
printf("Can't unlock pidfile %s, %s.\n", pidfile, strerror(errno));
|
|
||||||
close(fd);
|
close(fd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -135,4 +123,4 @@ int remove_pid (char *pidfile)
|
||||||
{
|
{
|
||||||
return unlink (pidfile);
|
return unlink (pidfile);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,13 +19,14 @@
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef HAVE_MINGW
|
||||||
/* read_pid
|
/* read_pid
|
||||||
*
|
*
|
||||||
* Reads the specified pidfile and returns the read pid.
|
* Reads the specified pidfile and returns the read pid.
|
||||||
* 0 is returned if either there's no pidfile, it's empty
|
* 0 is returned if either there's no pidfile, it's empty
|
||||||
* or no pid can be read.
|
* or no pid can be read.
|
||||||
*/
|
*/
|
||||||
int read_pid (char *pidfile);
|
pid_t read_pid (char *pidfile);
|
||||||
|
|
||||||
/* check_pid
|
/* check_pid
|
||||||
*
|
*
|
||||||
|
@ -33,14 +34,14 @@ int read_pid (char *pidfile);
|
||||||
* table (using /proc) to determine if the process already exists. If
|
* table (using /proc) to determine if the process already exists. If
|
||||||
* so 1 is returned, otherwise 0.
|
* so 1 is returned, otherwise 0.
|
||||||
*/
|
*/
|
||||||
int check_pid (char *pidfile);
|
pid_t check_pid (char *pidfile);
|
||||||
|
|
||||||
/* write_pid
|
/* write_pid
|
||||||
*
|
*
|
||||||
* Writes the pid to the specified file. If that fails 0 is
|
* Writes the pid to the specified file. If that fails 0 is
|
||||||
* returned, otherwise the pid.
|
* returned, otherwise the pid.
|
||||||
*/
|
*/
|
||||||
int write_pid (char *pidfile);
|
pid_t write_pid (char *pidfile);
|
||||||
|
|
||||||
/* remove_pid
|
/* remove_pid
|
||||||
*
|
*
|
||||||
|
@ -48,3 +49,4 @@ int write_pid (char *pidfile);
|
||||||
* is returned
|
* is returned
|
||||||
*/
|
*/
|
||||||
int remove_pid (char *pidfile);
|
int remove_pid (char *pidfile);
|
||||||
|
#endif
|
||||||
|
|
97
lib/utils.c
97
lib/utils.c
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
utils.c -- gathering of some stupid small functions
|
utils.c -- gathering of some stupid small functions
|
||||||
Copyright (C) 1999-2001 Ivo Timmermans <zarq@iname.com>
|
Copyright (C) 1999-2004 Ivo Timmermans <zarq@iname.com>
|
||||||
2000,2001 Guus Sliepen <guus@sliepen.warande.net>
|
2000-2004 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -18,15 +18,10 @@
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include "system.h"
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "../src/logger.h"
|
||||||
|
#include "utils.h"
|
||||||
#include <utils.h>
|
|
||||||
#include <syslog.h>
|
|
||||||
#include <xalloc.h>
|
|
||||||
|
|
||||||
#ifdef ENABLE_TRACING
|
#ifdef ENABLE_TRACING
|
||||||
volatile int (cp_line[]) = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
volatile int (cp_line[]) = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||||
|
@ -38,50 +33,70 @@ char *hexadecimals = "0123456789ABCDEF";
|
||||||
|
|
||||||
int charhex2bin(char c)
|
int charhex2bin(char c)
|
||||||
{
|
{
|
||||||
if(isdigit(c))
|
if(isdigit(c))
|
||||||
return c - '0';
|
return c - '0';
|
||||||
else
|
else
|
||||||
return toupper(c) - 'A' + 10;
|
return toupper(c) - 'A' + 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void hex2bin(char *src, char *dst, int length)
|
void hex2bin(char *src, char *dst, int length)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for(i=0; i<length; i++)
|
for(i = 0; i < length; i++)
|
||||||
dst[i] = charhex2bin(src[i*2])*16 + charhex2bin(src[i*2+1]);
|
dst[i] = charhex2bin(src[i * 2]) * 16 + charhex2bin(src[i * 2 + 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bin2hex(char *src, char *dst, int length)
|
void bin2hex(char *src, char *dst, int length)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for(i=length-1; i>=0; i--)
|
for(i = length - 1; i >= 0; i--) {
|
||||||
{
|
dst[i * 2 + 1] = hexadecimals[(unsigned char) src[i] & 15];
|
||||||
dst[i*2+1] = hexadecimals[(unsigned char)src[i] & 15];
|
dst[i * 2] = hexadecimals[(unsigned char) src[i] >> 4];
|
||||||
dst[i*2] = hexadecimals[(unsigned char)src[i]>>4];
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_TRACING
|
#ifdef ENABLE_TRACING
|
||||||
void cp_trace()
|
void cp_trace()
|
||||||
{
|
{
|
||||||
syslog(LOG_DEBUG, "Checkpoint trace: %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d...",
|
logger(LOG_DEBUG, "Checkpoint trace: %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d...",
|
||||||
cp_file[(cp_index+15)%16], cp_line[(cp_index+15)%16],
|
cp_file[(cp_index + 15) % 16], cp_line[(cp_index + 15) % 16],
|
||||||
cp_file[(cp_index+14)%16], cp_line[(cp_index+14)%16],
|
cp_file[(cp_index + 14) % 16], cp_line[(cp_index + 14) % 16],
|
||||||
cp_file[(cp_index+13)%16], cp_line[(cp_index+13)%16],
|
cp_file[(cp_index + 13) % 16], cp_line[(cp_index + 13) % 16],
|
||||||
cp_file[(cp_index+12)%16], cp_line[(cp_index+12)%16],
|
cp_file[(cp_index + 12) % 16], cp_line[(cp_index + 12) % 16],
|
||||||
cp_file[(cp_index+11)%16], cp_line[(cp_index+11)%16],
|
cp_file[(cp_index + 11) % 16], cp_line[(cp_index + 11) % 16],
|
||||||
cp_file[(cp_index+10)%16], cp_line[(cp_index+10)%16],
|
cp_file[(cp_index + 10) % 16], cp_line[(cp_index + 10) % 16],
|
||||||
cp_file[(cp_index+9)%16], cp_line[(cp_index+9)%16],
|
cp_file[(cp_index + 9) % 16], cp_line[(cp_index + 9) % 16],
|
||||||
cp_file[(cp_index+8)%16], cp_line[(cp_index+8)%16],
|
cp_file[(cp_index + 8) % 16], cp_line[(cp_index + 8) % 16],
|
||||||
cp_file[(cp_index+7)%16], cp_line[(cp_index+7)%16],
|
cp_file[(cp_index + 7) % 16], cp_line[(cp_index + 7) % 16],
|
||||||
cp_file[(cp_index+6)%16], cp_line[(cp_index+6)%16],
|
cp_file[(cp_index + 6) % 16], cp_line[(cp_index + 6) % 16],
|
||||||
cp_file[(cp_index+5)%16], cp_line[(cp_index+5)%16],
|
cp_file[(cp_index + 5) % 16], cp_line[(cp_index + 5) % 16],
|
||||||
cp_file[(cp_index+4)%16], cp_line[(cp_index+4)%16],
|
cp_file[(cp_index + 4) % 16], cp_line[(cp_index + 4) % 16],
|
||||||
cp_file[(cp_index+3)%16], cp_line[(cp_index+3)%16],
|
cp_file[(cp_index + 3) % 16], cp_line[(cp_index + 3) % 16],
|
||||||
cp_file[(cp_index+2)%16], cp_line[(cp_index+2)%16],
|
cp_file[(cp_index + 2) % 16], cp_line[(cp_index + 2) % 16],
|
||||||
cp_file[(cp_index+1)%16], cp_line[(cp_index+1)%16],
|
cp_file[(cp_index + 1) % 16], cp_line[(cp_index + 1) % 16],
|
||||||
cp_file[cp_index], cp_line[cp_index]
|
cp_file[cp_index], cp_line[cp_index]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_MINGW) || defined(HAVE_CYGWIN)
|
||||||
|
#ifdef HAVE_CYGWIN
|
||||||
|
#include <w32api/windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
char *winerror(int err) {
|
||||||
|
static char buf[1024], *newline;
|
||||||
|
|
||||||
|
if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
|
NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, sizeof(buf), NULL)) {
|
||||||
|
strncpy(buf, _("(unable to format errormessage)"), sizeof(buf));
|
||||||
|
};
|
||||||
|
|
||||||
|
if((newline = strchr(buf, '\r')))
|
||||||
|
*newline = '\0';
|
||||||
|
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
37
lib/utils.h
37
lib/utils.h
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
utils.h -- header file for utils.c
|
utils.h -- header file for utils.c
|
||||||
Copyright (C) 1999-2001 Ivo Timmermans <zarq@iname.com>
|
Copyright (C) 1999-2004 Ivo Timmermans <zarq@iname.com>
|
||||||
2000,2001 Guus Sliepen <guus@sliepen.warande.net>
|
2000-2004 Guus Sliepen <guus@tinc-vpn.org>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -21,37 +21,26 @@
|
||||||
#ifndef __TINC_UTILS_H__
|
#ifndef __TINC_UTILS_H__
|
||||||
#define __TINC_UTILS_H__
|
#define __TINC_UTILS_H__
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
enum {
|
|
||||||
DEBUG_NOTHING = 0, /* Quiet mode, only show starting/stopping of the daemon */
|
|
||||||
DEBUG_CONNECTIONS = 1, /* Show (dis)connects of other tinc daemons via TCP */
|
|
||||||
DEBUG_ERROR = 2, /* Show error messages received from other hosts */
|
|
||||||
DEBUG_STATUS = 2, /* Show status messages received from other hosts */
|
|
||||||
DEBUG_PROTOCOL = 3, /* Show the requests that are sent/received */
|
|
||||||
DEBUG_META = 4, /* Show contents of every request that is sent/received */
|
|
||||||
DEBUG_TRAFFIC = 5, /* Show network traffic information */
|
|
||||||
DEBUG_PACKET = 6, /* Show contents of each packet that is being sent/received */
|
|
||||||
DEBUG_SCARY_THINGS = 10 /* You have been warned */
|
|
||||||
};
|
|
||||||
|
|
||||||
#define min(a,b) (((a)<(b))?(a):(b))
|
|
||||||
|
|
||||||
#ifdef ENABLE_TRACING
|
#ifdef ENABLE_TRACING
|
||||||
extern volatile int cp_line[];
|
extern volatile int cp_line[];
|
||||||
extern volatile char *cp_file[];
|
extern volatile char *cp_file[];
|
||||||
extern volatile int cp_index;
|
extern volatile int cp_index;
|
||||||
extern void cp_trace(void);
|
extern void cp_trace(void);
|
||||||
|
|
||||||
#define cp { cp_line[cp_index] = __LINE__; cp_file[cp_index] = __FILE__; cp_index++; cp_index %= 16; }
|
#define cp() { cp_line[cp_index] = __LINE__; cp_file[cp_index] = __FILE__; cp_index++; cp_index %= 16; }
|
||||||
#define ecp { fprintf(stderr, "Explicit checkpoint in %s line %d\n", __FILE__, __LINE__); }
|
#define ecp() { fprintf(stderr, "Explicit checkpoint in %s line %d\n", __FILE__, __LINE__); }
|
||||||
#else
|
#else
|
||||||
#define cp
|
#define cp()
|
||||||
#define ecp
|
#define ecp()
|
||||||
#define cp_trace()
|
#define cp_trace()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void hex2bin(char *src, char *dst, int length);
|
extern void hex2bin(char *src, char *dst, int length);
|
||||||
extern void bin2hex(char *src, char *dst, int length);
|
extern void bin2hex(char *src, char *dst, int length);
|
||||||
|
|
||||||
#endif /* __TINC_UTILS_H__ */
|
#ifdef HAVE_MINGW
|
||||||
|
extern char *winerror(int);
|
||||||
|
#define strerror(x) ((x)>0?strerror(x):winerror(GetLastError()))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __TINC_UTILS_H__ */
|
||||||
|
|
|
@ -18,9 +18,9 @@ extern char *const xalloc_msg_memory_exhausted;
|
||||||
/* FIXME: describe */
|
/* FIXME: describe */
|
||||||
extern void (*xalloc_fail_func) ();
|
extern void (*xalloc_fail_func) ();
|
||||||
|
|
||||||
void *xmalloc PARAMS ((size_t n));
|
void *xmalloc PARAMS ((size_t n)) __attribute__ ((__malloc__));
|
||||||
void *xmalloc_and_zero PARAMS ((size_t n));
|
void *xmalloc_and_zero PARAMS ((size_t n)) __attribute__ ((__malloc__));
|
||||||
void *xcalloc PARAMS ((size_t n, size_t s));
|
void *xcalloc PARAMS ((size_t n, size_t s));
|
||||||
void *xrealloc PARAMS ((void *p, size_t n));
|
void *xrealloc PARAMS ((void *p, size_t n)) __attribute__ ((__malloc__));
|
||||||
|
|
||||||
char *xstrdup PARAMS ((const char *s));
|
char *xstrdup PARAMS ((const char *s)) __attribute__ ((__malloc__));
|
||||||
|
|
|
@ -32,15 +32,7 @@ void *realloc ();
|
||||||
void free ();
|
void free ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLE_NLS
|
#include "gettext.h"
|
||||||
# include <libintl.h>
|
|
||||||
# define _(Text) gettext (Text)
|
|
||||||
#else
|
|
||||||
# define textdomain(Domain)
|
|
||||||
# define _(Text) Text
|
|
||||||
#endif
|
|
||||||
#define N_(Text) Text
|
|
||||||
|
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
|
|
||||||
#ifndef EXIT_FAILURE
|
#ifndef EXIT_FAILURE
|
||||||
|
|
|
@ -1,19 +1,4 @@
|
||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
|
|
||||||
##m4-files-begin
|
EXTRA_DIST = README *.m4
|
||||||
EXTRA_DIST = README Makefile.am.in aclocal-include.m4 malloc.m4 openssl.m4 \
|
|
||||||
perl.m4 realloc.m4 tuntap.m4 zlib.m4
|
|
||||||
|
|
||||||
##m4-files-end
|
|
||||||
|
|
||||||
Makefile.am: Makefile.am.in
|
|
||||||
rm -f $@ $@t
|
|
||||||
sed -n '1,/^##m4-files-begin/p' $< > $@t
|
|
||||||
( echo EXTRA_DIST = README Makefile.am.in; \
|
|
||||||
find . -type f -name '*.m4' -print |sed 's,^\./,,' |sort ) \
|
|
||||||
|fmt | (tr '\012' @; echo) \
|
|
||||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
|
||||||
>> $@t
|
|
||||||
sed -n '/^##m4-files-end/,$$p' $< >> $@t
|
|
||||||
chmod a-w $@t
|
|
||||||
mv $@t $@
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
|
||||||
|
|
||||||
##m4-files-begin
|
|
||||||
##m4-files-end
|
|
||||||
|
|
||||||
Makefile.am: Makefile.am.in
|
|
||||||
rm -f $@ $@t
|
|
||||||
sed -n '1,/^##m4-files-begin/p' $< > $@t
|
|
||||||
( echo EXTRA_DIST = README Makefile.am.in; \
|
|
||||||
find . -type f -name '*.m4' -print |sed 's,^\./,,' |sort ) \
|
|
||||||
|fmt | (tr '\012' @; echo) \
|
|
||||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
|
||||||
>> $@t
|
|
||||||
sed -n '/^##m4-files-end/,$$p' $< >> $@t
|
|
||||||
chmod a-w $@t
|
|
||||||
mv $@t $@
|
|
297
m4/Makefile.in
297
m4/Makefile.in
|
@ -1,7 +1,8 @@
|
||||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
# Free Software Foundation, Inc.
|
# 2003, 2004 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
@ -12,130 +13,208 @@
|
||||||
# PARTICULAR PURPOSE.
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
SHELL = @SHELL@
|
|
||||||
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
prefix = @prefix@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
|
|
||||||
bindir = @bindir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
datadir = @datadir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
libdir = @libdir@
|
|
||||||
infodir = @infodir@
|
|
||||||
mandir = @mandir@
|
|
||||||
includedir = @includedir@
|
|
||||||
oldincludedir = /usr/include
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
top_builddir = ..
|
top_builddir = ..
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
INSTALL_HEADER = $(INSTALL_DATA)
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
transform = @program_transform_name@
|
transform = $(program_transform_name)
|
||||||
NORMAL_INSTALL = :
|
NORMAL_INSTALL = :
|
||||||
PRE_INSTALL = :
|
PRE_INSTALL = :
|
||||||
POST_INSTALL = :
|
POST_INSTALL = :
|
||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
host_alias = @host_alias@
|
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
AMTAR = @AMTAR@
|
|
||||||
AWK = @AWK@
|
|
||||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
|
||||||
CATALOGS = @CATALOGS@
|
|
||||||
CATOBJEXT = @CATOBJEXT@
|
|
||||||
CC = @CC@
|
|
||||||
CPP = @CPP@
|
|
||||||
DATADIRNAME = @DATADIRNAME@
|
|
||||||
DEPDIR = @DEPDIR@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
GENCAT = @GENCAT@
|
|
||||||
GLIBC21 = @GLIBC21@
|
|
||||||
GMOFILES = @GMOFILES@
|
|
||||||
GMSGFMT = @GMSGFMT@
|
|
||||||
HAVE_TUNTAP = @HAVE_TUNTAP@
|
|
||||||
INCLUDES = @INCLUDES@
|
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
|
||||||
INTLBISON = @INTLBISON@
|
|
||||||
INTLLIBS = @INTLLIBS@
|
|
||||||
INTLOBJS = @INTLOBJS@
|
|
||||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
|
||||||
LIBICONV = @LIBICONV@
|
|
||||||
LINUX_IF_TUN_H = @LINUX_IF_TUN_H@
|
|
||||||
LN_S = @LN_S@
|
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
|
||||||
MSGFMT = @MSGFMT@
|
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
PACKAGE = @PACKAGE@
|
|
||||||
PERL = @PERL@
|
|
||||||
POFILES = @POFILES@
|
|
||||||
POSUB = @POSUB@
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
|
||||||
USE_NLS = @USE_NLS@
|
|
||||||
VERSION = @VERSION@
|
|
||||||
am__include = @am__include@
|
|
||||||
am__quote = @am__quote@
|
|
||||||
install_sh = @install_sh@
|
|
||||||
|
|
||||||
EXTRA_DIST = README Makefile.am.in aclocal-include.m4 malloc.m4 openssl.m4 \
|
|
||||||
perl.m4 realloc.m4 tuntap.m4 zlib.m4
|
|
||||||
|
|
||||||
subdir = m4
|
subdir = m4
|
||||||
|
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal-include.m4 \
|
||||||
|
$(top_srcdir)/m4/attribute.m4 $(top_srcdir)/m4/gettext.m4 \
|
||||||
|
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||||
|
$(top_srcdir)/m4/lzo.m4 $(top_srcdir)/m4/malloc.m4 \
|
||||||
|
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/openssl.m4 \
|
||||||
|
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||||
|
$(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/tuntap.m4 \
|
||||||
|
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.in
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
|
SOURCES =
|
||||||
DIST_SOURCES =
|
DIST_SOURCES =
|
||||||
DIST_COMMON = README Makefile.am Makefile.in
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
ALLOCA = @ALLOCA@
|
||||||
|
AMDEP_FALSE = @AMDEP_FALSE@
|
||||||
|
AMDEP_TRUE = @AMDEP_TRUE@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
GMSGFMT = @GMSGFMT@
|
||||||
|
HAVE_TUNTAP = @HAVE_TUNTAP@
|
||||||
|
INCLUDES = @INCLUDES@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
INTLLIBS = @INTLLIBS@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBICONV = @LIBICONV@
|
||||||
|
LIBINTL = @LIBINTL@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LINUX_IF_TUN_H = @LINUX_IF_TUN_H@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBICONV = @LTLIBICONV@
|
||||||
|
LTLIBINTL = @LTLIBINTL@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||||
|
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
|
MSGFMT = @MSGFMT@
|
||||||
|
MSGMERGE = @MSGMERGE@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
POSUB = @POSUB@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USE_NLS = @USE_NLS@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
XGETTEXT = @XGETTEXT@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||||
|
ac_ct_STRIP = @ac_ct_STRIP@
|
||||||
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
datadir = @datadir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
EXTRA_DIST = README *.m4
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \
|
||||||
cd $(top_srcdir) && \
|
cd $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu m4/Makefile
|
$(AUTOMAKE) --gnu m4/Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
.PRECIOUS: Makefile
|
||||||
cd $(top_builddir) && \
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
@case '$?' in \
|
||||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
*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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
uninstall-info-am:
|
uninstall-info-am:
|
||||||
tags: TAGS
|
tags: TAGS
|
||||||
TAGS:
|
TAGS:
|
||||||
|
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS:
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
|
|
||||||
top_distdir = ..
|
|
||||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
distdir: $(DISTFILES)
|
||||||
@for file in $(DISTFILES); do \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
list='$(DISTFILES)'; for file in $$list; do \
|
||||||
|
case $$file in \
|
||||||
|
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||||
|
esac; \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
dir="/$$dir"; \
|
||||||
|
$(mkdir_p) "$(distdir)$$dir"; \
|
||||||
|
else \
|
||||||
|
dir=''; \
|
||||||
fi; \
|
fi; \
|
||||||
if test -d $$d/$$file; then \
|
if test -d $$d/$$file; then \
|
||||||
cp -pR $$d/$$file $(distdir) \
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|| exit 1; \
|
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
fi; \
|
||||||
|
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||||
else \
|
else \
|
||||||
test -f $(distdir)/$$file \
|
test -f $(distdir)/$$file \
|
||||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||||
|
@ -145,9 +224,7 @@ distdir: $(DISTFILES)
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-am
|
check: check-am
|
||||||
all-am: Makefile
|
all-am: Makefile
|
||||||
|
|
||||||
installdirs:
|
installdirs:
|
||||||
|
|
||||||
install: install-am
|
install: install-am
|
||||||
install-exec: install-exec-am
|
install-exec: install-exec-am
|
||||||
install-data: install-data-am
|
install-data: install-data-am
|
||||||
|
@ -159,6 +236,7 @@ install-am: all-am
|
||||||
installcheck: installcheck-am
|
installcheck: installcheck-am
|
||||||
install-strip:
|
install-strip:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
`test -z '$(STRIP)' || \
|
`test -z '$(STRIP)' || \
|
||||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
@ -166,7 +244,7 @@ mostlyclean-generic:
|
||||||
clean-generic:
|
clean-generic:
|
||||||
|
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
-rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@ -176,13 +254,15 @@ clean: clean-am
|
||||||
clean-am: clean-generic mostlyclean-am
|
clean-am: clean-generic mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-generic
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
dvi: dvi-am
|
dvi: dvi-am
|
||||||
|
|
||||||
dvi-am:
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
info: info-am
|
info: info-am
|
||||||
|
|
||||||
info-am:
|
info-am:
|
||||||
|
@ -198,35 +278,32 @@ install-man:
|
||||||
installcheck-am:
|
installcheck-am:
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
mostlyclean: mostlyclean-am
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
mostlyclean-am: mostlyclean-generic
|
mostlyclean-am: mostlyclean-generic
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
uninstall-am: uninstall-info-am
|
uninstall-am: uninstall-info-am
|
||||||
|
|
||||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||||
distclean-generic distdir dvi dvi-am info info-am install \
|
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||||
install-am install-data install-data-am install-exec \
|
install install-am install-data install-data-am install-exec \
|
||||||
install-exec-am install-info install-info-am install-man \
|
install-exec-am install-info install-info-am install-man \
|
||||||
install-strip installcheck installcheck-am installdirs \
|
install-strip installcheck installcheck-am installdirs \
|
||||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||||
mostlyclean-generic uninstall uninstall-am uninstall-info-am
|
mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
|
||||||
|
uninstall-info-am
|
||||||
|
|
||||||
|
|
||||||
Makefile.am: Makefile.am.in
|
|
||||||
rm -f $@ $@t
|
|
||||||
sed -n '1,/^##m4-files-begin/p' $< > $@t
|
|
||||||
( echo EXTRA_DIST = README Makefile.am.in; \
|
|
||||||
find . -type f -name '*.m4' -print |sed 's,^\./,,' |sort ) \
|
|
||||||
|fmt | (tr '\012' @; echo) \
|
|
||||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
|
||||||
>> $@t
|
|
||||||
sed -n '/^##m4-files-end/,$$p' $< >> $@t
|
|
||||||
chmod a-w $@t
|
|
||||||
mv $@t $@
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# 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.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
25
m4/attribute.m4
Normal file
25
m4/attribute.m4
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
dnl Check to find out whether function attributes are supported.
|
||||||
|
dnl If they are not, #define them to be nothing.
|
||||||
|
|
||||||
|
AC_DEFUN([tinc_ATTRIBUTE],
|
||||||
|
[
|
||||||
|
AC_CACHE_CHECK([for working $1 attribute], tinc_cv_attribute_$1,
|
||||||
|
[
|
||||||
|
tempcflags="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -Wall -Werror"
|
||||||
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_SOURCE(
|
||||||
|
[void test(void) __attribute__ (($1));
|
||||||
|
void test(void) { return; }
|
||||||
|
],
|
||||||
|
)],
|
||||||
|
[tinc_cv_attribute_$1=yes],
|
||||||
|
[tinc_cv_attribute_$1=no]
|
||||||
|
)
|
||||||
|
CFLAGS="$tempcflags"
|
||||||
|
])
|
||||||
|
|
||||||
|
if test ${tinc_cv_attribute_$1} = no; then
|
||||||
|
AC_DEFINE([$1], [], [Defined if the $1 attribute is not supported.])
|
||||||
|
fi
|
||||||
|
])
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue