* src/lib/errno.h:

* src/lib/evil_errno.c:
	export errno symbol.
	* src/lib/evil_string.c:
	* src/lib/evil_string.h:
	add a (slow) implementation of ffs(). Needed for eina



SVN revision: 36824
This commit is contained in:
Vincent Torri 2008-10-19 19:06:19 +00:00
parent dcb2e6ea27
commit 1293953743
5 changed files with 49 additions and 1 deletions

View File

@ -1,3 +1,13 @@
2008-10-19 Vincent Torri <doursse at users dot sf dot net>
* src/lib/errno.h:
* src/lib/evil_errno.c:
export errno symbol.
* src/lib/evil_string.c:
* src/lib/evil_string.h:
add a (slow) implementation of ffs(). Needed for eina
2008-10-16 Vincent Torri <doursse at users dot sf dot net>
* configure.ac:

View File

@ -21,7 +21,7 @@
extern "C" {
#endif
extern int errno;
extern EAPI int errno;
/* Fake values */
#define E2BIG 1

View File

@ -1,7 +1,10 @@
#ifdef __MINGW32CE__
#include "Evil.h"
#include "errno.h"
int errno = 0;
#endif /* __MINGW32CE__ */

View File

@ -19,3 +19,27 @@ char *strerror (int errnum)
}
#endif /* __MINGW32CE__ */
#ifndef __CEGCC__
/*
* bit related functions
*
*/
int ffs(int i)
{
int size;
int x;
if (!i) return 1;
/* remove the sign bit */
x = i & -i;
size = sizeof(int) << 3;
for (i = size; i > 0; --i, x << 1)
if (x & (1 << (size - 1))) return i;
}
#endif /* ! __CEGCC__ */

View File

@ -13,5 +13,16 @@ EAPI char *strerror (int errnum);
#endif /* __MINGW32CE__ */
#ifndef __CEGCC__
/*
* bit related functions
*
*/
EAPI int ffs(int i);
#endif /* ! __CEGCC__ */
#endif /* __EVIL_STRING_H__ */