efl: remove check for errno.h
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 10 Jan 2013 20:25:44 +0000 (20:25 +0000)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 10 Jan 2013 20:25:44 +0000 (20:25 +0000)
SVN revision: 82581

configure.ac
src/lib/ecore_con/ecore_con_dns.c
src/lib/ecore_con/ecore_con_local.c
src/lib/escape/escape_unistd.c
src/lib/evil/evil_dirent.c
src/lib/evil/evil_inet.c
src/lib/evil/evil_link_xp.cpp
src/lib/evil/evil_printa.c
src/lib/evil/evil_stdlib.c
src/lib/evil/evil_unistd.c

index b1734ab..fb231ed 100644 (file)
@@ -379,7 +379,6 @@ AC_HEADER_TIME
 
 AC_CHECK_HEADERS([ \
 execinfo.h \
-errno.h \
 libgen.h \
 mcheck.h \
 netinet/in.h \
index 7851d0d..8180cbe 100644 (file)
 
 #include <string.h>
 #include <sys/types.h>
-
-#ifdef HAVE_ERRNO_H
-# include <errno.h> /* for EAGAIN */
-#endif
+#include <errno.h> /* for EAGAIN */
 
 #ifdef HAVE_NETINET_IN_H
 # include <netinet/in.h>
 # include <arpa/inet.h>
 #endif
 
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif
-
 #include "dns.h"
 
 #include "Ecore.h"
index 647d9d5..6a67ef8 100644 (file)
@@ -2,6 +2,7 @@
 # include <config.h>
 #endif
 
+#include <errno.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif
-
 #ifdef HAVE_SYS_SOCKET_H
 # include <sys/socket.h>
 #endif
index 5dbbb18..3ac3ee7 100644 (file)
@@ -2,9 +2,7 @@
 # include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-#ifdef HAVE_ERRNO_H
 #include <errno.h>
-#endif /* HAVE_ERRNO_H */
 
 #include <sys/types.h> /* See NOTES */
 #include <sys/socket.h>
index e02b95f..041899d 100644 (file)
@@ -3,10 +3,7 @@
 #endif /* HAVE_CONFIG_H */
 
 #include <dirent.h>
-
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif
+#include <errno.h>
 
 #include "Evil.h"
 
@@ -34,9 +31,7 @@ DIR *opendir(char const *name)
    /* valid name */
    if (!name || !*name)
      {
-#ifdef HAVE_ERRNO_H
         errno = ENOENT;
-#endif
         return NULL;
      }
 
@@ -44,9 +39,7 @@ DIR *opendir(char const *name)
    wname = evil_char_to_wchar(name);
    if (!wname)
      {
-# ifdef HAVE_ERRNO_H
         errno = ENOMEM;
-# endif
         return NULL;
      }
 
@@ -55,9 +48,7 @@ DIR *opendir(char const *name)
    if((attr = GetFileAttributes(name)) == 0xFFFFFFFF)
 #endif
      {
-#ifdef HAVE_ERRNO_H
         errno = ENOENT;
-#endif
         return NULL;
      }
 
@@ -68,18 +59,14 @@ DIR *opendir(char const *name)
    /* directory */
    if (!(attr & FILE_ATTRIBUTE_DIRECTORY))
      {
-#ifdef HAVE_ERRNO_H
         errno = ENOTDIR;
-#endif
         return NULL;
      }
 
    dir = (DIR *)malloc(sizeof(DIR));
    if (!dir)
      {
-#ifdef HAVE_ERRNO_H
         errno = ENOMEM;
-#endif
         return NULL;
      }
 
@@ -87,9 +74,7 @@ DIR *opendir(char const *name)
    tmp1 = (char *)malloc(sizeof(char) * l + 5);
    if (!tmp1)
      {
-#ifdef HAVE_ERRNO_H
         errno = ENOMEM;
-#endif
         return NULL;
      }
 
@@ -107,9 +92,7 @@ DIR *opendir(char const *name)
    wname = evil_char_to_wchar(tmp1);
    if (!wname)
      {
-#ifdef HAVE_ERRNO_H
         errno = ENOMEM;
-#endif
         free(tmp1);
 
         return NULL;
@@ -149,9 +132,7 @@ int closedir(DIR *dir)
 {
    if (!dir)
      {
-#ifdef HAVE_ERRNO_H
         errno = EBADF;
-#endif
         return -1;
      }
 
@@ -170,9 +151,7 @@ struct dirent *readdir(DIR *dir)
 
    if (!dir)
      {
-#ifdef HAVE_ERRNO_H
         errno = EBADF;
-#endif
         return NULL;
      }
 
index 99ce14e..c493833 100644 (file)
 # include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#include <errno.h>
 #include <stdio.h>
 #include <ctype.h>
 
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif /* HAVE_ERRNO_H */
-
 #ifndef WIN32_LEAN_AND_MEAN
 # define WIN32_LEAN_AND_MEAN
 #endif
index 675908f..2b5b956 100644 (file)
@@ -2,9 +2,7 @@
 # include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-#ifdef HAVE_ERRNO_H
 #include <errno.h>
-#endif /* HAVE_ERRNO_H */
 
 #include <shlobj.h>
 #include <objidl.h>
index e6f6eb8..a0f8593 100644 (file)
@@ -1,5 +1,6 @@
 #define __CRT__NO_INLINE
 
+#include <errno.h>
 #include <limits.h>
 #include <stddef.h>
 #include <stdarg.h>
 #include <wctype.h>
 #include <locale.h>
 
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif /* HAVE_ERRNO_H */
-
 #include "evil_pformat.h"
 #include "evil_print.h"
 #include "gdtoa/gdtoa.h"
@@ -300,9 +297,7 @@ _evil_sformat (_IFP *s, const char *format, va_list argp)
 
   if (!s || s->fp == NULL || !format)
     {
-#ifdef HAVE_ERRNO_H
       errno = EINVAL;
-#endif /* HAVE_ERRNO_H */
       return EOF;
     }
 
@@ -485,10 +480,7 @@ _evil_sformat (_IFP *s, const char *format, va_list argp)
          do
            {
              if ((c == EOF || (c = in_ch (s, &read_in)) == EOF)
-#ifdef HAVE_ERRNO_H
-                 && errno == EINTR
-#endif /* HAVE_ERRNO_H */
-                  )
+                 && errno == EINTR)
                return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf);
            }
          while (isspace (c));
@@ -678,9 +670,7 @@ _evil_sformat (_IFP *s, const char *format, va_list argp)
                    {
                      if ((c = in_ch (s, &read_in)) == EOF)
                        {
-#ifdef HAVE_ERRNO_H
                          errno = EILSEQ;
-#endif /* HAVE_ERRNO_H */
                          return cleanup_return (rval, &gcollect, pstr, &wbuf);
                        }
 
@@ -690,9 +680,7 @@ _evil_sformat (_IFP *s, const char *format, va_list argp)
 
                  if (n != 1)
                    {
-#ifdef HAVE_ERRNO_H
                        errno = EILSEQ;
-#endif /* HAVE_ERRNO_H */
                        return cleanup_return (rval, &gcollect, pstr, &wbuf);
                    }
                  break;
@@ -842,9 +830,7 @@ _evil_sformat (_IFP *s, const char *format, va_list argp)
                    {
                      if ((c = in_ch (s, &read_in)) == EOF)
                        {
-#ifdef HAVE_ERRNO_H
                          errno = EILSEQ;
-#endif /* HAVE_ERRNO_H */
                          return cleanup_return (rval, &gcollect, pstr, &wbuf);
                        }
 
@@ -854,9 +840,7 @@ _evil_sformat (_IFP *s, const char *format, va_list argp)
 
                  if (n != 1)
                    {
-#ifdef HAVE_ERRNO_H
                      errno = EILSEQ;
-#endif /* HAVE_ERRNO_H */
                      return cleanup_return (rval, &gcollect, pstr, &wbuf);
                    }
 
@@ -1485,9 +1469,7 @@ _evil_sformat (_IFP *s, const char *format, va_list argp)
 
              if (cnt != 0)
                {
-#ifdef HAVE_ERRNO_H
                  errno = EILSEQ;
-#endif /* HAVE_ERRNO_H */
                  return cleanup_return (rval, &gcollect, pstr, &wbuf);
                }
 
index d22a7dc..ffd9acd 100644 (file)
@@ -8,9 +8,7 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif /* HAVE_ERRNO_H */
+#include <errno.h>
 
 #ifndef WIN32_LEAN_AND_MEAN
 # define WIN32_LEAN_AND_MEAN
@@ -147,9 +145,7 @@ setenv(const char *name,
    /* if '=' is found, return EINVAL */
    if (strchr (name, '='))
      {
-#ifdef HAVE_ERRNO_H
         errno = EINVAL;
-#endif /* HAVE_ERRNO_H */
         return -1;
      }
 
@@ -163,9 +159,7 @@ setenv(const char *name,
    str = (char *)malloc(length);
    if (!str)
      {
-#ifdef HAVE_ERRNO_H
         errno = ENOMEM;
-#endif /* HAVE_ERRNO_H */
         return -1;
      }
    if (!value)
@@ -292,9 +286,7 @@ mkstemp(char *__template)
    if ((length < 6) ||
        (strncmp (__template + length - 6, "XXXXXX", 6)))
      {
-#ifdef HAVE_ERRNO_H
         errno = EINVAL;
-#endif /* HAVE_ERRNO_H */
         return -1;
      }
 
@@ -337,9 +329,7 @@ mkstemp(char *__template)
            free(wtemplate);
            if (!f)
              {
-# ifdef HAVE_ERRNO_H
                 errno = EEXIST;
-# endif /* HAVE_ERRNO_H */
                 return -1;
              }
            fd = (int)_fileno(f);
@@ -351,9 +341,7 @@ mkstemp(char *__template)
         val += 7777;
      }
 
-#ifdef HAVE_ERRNO_H
    errno = EEXIST;
-#endif /* HAVE_ERRNO_H */
    return -1;
 }
 
index 10ef018..cfa5320 100644 (file)
@@ -2,9 +2,7 @@
 # include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-#ifdef HAVE_ERRNO_H
 #include <errno.h>
-#endif /* HAVE_ERRNO_H */
 
 #ifndef WIN32_LEAN_AND_MEAN
 # define WIN32_LEAN_AND_MEAN