X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=direct%2Fydirectenv.h;h=126b6ce79b1ed9b407fa43f747e6bafe9d8a47e1;hb=c1422c27f5f17c68acf261209292c7489085df6b;hp=b2293a62fbdf4236092590d21e67ed5c451d93a7;hpb=878880321c4fa7ab0e431d22a3dd156a9a272c68;p=yaffs2.git diff --git a/direct/ydirectenv.h b/direct/ydirectenv.h index b2293a6..126b6ce 100644 --- a/direct/ydirectenv.h +++ b/direct/ydirectenv.h @@ -39,6 +39,9 @@ void yaffs_bug_fn(const char *file_name, int line_no); #define Y_LOFF_T loff_t #endif +/* Some RTOSs (eg. VxWorks) need strnlen. */ +size_t strnlen(const char *s, size_t maxlen); + #define yaffs_strcat(a, b) strcat(a, b) #define yaffs_strcpy(a, b) strcpy(a, b) #define yaffs_strncpy(a, b, c) strncpy(a, b, c) @@ -54,10 +57,7 @@ void yaffs_bug_fn(const char *file_name, int line_no); #define hweight8(x) yaffs_hweight8(x) #define hweight32(x) yaffs_hweight32(x) -void yaffs_qsort(void *aa, size_t n, size_t es, - int (*cmp)(const void *, const void *)); - -#define sort(base, n, sz, cmp_fn, swp) yaffs_qsort(base, n, sz, cmp_fn) +#define sort(base, n, sz, cmp_fn, swp) qsort(base, n, sz, cmp_fn) #define YAFFS_PATH_DIVIDERS "/"