Kernel/VFS - Fixed missuse of strcmp that caused userland compilations to break
[tpg/acess2.git] / KernelLand / Kernel / lib.c
index 3c97ab7..f07e9f3 100644 (file)
@@ -20,7 +20,7 @@ const short DAYS_BEFORE[] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 3
  int   ParseInt(const char *string, int *Val);
 void   itoa(char *buf, Uint64 num, int base, int minLength, char pad);
  int   vsnprintf(char *__s, size_t __maxlen, const char *__format, va_list args);
-size_t snprintf(char *__s, size_t __n, const char *__format, ...);
+ int   snprintf(char *__s, size_t __n, const char *__format, ...);
  int   sprintf(char *__s, const char *__format, ...);
 #endif
  int   tolower(int c);
@@ -58,6 +58,7 @@ void  format_date(tTime TS, int *year, int *month, int *day, int *hrs, int *mins,
 EXPORT(atoi);
 EXPORT(itoa);
 EXPORT(vsnprintf);
+EXPORT(snprintf);
 EXPORT(sprintf);
 EXPORT(tolower);
 EXPORT(strucmp);
@@ -86,6 +87,7 @@ EXPORT(ModUtil_SetIdent);
 EXPORT(UnHex);
 EXPORT(SwapEndian16);
 EXPORT(SwapEndian32);
+EXPORT(SwapEndian64);
 EXPORT(memmove);
 
 // === CODE ===
@@ -412,7 +414,7 @@ int vsnprintf(char *__s, size_t __maxlen, const char *__format, va_list args)
 
 /**
  */
-size_t snprintf(char *__s, size_t __n, const char *__format, ...)
+int snprintf(char *__s, size_t __n, const char *__format, ...)
 {
        va_list args;
         int    ret;
@@ -1059,6 +1061,10 @@ Uint32 SwapEndian32(Uint32 Val)
 {
        return ((Val&0xFF)<<24) | ((Val&0xFF00)<<8) | ((Val>>8)&0xFF00) | ((Val>>24)&0xFF);
 }
+Uint64 SwapEndian64(Uint64 Val)
+{
+       return SwapEndian32(Val >> 32) | ((Uint64)SwapEndian32(Val) << 32);
+}
 
 void *memmove(void *__dest, const void *__src, size_t len)
 {

UCC git Repository :: git.ucc.asn.au