On Debian, I decided to not use the sources for Kannel as you suggest, but install kannel-dev instead. This did not work as expected, due to the autotools setup (which I cannot fix, being a CMake user).
Here's what I found, reporting in the hope it is useful to you.
Regular expressions.
I did not find the gwlib/gw-regex.h. It's funny that it includes the file with double quotes instead of <kannel/gwlib/gew-regex.h>,
libsmpp/smpp_route.h:65:10: fatal error: gwlib/gw-regex.h: No such file or directory
65 | #include "gwlib/gw-regex.h"
But, is this really Kannel functionality or should it be <regex.h> for the standard POSIX functionality? FWIW, the include file is not part in the OS package, whereas <regex.h> is available, along with regcomp() and regmatch() functions. (I tried brutally renaming with #define gw_regex_comp regcomp but it's a little more contrived, I got compiler errors and am sure a linker error would also follow).
Prototypes.
Several prototypes for the library's own functions are undefined. Maybe include them in a header file? This impacts linker-friendliness for the library after all. Example:
79 | sig_atomic_t smpp_bearerbox_get_state(SMPPBearerbox *smpp_bearerbox) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
libsmpp/smpp_bearerbox.c:87:6: warning: no previous prototype for 'smpp_bearerbox_set_state' [-Wmissing-prototypes]
Redefines.
You can call gcc paranaoid, but it complains about redefinitions of #define without prior #undef. It does that for PACKAGE, PACKAGE_BUGREPORT, PACKAGE_NAME, PACKAGE_STRING, PACKAGE_TARNAME, PACKAGE_URL, PACKAGE_VERSION and VERSION. Harmless warnings, but they clutter the build process and can easily be avoided with #undef. Example:
../config.h:44: warning: "PACKAGE" redefined
44 | #define PACKAGE "ksmppd"
|
In file included from /usr/include/kannel/gwlib/gw-rwlock.h:66,
from /usr/include/kannel/gwlib/gwlib.h:104,
from ksmppd.c:70
On Debian, I decided to not use the sources for Kannel as you suggest, but install
kannel-dev
instead. This did not work as expected, due to theautotools
setup (which I cannot fix, being a CMake user).Here's what I found, reporting in the hope it is useful to you.
Regular expressions. I did not find the
gwlib/gw-regex.h
. It's funny that it includes the file with double quotes instead of<kannel/gwlib/gew-regex.h>
,But, is this really Kannel functionality or should it be
<regex.h>
for the standard POSIX functionality? FWIW, the include file is not part in the OS package, whereas<regex.h>
is available, along withregcomp()
andregmatch()
functions. (I tried brutally renaming with#define gw_regex_comp regcomp
but it's a little more contrived, I got compiler errors and am sure a linker error would also follow).Prototypes. Several prototypes for the library's own functions are undefined. Maybe include them in a header file? This impacts linker-friendliness for the library after all. Example:
Redefines. You can call
gcc
paranaoid, but it complains about redefinitions of#define
without prior#undef
. It does that forPACKAGE
,PACKAGE_BUGREPORT
,PACKAGE_NAME
,PACKAGE_STRING
,PACKAGE_TARNAME
,PACKAGE_URL
,PACKAGE_VERSION
andVERSION
. Harmless warnings, but they clutter the build process and can easily be avoided with#undef
. Example: