]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
ggml : do not use _GNU_SOURCE gratuitously (#1027)
authorPrzemysław Pawełczyk <redacted>
Sun, 25 Jun 2023 13:34:30 +0000 (15:34 +0200)
committerGitHub <redacted>
Sun, 25 Jun 2023 13:34:30 +0000 (16:34 +0300)
commit3f7a03ebe3b65be0792849e300a122f6a050e3f8
tree6670c595c2bb05c6e4da51cc3d57c276d7954cd8
parent62642bb61cb169cb767b8452762d5173e2193f11
ggml : do not use _GNU_SOURCE gratuitously (#1027)

* Do not use _GNU_SOURCE gratuitously.

What is needed to build whisper.cpp and examples is availability of
stuff defined in The Open Group Base Specifications Issue 6
(https://pubs.opengroup.org/onlinepubs/009695399/) known also as
Single Unix Specification v3 (SUSv3) or POSIX.1-2001 + XSI extensions.

There is no need to penalize musl libc which simply follows standards.

Not having feature test macros in source code gives greater flexibility
to those wanting to reuse it in 3rd party app, as they can build it with
minimal FTM (_XOPEN_SOURCE=600) or other FTM depending on their needs.

It builds without issues in Alpine (musl libc), Ubuntu (glibc), MSYS2.

* examples : include SDL headers before other headers

This is an attempt at fixing macOS build error coming from SDL2 relying
on Darwin extension memset_pattern4/8/16 coming from Apple's string.h.
Makefile
examples/command/command.cpp
examples/stream/stream.cpp
examples/talk-llama/llama.cpp
examples/talk-llama/talk-llama.cpp
examples/talk/talk.cpp
ggml.c