samples: link on MinGW again

verbosity.c mirrors each log line into the desktop companion under
HAVE_COMPANION_WIMP, which ui_companion_driver.h turns on for every
desktop Windows build, so each sample that links verbosity.c failed
to link there: undefined ui_companion_driver_log_active and
ui_companion_driver_log_msg.  samples/ui_companion_log_stub.c gives
the six of them a companion that is never open.

The database sample's main.c used strlcpy() without <compat/strl.h>,
an error with GCC 14 and later.
This commit is contained in:
LibretroAdmin authored and libretroadmin committed 2026-11-04 19:05:04 +01:00
1 parent fd880c6ac0
commit fb1595d62d
8 files changed
+48 -1

No files matched your search

@@ -12,6 +12,7 @@ LRC := $(CORE_DIR)/libretro-common
SOURCES := salamander_pending_test.c \
$(CORE_DIR)/frontend/frontend_salamander.c \
$(CORE_DIR)/verbosity.c \
$(CORE_DIR)/samples/ui_companion_log_stub.c \
$(LRC)/file/file_path.c \
$(LRC)/file/file_path_io.c \
$(LRC)/string/rstrtod.c \
+1
View File
@@ -9,6 +9,7 @@ SOURCES_C := \
$(CORE_DIR)/samples/playlist/playlist_parity_test.c \
$(CORE_DIR)/playlist.c \
$(CORE_DIR)/verbosity.c \
$(CORE_DIR)/samples/ui_companion_log_stub.c \
$(LIBRETRO_COMM_DIR)/formats/json/rjson.c \
$(LIBRETRO_COMM_DIR)/compat/compat_posix_string.c \
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
+1
View File
@@ -3,6 +3,7 @@ ROOT := ../../..
LC := $(ROOT)/libretro-common
TARGET := log_ring_test
SOURCES := log_ring_test.c $(ROOT)/verbosity.c \
$(ROOT)/samples/ui_companion_log_stub.c \
$(LC)/rthreads/rthreads.c $(LC)/compat/compat_strl.c \
$(LC)/file/file_path.c $(LC)/file/file_path_io.c \
$(LC)/streams/file_stream.c $(LC)/vfs/vfs_implementation.c \
+1
View File
@@ -30,6 +30,7 @@ SOURCES := \
$(LIBRETRO_COMM_DIR)/rthreads/rthreads.c \
$(LIBRETRO_COMM_DIR)/rthreads/retro_eventcount.c \
$(CORE_DIR)/verbosity.c \
$(CORE_DIR)/samples/ui_companion_log_stub.c \
$(LIBRETRO_COMM_DIR)/streams/interface_stream.c \
$(LIBRETRO_COMM_DIR)/streams/file_stream.c \
$(LIBRETRO_COMM_DIR)/string/rstrtod.c \
+1
View File
@@ -101,6 +101,7 @@ SOURCES_C := \
$(CORE_DIR)/playlist.c \
$(CORE_DIR)/manual_content_scan.c \
$(CORE_DIR)/verbosity.c \
$(CORE_DIR)/samples/ui_companion_log_stub.c \
$(LIBRETRO_COMM_DIR)/formats/m3u/rm3u.c \
$(LIBRETRO_COMM_DIR)/formats/logiqx_dat/logiqx_dat.c \
$(CORE_DIR)/libretro-db/bintree.c \
+1
View File
@@ -3,6 +3,7 @@
#include <string.h>
#include <queues/task_queue.h>
#include <compat/strl.h>
#include <lists/dir_list.h>
#include "../../../core_info.h"
+2 -1
View File
@@ -48,7 +48,8 @@ SOURCES := pl_manager_budget_test.c \
$(LIBRETRO_COMM_DIR)/compat/compat_strldup.c \
$(LIBRETRO_COMM_DIR)/compat/compat_posix_string.c \
$(LIBRETRO_COMM_DIR)/compat/fopen_utf8.c \
$(REPO_ROOT)/verbosity.c
$(REPO_ROOT)/verbosity.c \
$(REPO_ROOT)/samples/ui_companion_log_stub.c
OBJS := $(call sample_objs,$(SOURCES:.c=.o))
+40
View File
@@ -0,0 +1,40 @@
/* Copyright (C) 2010-2026 The RetroArch team
*
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (ui_companion_log_stub.c).
* ---------------------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge,
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* verbosity.c mirrors each line into the desktop companion wherever
* ui_companion_driver.h turns HAVE_COMPANION_WIMP on, which is every
* desktop Windows build. A sample that links verbosity.c has no
* companion: none is ever open. */
#include <boolean.h>
bool ui_companion_driver_log_active(void);
void ui_companion_driver_log_msg(const char *msg);
bool ui_companion_driver_log_active(void)
{
return false;
}
void ui_companion_driver_log_msg(const char *msg)
{
(void)msg;
}