Hi all,
sorry for not finding the time for doing this earlier. Attached is a
patch that sorts out a number of smaller issues with eina on NetBSD and
Solaris. Some are noise, some are real bugs. This brings it down to one
compiler warning for iconv, which is expected (and messy).
Joerg
Use the SunPro handling for Solaris, independent of the compiler used.
--- src/lib/eina_cpu.c.orig 2011-04-05 08:41:54.000000000 +0000
+++ src/lib/eina_cpu.c
@@ -24,7 +24,7 @@
# ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
-# elif defined (__SUNPRO_C) || defined(__GNU__)
+# elif defined (__sun) || defined(__GNU__)
# include <unistd.h>
# elif defined (__FreeBSD__) || defined (__OpenBSD__) || \
defined (__NetBSD__) || defined (__DragonFly__) || defined (__MacOSX__) || \
@@ -140,7 +140,7 @@ EAPI int eina_cpu_count(void)
GetSystemInfo(&sysinfo);
return sysinfo.dwNumberOfProcessors;
-# elif defined (__SUNPRO_C) || defined(__GNU__)
+# elif defined (__sun) || defined(__GNU__)
/*
* _SC_NPROCESSORS_ONLN: number of processors that are online, that
is available when sysconf is called. The number
dirfd(3) is a macro at least on NetBSD.
--- configure.ac.orig 2011-11-26 11:33:53.000000000 +0000
+++ configure.ac
@@ -469,7 +469,25 @@ EFL_LINKER_FLAG([-fno-strict-aliasing])
### Checks for library functions
AC_ISC_POSIX
AC_FUNC_ALLOCA
-AC_CHECK_FUNCS([strlcpy dirfd openat fstatat fpathconf execvp])
+AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp])
+
+AC_MSG_CHECKING([dirfd])
+AC_LINK_IFELSE([
+
+#include <dirent.h>
+
+DIR *dirp;
+
+int
+main(void)
+{
+ return dirfd(dirp);
+}
+], [ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_DIRFD], 1, [ Define to 1 if you have the `dirfd' function
or macro. ])
+ ],
+ [ AC_MSG_RESULT([no])]
+)
# dlopen and dladdr
dlopen_libs=""
Avoid warnings for casts between integer and pointer on LP64.
Using uintptr_t would be better, but requires more work for Windows.
--- src/lib/eina_magic.c.orig 2011-06-22 16:11:17.000000000 +0000
+++ src/lib/eina_magic.c
@@ -79,7 +79,7 @@ _eina_magic_strings_sort_cmp(const void
static int
_eina_magic_strings_find_cmp(const void *p1, const void *p2)
{
- Eina_Magic a = (Eina_Magic)p1;
+ Eina_Magic a = (Eina_Magic)(size_t)p1;
const Eina_Magic_String *b = p2;
return a - b->magic;
}
@@ -206,7 +206,7 @@ eina_magic_string_get(Eina_Magic magic)
_eina_magic_strings_dirty = 0;
}
- ems = bsearch((void *)magic, _eina_magic_strings,
+ ems = bsearch((void *)(size_t)magic, _eina_magic_strings,
_eina_magic_strings_count, sizeof(Eina_Magic_String),
_eina_magic_strings_find_cmp);
if (ems)
Fix ctype API usage.
--- src/lib/eina_simple_xml_parser.c.orig 2011-11-09 07:12:35.000000000 +0000
+++ src/lib/eina_simple_xml_parser.c
@@ -121,7 +121,7 @@ static inline const char *
_eina_simple_xml_whitespace_find(const char *itr, const char *itr_end)
{
for (; itr < itr_end; itr++)
- if (isspace(*itr)) break;
+ if (isspace((unsigned char)*itr)) break;
return itr;
}
@@ -129,7 +129,7 @@ static inline const char *
_eina_simple_xml_whitespace_skip(const char *itr, const char *itr_end)
{
for (; itr < itr_end; itr++)
- if (!isspace(*itr)) break;
+ if (!isspace((unsigned char)*itr)) break;
return itr;
}
@@ -137,7 +137,7 @@ static inline const char *
_eina_simple_xml_whitespace_unskip(const char *itr, const char *itr_start)
{
for (itr--; itr > itr_start; itr--)
- if (!isspace(*itr)) break;
+ if (!isspace((unsigned char)*itr)) break;
return itr + 1;
}
@@ -309,7 +309,7 @@ eina_simple_xml_parse(const char *buf, u
(!memcmp(itr + 2, "DOCTYPE",
sizeof("DOCTYPE") - 1)) &&
((itr[2 + sizeof("DOCTYPE") - 1] == '>') ||
- (isspace(itr[2 + sizeof("DOCTYPE") - 1]))))
+ (isspace((unsigned char)itr[2 + sizeof("DOCTYPE") - 1]))))
{
type = EINA_SIMPLE_XML_DOCTYPE;
toff = sizeof("!DOCTYPE") - 1;
@@ -455,7 +455,7 @@ eina_simple_xml_tag_attributes_find(cons
for (; itr < itr_end; itr++)
{
- if (!isspace(*itr))
+ if (!isspace((unsigned char)*itr))
{
/* user skip tagname and already gave it the attributes */
if (*itr == '=')
@@ -492,7 +492,7 @@ eina_simple_xml_attributes_parse(const c
key = p;
for (key_end = key; key_end < itr_end; key_end++)
- if ((*key_end == '=') || (isspace(*key_end))) break;
+ if ((*key_end == '=') || (isspace((unsigned char)*key_end))) break;
if (key_end == itr_end) return EINA_FALSE;
if (key_end == key) continue;
@@ -504,7 +504,7 @@ eina_simple_xml_attributes_parse(const c
value++;
}
for (; value < itr_end; value++)
- if (!isspace(*value)) break;
+ if (!isspace((unsigned char)*value)) break;
if (value == itr_end) return EINA_FALSE;
if ((*value == '"') || (*value == '\''))
Fix ctype API usage.
--- src/lib/eina_strbuf.c.orig 2011-10-16 12:46:24.000000000 +0000
+++ src/lib/eina_strbuf.c
@@ -162,9 +162,9 @@ eina_strbuf_insert_vprintf(Eina_Strbuf *
EAPI void
eina_strbuf_trim(Eina_Strbuf *buf)
{
- char *c = buf->buf;
+ unsigned char *c = buf->buf;
- while (buf->len > 0 && isspace(((unsigned char*)(buf->buf))[buf->len - 1]))
+ while (buf->len > 0 && isspace(c[buf->len - 1]))
buf->len--;
while (buf->len > 0 && isspace(*c))
{
@@ -178,7 +178,7 @@ eina_strbuf_trim(Eina_Strbuf *buf)
EAPI void
eina_strbuf_ltrim(Eina_Strbuf *buf)
{
- char *c = buf->buf;
+ unsigned char *c = buf->buf;
while (buf->len > 0 && isspace(*c))
{
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel