Hi!
There is a little problem in the security/isakmpd port. There are some
gen*.sh scripts in it, which generate some C header (and src) files.
These scripts are using awk, tr, etc - some generic UNIX tools. One of
the tools has problems with some localisations, so these scripts
generate incorrect C-code. Eg, I have Hungarian localisation set, so I
have the following in my environ:
LANG=hu_HU.ISO8859-2
But with it, I get so many errors, like this:
$ cd /usr/ports/security/isakmpd
$ make
So many lines deleted ....
cc -O2 -fno-strict-aliasing -pipe -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -DNEED_SYSDEP_APP
-I/usr/ports/security/isakmpd/work/isakmpd
-I/usr/ports/security/isakmpd/work/isakmpd/sysdep/freebsd -I.
-DHAVE_GETIFADDRS -DHAVE_PCAP
-I/usr/ports/security/isakmpd/work/isakmpd/sysdep/common -I/usr/include
-I/usr/include/openssl -I/usr/local/include
-I/usr/local/include/openssl -DUSE_TRIPLEDES -DUSE_DES -DUSE_BLOWFISH
-DUSE_CAST -DUSE_X509 -DUSE_EC -DUSE_AGGRESSIVE -DUSE_DEBUG -DUSE_RAWKEY
-DMP_FLAVOUR=MP_FLAVOUR_OPENSSL -DUSE_LIBCRYPTO -DUSE_PF_KEY_V2 -c
attribute.c
In file included from isakmp.h:36,
from attribute.c:40:
isakmp_fld.h:28: error: stray '\223' in program
isakmp_fld.h:28: error: syntax error before "_paxload_maps"
isakmp_fld.h:37: error: stray '\223' in program
isakmp_fld.h:37: error: syntax error before "xpe_maps"
isakmp_fld.h:59: error: stray '\223' in program
isakmp_fld.h:59: error: syntax error before "_paxload_maps"
isakmp_fld.h:72: error: stray '\223' in program
isakmp_fld.h:72: error: stray '\223' in program
isakmp_fld.h:72: error: syntax error before "r_fld"
isakmp_fld.h:76: error: stray '\223' in program
isakmp_fld.h:76: error: stray '\223' in program
isakmp_fld.h:76: error: syntax error before "r_"
isakmp_fld.h:76: error: stray '\223' in program
isakmp_fld.h:108: error: stray '\223' in program
isakmp_fld.h:108: error: syntax error before "o_maps"
isakmp_fld.h:124: error: stray '\223' in program
isakmp_fld.h:124: error: syntax error before "ransform_fld"
isakmp_fld.h:165: error: stray '\223' in program
isakmp_fld.h:165: error: syntax error before "_fld"
isakmp_fld.h:169: error: stray '\223' in program
isakmp_fld.h:169: error: syntax error before "_encoding_maps"
isakmp_fld.h:177: error: stray '\223' in program
isakmp_fld.h:177: error: syntax error before "req_fld"
isakmp_fld.h:181: error: stray '\223' in program
isakmp_fld.h:181: error: syntax error before "req_"
isakmp_fld.h:181: error: stray '\223' in program
isakmp_fld.h:210: error: stray '\223' in program
isakmp_fld.h:210: error: syntax error before "ifx_fld"
isakmp_fld.h:214: error: stray '\223' in program
isakmp_fld.h:214: error: syntax error before "ifx_doi_maps"
isakmp_fld.h:219: error: stray '\223' in program
isakmp_fld.h:219: error: syntax error before "ifx_pro"
isakmp_fld.h:219: error: stray '\223' in program
isakmp_fld.h:228: error: stray '\223' in program
isakmp_fld.h:228: error: syntax error before "ifx_msg_"
isakmp_fld.h:228: error: stray '\223' in program
isakmp_fld.h:236: error: stray '\223' in program
isakmp_fld.h:236: error: syntax error before "e_fld"
isakmp_fld.h:240: error: stray '\223' in program
isakmp_fld.h:240: error: syntax error before "e_doi_maps"
isakmp_fld.h:245: error: stray '\223' in program
isakmp_fld.h:245: error: syntax error before "e_pro"
isakmp_fld.h:245: error: stray '\223' in program
isakmp_fld.h:261: error: stray '\251' in program
isakmp_fld.h:261: error: syntax error before "endor_fld"
isakmp_fld.h:268: error: stray '\223' in program
isakmp_fld.h:268: error: stray '\223' in program
isakmp_fld.h:268: error: syntax error before "rib"
isakmp_fld.h:268: error: stray '\254' in program
isakmp_fld.h:268: error: stray '\223' in program
isakmp_fld.h:272: error: stray '\223' in program
isakmp_fld.h:272: error: stray '\223' in program
isakmp_fld.h:272: error: syntax error before "rib"
isakmp_fld.h:272: error: stray '\254' in program
isakmp_fld.h:272: error: stray '\223' in program
isakmp_fld.h:272: error: stray '\223' in program
isakmp_fld.h:288: error: stray '\223' in program
isakmp_fld.h:288: error: syntax error before "_d_fld"
isakmp_fld.h:295: error: stray '\223' in program
isakmp_fld.h:295: error: syntax error before "_oa_fld"
In file included from isakmp.h:37,
from attribute.c:40:
isakmp_num.h:3:18: warning: extra tokens at end of #ifndef directive
isakmp_num.h:4:18: warning: ISO C requires whitespace after the macro name
In file included from isakmp.h:37,
from attribute.c:40:
isakmp_num.h:63: error: stray '\223' in program
isakmp_num.h:63: error: syntax error before "enc_cst"
isakmp_num.h:82: error: stray '\223' in program
isakmp_num.h:82: error: syntax error before "ifx_cst"
isakmp_num.h:130: error: stray '\251' in program
isakmp_num.h:130:36: invalid suffix "_no" on integer constant
isakmp_num.h:130: error: syntax error before numeric constant
isakmp_num.h:130: error: stray '\223' in program
isakmp_num.h:169: error: stray '\223' in program
isakmp_num.h:169: error: syntax error before "o_cst"
isakmp_num.h:184: error: stray '\223' in program
isakmp_num.h:184: error: stray '\223' in program
isakmp_num.h:184: error: syntax error before "r_cst"
isakmp_num.h:213: error: stray '\223' in program
isakmp_num.h:213: error: syntax error before "xpe_cst"
attribute.c: In function `attribute_set_basic':
attribute.c:46: error: stray '\223' in program
attribute.c:46: error: stray '\223' in program
attribute.c:46: error: `isakmp_a' undeclared (first use in this function)
attribute.c:46: error: (Each undeclared identifier is reported only once
attribute.c:46: error: for each function it appears in.)
attribute.c:46: error: syntax error before "r_fld"
attribute.c:47: error: stray '\223' in program
attribute.c:47: error: stray '\223' in program
attribute.c:47: error: syntax error before "r_fld"
attribute.c: In function `attribute_set_var':
attribute.c:55: error: stray '\223' in program
attribute.c:55: error: stray '\223' in program
attribute.c:55: error: `isakmp_a' undeclared (first use in this function)
attribute.c:55: error: syntax error before "r_fld"
attribute.c:56: error: stray '\223' in program
attribute.c:56: error: stray '\223' in program
attribute.c:56: error: syntax error before "r_fld"
attribute.c: In function `attribute_map':
attribute.c:80: error: stray '\223' in program
attribute.c:80: error: stray '\223' in program
attribute.c:80: error: `isakmp_a' undeclared (first use in this function)
attribute.c:80: error: syntax error before "r_fld"
attribute.c:86: error: stray '\223' in program
attribute.c:86: error: stray '\223' in program
attribute.c:86: error: syntax error before "r_fld"
*** Error code 1
Stop in /usr/ports/security/isakmpd/work/isakmpd.
*** Error code 1
Stop in /usr/ports/security/isakmpd.
$
If I correct this file, I get another problem with another file - all of
the files (6 or 7) generated with these scripts - has errors.
(But with LANG=C - or without any LANG - I can compile isakmpd.)
I think the real problem is the bug in tr/awk - maybe somebody has to
look at it, too.
By, Gabor < Gabor at Zahemszky dot HU >
--
#!/bin/ksh
Z='21N16I25C25E30, 40M30E33E25T15U!';IFS='
ABCDEFGHIJKLMNOPQRSTUVWXYZ
';set -- $Z;for i;{ [[ $i = ? ]]&&print $i&&break;[[ $i =
???
]]&&j=$i&&i=${i%?};typeset -i40 i=8#$i;print -n ${i#???};[[
"$j" = ???
]]&&print -n "${j#??} "&&j=;typeset +i i;};IFS='
0123456789 ';set --
$Z;for i;{ [[ $i = , ]]&&i=2;[[ $i = ?? ]]||typeset -l i;j="$j
$i";typeset +l i;};print "$j"