fixed multiple glitches for building on non-posix platforms
This commit is contained in:
@ -128,7 +128,7 @@ qse_dir_errnum_t qse_dir_geterrnum (qse_dir_t* dir)
|
||||
return dir->errnum;
|
||||
}
|
||||
|
||||
static int compare_dirent (qse_lda_t* lda, const void* dptr1, size_t dlen1, const void* dptr2, size_t dlen2)
|
||||
static int compare_dirent (qse_lda_t* lda, const void* dptr1, qse_size_t dlen1, const void* dptr2, qse_size_t dlen2)
|
||||
{
|
||||
int n = QSE_MEMCMP (dptr1, dptr2, ((dlen1 < dlen2)? dlen1: dlen2));
|
||||
if (n == 0 && dlen1 != dlen2) n = (dlen1 > dlen2)? 1: -1;
|
||||
|
@ -415,7 +415,7 @@ static QSE_INLINE int append_wcs (qse_env_t* env, const qse_wchar_t* value[])
|
||||
{
|
||||
#if defined(QSE_ENV_CHAR_IS_WCHAR)
|
||||
/* no conversion -> wchar */
|
||||
return appendw (env, name, value);
|
||||
return appendw (env, value);
|
||||
#else
|
||||
/* convert wchar to mchar */
|
||||
qse_mchar_t* valuedup[2];
|
||||
@ -469,7 +469,7 @@ static QSE_INLINE int append_mbs (qse_env_t* env, const qse_mchar_t* value[])
|
||||
valuedup[0] = qse_mbsatowcsalldup (value, QSE_NULL, env->mmgr);
|
||||
if (valuedup[0] == QSE_NULL) return -1;
|
||||
valuedup[1] = QSE_NULL;
|
||||
n = appendw (env, namedup, valuedup);
|
||||
n = appendw (env, valuedup);
|
||||
QSE_MMGR_FREE (env->mmgr, valuedup[0]);
|
||||
|
||||
return n;
|
||||
|
@ -25,7 +25,8 @@
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h> /* sockaddr_in6 */
|
||||
# include <windows.h>
|
||||
# if (defined(__WATCOMC__) && (__WATCOMC__ < 1200))
|
||||
# undef AF_UNIX
|
||||
# if defined(__WATCOMC__) && (__WATCOMC__ < 1200)
|
||||
/* the header files shipped with watcom 11 doesn't contain
|
||||
* proper inet6 support. note using the compiler version
|
||||
* in the contidional isn't that good idea since you
|
||||
@ -41,6 +42,7 @@
|
||||
/* though AF_INET6 is defined, there is no support
|
||||
* for it. so undefine it */
|
||||
# undef AF_INET6
|
||||
# undef AF_UNIX
|
||||
# pragma library("tcpip32.lib")
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: consider watt-32 */
|
||||
|
Reference in New Issue
Block a user