head 1.9; access; symbols pkgsrc-2020Q2:1.8.0.30 pkgsrc-2020Q2-base:1.8 pkgsrc-2020Q1:1.8.0.10 pkgsrc-2020Q1-base:1.8 pkgsrc-2019Q4:1.8.0.32 pkgsrc-2019Q4-base:1.8 pkgsrc-2019Q3:1.8.0.28 pkgsrc-2019Q3-base:1.8 pkgsrc-2019Q2:1.8.0.26 pkgsrc-2019Q2-base:1.8 pkgsrc-2019Q1:1.8.0.24 pkgsrc-2019Q1-base:1.8 pkgsrc-2018Q4:1.8.0.22 pkgsrc-2018Q4-base:1.8 pkgsrc-2018Q3:1.8.0.20 pkgsrc-2018Q3-base:1.8 pkgsrc-2018Q2:1.8.0.18 pkgsrc-2018Q2-base:1.8 pkgsrc-2018Q1:1.8.0.16 pkgsrc-2018Q1-base:1.8 pkgsrc-2017Q4:1.8.0.14 pkgsrc-2017Q4-base:1.8 pkgsrc-2017Q3:1.8.0.12 pkgsrc-2017Q3-base:1.8 pkgsrc-2017Q2:1.8.0.8 pkgsrc-2017Q2-base:1.8 pkgsrc-2017Q1:1.8.0.6 pkgsrc-2017Q1-base:1.8 pkgsrc-2016Q4:1.8.0.4 pkgsrc-2016Q4-base:1.8 pkgsrc-2016Q3:1.8.0.2 pkgsrc-2016Q3-base:1.8 pkgsrc-2016Q2:1.5.0.26 pkgsrc-2016Q2-base:1.5 pkgsrc-2016Q1:1.5.0.24 pkgsrc-2016Q1-base:1.5 pkgsrc-2015Q4:1.5.0.22 pkgsrc-2015Q4-base:1.5 pkgsrc-2015Q3:1.5.0.20 pkgsrc-2015Q3-base:1.5 pkgsrc-2015Q2:1.5.0.18 pkgsrc-2015Q2-base:1.5 pkgsrc-2015Q1:1.5.0.16 pkgsrc-2015Q1-base:1.5 pkgsrc-2014Q4:1.5.0.14 pkgsrc-2014Q4-base:1.5 pkgsrc-2014Q3:1.5.0.12 pkgsrc-2014Q3-base:1.5 pkgsrc-2014Q2:1.5.0.10 pkgsrc-2014Q2-base:1.5 pkgsrc-2014Q1:1.5.0.8 pkgsrc-2014Q1-base:1.5 pkgsrc-2013Q4:1.5.0.6 pkgsrc-2013Q4-base:1.5 pkgsrc-2013Q3:1.5.0.4 pkgsrc-2013Q3-base:1.5 pkgsrc-2013Q2:1.5.0.2 pkgsrc-2013Q2-base:1.5 pkgsrc-2013Q1:1.4.0.8 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.6 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.4 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.2 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.3.0.12 pkgsrc-2012Q1-base:1.3 pkgsrc-2011Q4:1.3.0.10 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q3:1.3.0.8 pkgsrc-2011Q3-base:1.3 pkgsrc-2011Q2:1.3.0.6 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.3.0.4 pkgsrc-2011Q1-base:1.3 pkgsrc-2010Q4:1.3.0.2 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.2.0.20 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.2.0.18 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.2.0.16 pkgsrc-2010Q1-base:1.2 pkgsrc-2009Q4:1.2.0.14 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.12 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.10 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.2.0.8 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.2.0.6 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.4 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.2 cube-native-xorg-base:1.2 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.9 date 2020.09.02.09.54.33; author ryoon; state dead; branches; next 1.8; commitid CsbTXPoUFZfjpsmC; 1.8 date 2016.09.09.21.07.23; author richard; state Exp; branches; next 1.7; commitid TH1yUwiQETudRElz; 1.7 date 2016.09.08.15.43.12; author richard; state Exp; branches; next 1.6; commitid MCGpxoXsO9545vlz; 1.6 date 2016.08.28.15.48.32; author wiz; state Exp; branches; next 1.5; commitid rTBn3EBawNhbu5kz; 1.5 date 2013.06.24.15.57.21; author jperkin; state Exp; branches; next 1.4; commitid PGZJx1hTXxnYQSUw; 1.4 date 2012.04.18.17.47.22; author hans; state Exp; branches; next 1.3; 1.3 date 2011.01.07.15.20.45; author obache; state Exp; branches; next 1.2; 1.2 date 2008.09.08.19.10.20; author jmcneill; state Exp; branches; next 1.1; 1.1 date 2008.09.08.19.07.41; author jmcneill; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.09.08.19.07.41; author jmcneill; state Exp; branches; next ; desc @@ 1.9 log @libv4l, libv4l1: Update graphics/libv4l with libv4l1 * Copy graphics/libv4l1 to graphics/libv4l. * Remove graphics/libv4l1. @ text @$NetBSD: patch-af,v 1.8 2016/09/09 21:07:23 richard Exp $ * XXXX * `mode_t' is promoted to `int' when passed through `...'. * Fix SunOS 64-bit. * if SYS_open doesn't exist, use SYS_openat --- libv4l2/v4l2convert.c.orig 2008-08-26 12:32:39.000000000 +0000 +++ libv4l2/v4l2convert.c @@@@ -24,11 +24,16 @@@@ #include #include +#ifdef __linux__ #include +#else +#include +#endif #include #include #include #include +#ifdef __linux__ /* These headers are not needed by us, but by linux/videodev2.h, which is broken on some systems and doesn't include them itself :( */ #include @@@@ -36,8 +41,22 @@@@ #include /* end broken header workaround includes */ #include +#else +#include +#include +#include +#ifdef __sun +#include +#else +#include +#endif +#endif #include +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif + /* Check that open/read/mmap is not a define */ #if defined open || defined read || defined mmap #error open/read/mmap is a prepocessor macro !! @@@@ -61,13 +80,20 @@@@ LIBV4L_PUBLIC int open (const char *file mode_t mode; va_start (ap, oflag); - mode = va_arg (ap, mode_t); + mode = (sizeof (mode_t) < sizeof (int) ? (mode_t)va_arg (ap, int) : va_arg (ap, mode_t)); +#ifdef SYS_open fd = syscall(SYS_open, file, oflag, mode); - +#else + fd = syscall(SYS_openat, AT_FDCWD, file, oflag, mode); +#endif va_end(ap); } else +#ifdef SYS_open fd = syscall(SYS_open, file, oflag); +#else + fd = syscall(SYS_openat, AT_FDCWD, file, oflag); +#endif /* end of original open code */ if (fd == -1) @@@@ -92,6 +118,7 @@@@ LIBV4L_PUBLIC int open (const char *file return fd; } +#if !(defined(__sun) && defined(_LP64)) LIBV4L_PUBLIC int open64(const char *file, int oflag, ...) { int fd; @@@@ -114,6 +141,7 @@@@ LIBV4L_PUBLIC int open64(const char *fil return fd; } +#endif LIBV4L_PUBLIC int close(int fd) { @@@@ -137,22 +165,19 @@@@ LIBV4L_PUBLIC int ioctl (int fd, unsigne return v4l2_ioctl (fd, request, arg); } -LIBV4L_PUBLIC ssize_t read (int fd, void* buffer, size_t n) -{ - return v4l2_read (fd, buffer, n); -} - LIBV4L_PUBLIC void *mmap(void *start, size_t length, int prot, int flags, int fd, __off_t offset) { return v4l2_mmap(start, length, prot, flags, fd, offset); } +#if !(defined(__sun) && defined(_LP64)) LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd, __off64_t offset) { return v4l2_mmap(start, length, prot, flags, fd, offset); } +#endif LIBV4L_PUBLIC int munmap(void *start, size_t length) { @ 1.8 log @Add symlink back after fixing videodev.h to include/linux (thanks wiz@@) Also fix typo in SYS_open check and use _XOPEN_SOURCE=500 for SunOS in order to get prototype for things like snprintf(). @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.7 2016/09/08 15:43:12 richard Exp $ @ 1.7 log @Add license and fix Linux build to use SYS_openat syscall when SYS_open isn't available. Also, videodev.h is expected in include/linux to build. Upgrade to more current version next time around. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.6 2016/08/28 15:48:32 wiz Exp $ d57 1 a57 1 +#ifdef SYS_OPEN d65 1 a65 1 +#ifdef SYS_OPEN @ 1.6 log @Remove unnecessary PLIST_SUBST and FILES_SUBST that are now provided by the infrastructure. Mark a couple more packages as not ready for python-3.x. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.5 2013/06/24 15:57:21 jperkin Exp $ d6 1 d50 1 a50 1 @@@@ -61,7 +80,7 @@@@ LIBV4L_PUBLIC int open (const char *file d57 1 d59 12 d72 2 a73 1 @@@@ -92,6 +111,7 @@@@ LIBV4L_PUBLIC int open (const char *file d81 1 a81 1 @@@@ -114,6 +134,7 @@@@ LIBV4L_PUBLIC int open64(const char *fil d89 1 a89 1 @@@@ -137,22 +158,19 @@@@ LIBV4L_PUBLIC int ioctl (int fd, unsigne @ 1.5 log @Fixes for SunOS 64-bit where open/mmap are redefined to *64 versions. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.4 2012/04/18 17:47:22 hans Exp $ d74 12 a85 1 @@@@ -148,11 +169,13 @@@@ LIBV4L_PUBLIC void *mmap(void *start, si @ 1.4 log @Make this build on SunOS 5.11. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.3 2011/01/07 15:20:45 obache Exp $ d5 1 d49 1 a49 1 @@@@ -61,7 +76,7 @@@@ LIBV4L_PUBLIC int open (const char *file d58 30 @ 1.3 log @better and one more fix for mode_t of va_arg. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.2 2008/09/08 19:10:20 jmcneill Exp $ d25 1 a25 1 @@@@ -36,8 +41,18 @@@@ d33 3 d38 1 @ 1.2 log @Add RCSID tags. @ text @d1 1 a1 1 $NetBSD$ d3 5 a7 2 --- libv4l2/v4l2convert.c.orig 2008-09-08 14:48:19.000000000 -0400 +++ libv4l2/v4l2convert.c 2008-09-08 14:50:00.000000000 -0400 d44 9 @ 1.1 log @Initial revision @ text @d1 2 @ 1.1.1.1 log @libv4l is a collection of libraries which adds a thin abstraction layer on top of video4linux2 devices. The purpose of this (thin) layer is to make it easy for application writers to support a wide variety of devices without having to write seperate code for different devices in the same class. @ text @@