fixed some typecasting issues with modern c++ compilers.
version raised to 0.9.1
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
# Makefile.in generated by automake 1.16.2 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -285,8 +285,6 @@ am__define_uniq_tagged_files = \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/depcomp
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
@ -303,6 +301,8 @@ CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
@ -319,6 +319,7 @@ ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
@ -901,7 +902,6 @@ cscopelist-am: $(am__tagged_files)
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
|
@ -700,7 +700,7 @@ int qse_fs_cpfilembs (qse_fs_t* fs, const qse_mchar_t* srcpath, const qse_mchar_
|
||||
if (flags & QSE_FS_CPFILE_GLOB)
|
||||
{
|
||||
fs->errnum = QSE_FS_ENOERR;
|
||||
if (qse_globmbs(srcpath, copy_file_for_glob, &ctx, DEFAULT_GLOB_FLAGS, fs->mmgr, fs->cmgr) <= -1)
|
||||
if (qse_globmbs(srcpath, (qse_glob_mbscbimpl_t)copy_file_for_glob, &ctx, DEFAULT_GLOB_FLAGS, fs->mmgr, fs->cmgr) <= -1)
|
||||
{
|
||||
if (fs->errnum == QSE_FS_ENOERR) fs->errnum = QSE_FS_EGLOB;
|
||||
ret = -1;
|
||||
@ -738,7 +738,7 @@ int qse_fs_cpfilewcs (qse_fs_t* fs, const qse_wchar_t* srcpath, const qse_wchar_
|
||||
if (flags & QSE_FS_CPFILE_GLOB)
|
||||
{
|
||||
fs->errnum = QSE_FS_ENOERR;
|
||||
if (qse_globwcs(srcpath, copy_file_for_glob, &ctx, DEFAULT_GLOB_FLAGS, fs->mmgr, fs->cmgr) <= -1)
|
||||
if (qse_globwcs(srcpath, (qse_glob_wcscbimpl_t)copy_file_for_glob, &ctx, DEFAULT_GLOB_FLAGS, fs->mmgr, fs->cmgr) <= -1)
|
||||
{
|
||||
if (fs->errnum == QSE_FS_ENOERR) fs->errnum = QSE_FS_EGLOB;
|
||||
ret = -1;
|
||||
|
@ -24,6 +24,11 @@
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#if !defined(_GNU_SOURCE)
|
||||
# define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#include <qse/si/mux.h>
|
||||
#include "../cmn/mem-prv.h"
|
||||
|
||||
|
@ -597,10 +597,10 @@ static int get_nwifcfg (int s, qse_nwifcfg_t* cfg, struct ifreq* ifr)
|
||||
QSE_MEMSET (cfg->ethw, 0, QSE_SIZEOF(cfg->ethw));
|
||||
|
||||
if (ioctl (s, SIOCGIFADDR, ifr) >= 0)
|
||||
qse_skadtonwad (&ifr->ifr_addr, &cfg->addr);
|
||||
qse_skadtonwad ((const qse_skad_t*)&ifr->ifr_addr, &cfg->addr);
|
||||
|
||||
if (ioctl (s, SIOCGIFNETMASK, ifr) >= 0)
|
||||
qse_skadtonwad (&ifr->ifr_addr, &cfg->mask);
|
||||
qse_skadtonwad ((const qse_skad_t*)&ifr->ifr_addr, &cfg->mask);
|
||||
|
||||
#if defined(__linux)
|
||||
if (cfg->addr.type == QSE_NWAD_NX && cfg->mask.type == QSE_NWAD_NX && cfg->type == QSE_NWIFCFG_IN6)
|
||||
@ -613,13 +613,13 @@ static int get_nwifcfg (int s, qse_nwifcfg_t* cfg, struct ifreq* ifr)
|
||||
if ((cfg->flags & QSE_NWIFCFG_BCAST) &&
|
||||
ioctl (s, SIOCGIFBRDADDR, ifr) >= 0)
|
||||
{
|
||||
qse_skadtonwad (&ifr->ifr_broadaddr, &cfg->bcast);
|
||||
qse_skadtonwad ((const qse_skad_t*)&ifr->ifr_broadaddr, &cfg->bcast);
|
||||
}
|
||||
|
||||
if ((cfg->flags & QSE_NWIFCFG_PTOP) &&
|
||||
ioctl (s, SIOCGIFDSTADDR, ifr) >= 0)
|
||||
{
|
||||
qse_skadtonwad (&ifr->ifr_dstaddr, &cfg->ptop);
|
||||
qse_skadtonwad ((const qse_skad_t*)&ifr->ifr_dstaddr, &cfg->ptop);
|
||||
}
|
||||
|
||||
#if defined(SIOCGIFHWADDR)
|
||||
@ -672,7 +672,7 @@ static void get_moreinfo (int s, qse_nwifcfg_t* cfg, struct ifreq* ifr)
|
||||
|
||||
QSE_MEMSET (&ev, 0, QSE_SIZEOF(ev));
|
||||
ev.cmd= ETHTOOL_GLINK;
|
||||
ifr->ifr_data = &ev;
|
||||
ifr->ifr_data = (void*)&ev;
|
||||
if (ioctl (s, SIOCETHTOOL,ifr) >= 0)
|
||||
cfg->flags |= ev.data? QSE_NWIFCFG_LINKUP: QSE_NWIFCFG_LINKDOWN;
|
||||
}
|
||||
|
@ -200,6 +200,17 @@ static void link_task (qse_task_t* task, qse_task_slice_t* slice)
|
||||
#if defined(USE_UCONTEXT) && \
|
||||
(QSE_SIZEOF_INT == QSE_SIZEOF_INT32_T) && \
|
||||
(QSE_SIZEOF_VOID_P == (QSE_SIZEOF_INT32_T * 2))
|
||||
/*
|
||||
* man makecontext
|
||||
*
|
||||
On architectures where int and pointer types are the same size (e.g., x86-32, where both types are 32
|
||||
bits), you may be able to get away with passing pointers as arguments to makecontext() following argc.
|
||||
However, doing this is not guaranteed to be portable, is undefined according to the standards, and won't
|
||||
work on architectures where pointers are larger than ints. Nevertheless, starting with glibc 2.8, glibc
|
||||
makes some changes to makecontext(), to permit this on some 64-bit architectures (e.g., x86-64).
|
||||
|
||||
See the code where makecontext() is invoked. It passed 2 32-bit values if int and pointer size are different
|
||||
*/
|
||||
|
||||
static void __CALL_BACK__ execute_current_slice (qse_uint32_t ptr1, qse_uint32_t ptr2)
|
||||
{
|
||||
@ -298,11 +309,11 @@ qse_task_slice_t* qse_task_create (
|
||||
(QSE_SIZEOF_VOID_P == (QSE_SIZEOF_INT32_T * 2))
|
||||
|
||||
/* limited work around for unclear makecontext parameters */
|
||||
makecontext (&slice->uctx, execute_current_slice, 2,
|
||||
(qse_uint32_t)(((qse_uintptr_t)slice) >> 32),
|
||||
makecontext (&slice->uctx, (void*)execute_current_slice, 2,// void* casting to some strict compiler check on
|
||||
(qse_uint32_t)(((qse_uintptr_t)slice) >> 32), // systems where ucontext.h defines it to void(*)(void).
|
||||
(qse_uint32_t)((qse_uintptr_t)slice & 0xFFFFFFFFu));
|
||||
#else
|
||||
makecontext (&slice->uctx, execute_current_slice, 1, slice);
|
||||
makecontext (&slice->uctx, (void*)execute_current_slice, 1, slice);
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
Reference in New Issue
Block a user