aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-08-20 16:06:47 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-09-09 15:56:23 +0200
commitc034e1a19e400fbd70af6ba915f5ed352b2481da (patch)
tree2cb72c5c26cac8b5014c804f96ab8138c881fc1f
parentd2f76464d9cf3036aa67ca89420e8753210a4def (diff)
clean up includes and convert C includes to C++
Several C includes ending in .h are deprecated in C++. Tested with several combinations of uClibc-ng, musl, glibc, libstdcpp, libcxx, and uClibc++. Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/cec-compliance/cec-compliance.cpp19
-rw-r--r--utils/cec-compliance/cec-compliance.h4
-rw-r--r--utils/cec-compliance/cec-test-adapter.cpp19
-rw-r--r--utils/cec-compliance/cec-test-audio.cpp17
-rw-r--r--utils/cec-compliance/cec-test-fuzzing.cpp15
-rw-r--r--utils/cec-compliance/cec-test-power.cpp16
-rw-r--r--utils/cec-compliance/cec-test.cpp18
-rw-r--r--utils/cec-ctl/cec-ctl.cpp30
-rw-r--r--utils/cec-ctl/cec-pin.cpp18
-rw-r--r--utils/cec-follower/cec-follower.cpp15
-rw-r--r--utils/cec-follower/cec-follower.h4
-rw-r--r--utils/cec-follower/cec-processing.cpp17
-rw-r--r--utils/cec-follower/cec-tuner.cpp4
-rw-r--r--utils/common/media-info.cpp21
-rw-r--r--utils/common/v4l2-info.cpp17
-rw-r--r--utils/common/v4l2-info.h1
-rw-r--r--utils/libcecutil/cec-info.cpp8
-rw-r--r--utils/libcecutil/cec-log.cpp10
-rw-r--r--utils/libcecutil/cec-parse.cpp23
-rw-r--r--utils/rds-ctl/rds-ctl.cpp37
-rw-r--r--utils/v4l2-compliance/v4l2-compliance.cpp24
-rw-r--r--utils/v4l2-compliance/v4l2-compliance.h7
-rw-r--r--utils/v4l2-compliance/v4l2-test-buffers.cpp26
-rw-r--r--utils/v4l2-compliance/v4l2-test-codecs.cpp15
-rw-r--r--utils/v4l2-compliance/v4l2-test-colors.cpp17
-rw-r--r--utils/v4l2-compliance/v4l2-test-controls.cpp15
-rw-r--r--utils/v4l2-compliance/v4l2-test-debug.cpp17
-rw-r--r--utils/v4l2-compliance/v4l2-test-formats.cpp15
-rw-r--r--utils/v4l2-compliance/v4l2-test-input-output.cpp16
-rw-r--r--utils/v4l2-compliance/v4l2-test-io-config.cpp14
-rw-r--r--utils/v4l2-compliance/v4l2-test-media.cpp20
-rw-r--r--utils/v4l2-compliance/v4l2-test-subdevs.cpp14
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-common.cpp28
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-edid.cpp13
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-io.cpp16
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-meta.cpp17
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-misc.cpp17
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-modes.cpp2
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-overlay.cpp17
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-sdr.cpp17
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-selection.cpp17
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-stds.cpp17
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-streaming.cpp21
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-subdev.cpp17
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-tuner.cpp15
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-vbi.cpp16
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-vidcap.cpp19
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-vidout.cpp17
-rw-r--r--utils/v4l2-ctl/v4l2-ctl.cpp24
-rw-r--r--utils/v4l2-ctl/v4l2-ctl.h2
-rw-r--r--utils/v4l2-dbg/v4l2-dbg.cpp26
51 files changed, 168 insertions, 663 deletions
diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp
index 06a8e23f..2f085b49 100644
--- a/utils/cec-compliance/cec-compliance.cpp
+++ b/utils/cec-compliance/cec-compliance.cpp
@@ -3,22 +3,13 @@
* Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
+#include <sstream>
+
#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
+#include <getopt.h>
#include <sys/ioctl.h>
-#include <sys/wait.h>
-#include <sstream>
-#include <cstdlib>
+#include <sys/time.h>
+#include <unistd.h>
#include "cec-compliance.h"
#include "compiler.h"
diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec-compliance.h
index 728df582..d87e4f1b 100644
--- a/utils/cec-compliance/cec-compliance.h
+++ b/utils/cec-compliance/cec-compliance.h
@@ -8,10 +8,6 @@
#ifndef _CEC_COMPLIANCE_H_
#define _CEC_COMPLIANCE_H_
-#include <cstdlib>
-#include <ctime>
-#include <string>
-
#include <linux/cec-funcs.h>
#include "cec-htng-funcs.h"
diff --git a/utils/cec-compliance/cec-test-adapter.cpp b/utils/cec-compliance/cec-test-adapter.cpp
index f19329a9..4fb7bc08 100644
--- a/utils/cec-compliance/cec-test-adapter.cpp
+++ b/utils/cec-compliance/cec-test-adapter.cpp
@@ -3,21 +3,14 @@
* Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+#include <cerrno>
+#include <ctime>
+#include <string>
+
#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
#include <sys/ioctl.h>
-#include <sys/wait.h>
-#include <sstream>
-#include <cstdlib>
+#include <sys/select.h>
+#include <unistd.h>
#include "cec-compliance.h"
diff --git a/utils/cec-compliance/cec-test-audio.cpp b/utils/cec-compliance/cec-test-audio.cpp
index 85b3777d..980a9640 100644
--- a/utils/cec-compliance/cec-test-audio.cpp
+++ b/utils/cec-compliance/cec-test-audio.cpp
@@ -3,23 +3,14 @@
* Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
+#include <ctime>
+#include <string>
+
#include <sys/ioctl.h>
-#include <config.h>
-#include <cstdlib>
+#include <unistd.h>
#include "cec-compliance.h"
-
/* Dynamic Auto Lipsync */
static int dal_request_current_latency(struct node *node, unsigned me, unsigned la, bool interactive)
diff --git a/utils/cec-compliance/cec-test-fuzzing.cpp b/utils/cec-compliance/cec-test-fuzzing.cpp
index ce0bf12d..0fe1d5ae 100644
--- a/utils/cec-compliance/cec-test-fuzzing.cpp
+++ b/utils/cec-compliance/cec-test-fuzzing.cpp
@@ -3,19 +3,10 @@
* Copyright 2019 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
+#include <ctime>
+#include <string>
+
#include <sys/ioctl.h>
-#include <config.h>
-#include <sstream>
#include "cec-compliance.h"
diff --git a/utils/cec-compliance/cec-test-power.cpp b/utils/cec-compliance/cec-test-power.cpp
index 3714d03c..81faa60e 100644
--- a/utils/cec-compliance/cec-test-power.cpp
+++ b/utils/cec-compliance/cec-test-power.cpp
@@ -3,18 +3,12 @@
* Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
+#include <cerrno>
+#include <ctime>
+#include <string>
+
#include <sys/ioctl.h>
-#include <config.h>
+#include <unistd.h>
#include "cec-compliance.h"
diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp
index 986d134f..7b39e20b 100644
--- a/utils/cec-compliance/cec-test.cpp
+++ b/utils/cec-compliance/cec-test.cpp
@@ -3,23 +3,13 @@
* Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <cstdlib>
#include <cstring>
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <config.h>
+#include <map>
#include <sstream>
#include <vector>
-#include <map>
+
+#include <sys/ioctl.h>
+#include <unistd.h>
#include "cec-compliance.h"
diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp
index 672110ab..df79d785 100644
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -3,29 +3,23 @@
* Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
+#include <algorithm>
+#include <cctype>
+#include <cerrno>
#include <cstring>
+#include <ctime>
+#include <map>
+#include <string>
+#include <vector>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
#include <dirent.h>
#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <stdarg.h>
-#include <ctime>
-#include <cerrno>
+#include <getopt.h>
#include <pthread.h>
-#include <string>
-#include <vector>
-#include <map>
-#include <algorithm>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <unistd.h>
+
#include <linux/cec-funcs.h>
#include "cec-htng-funcs.h"
#include "cec-log.h"
diff --git a/utils/cec-ctl/cec-pin.cpp b/utils/cec-ctl/cec-pin.cpp
index c09d6bbd..f9ecac7f 100644
--- a/utils/cec-ctl/cec-pin.cpp
+++ b/utils/cec-ctl/cec-pin.cpp
@@ -3,24 +3,8 @@
* Copyright 2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <stdarg.h>
-#include <cerrno>
#include <string>
-#include <vector>
-#include <algorithm>
+
#include <linux/cec.h>
#include "cec-htng.h"
diff --git a/utils/cec-follower/cec-follower.cpp b/utils/cec-follower/cec-follower.cpp
index 9e049ef1..94173d73 100644
--- a/utils/cec-follower/cec-follower.cpp
+++ b/utils/cec-follower/cec-follower.cpp
@@ -3,22 +3,13 @@
* Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <cstdlib>
#include <cstring>
+#include <ctime>
+#include <sstream>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
+#include <getopt.h>
#include <sys/ioctl.h>
-#include <sys/wait.h>
-#include <sstream>
#include "cec-follower.h"
#include "compiler.h"
diff --git a/utils/cec-follower/cec-follower.h b/utils/cec-follower/cec-follower.h
index 380bd480..5b67a260 100644
--- a/utils/cec-follower/cec-follower.h
+++ b/utils/cec-follower/cec-follower.h
@@ -8,10 +8,6 @@
#ifndef _CEC_FOLLOWER_H_
#define _CEC_FOLLOWER_H_
-#include <stdarg.h>
-#include <ctime>
-#include <cerrno>
-#include <string>
#include <linux/cec-funcs.h>
#include "cec-htng-funcs.h"
diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processing.cpp
index e5021aa3..fdc62c8b 100644
--- a/utils/cec-follower/cec-processing.cpp
+++ b/utils/cec-follower/cec-processing.cpp
@@ -3,19 +3,12 @@
* Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
+#include <cerrno>
+#include <ctime>
+#include <string>
+
#include <sys/ioctl.h>
-#include <config.h>
+#include <sys/time.h>
#include "cec-follower.h"
#include "compiler.h"
diff --git a/utils/cec-follower/cec-tuner.cpp b/utils/cec-follower/cec-tuner.cpp
index 4aecebce..ac5c4995 100644
--- a/utils/cec-follower/cec-tuner.cpp
+++ b/utils/cec-follower/cec-tuner.cpp
@@ -3,8 +3,10 @@
* Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
+#include <ctime>
+#include <string>
+
#include <sys/ioctl.h>
-#include <stdlib.h>
#include "cec-follower.h"
#include "compiler.h"
diff --git a/utils/common/media-info.cpp b/utils/common/media-info.cpp
index 78ed6746..5e40bafc 100644
--- a/utils/common/media-info.cpp
+++ b/utils/common/media-info.cpp
@@ -3,26 +3,19 @@
* Copyright 2018 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+#include <cstring>
+#include <fstream>
+#include <iostream>
+
+#include <dirent.h>
#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
#include <sys/ioctl.h>
-#include <sys/time.h>
+#include <sys/stat.h>
#include <sys/sysmacros.h>
-#include <dirent.h>
-#include <cstdlib>
+#include <unistd.h>
#include <linux/media.h>
-#include <iostream>
-#include <fstream>
#include <media-info.h>
static std::string num2s(unsigned num, bool is_hex = true)
diff --git a/utils/common/v4l2-info.cpp b/utils/common/v4l2-info.cpp
index 16be409a..2903a125 100644
--- a/utils/common/v4l2-info.cpp
+++ b/utils/common/v4l2-info.cpp
@@ -3,25 +3,8 @@
* Copyright 2018 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <sys/sysmacros.h>
-#include <dirent.h>
-
#include <v4l2-info.h>
-#include <fstream>
-
static std::string num2s(unsigned num, bool is_hex = true)
{
char buf[16];
diff --git a/utils/common/v4l2-info.h b/utils/common/v4l2-info.h
index ce2600f0..f7e945a4 100644
--- a/utils/common/v4l2-info.h
+++ b/utils/common/v4l2-info.h
@@ -7,6 +7,7 @@
#define _V4L2_INFO_H
#include <string>
+
#include <linux/videodev2.h>
/* Print capability information */
diff --git a/utils/libcecutil/cec-info.cpp b/utils/libcecutil/cec-info.cpp
index 9a12e6a1..8f85db11 100644
--- a/utils/libcecutil/cec-info.cpp
+++ b/utils/libcecutil/cec-info.cpp
@@ -5,12 +5,14 @@
* Copyright 2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <stdio.h>
+#include <cctype>
#include <string>
-#include <unistd.h>
-#include <fcntl.h>
+
#include <dirent.h>
+#include <fcntl.h>
#include <sys/ioctl.h>
+#include <unistd.h>
+
#include <cec-info.h>
#include <cec-htng.h>
diff --git a/utils/libcecutil/cec-log.cpp b/utils/libcecutil/cec-log.cpp
index 9410c071..76251443 100644
--- a/utils/libcecutil/cec-log.cpp
+++ b/utils/libcecutil/cec-log.cpp
@@ -3,14 +3,12 @@
* Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <stdarg.h>
#include <string>
+
+#include <unistd.h>
+
#include <linux/cec-funcs.h>
+
#include "cec-htng-funcs.h"
#include "cec-info.h"
#include "cec-log.h"
diff --git a/utils/libcecutil/cec-parse.cpp b/utils/libcecutil/cec-parse.cpp
index 8c869fec..1190d8e5 100644
--- a/utils/libcecutil/cec-parse.cpp
+++ b/utils/libcecutil/cec-parse.cpp
@@ -3,27 +3,12 @@
* Copyright 2019 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <stdarg.h>
+#include <cctype>
#include <cstring>
-#include <ctime>
-#include <cerrno>
#include <string>
-#include <vector>
-#include <map>
-#include <algorithm>
+
+#include <unistd.h>
+
#include <linux/cec-funcs.h>
#include "cec-htng-funcs.h"
#include "cec-log.h"
diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp
index cabfa538..37ab7dad 100644
--- a/utils/rds-ctl/rds-ctl.cpp
+++ b/utils/rds-ctl/rds-ctl.cpp
@@ -7,34 +7,25 @@
* Author: Konke Radlow <koradlow@gmail.com>
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <wchar.h>
-#include <locale.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <config.h>
-#include <signal.h>
-
-#include <linux/videodev2.h>
-#include <libv4l2rds.h>
-
#include <cctype>
+#include <cerrno>
+#include <clocale>
#include <cmath>
+#include <csignal>
+#include <cstring>
#include <ctime>
-#include <list>
-#include <vector>
#include <map>
#include <string>
-#include <algorithm>
+#include <vector>
+
+#include <dirent.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+
+#include <linux/videodev2.h>
+#include <libv4l2rds.h>
#define ARRAY_SIZE(arr) ((int)(sizeof(arr) / sizeof((arr)[0])))
diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp
index fa941a14..4ff0a303 100644
--- a/utils/v4l2-compliance/v4l2-compliance.cpp
+++ b/utils/v4l2-compliance/v4l2-compliance.cpp
@@ -18,27 +18,17 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <cstdlib>
+#include <cctype>
+#include <csignal>
#include <cstring>
+#include <map>
+#include <set>
+#include <vector>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
+#include <dirent.h>
#include <getopt.h>
#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <sys/sysmacros.h>
-#include <dirent.h>
-#include <math.h>
-#include <sys/utsname.h>
-#include <signal.h>
-#include <vector>
+#include <unistd.h>
#include "v4l2-compliance.h"
#include <media-info.h>
diff --git a/utils/v4l2-compliance/v4l2-compliance.h b/utils/v4l2-compliance/v4l2-compliance.h
index 38a4ded3..5cfe870b 100644
--- a/utils/v4l2-compliance/v4l2-compliance.h
+++ b/utils/v4l2-compliance/v4l2-compliance.h
@@ -21,13 +21,6 @@
#ifndef _V4L2_COMPLIANCE_H_
#define _V4L2_COMPLIANCE_H_
-#include <stdarg.h>
-#include <cerrno>
-#include <cstdlib>
-#include <string>
-#include <map>
-#include <set>
-#include <map>
#include <linux/videodev2.h>
#include <linux/v4l2-subdev.h>
#include <linux/media.h>
diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp
index 5df71b80..aca0eb68 100644
--- a/utils/v4l2-compliance/v4l2-test-buffers.cpp
+++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp
@@ -18,28 +18,18 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/epoll.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <poll.h>
-#include <pthread.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <netinet/in.h>
#include <algorithm>
#include <atomic>
+#include <csignal>
#include <map>
+#include <set>
#include <vector>
+
+#include <arpa/inet.h>
+#include <poll.h>
+#include <pthread.h>
+#include <sys/epoll.h>
+
#include "v4l2-compliance.h"
#define V4L2_CTRL_CLASS_VIVID 0x00f00000
diff --git a/utils/v4l2-compliance/v4l2-test-codecs.cpp b/utils/v4l2-compliance/v4l2-test-codecs.cpp
index 3fd44c8b..0acdc27d 100644
--- a/utils/v4l2-compliance/v4l2-test-codecs.cpp
+++ b/utils/v4l2-compliance/v4l2-test-codecs.cpp
@@ -18,18 +18,11 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
+#include <map>
+#include <set>
+
#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <assert.h>
+
#include "v4l2-compliance.h"
int testEncoder(struct node *node)
diff --git a/utils/v4l2-compliance/v4l2-test-colors.cpp b/utils/v4l2-compliance/v4l2-test-colors.cpp
index 09d29a3e..93651504 100644
--- a/utils/v4l2-compliance/v4l2-test-colors.cpp
+++ b/utils/v4l2-compliance/v4l2-test-colors.cpp
@@ -14,20 +14,11 @@
GNU General Public License for more details.
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
+#include <cstdio>
+#include <map>
+#include <set>
+
#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <math.h>
#include "compiler.h"
#include "v4l2-compliance.h"
diff --git a/utils/v4l2-compliance/v4l2-test-controls.cpp b/utils/v4l2-compliance/v4l2-test-controls.cpp
index 1627b8a1..fcc42cdf 100644
--- a/utils/v4l2-compliance/v4l2-test-controls.cpp
+++ b/utils/v4l2-compliance/v4l2-test-controls.cpp
@@ -18,19 +18,12 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
+#include <map>
+#include <set>
#include <vector>
+#include <sys/types.h>
+
#include "compiler.h"
#include "v4l2-compliance.h"
diff --git a/utils/v4l2-compliance/v4l2-test-debug.cpp b/utils/v4l2-compliance/v4l2-test-debug.cpp
index 3f43e661..877b577c 100644
--- a/utils/v4l2-compliance/v4l2-test-debug.cpp
+++ b/utils/v4l2-compliance/v4l2-test-debug.cpp
@@ -18,20 +18,11 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
+#include <map>
+#include <set>
+
#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <math.h>
+
#include "v4l2-compliance.h"
int testRegister(struct node *node)
diff --git a/utils/v4l2-compliance/v4l2-test-formats.cpp b/utils/v4l2-compliance/v4l2-test-formats.cpp
index d771dc4a..5ba40d0b 100644
--- a/utils/v4l2-compliance/v4l2-test-formats.cpp
+++ b/utils/v4l2-compliance/v4l2-test-formats.cpp
@@ -18,18 +18,11 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
+#include <cassert>
+#include <map>
+#include <set>
+
#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <assert.h>
#include "compiler.h"
#include "v4l2-compliance.h"
diff --git a/utils/v4l2-compliance/v4l2-test-input-output.cpp b/utils/v4l2-compliance/v4l2-test-input-output.cpp
index e86d706b..7088819a 100644
--- a/utils/v4l2-compliance/v4l2-test-input-output.cpp
+++ b/utils/v4l2-compliance/v4l2-test-input-output.cpp
@@ -18,18 +18,12 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
+#include <map>
+#include <set>
#include <vector>
+
+#include <sys/types.h>
+
#include "v4l2-compliance.h"
#define MAGIC 0x1eadbeef
diff --git a/utils/v4l2-compliance/v4l2-test-io-config.cpp b/utils/v4l2-compliance/v4l2-test-io-config.cpp
index 9ade11e8..1d672520 100644
--- a/utils/v4l2-compliance/v4l2-test-io-config.cpp
+++ b/utils/v4l2-compliance/v4l2-test-io-config.cpp
@@ -18,17 +18,11 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
+#include <map>
+#include <set>
+
#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
+
#include "v4l2-compliance.h"
static int checkStd(struct node *node, bool has_std, v4l2_std_id mask, bool is_input)
diff --git a/utils/v4l2-compliance/v4l2-test-media.cpp b/utils/v4l2-compliance/v4l2-test-media.cpp
index acbee331..a7dd81b2 100644
--- a/utils/v4l2-compliance/v4l2-test-media.cpp
+++ b/utils/v4l2-compliance/v4l2-test-media.cpp
@@ -18,22 +18,12 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/sysmacros.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <assert.h>
+#include <map>
#include <set>
-#include <fstream>
+
+#include <dirent.h>
+#include <sys/sysmacros.h>
+#include <sys/types.h>
#include "v4l2-compliance.h"
diff --git a/utils/v4l2-compliance/v4l2-test-subdevs.cpp b/utils/v4l2-compliance/v4l2-test-subdevs.cpp
index 489639fb..ec3ef169 100644
--- a/utils/v4l2-compliance/v4l2-test-subdevs.cpp
+++ b/utils/v4l2-compliance/v4l2-test-subdevs.cpp
@@ -18,18 +18,10 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
+#include <map>
+#include <set>
+
#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <assert.h>
#include "v4l2-compliance.h"
diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
index ed28a568..b15c03f1 100644
--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
@@ -1,18 +1,14 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
+#include <algorithm>
+#include <cctype>
+#include <cstring>
+#include <list>
+#include <map>
+#include <vector>
+
+#include <dirent.h>
#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
#include <sys/sysmacros.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
+
#include <linux/media.h>
#include "v4l2-ctl.h"
@@ -21,12 +17,6 @@
#include <sys/klog.h>
#endif
-#include <cstring>
-#include <list>
-#include <vector>
-#include <map>
-#include <algorithm>
-
struct ctrl_subset {
unsigned offset[V4L2_CTRL_MAX_DIMS];
unsigned size[V4L2_CTRL_MAX_DIMS];
diff --git a/utils/v4l2-ctl/v4l2-ctl-edid.cpp b/utils/v4l2-ctl/v4l2-ctl-edid.cpp
index a0a08d69..d82af0c9 100644
--- a/utils/v4l2-ctl/v4l2-ctl-edid.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-edid.cpp
@@ -1,19 +1,10 @@
-#include <cstdlib>
+#include <cctype>
#include <cstring>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
+#include <linux/v4l2-subdev.h>
#include "v4l2-ctl.h"
-#include <linux/v4l2-subdev.h>
-
/*
* The 24-bit IEEE Registration Identifier for the HDMI-LLC Vendor
* Specific Data Block.
diff --git a/utils/v4l2-ctl/v4l2-ctl-io.cpp b/utils/v4l2-ctl/v4l2-ctl-io.cpp
index 9e83c03a..ac30b062 100644
--- a/utils/v4l2-ctl/v4l2-ctl-io.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-io.cpp
@@ -1,19 +1,3 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
-
#include "v4l2-ctl.h"
static struct v4l2_audio vaudio; /* list audio inputs */
diff --git a/utils/v4l2-ctl/v4l2-ctl-meta.cpp b/utils/v4l2-ctl/v4l2-ctl-meta.cpp
index a4f1d534..a2db57c7 100644
--- a/utils/v4l2-ctl/v4l2-ctl-meta.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-meta.cpp
@@ -1,19 +1,4 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
-#include <cstdlib>
+#include <endian.h>
#include "v4l2-ctl.h"
diff --git a/utils/v4l2-ctl/v4l2-ctl-misc.cpp b/utils/v4l2-ctl/v4l2-ctl-misc.cpp
index f37e38e1..a9eec94d 100644
--- a/utils/v4l2-ctl/v4l2-ctl-misc.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-misc.cpp
@@ -1,20 +1,3 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
-#include <cstdlib>
-
#include "v4l2-ctl.h"
struct v4l2_decoder_cmd dec_cmd; /* (try_)decoder_cmd */
diff --git a/utils/v4l2-ctl/v4l2-ctl-modes.cpp b/utils/v4l2-ctl/v4l2-ctl-modes.cpp
index b311ce5d..7e1d759c 100644
--- a/utils/v4l2-ctl/v4l2-ctl-modes.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-modes.cpp
@@ -6,8 +6,6 @@
* reserved.
*/
-#include <stdio.h>
-#include <stdbool.h>
#include "v4l2-ctl.h"
static bool valid_params(int width, int height, int refresh_rate)
diff --git a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp
index 75681332..d8138ff5 100644
--- a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp
@@ -1,21 +1,6 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
+#include <vector>
#include <linux/fb.h>
-#include <vector>
#include "v4l2-ctl.h"
diff --git a/utils/v4l2-ctl/v4l2-ctl-sdr.cpp b/utils/v4l2-ctl/v4l2-ctl-sdr.cpp
index 5b724696..95ac1712 100644
--- a/utils/v4l2-ctl/v4l2-ctl-sdr.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-sdr.cpp
@@ -1,20 +1,3 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
-#include <cstdlib>
-
#include "v4l2-ctl.h"
static struct v4l2_format vfmt; /* set_format/get_format */
diff --git a/utils/v4l2-ctl/v4l2-ctl-selection.cpp b/utils/v4l2-ctl/v4l2-ctl-selection.cpp
index 5cafb9f4..1665607e 100644
--- a/utils/v4l2-ctl/v4l2-ctl-selection.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-selection.cpp
@@ -1,20 +1,3 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
-#include <cstdlib>
-
#include "v4l2-ctl.h"
/* crop specified */
diff --git a/utils/v4l2-ctl/v4l2-ctl-stds.cpp b/utils/v4l2-ctl/v4l2-ctl-stds.cpp
index f613d037..13f26757 100644
--- a/utils/v4l2-ctl/v4l2-ctl-stds.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-stds.cpp
@@ -1,19 +1,4 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
-#include <cstdlib>
+#include <cctype>
#include "v4l2-ctl.h"
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index c936299f..04af717e 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -1,25 +1,8 @@
-#include <algorithm>
-#include <cstdlib>
#include <cstring>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
#include <netdb.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <sys/mman.h>
-#include <dirent.h>
-#include <math.h>
+#include <sys/types.h>
+
#include <linux/media.h>
#include "compiler.h"
diff --git a/utils/v4l2-ctl/v4l2-ctl-subdev.cpp b/utils/v4l2-ctl/v4l2-ctl-subdev.cpp
index c0f36eab..08ead125 100644
--- a/utils/v4l2-ctl/v4l2-ctl-subdev.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-subdev.cpp
@@ -1,20 +1,3 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
-#include <cstdlib>
-
#include "v4l2-ctl.h"
struct mbus_name {
diff --git a/utils/v4l2-ctl/v4l2-ctl-tuner.cpp b/utils/v4l2-ctl/v4l2-ctl-tuner.cpp
index 2f854dc2..f5a04d25 100644
--- a/utils/v4l2-ctl/v4l2-ctl-tuner.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-tuner.cpp
@@ -1,19 +1,4 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
#include <cmath>
-#include <cstdlib>
#include "v4l2-ctl.h"
diff --git a/utils/v4l2-ctl/v4l2-ctl-vbi.cpp b/utils/v4l2-ctl/v4l2-ctl-vbi.cpp
index e72886f8..358aba6a 100644
--- a/utils/v4l2-ctl/v4l2-ctl-vbi.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-vbi.cpp
@@ -1,21 +1,5 @@
#include <cstring>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
-#include <cstdlib>
-
#include "compiler.h"
#include "v4l2-ctl.h"
diff --git a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp
index 3d0f27db..4f4a4ea0 100644
--- a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp
@@ -1,19 +1,6 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
-#include <cstdlib>
+#include <cctype>
+
+#include <endian.h>
#include "v4l2-ctl.h"
diff --git a/utils/v4l2-ctl/v4l2-ctl-vidout.cpp b/utils/v4l2-ctl/v4l2-ctl-vidout.cpp
index 5362e155..4b3d910a 100644
--- a/utils/v4l2-ctl/v4l2-ctl-vidout.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-vidout.cpp
@@ -1,20 +1,3 @@
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <dirent.h>
-#include <math.h>
-#include <cstdlib>
-
#include "v4l2-ctl.h"
static unsigned set_fmts_out;
diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
index c01ee883..82d14c3c 100644
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -20,23 +20,11 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
+#include <cctype>
+
+#include <dirent.h>
#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <sys/epoll.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <sys/sysmacros.h>
-#include <dirent.h>
-#include <math.h>
#include <linux/media.h>
@@ -48,12 +36,6 @@
#include <sys/klog.h>
#endif
-#include <list>
-#include <vector>
-#include <map>
-#include <algorithm>
-#include <fstream>
-
char options[OptLast];
static int app_result;
diff --git a/utils/v4l2-ctl/v4l2-ctl.h b/utils/v4l2-ctl/v4l2-ctl.h
index e906dc73..11037cef 100644
--- a/utils/v4l2-ctl/v4l2-ctl.h
+++ b/utils/v4l2-ctl/v4l2-ctl.h
@@ -7,8 +7,6 @@
#include <config.h>
#endif
-#include <string>
-
#include <linux/videodev2.h>
#include <linux/v4l2-subdev.h>
diff --git a/utils/v4l2-dbg/v4l2-dbg.cpp b/utils/v4l2-dbg/v4l2-dbg.cpp
index c4a7b942..6a190f1b 100644
--- a/utils/v4l2-dbg/v4l2-dbg.cpp
+++ b/utils/v4l2-dbg/v4l2-dbg.cpp
@@ -16,20 +16,16 @@
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+#include <cctype>
+#include <cerrno>
+#include <cstring>
+#include <string>
+#include <vector>
+
#include <fcntl.h>
-#include <ctype.h>
-#include <errno.h>
+#include <getopt.h>
#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <math.h>
-#include <cstdlib>
+#include <unistd.h>
#ifdef ANDROID
#include <android-config.h>
@@ -43,12 +39,6 @@
#include <linux/videodev2.h>
-#include <cstring>
-#include <list>
-#include <vector>
-#include <map>
-#include <string>
-
#include "v4l2-dbg-bttv.h"
#include "v4l2-dbg-saa7134.h"
#include "v4l2-dbg-em28xx.h"

Privacy Policy