From 4fb633f74495deba6b5fe78fc7a3c5b74c583bb1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Fri, 10 Apr 2009 16:31:25 +0300 Subject: [PATCH] Remove useless (very partially used) check for errno.h --- configure.ac | 2 +- modules/access/cdda.c | 2 -- modules/access/cdda/info.c | 4 +--- modules/control/http/http.h | 4 +--- modules/demux/mp4/drms.c | 12 +++--------- src/extras/dirent.c | 12 +----------- 6 files changed, 7 insertions(+), 29 deletions(-) diff --git a/configure.ac b/configure.ac index 5a1666a8fc..d7a435f23b 100644 --- a/configure.ac +++ b/configure.ac @@ -829,7 +829,7 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[ AC_MSG_RESULT(no)]) dnl Check for headers -AC_CHECK_HEADERS(time.h errno.h stdint.h getopt.h strings.h locale.h) +AC_CHECK_HEADERS(time.h stdint.h getopt.h strings.h locale.h) AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h xlocale.h) AC_CHECK_HEADERS([arpa/inet.h netinet/in.h netinet/udplite.h sys/eventfd.h]) AC_CHECK_HEADERS([net/if.h], [], [], diff --git a/modules/access/cdda.c b/modules/access/cdda.c index f4d980ffb9..5bddc08a2b 100644 --- a/modules/access/cdda.c +++ b/modules/access/cdda.c @@ -50,9 +50,7 @@ #include #endif -#ifdef HAVE_ERRNO_H #include -#endif /***************************************************************************** * Module descriptior diff --git a/modules/access/cdda/info.c b/modules/access/cdda/info.c index 9aec7ae192..78c7f7606b 100644 --- a/modules/access/cdda/info.c +++ b/modules/access/cdda/info.c @@ -36,9 +36,7 @@ #include #include "info.h" -#ifdef HAVE_ERRNO_H -# include -#endif +#include #include static char *CDDAFormatStr( const access_t *p_access, cdda_data_t *p_cdda, diff --git a/modules/control/http/http.h b/modules/control/http/http.h index f069ee44a4..038b36baf8 100644 --- a/modules/control/http/http.h +++ b/modules/control/http/http.h @@ -48,9 +48,7 @@ #ifdef HAVE_SYS_STAT_H # include #endif -#ifdef HAVE_ERRNO_H -# include -#endif +#include #ifdef HAVE_FCNTL_H # include #endif diff --git a/modules/demux/mp4/drms.c b/modules/demux/mp4/drms.c index 9cacb52cd4..ca4d9c6398 100644 --- a/modules/demux/mp4/drms.c +++ b/modules/demux/mp4/drms.c @@ -41,9 +41,7 @@ # include #endif -#ifdef HAVE_ERRNO_H -# include -#endif +#include #ifdef WIN32 # if !defined( UNDER_CE ) @@ -1573,14 +1571,10 @@ static int WriteUserKey( void *_p_drms, uint32_t *p_user_key ) snprintf( psz_path, PATH_MAX - 1, "%s/" DRMS_DIRNAME, p_drms->psz_homedir ); -#if defined( HAVE_ERRNO_H ) -# if defined( WIN32 ) +#if defined( WIN32 ) if( !mkdir( psz_path ) || errno == EEXIST ) -# else - if( !mkdir( psz_path, 0755 ) || errno == EEXIST ) -# endif #else - if( !mkdir( psz_path ) ) + if( !mkdir( psz_path, 0755 ) || errno == EEXIST ) #endif { snprintf( psz_path, PATH_MAX - 1, "%s/" DRMS_DIRNAME "/%08X.%03d", diff --git a/src/extras/dirent.c b/src/extras/dirent.c index d0a0f33293..d19b762890 100644 --- a/src/extras/dirent.c +++ b/src/extras/dirent.c @@ -20,17 +20,7 @@ #include #include -#ifdef HAVE_ERRNO_H -# include -#else - static int errno; - /* FIXME: anything clever to put here? */ -# define EFAULT 12 -# define ENOTDIR 12 -# define ENOENT 12 -# define ENOMEM 12 -# define EINVAL 12 -#endif +#include #include #ifndef UNDER_CE # include -- 2.39.2