summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-10-19 19:35:21 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-10-19 19:35:21 +0000
commit610b78c4e79f84a14047bfd19b3d8540df129f00 (patch)
tree2fb692b975e354d6d153dbbdb5f608b5e50fa563
parent9b7812ade5a36da7418b8bf858ef5693b7b9f372 (diff)
Fixes for good C++ link
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4054 7fd9a85b-ad96-42d3-883c-3090e2eb8679
-rw-r--r--nuttx/configs/sim/mount/Make.defs4
-rw-r--r--nuttx/configs/sim/nettest/Make.defs4
-rw-r--r--nuttx/configs/sim/nsh/Make.defs4
-rw-r--r--nuttx/configs/sim/nsh2/Make.defs2
-rw-r--r--nuttx/configs/sim/nx/Make.defs4
-rw-r--r--nuttx/configs/sim/nx11/Make.defs4
-rw-r--r--nuttx/configs/sim/nxffs/Make.defs4
-rw-r--r--nuttx/configs/sim/ostest/Make.defs4
-rw-r--r--nuttx/configs/sim/pashello/Make.defs4
-rw-r--r--nuttx/configs/sim/touchscreen/Make.defs4
-rw-r--r--nuttx/include/nuttx/rgbcolors.h24
-rwxr-xr-xnuttx/libxx/libxx_cxapurevirtual.cxx15
-rw-r--r--nuttx/sched/os_internal.h4
13 files changed, 51 insertions, 30 deletions
diff --git a/nuttx/configs/sim/mount/Make.defs b/nuttx/configs/sim/mount/Make.defs
index 1ae07a201f..498291077d 100644
--- a/nuttx/configs/sim/mount/Make.defs
+++ b/nuttx/configs/sim/mount/Make.defs
@@ -2,7 +2,7 @@
# configs/sim/mount/Make.defs
#
# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ else
endif
ARCHCPUFLAGS = -fno-builtin
-ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions
+ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
diff --git a/nuttx/configs/sim/nettest/Make.defs b/nuttx/configs/sim/nettest/Make.defs
index 41a9e93784..cf0134b9b0 100644
--- a/nuttx/configs/sim/nettest/Make.defs
+++ b/nuttx/configs/sim/nettest/Make.defs
@@ -2,7 +2,7 @@
# configs/sim/Make.defs
#
# Copyright (C) 2007-2008, 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ else
endif
ARCHCPUFLAGS = -fno-builtin
-ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions
+ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
diff --git a/nuttx/configs/sim/nsh/Make.defs b/nuttx/configs/sim/nsh/Make.defs
index 4da1545cf7..1330ade1e0 100644
--- a/nuttx/configs/sim/nsh/Make.defs
+++ b/nuttx/configs/sim/nsh/Make.defs
@@ -2,7 +2,7 @@
# configs/sim/nsh/Make.defs
#
# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ else
endif
ARCHCPUFLAGS = -fno-builtin
-ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions
+ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
diff --git a/nuttx/configs/sim/nsh2/Make.defs b/nuttx/configs/sim/nsh2/Make.defs
index d36c3438fa..b127e0a209 100644
--- a/nuttx/configs/sim/nsh2/Make.defs
+++ b/nuttx/configs/sim/nsh2/Make.defs
@@ -44,7 +44,7 @@ else
endif
ARCHCPUFLAGS = -fno-builtin
-ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions
+ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
diff --git a/nuttx/configs/sim/nx/Make.defs b/nuttx/configs/sim/nx/Make.defs
index dc00e53397..70f6066e19 100644
--- a/nuttx/configs/sim/nx/Make.defs
+++ b/nuttx/configs/sim/nx/Make.defs
@@ -2,7 +2,7 @@
# configs/sim/nx/Make.defs
#
# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ else
endif
ARCHCPUFLAGS = -fno-builtin
-ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions
+ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
diff --git a/nuttx/configs/sim/nx11/Make.defs b/nuttx/configs/sim/nx11/Make.defs
index 437a6e663a..2dfda3e659 100644
--- a/nuttx/configs/sim/nx11/Make.defs
+++ b/nuttx/configs/sim/nx11/Make.defs
@@ -2,7 +2,7 @@
# configs/sim/nx11/Make.defs
#
# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ else
endif
ARCHCPUFLAGS = -fno-builtin
-ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions
+ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
diff --git a/nuttx/configs/sim/nxffs/Make.defs b/nuttx/configs/sim/nxffs/Make.defs
index d5274e7d5c..9010d2bb46 100644
--- a/nuttx/configs/sim/nxffs/Make.defs
+++ b/nuttx/configs/sim/nxffs/Make.defs
@@ -2,7 +2,7 @@
# configs/sim/nxffs/Make.defs
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ else
endif
ARCHCPUFLAGS = -fno-builtin
-ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions
+ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
diff --git a/nuttx/configs/sim/ostest/Make.defs b/nuttx/configs/sim/ostest/Make.defs
index 41a9e93784..cf0134b9b0 100644
--- a/nuttx/configs/sim/ostest/Make.defs
+++ b/nuttx/configs/sim/ostest/Make.defs
@@ -2,7 +2,7 @@
# configs/sim/Make.defs
#
# Copyright (C) 2007-2008, 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ else
endif
ARCHCPUFLAGS = -fno-builtin
-ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions
+ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
diff --git a/nuttx/configs/sim/pashello/Make.defs b/nuttx/configs/sim/pashello/Make.defs
index ac0d4c0576..40dc5acb15 100644
--- a/nuttx/configs/sim/pashello/Make.defs
+++ b/nuttx/configs/sim/pashello/Make.defs
@@ -2,7 +2,7 @@
# configs/sim/pashello/Make.defs
#
# Copyright (C) 2007-2008, 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ else
endif
ARCHCPUFLAGS = -fno-builtin
-ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions
+ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
diff --git a/nuttx/configs/sim/touchscreen/Make.defs b/nuttx/configs/sim/touchscreen/Make.defs
index e52d09de2b..599b374327 100644
--- a/nuttx/configs/sim/touchscreen/Make.defs
+++ b/nuttx/configs/sim/touchscreen/Make.defs
@@ -2,7 +2,7 @@
# configs/sim/touchscreen/Make.defs
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@ else
endif
ARCHCPUFLAGS = -fno-builtin
-ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions
+ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
diff --git a/nuttx/include/nuttx/rgbcolors.h b/nuttx/include/nuttx/rgbcolors.h
index dad6008d4f..7dc6ef42dd 100644
--- a/nuttx/include/nuttx/rgbcolors.h
+++ b/nuttx/include/nuttx/rgbcolors.h
@@ -2,8 +2,8 @@
* include/nuttx/rgbcolors.h
* User-friendly RGB color definitions
*
- * Copyright (C) 2010 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -44,8 +44,23 @@
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
+/* Color Creation and Conversion Macros *************************************/
+/* This macro creates RGB24 from 8:8:8 RGB */
-/* Color conversions. This macros converts RGB24 (8:8:8) to RGB16 (5:6:5):
+#define RGBTO24(r,g,b) \
+ ((uint32_t)((r) & 0xff) << 16 | (uint32_t)((g) & 0xff) << 8 | (uint32_t)((b) & 0xff))
+
+/* This macro creates RGB16 (5:6:5) from 8:8:8 RGB */
+
+#define RGBTO16(r,g,b) \
+ ((((uint16_t)(r) << 11) & 0xf800) | (((uint16_t)(r) << 5) & 0x07e0) | ((uint16_t)(r) & 0x001f))
+
+/* This macro creates RGB8 (3:3:2) from 8:8:8 RGB */
+
+#define RGBTO8(r,g,b) \
+ ((((uint8_t)(r) << 5) & 0xe0) | (((uint8_t)(r) << 2) & 0x1c) | ((uint8_t)(r) & 0x03))
+
+/* This macro converts RGB24 (8:8:8) to RGB16 (5:6:5):
*
* 00000000 RRRRRRRR BBBBBBBB GGGGGGGG -> RRRRRBBB BBBGGGGG
*/
@@ -53,7 +68,7 @@
#define RGB24TO16(rgb24) \
(((rgb24 >> 8) & 0xf800) | ((rgb24 >> 5) & 0x07e0) | ((rgb24 >> 3) & 0x001f))
-/* This macros converts RGB16 (5:6:5) to RGB24 (8:8:8):
+/* This macro converts RGB16 (5:6:5) to RGB24 (8:8:8):
*
* RRRRRBBB BBBGGGGG -> 00000000 RRRRRRRR BBBBBBBB GGGGGGGG
*/
@@ -61,6 +76,7 @@
#define RGB16TO24(rgb16) \
(((rgb16 & 0xf800) << 8) | ((rgb16 & 0x07e0) << 5) | ((rgb16 & 0x001f) << 3))
+/* Standard Color Definitions ***********************************************/
/* RGB24-888: 00000000 RRRRRRRR GGGGGGGG BBBBBBBB */
#define RGB24_BLACK 0x00000000
diff --git a/nuttx/libxx/libxx_cxapurevirtual.cxx b/nuttx/libxx/libxx_cxapurevirtual.cxx
index 4a0ca36717..e8912558a5 100755
--- a/nuttx/libxx/libxx_cxapurevirtual.cxx
+++ b/nuttx/libxx/libxx_cxapurevirtual.cxx
@@ -1,8 +1,8 @@
//***************************************************************************
// libxx/libxx_cxapurevirtual.cxx
//
-// Copyright (C) 2009 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+// Copyright (C) 2009 2011 Gregory Nutt. All rights reserved.
+// Author: Gregory Nutt <gnutt@nuttx.org>
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
@@ -37,6 +37,8 @@
// Included Files
//***************************************************************************
+#include <cassert>
+
//***************************************************************************
// Definitions
//***************************************************************************
@@ -53,12 +55,15 @@
// Name: __cxa_pure_virtual
//
// Description:
-// Do nothing when a pure virtual function is called
+// Crash when an un-implemented pure virtual function is called
//
//***************************************************************************
-int __cxa_pure_virtual(void)
+extern "C"
{
- return 0;
+ void __cxa_pure_virtual(void)
+ {
+ PANIC(100);
+ }
}
diff --git a/nuttx/sched/os_internal.h b/nuttx/sched/os_internal.h
index 4ad8f087b5..16eb176e19 100644
--- a/nuttx/sched/os_internal.h
+++ b/nuttx/sched/os_internal.h
@@ -2,7 +2,7 @@
* sched/os_internal.h
*
* Copyright (C) 2007-2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -52,7 +52,7 @@
* Pre-processor Definitions
****************************************************************************/
-/* OS CRASH CODES */
+/* OS CRASH CODES: All must lie in the range 0-99 */
enum os_crash_codes_e
{