Branch: master

35e5ff35 2019-04-10 05:38:29 OBATA Akio
Remove traditional `errno` usage

On modern POSIX environments, `errno` may not be simple `int` type,
and <errno.h> is sufficient for `errno` and its symbolic values.

Signed-off-by: OBATA Akio <obache@...>
M mpg123_artsplugin/mpg123/httpget.c

mpg123_artsplugin/mpg123/httpget.c

diff --git a/mpg123_artsplugin/mpg123/httpget.c b/mpg123_artsplugin/mpg123/httpget.c
index 7175011..3cf22e7 100644
--- a/mpg123_artsplugin/mpg123/httpget.c
+++ b/mpg123_artsplugin/mpg123/httpget.c
@@ -18,10 +18,8 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <ctype.h>
-
-extern int errno;
 
 #include "mpg123.h"
 
a2b21b9c 2019-04-11 00:59:00 OBATA Akio
Remove unsed platform endian detection

Used part had been commented out over 8 years ago.
Variety of include files are not sufficient and may cause build failure
because of missing header file.

Signed-off-by: OBATA Akio <obache@...>
M tdeioslave/audiocd/plugins/lame/encoderlame.cpp

tdeioslave/audiocd/plugins/lame/encoderlame.cpp

diff --git a/tdeioslave/audiocd/plugins/lame/encoderlame.cpp b/tdeioslave/audiocd/plugins/lame/encoderlame.cpp
index 0b3787a..f7535f5 100644
--- a/tdeioslave/audiocd/plugins/lame/encoderlame.cpp
+++ b/tdeioslave/audiocd/plugins/lame/encoderlame.cpp
@@ -18,13 +18,6 @@
 
 #include <config.h>
 
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
-#include <sys/types.h>
-#include <sys/endian.h>
-#else
-#include <endian.h>
-#endif
-
 #include "encoderlame.h"
 #include "encoderlameconfig.h"
 #include "audiocd_lame_encoder.h"
@@ -228,11 +221,7 @@
 	// -x bitswap
 	// -r raw/pcm
 	// -s 44.1 (because it is raw you have to specify this)
-// #if __BYTE_ORDER == __LITTLE_ENDIAN
-// 	*(d->currentEncodeProcess)	<< "lame" << "--verbose" << "-x" << "-r" << "-s" << "44.1";
-// #else
 	*(d->currentEncodeProcess)      << "lame" << "--verbose" << "-r" << "-s" << "44.1";
-// #endif
 
 	*(d->currentEncodeProcess) << args;
 	if(Settings::self()->id3_tag())

Branch: r14.0.x

b6ae5c86 2019-04-11 00:59:49 OBATA Akio
Remove unsed platform endian detection

Used part had been commented out over 8 years ago.
Variety of include files are not sufficient and may cause build failure
because of missing header file.

Signed-off-by: OBATA Akio <obache@...>
(cherry picked from commit a2b21b9cf6125f091d83cd99c91d57fa77f1c917)
M tdeioslave/audiocd/plugins/lame/encoderlame.cpp

tdeioslave/audiocd/plugins/lame/encoderlame.cpp

diff --git a/tdeioslave/audiocd/plugins/lame/encoderlame.cpp b/tdeioslave/audiocd/plugins/lame/encoderlame.cpp
index 0b3787a..f7535f5 100644
--- a/tdeioslave/audiocd/plugins/lame/encoderlame.cpp
+++ b/tdeioslave/audiocd/plugins/lame/encoderlame.cpp
@@ -18,13 +18,6 @@
 
 #include <config.h>
 
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
-#include <sys/types.h>
-#include <sys/endian.h>
-#else
-#include <endian.h>
-#endif
-
 #include "encoderlame.h"
 #include "encoderlameconfig.h"
 #include "audiocd_lame_encoder.h"
@@ -228,11 +221,7 @@
 	// -x bitswap
 	// -r raw/pcm
 	// -s 44.1 (because it is raw you have to specify this)
-// #if __BYTE_ORDER == __LITTLE_ENDIAN
-// 	*(d->currentEncodeProcess)	<< "lame" << "--verbose" << "-x" << "-r" << "-s" << "44.1";
-// #else
 	*(d->currentEncodeProcess)      << "lame" << "--verbose" << "-r" << "-s" << "44.1";
-// #endif
 
 	*(d->currentEncodeProcess) << args;
 	if(Settings::self()->id3_tag())