From 860e5f0524a79a3fc7c776d925d1e73066b7f78d Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 20 Oct 2012 13:14:04 +0000 Subject: [PATCH] The termios c_speed field cannot be 'const' git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5234 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/ChangeLog | 3 +++ nuttx/configs/lincoln60/README.txt | 4 ++-- nuttx/configs/mbed/README.txt | 4 ++-- nuttx/configs/olimex-lpc1766stk/README.txt | 4 ++-- nuttx/configs/olimex-lpc1766stk/ftpc/setenv.sh | 5 ----- nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh | 5 ----- nuttx/configs/olimex-lpc1766stk/nettest/setenv.sh | 5 ----- nuttx/configs/olimex-lpc1766stk/nsh/setenv.sh | 5 ----- nuttx/configs/olimex-lpc1766stk/nx/setenv.sh | 5 ----- nuttx/configs/olimex-lpc1766stk/ostest/setenv.sh | 5 ----- nuttx/configs/olimex-lpc1766stk/slip-httpd/setenv.sh | 5 ----- nuttx/configs/olimex-lpc1766stk/thttpd/setenv.sh | 5 ----- nuttx/configs/olimex-lpc1766stk/usbserial/setenv.sh | 5 ----- nuttx/configs/olimex-lpc1766stk/usbstorage/setenv.sh | 5 ----- nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh | 5 ----- nuttx/configs/shenzhou/README.txt | 10 ++++++++++ nuttx/include/termios.h | 2 +- nuttx/lib/termios/lib_cfsetspeed.c | 7 +------ 18 files changed, 21 insertions(+), 68 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 971e9ff9bf..ad6521a9e1 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3474,4 +3474,7 @@ board (Darcy Gong). * configs/shenzhou/thttpd: Add a THTTPD configuration for the Shenzhou board (Darcy Gong). + * include/termios.h and lib/termios/libcf*speed.c: The non-standard, + "hidden" c_speed cannot be type const or else static instantiations + of termios will be required to initialize it (Mike Smith). diff --git a/nuttx/configs/lincoln60/README.txt b/nuttx/configs/lincoln60/README.txt index 07ca167cd1..068ca50dc7 100644 --- a/nuttx/configs/lincoln60/README.txt +++ b/nuttx/configs/lincoln60/README.txt @@ -461,8 +461,8 @@ host operations. To make these modifications, do the following: 2. Then edit the top-level .config file to enable USB host. Make the following changes: - CONFIG_LPC17_USBHOST=n - CONFIG_USBHOST=n + CONFIG_LPC17_USBHOST=y + CONFIG_USBHOST=y CONFIG_SCHED_WORKQUEUE=y When this change is made, NSH should be extended to support USB flash diff --git a/nuttx/configs/mbed/README.txt b/nuttx/configs/mbed/README.txt index 4b413560ab..958ae98184 100644 --- a/nuttx/configs/mbed/README.txt +++ b/nuttx/configs/mbed/README.txt @@ -432,8 +432,8 @@ host operations. To make these modifications, do the following: 2. Then edit the top-level .config file to enable USB host. Make the following changes: - CONFIG_LPC17_USBHOST=n - CONFIG_USBHOST=n + CONFIG_LPC17_USBHOST=y + CONFIG_USBHOST=y CONFIG_SCHED_WORKQUEUE=y When this change is made, NSH should be extended to support USB flash diff --git a/nuttx/configs/olimex-lpc1766stk/README.txt b/nuttx/configs/olimex-lpc1766stk/README.txt index f638ed4ff6..0983ab1f52 100644 --- a/nuttx/configs/olimex-lpc1766stk/README.txt +++ b/nuttx/configs/olimex-lpc1766stk/README.txt @@ -836,8 +836,8 @@ USB host operations. To make these modifications, do the following: 2. Then edit the top-level .config file to enable USB host. Make the following changes: - CONFIG_LPC17_USBHOST=n - CONFIG_USBHOST=n + CONFIG_LPC17_USBHOST=y + CONFIG_USBHOST=y CONFIG_SCHED_WORKQUEUE=y When this change is made, NSH should be extended to support USB flash diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/setenv.sh b/nuttx/configs/olimex-lpc1766stk/ftpc/setenv.sh index f9194c00d3..bc02a33b5c 100755 --- a/nuttx/configs/olimex-lpc1766stk/ftpc/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/ftpc/setenv.sh @@ -47,11 +47,6 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}" fi -# This is the Cygwin path to the location where I installed the RIDE -# toolchain under windows. You will also have to edit this if you install -# the RIDE toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" - # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh b/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh index 4c76646f9f..af4a2589ee 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh @@ -47,11 +47,6 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}" fi -# This is the Cygwin path to the location where I installed the RIDE -# toolchain under windows. You will also have to edit this if you install -# the RIDE toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" - # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/setenv.sh b/nuttx/configs/olimex-lpc1766stk/nettest/setenv.sh index d544f44706..d4627713d1 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/nettest/setenv.sh @@ -47,11 +47,6 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}" fi -# This is the Cygwin path to the location where I installed the RIDE -# toolchain under windows. You will also have to edit this if you install -# the RIDE toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" - # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/setenv.sh b/nuttx/configs/olimex-lpc1766stk/nsh/setenv.sh index 84150b0687..f9d5c3a16b 100755 --- a/nuttx/configs/olimex-lpc1766stk/nsh/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/nsh/setenv.sh @@ -47,11 +47,6 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}" fi -# This is the Cygwin path to the location where I installed the RIDE -# toolchain under windows. You will also have to edit this if you install -# the RIDE toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" - # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location diff --git a/nuttx/configs/olimex-lpc1766stk/nx/setenv.sh b/nuttx/configs/olimex-lpc1766stk/nx/setenv.sh index b94b47ad48..f9516c7765 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/nx/setenv.sh @@ -47,11 +47,6 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}" fi -# This is the Cygwin path to the location where I installed the RIDE -# toolchain under windows. You will also have to edit this if you install -# the RIDE toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" - # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/setenv.sh b/nuttx/configs/olimex-lpc1766stk/ostest/setenv.sh index a5547b3bfd..2c3bc3e6d4 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/ostest/setenv.sh @@ -47,11 +47,6 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}" fi -# This is the Cygwin path to the location where I installed the RIDE -# toolchain under windows. You will also have to edit this if you install -# the RIDE toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" - # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/setenv.sh b/nuttx/configs/olimex-lpc1766stk/slip-httpd/setenv.sh index 35dbd55b38..c32bc579a3 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/setenv.sh @@ -47,11 +47,6 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}" fi -# This is the Cygwin path to the location where I installed the RIDE -# toolchain under windows. You will also have to edit this if you install -# the RIDE toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" - # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/setenv.sh b/nuttx/configs/olimex-lpc1766stk/thttpd/setenv.sh index bcf0c4dead..7517148f5f 100755 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/setenv.sh @@ -47,11 +47,6 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}" fi -# This is the Cygwin path to the location where I installed the RIDE -# toolchain under windows. You will also have to edit this if you install -# the RIDE toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" - # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/setenv.sh b/nuttx/configs/olimex-lpc1766stk/usbserial/setenv.sh index ea9fe6c67e..ad34dd6a1d 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/setenv.sh @@ -47,11 +47,6 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}" fi -# This is the Cygwin path to the location where I installed the RIDE -# toolchain under windows. You will also have to edit this if you install -# the RIDE toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" - # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/setenv.sh b/nuttx/configs/olimex-lpc1766stk/usbstorage/setenv.sh index fa23269fbe..4e01bb195d 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/setenv.sh @@ -47,11 +47,6 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}" fi -# This is the Cygwin path to the location where I installed the RIDE -# toolchain under windows. You will also have to edit this if you install -# the RIDE toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" - # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh b/nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh index b7ada2bc25..767614612b 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh +++ b/nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh @@ -47,11 +47,6 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}" fi -# This is the Cygwin path to the location where I installed the RIDE -# toolchain under windows. You will also have to edit this if you install -# the RIDE toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin" - # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt index 772c59a174..7bf67710da 100644 --- a/nuttx/configs/shenzhou/README.txt +++ b/nuttx/configs/shenzhou/README.txt @@ -846,3 +846,13 @@ Where is one of the following: -CONFIG_NX_WRITEONLY=y +# CONFIG_NX_WRITEONLY is not set + thttpd + ------ + + This builds the THTTPD web server example using the THTTPD and + the apps/examples/thttpd application. + + NOTE: See note above with regard to the EABI/OABI buildroot + toolchains. This example can only be built using the older + OABI toolchain due to incompatibilities introduced in later + GCC releases. diff --git a/nuttx/include/termios.h b/nuttx/include/termios.h index e381814e3c..2e1c38fc26 100644 --- a/nuttx/include/termios.h +++ b/nuttx/include/termios.h @@ -230,7 +230,7 @@ struct termios * cf[set|get][o|i]speed() POSIX interfaces. */ - const speed_t c_speed; /* Input/output speed (non-POSIX)*/ + speed_t c_speed; /* Input/output speed (non-POSIX)*/ }; /**************************************************************************** diff --git a/nuttx/lib/termios/lib_cfsetspeed.c b/nuttx/lib/termios/lib_cfsetspeed.c index bf9e660640..714562ff50 100644 --- a/nuttx/lib/termios/lib_cfsetspeed.c +++ b/nuttx/lib/termios/lib_cfsetspeed.c @@ -110,12 +110,7 @@ int cfsetspeed(FAR struct termios *termiosp, speed_t speed) { - FAR speed_t *speedp; - DEBUGASSERT(termiosp); - - speedp = (FAR speed_t *)&termiosp->c_speed; - *speedp = speed; - + termiosp->c_speed = speed; return OK; }