fixed code a bit more for the old sco compiler
This commit is contained in:
parent
e57c9673d1
commit
cce68401e2
@ -51,7 +51,7 @@ POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/README.in \
|
||||
$(top_srcdir)/configure ac/config.guess ac/config.sub \
|
||||
ac/depcomp ac/install-sh ac/ltmain.sh ac/missing
|
||||
|
2
qse/configure
vendored
2
qse/configure
vendored
@ -17451,7 +17451,7 @@ fi
|
||||
|
||||
done
|
||||
|
||||
for ac_header in sys/sysctl.h sys/socket.h sys/sockio.h ifaddrs.h linux/netfilter_ipv4.h netinet/sctp.h
|
||||
for ac_header in sys/sysctl.h sys/socket.h sys/sockio.h sys/un.h ifaddrs.h linux/netfilter_ipv4.h netinet/sctp.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||
|
@ -123,7 +123,7 @@ AC_CHECK_HEADERS([stddef.h wchar.h wctype.h errno.h signal.h fcntl.h dirent.h])
|
||||
AC_CHECK_HEADERS([time.h sys/time.h utime.h spawn.h execinfo.h ucontext.h])
|
||||
AC_CHECK_HEADERS([sys/resource.h sys/wait.h sys/syscall.h sys/ioctl.h])
|
||||
AC_CHECK_HEADERS([sys/sendfile.h sys/epoll.h sys/event.h])
|
||||
AC_CHECK_HEADERS([sys/sysctl.h sys/socket.h sys/sockio.h ifaddrs.h linux/netfilter_ipv4.h netinet/sctp.h])
|
||||
AC_CHECK_HEADERS([sys/sysctl.h sys/socket.h sys/sockio.h sys/un.h ifaddrs.h linux/netfilter_ipv4.h netinet/sctp.h])
|
||||
AC_CHECK_HEADERS([net/if.h net/if_dl.h], [], [], [
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>])
|
||||
|
@ -32,9 +32,12 @@
|
||||
* The QSE_UTF8LEN_MAX macro defines the maximum number of bytes
|
||||
* needed to form a single unicode character.
|
||||
*/
|
||||
#if QSE_SIZEOF_WCHAR_T == 2
|
||||
#if (QSE_SIZEOF_WCHAR_T == QSE_SIZEOF_MCHAR_T)
|
||||
/* cannot handle utf8 conversion properly */
|
||||
# define QSE_UTF8LEN_MAX 1
|
||||
#elif (QSE_SIZEOF_WCHAR_T == 2)
|
||||
# define QSE_UTF8LEN_MAX 3
|
||||
#elif QSE_SIZEOF_WCHAR_T == 4
|
||||
#elif (QSE_SIZEOF_WCHAR_T == 4)
|
||||
# define QSE_UTF8LEN_MAX 6
|
||||
#else
|
||||
# error Unsupported wide-character size
|
||||
|
@ -631,6 +631,9 @@
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||
#undef HAVE_SYS_UN_H
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
|
@ -1207,9 +1207,8 @@ qse_ssize_t qse_fio_read (qse_fio_t* fio, void* buf, qse_size_t size)
|
||||
return rab->rab$w_rsz;
|
||||
#else
|
||||
|
||||
ssize_t n;
|
||||
if (size > (QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(size_t)))
|
||||
size = QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(size_t);
|
||||
qse_ssize_t n;
|
||||
if (size > QSE_TYPE_MAX(qse_ssize_t)) size = QSE_TYPE_MAX(qse_ssize_t);
|
||||
n = QSE_READ (fio->handle, buf, size);
|
||||
if (n <= -1) fio->errnum = syserr_to_errnum (errno);
|
||||
return n;
|
||||
@ -1312,9 +1311,8 @@ qse_ssize_t qse_fio_write (qse_fio_t* fio, const void* data, qse_size_t size)
|
||||
|
||||
#else
|
||||
|
||||
ssize_t n;
|
||||
if (size > (QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(size_t)))
|
||||
size = QSE_TYPE_MAX(qse_ssize_t) & QSE_TYPE_MAX(size_t);
|
||||
qse_ssize_t n;
|
||||
if (size > QSE_TYPE_MAX(qse_ssize_t)) size = QSE_TYPE_MAX(qse_ssize_t);
|
||||
n = QSE_WRITE (fio->handle, data, size);
|
||||
if (n <= -1) fio->errnum = syserr_to_errnum (errno);
|
||||
return n;
|
||||
@ -1605,7 +1603,7 @@ int qse_fio_unlock (qse_fio_t* fio, qse_fio_lck_t* lck, int flags)
|
||||
int qse_getstdfiohandle (qse_fio_std_t std, qse_fio_hnd_t* hnd)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
DWORD tab[] =
|
||||
static DWORD tab[] =
|
||||
{
|
||||
STD_INPUT_HANDLE,
|
||||
STD_OUTPUT_HANDLE,
|
||||
@ -1613,10 +1611,10 @@ int qse_getstdfiohandle (qse_fio_std_t std, qse_fio_hnd_t* hnd)
|
||||
};
|
||||
#elif defined(vms) || defined(__vms)
|
||||
/* TODO */
|
||||
int tab[] = { 0, 1, 2 };
|
||||
static int tab[] = { 0, 1, 2 };
|
||||
#else
|
||||
|
||||
qse_fio_hnd_t tab[] =
|
||||
static qse_fio_hnd_t tab[] =
|
||||
{
|
||||
#if defined(__OS2__)
|
||||
(HFILE)0, (HFILE)1, (HFILE)2
|
||||
|
@ -48,9 +48,12 @@
|
||||
# include <tcp.h> /* watt-32 */
|
||||
# undef AF_UNIX
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# if defined(HAVE_SYS_UN_H)
|
||||
# include <sys/un.h>
|
||||
# endif
|
||||
|
||||
# if defined(QSE_SIZEOF_STRUCT_SOCKADDR_IN6) && (QSE_SIZEOF_STRUCT_SOCKADDR_IN6 <= 0)
|
||||
# undef AF_INET6
|
||||
|
@ -56,6 +56,12 @@ static __utf8_t utf8_table[] =
|
||||
|
||||
static QSE_INLINE __utf8_t* get_utf8_slot (qse_wchar_t uc)
|
||||
{
|
||||
#if (QSE_SIZEOF_WCHAR_T == QSE_SIZEOF_MCHAR_T)
|
||||
/* no utf8 support */
|
||||
|
||||
return QSE_NULL; /* invalid character */
|
||||
|
||||
#else
|
||||
__utf8_t* cur, * end;
|
||||
|
||||
QSE_ASSERT (QSE_SIZEOF(qse_mchar_t) == 1);
|
||||
@ -71,6 +77,7 @@ static QSE_INLINE __utf8_t* get_utf8_slot (qse_wchar_t uc)
|
||||
}
|
||||
|
||||
return QSE_NULL; /* invalid character */
|
||||
#endif
|
||||
}
|
||||
|
||||
qse_size_t qse_uctoutf8 (qse_wchar_t uc, qse_mchar_t* utf8, qse_size_t size)
|
||||
@ -100,9 +107,12 @@ qse_size_t qse_uctoutf8 (qse_wchar_t uc, qse_mchar_t* utf8, qse_size_t size)
|
||||
return (qse_size_t)cur->length;
|
||||
}
|
||||
|
||||
qse_size_t qse_utf8touc (
|
||||
const qse_mchar_t* utf8, qse_size_t size, qse_wchar_t* uc)
|
||||
qse_size_t qse_utf8touc (const qse_mchar_t* utf8, qse_size_t size, qse_wchar_t* uc)
|
||||
{
|
||||
#if (QSE_SIZEOF_WCHAR_T == QSE_SIZEOF_MCHAR_T)
|
||||
/* no utf8 support */
|
||||
return 0;
|
||||
#else
|
||||
__utf8_t* cur, * end;
|
||||
|
||||
QSE_ASSERT (utf8 != QSE_NULL);
|
||||
@ -170,6 +180,7 @@ qse_size_t qse_utf8touc (
|
||||
}
|
||||
|
||||
return 0; /* error - invalid sequence */
|
||||
#endif
|
||||
}
|
||||
|
||||
qse_size_t qse_utf8len (const qse_mchar_t* utf8, qse_size_t size)
|
||||
|
@ -88,7 +88,9 @@
|
||||
# include "../cmn/syscall.h"
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# if defined(HAVE_SYS_UN_H)
|
||||
# include <sys/un.h>
|
||||
# endif
|
||||
# if defined(QSE_SIZEOF_STRUCT_SOCKADDR_IN6) && (QSE_SIZEOF_STRUCT_SOCKADDR_IN6 <= 0)
|
||||
# undef AF_INET6
|
||||
# endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user