This repository was archived by the owner on Jan 26, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ void *dlopen(const char *module_name, int mode)
3636 * same path or can be found in the usual places. Failing that, let's
3737 * let that dso look in the apache root.
3838 */
39+ #if !defined(WINAPI_FAMILY ) || (WINAPI_FAMILY != WINAPI_FAMILY_APP )
3940 em = SetErrorMode (SEM_FAILCRITICALERRORS );
4041 dsoh = LoadLibraryExA (path , NULL , LOAD_WITH_ALTERED_SEARCH_PATH );
4142 if (!dsoh )
@@ -45,6 +46,11 @@ void *dlopen(const char *module_name, int mode)
4546 }
4647 SetErrorMode (em );
4748 SetLastError (0 ); // clear the last error
49+ #else
50+ wchar_t pathW [MAX_PATH ];
51+ mbstowcs (pathW , path , MAX_PATH );
52+ dsoh = LoadPackagedLibrary (pathW , 0 );
53+ #endif
4854 return (void * )dsoh ;
4955}
5056
Original file line number Diff line number Diff line change 2929#include <stdio.h> /* fprintf */
3030#include <errno.h> /* errno, EIN* */
3131#include <string.h> /* memcpy, strlen */
32+ #if HAVE_UNISTD_H
3233#include <unistd.h> /* pclose */
34+ #endif
3335#include <limits.h> /* PATH_MAX */
3436#include <dirent.h> /* opendir, readdir */
3537#include <ctype.h> /* isalpha */
6163#if defined(_WIN32 )
6264# include <windows.h>
6365# include "msvc/contrib/win32_cs.h"
66+ # include <winsock2.h>
6467# define strcasecmp _stricmp
6568# define strncasecmp _strnicmp
6669#endif
You can’t perform that action at this time.
0 commit comments