Git Product home page Git Product logo

libuseful's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

libuseful's Issues

libUseful mistakes Mac getxattr for Linux getxattr

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.

faile to build with -Werror=return-type

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

unicode-names.conf installed into previx

[ 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.

failed build under musl libc missing LOCK_EX definition

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>

library has no soname

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.

headers installed twice

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

HTTPServerSendFile declared as int but never returns one

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.