[vlc-commits] [Git][videolan/vlc][master] 5 commits: vlc_atomic.h: include missing time.h
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Sep 5 10:56:15 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
b83ed2bf by Alexandre Janniaux at 2023-09-05T09:22:46+00:00
vlc_atomic.h: include missing time.h
On MacOS, the checkheader for vlc_atomic.h fails with:
In file included from checkheader_vlc_atomic_h.c:3:
/Users/unidan/Workspace/vlc/extras/package/macosx/../../../include/vlc_atomic.h:113:60: error: unknown type name 'time_t'; did you mean 'size_t'?
int vlc_atomic_timedwait_daytime(void *addr, unsigned val, time_t deadline);
^~~~~~
size_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h:31:32: note: 'size_t' declared here
typedef __darwin_size_t size_t;
^
1 error generated.
make[4]: *** [Makefile:6718: checkheader_vlc_atomic_h] Error 1
- - - - -
ccb9ad8a by Alexandre Janniaux at 2023-09-05T09:22:46+00:00
vlc_media_library.h: include missing time.h
On MacOS, the checkheader for vlc_media_library.h fails with:
In file included from checkheader_vlc_media_library_h.c:3:
/Users/unidan/Workspace/vlc/extras/package/macosx/../../../include/vlc_media_library.h:151:5: error: unknown type name 'time_t'; did you mean 'size_t'?
time_t i_last_modification_date;
^~~~~~
size_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h:31:32: note: 'size_t' declared here
typedef __darwin_size_t size_t;
^
In file included from checkheader_vlc_media_library_h.c:3:
/Users/unidan/Workspace/vlc/extras/package/macosx/../../../include/vlc_media_library.h:213:5: error: unknown type name 'time_t'; did you mean 'size_t'?
time_t i_last_played_date;
^~~~~~
size_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h:31:32: note: 'size_t' declared here
typedef __darwin_size_t size_t;
^
In file included from checkheader_vlc_media_library_h.c:3:
/Users/unidan/Workspace/vlc/extras/package/macosx/../../../include/vlc_media_library.h:257:5: error: unknown type name 'time_t'; did you mean 'size_t'?
time_t i_creation_date;
^~~~~~
size_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h:31:32: note: 'size_t' declared here
typedef __darwin_size_t size_t;
^
In file included from checkheader_vlc_media_library_h.c:3:
/Users/unidan/Workspace/vlc/extras/package/macosx/../../../include/vlc_media_library.h:258:5: error: unknown type name 'time_t'; did you mean 'size_t'?
time_t i_last_modification_date;
^~~~~~
size_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h:31:32: note: 'size_t' declared here
typedef __darwin_size_t size_t;
^
4 errors generated.
make[4]: *** [Makefile:6719: checkheader_vlc_media_library_h] Error 1
- - - - -
7dbba62d by Alexandre Janniaux at 2023-09-05T09:22:46+00:00
src: Makefile.am: add X_CFLAGS for vlc_xlib.h checkheader
Linux distribution compiling with X might provide X11 from a different
folder than the system one.
- - - - -
09534b06 by Alexandre Janniaux at 2023-09-05T09:22:46+00:00
configure.ac: forward $no_x to automake
This will allow to know whether --without-x was provided or not.
- - - - -
dcd2210b by Alexandre Janniaux at 2023-09-05T09:22:46+00:00
src: Makefile.am: skip vlc_xlib.h checkheader
Check whether X11 was disabled or not, for instance when building on
Darwin, and disable the check if it is.
The skip is necessary since the header is including Xlib includes and
the check will fail when they are not provided.
- - - - -
4 changed files:
- configure.ac
- include/vlc_atomic.h
- include/vlc_media_library.h
- src/Makefile.am
Changes:
=====================================
configure.ac
=====================================
@@ -3267,6 +3267,7 @@ dnl Xlib
dnl
AC_PATH_XTRA()
+AM_CONDITIONAL([HAVE_X], [test "$no_x" != "yes"])
dnl
dnl X C Bindings modules
=====================================
include/vlc_atomic.h
=====================================
@@ -38,6 +38,8 @@ using std::memory_order_acq_rel;
# include <vlc_common.h>
# include <vlc_tick.h>
+#include <time.h> /* vlc_atomic_timedwait_daytime */
+
#define VLC_STATIC_RC { \
.refs = ATOMIC_VAR_INIT(0) \
}
=====================================
include/vlc_media_library.h
=====================================
@@ -30,6 +30,8 @@
#include <assert.h>
#include <vlc_common.h>
+#include <time.h>
+
# ifdef __cplusplus
extern "C" {
# endif
=====================================
src/Makefile.am
=====================================
@@ -717,12 +717,15 @@ stamp-revision:
checkheader_verbose = $(checkheader_verbose_$(V))
checkheader_verbose_ = $(checkheader_verbose_$(AM_DEFAULT_VERBOSITY))
checkheader_verbose_0 = @echo " CHECK $(@:checkheader_%_h=%.h)";
+skip_checkheader_verbose_0 = @echo " CHECK $(@:checkheader_%_h=%.h) (SKIPPED)";
checkheader_verbose__0 = $(checkheader_verbose_0)
+
nodist_check_SCRIPTS = $(pluginsinclude_HEADERS:../include/%.h=checkheader_%_h)
MOSTLYCLEANFILES += \
$(pluginsinclude_HEADERS:../include/%.h=checkheader_%_h.c) \
$(pluginsinclude_HEADERS:../include/%.h=checkheader_%_h.lo)
+checkheaders: $(pluginsinclude_HEADERS:../include/%.h=checkheader_%_h)
checkheader_%_h:
@echo "#include <stdbool.h>" > $@.c
@echo "#include <vlc_common.h>" >> $@.c
@@ -731,6 +734,15 @@ checkheader_%_h:
# Some exceptions for headers depending on other libraries
checkheader_vlc_gcrypt_h: CHECK_CFLAGS = "-Dgcry_check_version(x)="
+checkheader_vlc_xlib_h: CHECK_CFLAGS = $(X_CFLAGS)
+
+SKIPPED_CHECKHEADERS =
+if !HAVE_X
+SKIPPED_CHECKHEADERS += vlc_xlib.h
+endif
+
+$(SKIPPED_CHECKHEADERS:%.h=checkheader_%_h): checkheader_verbose_0 = $(skip_checkheader_verbose_0)
+$(SKIPPED_CHECKHEADERS:%.h=checkheader_%_h): LTCOMPILE = exit 0;
dist_check_SCRIPTS = check_headers check_symbols
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/384398f40a29d9e023a812c8512093bf08e21126...dcd2210b346eacb767155b1e086d9fe65a1d663c
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/384398f40a29d9e023a812c8512093bf08e21126...dcd2210b346eacb767155b1e086d9fe65a1d663c
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list