Projekt

Allgemein

Profil

Aktionen

Bug #282

offen

Use OS-agnostic string comparison functions

Von wrobelda vor fast 3 Jahren hinzugefügt. Vor fast 3 Jahren aktualisiert.

Status:
New
Priorität:
Normal
Kategorie:
-
Beginn:
25.08.2022
Abgabedatum:
Betriebssystem:
Windows
AqBanking-Version:
5.10.1
Anwendung:
andere
Version der Anwendung:

Beschreibung

This patch is dirty, not intended for merging, but I post it anyway so that it is clear what needs to be done.

Before I begin, it's important to remember that strings.h is not available on Windows (only string.h is).

What it does is:
1) it removes all explicit calls for inclusion of <strings.h>
2) removes all inclusions of <strings.h>, be it standalone or HAVE_STRINGS_H-guarded. The latter unnecessary, but was done to keep code clean, given the 3b) below
3) adds checks to configure.ac that determine which string comparison functions are available, i.e. POSIX or WIN API version, and:
a) add the relevant HAVE_DECL_STR*CMP defines to config.h and defines POSIX names for equivalent WIN API functions.
b) includes strings.h if it's available. Since that's done in config.h, which is pretty much included in all source code across the board, all other <strings.h> usage was removed, as noted in 2)

As noted, this is dirty, but I did that to deal with this problem en-masse, as I was progressing towards obtaining a successful build with clang.

What I suggest to be done is to add wrapper methods for all these functions in gwenhywfar/text.h, akin to the existing GWEN_Text_strndup. This would probably be the cleanest approach and consistent with your existing code.


Dateien

Aktionen

Auch abrufbar als: Atom PDF