blob: 057b5b04c754edaa4b85726bdb271537991be37e [file] [log] [blame]
diff --git a/c++/cursesf.h b/c++/cursesf.h
--- a/c++/cursesf.h
+++ b/c++/cursesf.h
@@ -681,7 +681,7 @@ public:
const T* p_UserData = STATIC_CAST(T*)(0),
bool with_frame=FALSE,
bool autoDelete_Fields=FALSE)
- : NCursesForm (Fields, with_frame, autoDelete_Fields) {
+ : NCursesForm (&Fields, with_frame, autoDelete_Fields) {
if (form)
set_user (const_cast<void *>(p_UserData));
};
@@ -694,7 +694,7 @@ public:
const T* p_UserData = STATIC_CAST(T*)(0),
bool with_frame=FALSE,
bool autoDelete_Fields=FALSE)
- : NCursesForm (Fields, nlines, ncols, begin_y, begin_x,
+ : NCursesForm (&Fields, nlines, ncols, begin_y, begin_x,
with_frame, autoDelete_Fields) {
if (form)
set_user (const_cast<void *>(p_UserData));
diff --git a/c++/cursesm.h b/c++/cursesm.h
--- a/c++/cursesm.h
+++ b/c++/cursesm.h
@@ -639,7 +639,7 @@ public:
const T* p_UserData = STATIC_CAST(T*)(0),
bool with_frame=FALSE,
bool autoDelete_Items=FALSE)
- : NCursesMenu (Items, with_frame, autoDelete_Items) {
+ : NCursesMenu (&Items, with_frame, autoDelete_Items) {
if (menu)
set_user (const_cast<void *>(p_UserData));
};
@@ -651,7 +651,7 @@ public:
int begin_x = 0,
const T* p_UserData = STATIC_CAST(T*)(0),
bool with_frame=FALSE)
- : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) {
+ : NCursesMenu (&Items, nlines, ncols, begin_y, begin_x, with_frame) {
if (menu)
set_user (const_cast<void *>(p_UserData));
};
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -5400,7 +5400,7 @@ irix*) #(vi
LD_RPATH_OPT="-rpath "
fi
;;
-linux*|gnu*|k*bsd*-gnu) #(vi
+linux*|gnu*|nacl*|k*bsd*-gnu) #(vi
LD_RPATH_OPT="-Wl,-rpath,"
;;
openbsd[2-9].*) #(vi
@@ -5662,7 +5662,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
fi
cf_cv_rm_so_locs=yes
;;
- linux*|gnu*|k*bsd*-gnu) #(vi
+ linux*|gnu*|nacl*|k*bsd*-gnu) #(vi
if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
@@ -18894,8 +18894,8 @@ if test "$GCC" = yes ; then
LDFLAGS_SHARED=
;;
*) #( normally, except when broken
- LDFLAGS_STATIC=-static
- LDFLAGS_SHARED=-dynamic
+ LDFLAGS_STATIC=-Bstatic
+ LDFLAGS_SHARED=-Bdynamic
;;
esac
else
@@ -18948,7 +18948,7 @@ EOF
cf_save_LIBS="$LIBS"
- LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
+ LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_SHARED $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 18953 "configure"
#include "confdefs.h"
diff --git a/form/fty_num.c b/form/fty_num.c
--- a/form/fty_num.c
+++ b/form/fty_num.c
@@ -40,7 +40,7 @@ MODULE_ID("$Id: fty_num.c,v 1.28 2010/01/23 21:14:36 tom Exp $")
#include <locale.h>
#endif
-#if HAVE_LOCALE_H
+#if HAVE_LOCALE_H && (!defined(__native_client__) || !defined(__BIONIC__))
#define isDecimalPoint(c) ((c) == ((L && L->decimal_point) ? *(L->decimal_point) : '.'))
#else
#define isDecimalPoint(c) ((c) == '.')
@@ -96,7 +96,7 @@ Generic_This_Type(void *arg)
argn->low = args->low;
argn->high = args->high;
-#if HAVE_LOCALE_H
+#if HAVE_LOCALE_H && (!defined(__native_client__) || !defined(__BIONIC__))
argn->L = localeconv();
#else
argn->L = NULL;
diff --git a/ncurses/tinfo/lib_baudrate.c b/ncurses/tinfo/lib_baudrate.c
--- a/ncurses/tinfo/lib_baudrate.c
+++ b/ncurses/tinfo/lib_baudrate.c
@@ -219,11 +219,17 @@ NCURSES_SP_NAME(baudrate) (NCURSES_SP_DCL0)
if (IsValidTIScreen(SP_PARM)) {
#ifdef USE_OLD_TTY
+#if defined(__native_client__)
+ ospeed = 0;
+#else
result = cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
ospeed = _nc_ospeed(result);
+#endif
#else /* !USE_OLD_TTY */
#ifdef TERMIOS
+#if !defined(__native_client__)
ospeed = (NCURSES_OSPEED) cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
+#endif
#else
ospeed = (NCURSES_OSPEED) TerminalOf(SP_PARM)->Nttyb.sg_ospeed;
#endif
diff --git a/ncurses/tinfo/lib_kernel.c b/ncurses/tinfo/lib_kernel.c
--- a/ncurses/tinfo/lib_kernel.c
+++ b/ncurses/tinfo/lib_kernel.c
@@ -57,7 +57,7 @@ _nc_vdisable(void)
#if defined(_POSIX_VDISABLE) && HAVE_UNISTD_H
value = _POSIX_VDISABLE;
#endif
-#if defined(_PC_VDISABLE)
+#if defined(_PC_VDISABLE) && !defined(__native_client__)
if (value == -1) {
value = (int) fpathconf(0, _PC_VDISABLE);
if (value == -1) {
diff --git a/ncurses/tty/lib_twait.c b/ncurses/tty/lib_twait.c
--- a/ncurses/tty/lib_twait.c
+++ b/ncurses/tty/lib_twait.c
@@ -66,7 +66,10 @@
# endif
#endif
#ifdef __MINGW32__
-# include <sys/time.h>
+# include <sys/time.h>
+#endif
+#ifdef __native_client__
+# include <sys/time.h>
#endif
#undef CUR
diff --git a/progs/tset.c b/progs/tset.c
--- a/progs/tset.c
+++ b/progs/tset.c
@@ -583,7 +583,11 @@ get_termcap_entry(char *userarg)
if ((ttype = getenv("TERM")) != 0)
goto map;
+#if defined(__native_client__) && defined(__BIONIC__)
+ {
+#else
if ((ttypath = ttyname(STDERR_FILENO)) != 0) {
+#endif
p = _nc_basename(ttypath);
#if HAVE_GETTTYNAM
/*
@@ -1260,7 +1264,11 @@ main(int argc, char **argv)
can_restore = TRUE;
original = oldmode = mode;
#ifdef TERMIOS
+#if defined(__native_client__)
+ ospeed = 0;
+#else
ospeed = (NCURSES_OSPEED) cfgetospeed(&mode);
+#endif
#else
ospeed = (NCURSES_OSPEED) mode.sg_ospeed;
#endif
diff --git a/test/bs.c b/test/bs.c
--- a/test/bs.c
+++ b/test/bs.c
@@ -220,10 +220,12 @@ intro(void)
CATCHALL(uninitgame);
+#if !(defined(__native_client__) && (defined(__BIONIC__) || defined(__GLIBC__)))
if ((tmpname = getlogin()) != 0) {
(void) strcpy(name, tmpname);
name[0] = (char) toupper(UChar(name[0]));
} else
+#endif
(void) strcpy(name, dftname);
(void) initscr();