Remove the non standard c++ header file inclusion
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
159ca00752
commit
7ce7eff9a9
@ -27,9 +27,10 @@
|
||||
#include <cstdint>
|
||||
#include <cstdbool>
|
||||
#include <cstring>
|
||||
#include <csched>
|
||||
#include <cerrno>
|
||||
|
||||
#include <debug.h>
|
||||
#include <sched.h>
|
||||
|
||||
#include "graphics/nxwidgets/nxconfig.hxx"
|
||||
#include "graphics/nxwidgets/cnxserver.hxx"
|
||||
|
@ -23,13 +23,13 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <cinttypes>
|
||||
#include <cunistd>
|
||||
#include <cerrno>
|
||||
|
||||
#include <sched.h>
|
||||
#include <limits.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef CONFIG_NXWM_TOUCHSCREEN_CONFIGDATA
|
||||
# include "platform/configdata.h"
|
||||
@ -628,7 +628,7 @@ FAR void *CCalibration::calibration(FAR void *arg)
|
||||
{
|
||||
// Sleep for a while (or until we receive a signal)
|
||||
|
||||
std::usleep(500*1000);
|
||||
usleep(500*1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -24,14 +24,14 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <cunistd>
|
||||
#include <cerrno>
|
||||
#include <cfcntl>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sched.h>
|
||||
#include <pthread.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "graphics/nxwm/nxwmconfig.hxx"
|
||||
#include "graphics/nxwm/ckeyboard.hxx"
|
||||
@ -84,7 +84,7 @@ CKeyboard::~CKeyboard(void)
|
||||
|
||||
if (m_kbdFd >= 0)
|
||||
{
|
||||
std::close(m_kbdFd);
|
||||
close(m_kbdFd);
|
||||
}
|
||||
}
|
||||
|
||||
@ -167,7 +167,7 @@ int CKeyboard::open(void)
|
||||
{
|
||||
// Try to open the keyboard device
|
||||
|
||||
fd = std::open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
|
||||
fd = ::open(CONFIG_NXWM_KEYBOARD_DEVPATH, O_RDONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
int errcode = errno;
|
||||
@ -193,7 +193,7 @@ int CKeyboard::open(void)
|
||||
// Sleep a bit and try again
|
||||
|
||||
ginfo("WAITING for a USB device\n");
|
||||
std::sleep(2);
|
||||
sleep(2);
|
||||
}
|
||||
|
||||
// Anything else would be really bad.
|
||||
@ -366,7 +366,7 @@ FAR void *CKeyboard::listener(FAR void *arg)
|
||||
|
||||
// Close the keyboard device
|
||||
|
||||
std::close(This->m_kbdFd);
|
||||
close(This->m_kbdFd);
|
||||
This->m_kbdFd = -1;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,6 @@
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cunistd>
|
||||
#include <ctime>
|
||||
|
||||
#include <sys/boardctl.h>
|
||||
@ -35,6 +34,7 @@
|
||||
#include <sched.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "nshlib/nshlib.h"
|
||||
|
||||
@ -489,16 +489,16 @@ int CNxTerm::nxterm(int argc, char *argv[])
|
||||
std::fflush(stderr);
|
||||
|
||||
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||
std::dup2(fd, 0);
|
||||
dup2(fd, 0);
|
||||
#endif
|
||||
std::dup2(fd, 1);
|
||||
std::dup2(fd, 2);
|
||||
dup2(fd, 1);
|
||||
dup2(fd, 2);
|
||||
|
||||
// And we can close our original driver file descriptor
|
||||
|
||||
if (fd > 2)
|
||||
{
|
||||
std::close(fd);
|
||||
::close(fd);
|
||||
}
|
||||
|
||||
// Inform the parent thread that we successfully initialized
|
||||
|
@ -25,10 +25,11 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cfcntl>
|
||||
#include <csched>
|
||||
#include <cerrno>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sched.h>
|
||||
|
||||
#include "graphics/nxwidgets/cwidgetcontrol.hxx"
|
||||
|
||||
#include "graphics/nxwm/nxwmconfig.hxx"
|
||||
|
@ -25,16 +25,15 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <cunistd>
|
||||
#include <cerrno>
|
||||
#include <cfcntl>
|
||||
|
||||
#include <sys/prctl.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sched.h>
|
||||
#include <pthread.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <nuttx/nx/nxglib.h>
|
||||
|
||||
@ -103,7 +102,7 @@ CTouchscreen::~CTouchscreen(void)
|
||||
|
||||
if (m_touchFd >= 0)
|
||||
{
|
||||
std::close(m_touchFd);
|
||||
close(m_touchFd);
|
||||
}
|
||||
|
||||
// Destroy the semaphores that we created.
|
||||
@ -253,7 +252,7 @@ FAR void *CTouchscreen::listener(FAR void *arg)
|
||||
|
||||
// Open the touchscreen device that we just created.
|
||||
|
||||
This->m_touchFd = std::open(CONFIG_NXWM_TOUCHSCREEN_DEVPATH, O_RDONLY);
|
||||
This->m_touchFd = open(CONFIG_NXWM_TOUCHSCREEN_DEVPATH, O_RDONLY);
|
||||
if (This->m_touchFd < 0)
|
||||
{
|
||||
gerr("ERROR Failed to open %s for reading: %d\n",
|
||||
|
@ -24,10 +24,10 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <cfcntl>
|
||||
#include <cerrno>
|
||||
|
||||
#include <debug.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "graphics/nxwm/nxwmconfig.hxx"
|
||||
#include "graphics/nxwm/cstartwindow.hxx"
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cunistd>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/boardctl.h>
|
||||
|
||||
#ifdef CONFIG_NXWM_TOUCHSCREEN_CONFIGDATA
|
||||
@ -604,7 +604,7 @@ int main(int argc, char *argv[])
|
||||
printf("nxwm_main: Waiting for touchscreen calibration\n");
|
||||
while (!g_nxwmtest.touchscreen->isCalibrated())
|
||||
{
|
||||
std::sleep(2);
|
||||
sleep(2);
|
||||
}
|
||||
|
||||
// This is how we would then recover the calibration data. After the
|
||||
|
@ -25,14 +25,14 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <cunistd>
|
||||
#include <csched>
|
||||
#include <cassert>
|
||||
#include <cerrno>
|
||||
|
||||
#include <limits.h>
|
||||
#include <semaphore.h>
|
||||
#include <debug.h>
|
||||
#include <sched.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <nuttx/semaphore.h>
|
||||
#include <nuttx/nx/nxbe.h>
|
||||
|
@ -26,12 +26,12 @@
|
||||
|
||||
#include <ctime>
|
||||
#include <cstring>
|
||||
#include <csched>
|
||||
#include <cassert>
|
||||
#include <cunistd>
|
||||
|
||||
#include <semaphore.h>
|
||||
#include <debug.h>
|
||||
#include <sched.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <nuttx/semaphore.h>
|
||||
|
||||
@ -361,7 +361,7 @@ void CClock::stop(void)
|
||||
|
||||
// Then delete the NSH task, possibly stranding resources
|
||||
|
||||
std::task_delete(pid);
|
||||
task_delete(pid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,14 +26,14 @@
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cunistd>
|
||||
#include <cfcntl>
|
||||
#include <ctime>
|
||||
#include <cassert>
|
||||
|
||||
#include <sys/boardctl.h>
|
||||
#include <semaphore.h>
|
||||
#include <fcntl.h>
|
||||
#include <debug.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "nshlib/nshlib.h"
|
||||
|
||||
@ -402,16 +402,16 @@ int CNxTerm::nxterm(int argc, char *argv[])
|
||||
std::fflush(stderr);
|
||||
|
||||
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||
std::dup2(fd, 0);
|
||||
dup2(fd, 0);
|
||||
#endif
|
||||
std::dup2(fd, 1);
|
||||
std::dup2(fd, 2);
|
||||
dup2(fd, 1);
|
||||
dup2(fd, 2);
|
||||
|
||||
// And we can close our original driver file descriptor
|
||||
|
||||
if (fd > 2)
|
||||
{
|
||||
std::close(fd);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
// Inform the parent thread that we successfully initialized
|
||||
|
@ -24,9 +24,10 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <cfcntl>
|
||||
#include <cerrno>
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <nuttx/nx/nxglib.h>
|
||||
|
||||
#include "graphics/nxwidgets/cscaledbitmap.hxx"
|
||||
|
@ -24,11 +24,12 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <cstdint>
|
||||
#include <cstdbool>
|
||||
#include <cfcntl>
|
||||
#include <cerrno>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
#include <nuttx/nx/nxglib.h>
|
||||
|
@ -24,14 +24,14 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <cunistd>
|
||||
#include <cerrno>
|
||||
#include <cfcntl>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sched.h>
|
||||
#include <poll.h>
|
||||
#include <pthread.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <nuttx/semaphore.h>
|
||||
#include <nuttx/nx/nxglib.h>
|
||||
@ -127,7 +127,7 @@ CInput::~CInput(void)
|
||||
|
||||
if (m_kbdFd >= 0)
|
||||
{
|
||||
std::close(m_kbdFd);
|
||||
close(m_kbdFd);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -136,7 +136,7 @@ CInput::~CInput(void)
|
||||
|
||||
if (m_mouseFd >= 0)
|
||||
{
|
||||
std::close(m_mouseFd);
|
||||
close(m_mouseFd);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -220,7 +220,7 @@ int CInput::keyboardOpen(void)
|
||||
{
|
||||
// Try to open the keyboard device non-blocking.
|
||||
|
||||
fd = std::open(CONFIG_TWM4NX_KEYBOARD_DEVPATH, O_RDONLY | O_NONBLOCK);
|
||||
fd = open(CONFIG_TWM4NX_KEYBOARD_DEVPATH, O_RDONLY | O_NONBLOCK);
|
||||
if (fd < 0)
|
||||
{
|
||||
int errcode = errno;
|
||||
@ -246,7 +246,7 @@ int CInput::keyboardOpen(void)
|
||||
// Sleep a bit and try again
|
||||
|
||||
twminfo("WAITING for a USB keyboard\n");
|
||||
std::sleep(2);
|
||||
sleep(2);
|
||||
}
|
||||
|
||||
// Anything else would be really bad.
|
||||
@ -296,7 +296,7 @@ inline int CInput::mouseOpen(void)
|
||||
{
|
||||
// Try to open the mouse device non-blocking
|
||||
|
||||
fd = std::open(CONFIG_TWM4NX_MOUSE_DEVPATH, O_RDONLY | O_NONBLOCK);
|
||||
fd = open(CONFIG_TWM4NX_MOUSE_DEVPATH, O_RDONLY | O_NONBLOCK);
|
||||
if (fd < 0)
|
||||
{
|
||||
int errcode = errno;
|
||||
@ -322,7 +322,7 @@ inline int CInput::mouseOpen(void)
|
||||
// Sleep a bit and try again
|
||||
|
||||
twminfo("WAITING for a USB mouse\n");
|
||||
std::sleep(2);
|
||||
sleep(2);
|
||||
}
|
||||
|
||||
// Anything else would be really bad.
|
||||
@ -956,14 +956,14 @@ FAR void *CInput::listener(FAR void *arg)
|
||||
#ifndef CONFIG_TWM4NX_NOKEYBOARD
|
||||
// Close the keyboard device
|
||||
|
||||
std::close(This->m_kbdFd);
|
||||
close(This->m_kbdFd);
|
||||
This->m_kbdFd = -1;
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TWM4NX_NOMOUSE
|
||||
// Close the mouse device
|
||||
|
||||
std::close(This->m_mouseFd);
|
||||
close(This->m_mouseFd);
|
||||
This->m_mouseFd = -1;
|
||||
#endif
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <cunistd>
|
||||
#include <unistd.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <graphics/nxwidgets/cnxstring.hxx>
|
||||
|
@ -41,11 +41,11 @@
|
||||
#include <cstdbool>
|
||||
#include <csignal>
|
||||
#include <cstdio>
|
||||
#include <cfcntl>
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
#include <cerrno>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#include <nuttx/semaphore.h>
|
||||
|
@ -37,11 +37,11 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <cfcntl>
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
#include <cerrno>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
#include <nuttx/nx/nxglib.h>
|
||||
|
@ -55,9 +55,9 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <cfcntl>
|
||||
#include <cerrno>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <semaphore.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user