forked from enlightenment/efl
* 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:
parent
dcb2e6ea27
commit
1293953743
|
@ -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:
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int errno;
|
||||
extern EAPI int errno;
|
||||
|
||||
/* Fake values */
|
||||
#define E2BIG 1
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#ifdef __MINGW32CE__
|
||||
|
||||
#include "Evil.h"
|
||||
#include "errno.h"
|
||||
|
||||
|
||||
int errno = 0;
|
||||
|
||||
|
||||
#endif /* __MINGW32CE__ */
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -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__ */
|
||||
|
|
Loading…
Reference in New Issue