Skip to content

Next 20260106#9

Open
pkot wants to merge 86 commits into
savannahfrom
next-20260106
Open

Next 20260106#9
pkot wants to merge 86 commits into
savannahfrom
next-20260106

Conversation

@pkot

@pkot pkot commented Jan 7, 2026

Copy link
Copy Markdown
Owner

No description provided.

fabzzap and others added 30 commits January 21, 2022 20:12
mingw32 provides lower case names for Win32 header files, use lower
case names in #include directives.
Windows' mkdir() takes only 1 argument, so add a test for that.
Compilation fails with both HAVE_SETENV and WIN32 set.
Remove homebrew --enable-win option and use the standard autoconf way
to cross-compile, that is using option --host.
compat.h configuration depends on defines from config.h, however
it does not include it. Explicitely include config.h and remove
it from all files which did so only to satisfy compat.h
configuration.
compat.h is there to simplify including common header files. If we
need a number of standard header files we just include "compat.h" and
it does everything for us. Therefore all standard headers includes
are removed from the source files.

In addition add conditional includes where we did the checks in
config.h.

Include config.h where needed.

Add detection of error.h, errno.h and signal.h.
Update to the latest (7a5b65c88d3b) version from Samba's repository.
Previously connect_script was called only with valid fd, restore that.

Fixes: 4d38aee (Make device_script() generic for all connection types)
posix_spawn specification dates back to last century and its
implementation is mature enough in all systems we do support.
Thus use it instead of current fork and exec in hope it will
save us some resources.
On systems without setenv()/unsetenv() a declaration of these
functions was missing (a definition done in common/compat.c).
Add it to compat.h.
Function verify_max_message_len is using static local variable
making it thread unsafe. Move that variable into incoming message
instance.
Let it compile with Microsoft Visual C++ 6.0
When sending strings to AT driver treat it as strings (char *) and
not byte arrays (unsigned char *)
snprintf function family is needed by both gnokii and libgnokii
on systems without proper snprintf support and we do not want
libgnokii to export snprintf functions. Therefore move snprintf
to convenience library and statically link it to both gnokii and
libgnokii.
We already do have a list of supported connection in connectiontypes
array, so use it here as well. This removes another #ifdeffery
and fixed bug where condition for TCP was inverted.
Avoid conflicting types for 'getenv' and 'getopt' error raised by
MSYS2 project compilers.
Device include files now do not need to include anything but gnokii.h
3x380V and others added 30 commits January 6, 2026 18:54
Make batch file work no matter what directory it is called from.
Also although batch files are case insensitive, be consistent.
Update local acx_pthread.m4 so it is compliant with recent versions
of autoconf without any obsolete macro warnings.
Device open function can now access all configuration data directly.
This will allow to move gn_statemachine state out of device drivers
scope.
Register device methods into gn_device_ops structure. This
allows to remove stub functions returning -1 for not compiled
drivers.
Add AM_CONDITIONAL for platform devices to conditionally add
them to the build. Once there, move device detection in
configure.ac to live at one place.
Since stub functions are not needed anymore, remove them
as well as #ifdefs guarding platform drivers. These are
now excluded from the build conditionally.
Since stub functions are not needed anymore, remove them
as well as #ifdefs guarding platform drivers. These are
now excluded from the build conditionally.
asprintf returns -1 on error while strp is left undefined. Update
error check accordingly.
GN_ERR_MEMORYFULL relates to phone memory not host one.
SMS encoding does not respect locale returned by gn_char_get_encoding()
as g_locale_to_utf8() always uses current locale. Fix that using
utf8_encode() which also drops one glib dependency.
Replace last used glib functions with opencoded alternatives and
remove that depedency from libgnokii.
MSVC6 (and others ancient compilers) does not support variadic macros.
Undoubtedly, code is a bit less elegant, but gnokii codebase is ancient
as well as phones it supports, so it is only reasonable to support
ancient compilers as well.
All these were just updated from original Microsoft Visual C++ 6.0,
so it should be easy to recreate them eventually.
This API breaking change should be done a long time ago. Do it
now as we already broke API with commit 6d59b8b
("Move callbacks from gn_data to gn_statemachine->callbacks")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants