const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
{
- struct dirent *direntry = NULL;
-
if (ctx == NULL || directory == NULL)
{
errno = EINVAL;
}
do {
- if (ret = GetProcAddress(me32.hModule,name))
+ if ((ret = GetProcAddress(me32.hModule,name)))
{
(*close_snap)(hModuleSnap);
FreeLibrary(dll);
#ifdef COMPILE_HW_PADLOCK
/* We do these includes here to avoid header problems on platforms that
do not have the VIA padlock anyway... */
-#ifdef _MSC_VER
+#ifdef _WIN32
# include <malloc.h>
-# define alloca _alloca
+# ifndef alloca
+# define alloca _alloca
+# endif
#else
# include <stdlib.h>
#endif
# if defined(_WIN32_WCE) && _WIN32_WCE<410
# define getservbyname _masked_declaration_getservbyname
# endif
-# include <winsock.h>
+# if !defined(IPPROTO_IP)
+ /* winsock[2].h was included already? */
+# include <winsock.h>
+# endif
# ifdef getservbyname
# undef getservbyname
/* this is used to be wcecompat/include/winsock_extras.h */