columpaget / libuseful Goto Github PK
View Code? Open in Web Editor NEWProgrammers 'C' library of functions for: resizable strings, file and network access, string tokenization, pattern matching, terminal output, etc, etc
License: Other
Programmers 'C' library of functions for: resizable strings, file and network access, string tokenization, pattern matching, terminal output, etc, etc
License: Other
This is new in 5.7:
./configure
configure: error: cannot find sources (libUseful) in . or ..
With and without autoreconf -fiv
.
Both macOS and Linux provide non-POSIX functions named getxattr
/setxattr
, but they're not compatible with each other. At a glance, they seem to be mostly similar, but the Mac one takes extra position
and options
parameters: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getxattr.2.html
libUseful's configure script just checks for whether the function exists and assumes it's usable. That causes compilation to fail on Macs unless --disable-xattr
is explicitly passed. Since it looks like it's specifically looking for the Linux function by this name, it's probably a good idea to make using it dependent on the OS too.
stream.c
static void *SelectAddFD
is declared as returning a void *
but never does.
[ 15s] Stream.c: In function 'SelectAddFD':
[ 15s] Stream.c:56:1: error: no return statement in function returning non-void [-Werror=return-type]
[ 15s] 56 | }
[ 15s] | ^
[ 13s] Process.c: In function 'ProcessApplyLateConfig':
[ 13s] Process.c:892:1: error: control reaches end of non-void function [-Werror=return-type]
[ 13s] 892 | }
[ 13s] | ^
[ 13s] cc1: some warnings being treated as errors
[ 13s] make: *** [Makefile:190: Process.o] Error 1
https://github.com/ColumPaget/libUseful/blob/master/Encodings.h:
#define BASE64_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
...
#define PBASE64_CHARS "0123456789-ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz"
This last line is not rfc 4648 compliant. It must be:
#define PBASE64_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
See also: ColumPaget/Hashrat#18
[ 4s] + ./configure [...] --prefix=/usr [...]
Due to Makefile
cp *.conf $(DESTDIR)$(prefix)/etc
this installs into /usr/etc/unicode-names.conf
, while the code assumes /etc/unicode-names.conf
always.
Configure does not find zlib but claims it is enabled:
[ 5s] checking for deflate in -lz... no
[...]
[ 5s] zlib support enabled
configure.ac
prints on use_...
, not have_...
the following patch solved the issue
--- includes.h.orig 2022-12-14 13:07:39.000000000 +0100
+++ includes.h 2023-02-17 03:53:46.766396350 +0100
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <sys/stat.h>
+#include <sys/file.h>
#include <signal.h>
#include <netinet/in.h>
#include <netdb.h>
The shared library does not have an soname
. From my built (an rpmlint check):
[ 25s] libUseful.x86_64: W: no-soname /usr/lib/libUseful-5.9.so
[ 25s] The library has no soname.
The header files seem to be installed twice:
[ 12s] + ./configure --host=x86_64-suse-linux --build=x86_64-suse-linux --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
[...]
[ 22s] mkdir -p /home/abuild/rpmbuild/BUILDROOT/libUseful-5.9-2.1.x86_64/usr/include/libUseful-5.9
[ 22s] cp *.h /home/abuild/rpmbuild/BUILDROOT/libUseful-5.9-2.1.x86_64/usr/include/libUseful-5.9
[ 22s] mkdir -p /home/abuild/rpmbuild/BUILDROOT/libUseful-5.9-2.1.x86_64/usr/include/libUseful-5
[ 22s] cp *.h /home/abuild/rpmbuild/BUILDROOT/libUseful-5.9-2.1.x86_64/usr/include/libUseful-5
/usr/include/libUseful-5.9/Array.h
/usr/include/libUseful-5/Array.h
In 5.8, in HttpServer.c
function HTTPServerSendFile
is declared as returning int
, but never does.
[ 9s] HttpServer.c: In function 'HTTPServerSendFile':
[ 9s] HttpServer.c:189:1: error: control reaches end of non-void function [-Werror=return-type]
[ 9s] 189 | }
[ 9s] | ^
[ 9s] cc1: some warnings being treated as errors
[ 9s] make: *** [Makefile:54: HttpServer.o] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.