return memdup(str, strlen(str) + 1);
}
-#ifdef __WIN32__
+#ifdef _WIN32
wchar_t *
wimlib_wcsdup(const wchar_t *str)
{
* Random number generation
**************************/
-#ifndef __WIN32__
+#ifndef _WIN32
/*
* Generate @n cryptographically secure random bytes (thread-safe)
*
} while (n != 0);
close(fd);
}
-#endif /* !__WIN32__ */
+#endif /* !_WIN32 */
/*
* Generate @n cryptographically secure random alphanumeric characters
* System information
************************/
-#ifndef __WIN32__
+#ifndef _WIN32
unsigned
get_available_cpus(void)
{
}
return n;
}
-#endif /* !__WIN32__ */
+#endif /* !_WIN32 */
-#ifndef __WIN32__
+#ifndef _WIN32
u64
get_available_memory(void)
{
WARNING("Failed to determine available memory; assuming 1 GiB");
return (u64)1 << 30;
}
-#endif /* !__WIN32__ */
+#endif /* !_WIN32 */