parent
23b741699f
commit
3e4eb4437e
|
@ -379,7 +379,6 @@ AC_HEADER_TIME
|
|||
|
||||
AC_CHECK_HEADERS([ \
|
||||
execinfo.h \
|
||||
errno.h \
|
||||
libgen.h \
|
||||
mcheck.h \
|
||||
netinet/in.h \
|
||||
|
|
|
@ -11,10 +11,7 @@
|
|||
|
||||
#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>
|
||||
|
@ -24,10 +21,6 @@
|
|||
# include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ERRNO_H
|
||||
# include <errno.h>
|
||||
#endif
|
||||
|
||||
#include "dns.h"
|
||||
|
||||
#include "Ecore.h"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
@ -10,10 +11,6 @@
|
|||
#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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,13 +26,10 @@
|
|||
# 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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#define __CRT__NO_INLINE
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -12,10 +13,6 @@
|
|||
#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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue