├── install ├── clean.sh ├── cpp.zip ├── gcc-3.0-psion-98r2-9-patch ├── gcc-3.0-psion-98r2-9-src.tar.gz ├── gnupoc.er5.patch.011-patch ├── gnupoc.er5.patch.011.tar.gz ├── install.sh ├── sdk2unix-1.9-patch └── sdk2unix-1.9.tar.gz └── readme.txt /install/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -rf gcc_build src sdk2unix-1.9 gnupoc ../gcc-3.0-psion-98r2-9 ../epoc_cpp_sdk ../start_epoc_sdk.sh 3 | 4 | -------------------------------------------------------------------------------- /install/cpp.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/static-void/psion_cpp_sdk_linux/7763ee8229c65eb8dde49894eb3047622da031d7/install/cpp.zip -------------------------------------------------------------------------------- /install/gcc-3.0-psion-98r2-9-patch: -------------------------------------------------------------------------------- 1 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/bfd/archive.c gcc-3.0-psion-98r2-9-src/src/bfd/archive.c 2 | --- gcc-3.0-psion-98r2-9-src-orig/src/bfd/archive.c 2003-10-14 15:33:37.000000000 +0100 3 | +++ gcc-3.0-psion-98r2-9-src/src/bfd/archive.c 2021-02-16 22:34:32.603351972 +0000 4 | @@ -167,6 +167,22 @@ 5 | #define arch_eltdata(bfd) ((struct areltdata *)((bfd)->arelt_data)) 6 | #define arch_hdr(bfd) ((struct ar_hdr *)arch_eltdata(bfd)->arch_header) 7 | 8 | +void 9 | +_bfd_ar_spacepad (char *p, size_t n, const char *fmt, long val) 10 | +{ 11 | + static char buf[20]; 12 | + size_t len; 13 | + snprintf (buf, sizeof (buf), fmt, val); 14 | + len = strlen (buf); 15 | + if (len < n) 16 | + { 17 | + memcpy (p, buf, len); 18 | + memset (p + len, ' ', n - len); 19 | + } 20 | + else 21 | + memcpy (p, buf, n); 22 | +} 23 | + 24 | static char *get_extended_arelt_filename PARAMS ((bfd *arch, 25 | const char *name)); 26 | static boolean do_slurp_bsd_armap PARAMS ((bfd *abfd)); 27 | @@ -1319,15 +1335,7 @@ 28 | hdr->ar_name[0] = ar_padchar (current); 29 | /* We know there will always be enough room (one of the few 30 | cases where you may safely use sprintf). */ 31 | - sprintf ((hdr->ar_name) + 1, "%-d", (unsigned) (strptr - *tabloc)); 32 | - /* Kinda Kludgy. We should just use the returned value of 33 | - sprintf but not all implementations get this right */ 34 | - { 35 | - char *temp = hdr->ar_name + 2; 36 | - for (; temp < hdr->ar_name + maxname; temp++) 37 | - if (*temp == '\0') 38 | - *temp = ' '; 39 | - } 40 | + _bfd_ar_spacepad (hdr->ar_name + 1, maxname - 1, "%-ld", (unsigned) (strptr - *tabloc)); 41 | strptr += thislen + 1; 42 | if (trailing_slash) 43 | ++strptr; 44 | @@ -1351,7 +1359,6 @@ 45 | struct stat status; 46 | struct areltdata *ared; 47 | struct ar_hdr *hdr; 48 | - char *temp, *temp1; 49 | 50 | if (stat (filename, &status) != 0) 51 | { 52 | @@ -1368,25 +1375,15 @@ 53 | /* ar headers are space padded, not null padded! */ 54 | memset ((PTR) hdr, ' ', sizeof (struct ar_hdr)); 55 | 56 | - strncpy (hdr->ar_fmag, ARFMAG, 2); 57 | - 58 | - /* Goddamned sprintf doesn't permit MAXIMUM field lengths */ 59 | - sprintf ((hdr->ar_date), "%-12ld", (long) status.st_mtime); 60 | - sprintf ((hdr->ar_uid), "%ld", (long) status.st_uid); 61 | - sprintf ((hdr->ar_gid), "%ld", (long) status.st_gid); 62 | - sprintf ((hdr->ar_mode), "%-8o", (unsigned int) status.st_mode); 63 | - sprintf ((hdr->ar_size), "%-10ld", (long) status.st_size); 64 | - /* Correct for a lossage in sprintf whereby it null-terminates. I cannot 65 | - understand how these C losers could design such a ramshackle bunch of 66 | - IO operations */ 67 | - temp = (char *) hdr; 68 | - temp1 = temp + sizeof (struct ar_hdr) - 2; 69 | - for (; temp < temp1; temp++) 70 | - { 71 | - if (*temp == '\0') 72 | - *temp = ' '; 73 | - } 74 | - strncpy (hdr->ar_fmag, ARFMAG, 2); 75 | + _bfd_ar_spacepad (hdr->ar_date, sizeof (hdr->ar_date), "%-12ld", (long) status.st_mtime); 76 | + _bfd_ar_spacepad (hdr->ar_uid, sizeof (hdr->ar_uid), "%ld", (long) status.st_uid); 77 | + _bfd_ar_spacepad (hdr->ar_gid, sizeof (hdr->ar_gid), "%ld", 78 | + (long) status.st_gid); 79 | + _bfd_ar_spacepad (hdr->ar_mode, sizeof (hdr->ar_mode), "%-8lo", 80 | + (unsigned int) status.st_mode); 81 | + _bfd_ar_spacepad (hdr->ar_size, sizeof (hdr->ar_size), "%-10ld", 82 | + (long) status.st_size); 83 | + memcpy (hdr->ar_fmag, ARFMAG, 2); 84 | ared->parsed_size = status.st_size; 85 | ared->arch_header = (char *) hdr; 86 | 87 | @@ -1571,7 +1568,6 @@ 88 | boolean makemap = bfd_has_map (arch); 89 | boolean hasobjects = false; /* if no .o's, don't bother to make a map */ 90 | bfd_size_type wrote; 91 | - unsigned int i; 92 | int tries; 93 | 94 | /* Verify the viability of all entries; if any of them live in the 95 | @@ -1632,16 +1628,13 @@ 96 | { 97 | struct ar_hdr hdr; 98 | 99 | - memset ((char *) (&hdr), 0, sizeof (struct ar_hdr)); 100 | - strcpy (hdr.ar_name, ename); 101 | - /* Round size up to even number in archive header. */ 102 | - sprintf (&(hdr.ar_size[0]), "%-10d", 103 | - (int) ((elength + 1) & ~1)); 104 | - strncpy (hdr.ar_fmag, ARFMAG, 2); 105 | - for (i = 0; i < sizeof (struct ar_hdr); i++) 106 | - if (((char *) (&hdr))[i] == '\0') 107 | - (((char *) (&hdr))[i]) = ' '; 108 | - if ((bfd_write ((char *) &hdr, 1, sizeof (struct ar_hdr), arch) 109 | + memset (&hdr, ' ', sizeof (struct ar_hdr)); 110 | + memcpy (hdr.ar_name, ename, strlen (ename)); 111 | + /* Round size up to even number in archive header. */ 112 | + _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", 113 | + (int) ((elength + 1) & ~(bfd_size_type) 1)); 114 | + memcpy (hdr.ar_fmag, ARFMAG, 2); 115 | + if ((bfd_write ((char *) &hdr, 1, sizeof (struct ar_hdr), arch) 116 | != sizeof (struct ar_hdr)) 117 | || bfd_write (etable, 1, elength, arch) != elength) 118 | return false; 119 | @@ -1876,30 +1869,27 @@ 120 | unsigned int count; 121 | struct ar_hdr hdr; 122 | struct stat statbuf; 123 | - unsigned int i; 124 | 125 | firstreal = mapsize + elength + sizeof (struct ar_hdr) + SARMAG; 126 | 127 | stat (arch->filename, &statbuf); 128 | - memset ((char *) (&hdr), 0, sizeof (struct ar_hdr)); 129 | - sprintf (hdr.ar_name, RANLIBMAG); 130 | + memset (&hdr, ' ', sizeof (struct ar_hdr)); 131 | + memcpy (hdr.ar_name, RANLIBMAG, strlen (RANLIBMAG)); 132 | /* Remember the timestamp, to keep it holy. But fudge it a little. */ 133 | bfd_ardata (arch)->armap_timestamp = statbuf.st_mtime + ARMAP_TIME_OFFSET; 134 | bfd_ardata (arch)->armap_datepos = (SARMAG 135 | + offsetof (struct ar_hdr, ar_date[0])); 136 | - sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp); 137 | + _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", 138 | + bfd_ardata (arch)->armap_timestamp); 139 | #ifndef _WIN32 140 | - sprintf (hdr.ar_uid, "%ld", (long) getuid ()); 141 | - sprintf (hdr.ar_gid, "%ld", (long) getgid ()); 142 | + _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", (long) getuid ()); 143 | + _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", (long) getgid ()); 144 | #else 145 | - sprintf (hdr.ar_uid, "%ld", (long) 666); 146 | - sprintf (hdr.ar_gid, "%ld", (long) 42); 147 | + _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", (long) 666); 148 | + _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", (long) 42); 149 | #endif 150 | - sprintf (hdr.ar_size, "%-10d", (int) mapsize); 151 | - strncpy (hdr.ar_fmag, ARFMAG, 2); 152 | - for (i = 0; i < sizeof (struct ar_hdr); i++) 153 | - if (((char *) (&hdr))[i] == '\0') 154 | - (((char *) (&hdr))[i]) = ' '; 155 | + _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", (int) mapsize); 156 | + memcpy (hdr.ar_fmag, ARFMAG, 2); 157 | if (bfd_write ((char *) &hdr, 1, sizeof (struct ar_hdr), arch) 158 | != sizeof (struct ar_hdr)) 159 | return false; 160 | @@ -1964,7 +1954,6 @@ 161 | { 162 | struct stat archstat; 163 | struct ar_hdr hdr; 164 | - unsigned int i; 165 | 166 | /* Flush writes, get last-write timestamp from file, and compare it 167 | to the timestamp IN the file. */ 168 | @@ -1981,12 +1970,9 @@ 169 | bfd_ardata (arch)->armap_timestamp = archstat.st_mtime + ARMAP_TIME_OFFSET; 170 | 171 | /* Prepare an ASCII version suitable for writing. */ 172 | - memset (hdr.ar_date, 0, sizeof (hdr.ar_date)); 173 | - sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp); 174 | - for (i = 0; i < sizeof (hdr.ar_date); i++) 175 | - if (hdr.ar_date[i] == '\0') 176 | - (hdr.ar_date)[i] = ' '; 177 | - 178 | + memset (hdr.ar_date, ' ', sizeof (hdr.ar_date)); 179 | + _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", 180 | + bfd_ardata (arch)->armap_timestamp); 181 | /* Write it into the file. */ 182 | bfd_ardata (arch)->armap_datepos = (SARMAG 183 | + offsetof (struct ar_hdr, ar_date[0])); 184 | @@ -2033,7 +2019,6 @@ 185 | bfd *current = arch->archive_head; 186 | unsigned int count; 187 | struct ar_hdr hdr; 188 | - unsigned int i; 189 | int padit = mapsize & 1; 190 | 191 | if (padit) 192 | @@ -2045,19 +2030,17 @@ 193 | + sizeof (struct ar_hdr) 194 | + SARMAG); 195 | 196 | - memset ((char *) (&hdr), 0, sizeof (struct ar_hdr)); 197 | + memset (&hdr, ' ', sizeof (struct ar_hdr)); 198 | hdr.ar_name[0] = '/'; 199 | - sprintf (hdr.ar_size, "%-10d", (int) mapsize); 200 | - sprintf (hdr.ar_date, "%ld", (long) time (NULL)); 201 | + _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", 202 | + (int) mapsize); 203 | + _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", 204 | + (long) time (NULL)); 205 | /* This, at least, is what Intel coff sets the values to.: */ 206 | - sprintf ((hdr.ar_uid), "%d", 0); 207 | - sprintf ((hdr.ar_gid), "%d", 0); 208 | - sprintf ((hdr.ar_mode), "%-7o", (unsigned) 0); 209 | - strncpy (hdr.ar_fmag, ARFMAG, 2); 210 | - 211 | - for (i = 0; i < sizeof (struct ar_hdr); i++) 212 | - if (((char *) (&hdr))[i] == '\0') 213 | - (((char *) (&hdr))[i]) = ' '; 214 | + _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0); 215 | + _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0); 216 | + _bfd_ar_spacepad (hdr.ar_mode, sizeof (hdr.ar_mode), "%-7lo", 0); 217 | + memcpy (hdr.ar_fmag, ARFMAG, 2); 218 | 219 | /* Write the ar header for this item and the number of symbols */ 220 | 221 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/bfd/bfd-in2.h gcc-3.0-psion-98r2-9-src/src/bfd/bfd-in2.h 222 | --- gcc-3.0-psion-98r2-9-src-orig/src/bfd/bfd-in2.h 2003-10-14 15:33:37.000000000 +0100 223 | +++ gcc-3.0-psion-98r2-9-src/src/bfd/bfd-in2.h 2021-02-16 21:17:54.051036698 +0000 224 | @@ -701,20 +701,26 @@ 225 | /* ARM Interworking support. Called from linker. */ 226 | #ifdef COFF_IMAGE_WITH_PE 227 | static 228 | +#else 229 | +extern 230 | #endif 231 | -extern boolean bfd_arm_allocate_interworking_sections 232 | +boolean bfd_arm_allocate_interworking_sections 233 | PARAMS ((struct bfd_link_info *)); 234 | 235 | #ifdef COFF_IMAGE_WITH_PE 236 | static 237 | +#else 238 | +extern 239 | #endif 240 | -extern boolean bfd_arm_process_before_allocation 241 | +boolean bfd_arm_process_before_allocation 242 | PARAMS ((bfd *, struct bfd_link_info *, int)); 243 | 244 | #ifdef COFF_IMAGE_WITH_PE 245 | static 246 | +#else 247 | +extern 248 | #endif 249 | -extern boolean bfd_arm_get_bfd_for_interworking 250 | +boolean bfd_arm_get_bfd_for_interworking 251 | PARAMS ((bfd *, struct bfd_link_info *)); 252 | 253 | /* And more from the source. */ 254 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/bfd/libbfd.h gcc-3.0-psion-98r2-9-src/src/bfd/libbfd.h 255 | --- gcc-3.0-psion-98r2-9-src-orig/src/bfd/libbfd.h 2003-10-14 15:33:37.000000000 +0100 256 | +++ gcc-3.0-psion-98r2-9-src/src/bfd/libbfd.h 2021-02-16 22:08:03.556956319 +0000 257 | @@ -141,6 +141,7 @@ 258 | struct orl *map, unsigned int orl_count, int stridx)); 259 | 260 | extern PTR _bfd_generic_read_ar_hdr PARAMS ((bfd *)); 261 | +extern void _bfd_ar_spacepad(char *, size_t, const char *, long); 262 | 263 | extern PTR _bfd_generic_read_ar_hdr_mag PARAMS ((bfd *, const char *)); 264 | 265 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/bfd/libbfd-in.h gcc-3.0-psion-98r2-9-src/src/bfd/libbfd-in.h 266 | --- gcc-3.0-psion-98r2-9-src-orig/src/bfd/libbfd-in.h 2003-10-14 15:33:37.000000000 +0100 267 | +++ gcc-3.0-psion-98r2-9-src/src/bfd/libbfd-in.h 2021-02-16 22:08:10.900967428 +0000 268 | @@ -141,6 +141,7 @@ 269 | struct orl *map, unsigned int orl_count, int stridx)); 270 | 271 | extern PTR _bfd_generic_read_ar_hdr PARAMS ((bfd *)); 272 | +extern void _bfd_ar_spacepad(char *, size_t, const char *, long); 273 | 274 | extern PTR _bfd_generic_read_ar_hdr_mag PARAMS ((bfd *, const char *)); 275 | 276 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/bfd/pei-arm.c gcc-3.0-psion-98r2-9-src/src/bfd/pei-arm.c 277 | --- gcc-3.0-psion-98r2-9-src-orig/src/bfd/pei-arm.c 2003-10-14 15:33:37.000000000 +0100 278 | +++ gcc-3.0-psion-98r2-9-src/src/bfd/pei-arm.c 2021-02-16 21:18:40.131226130 +0000 279 | @@ -17,7 +17,6 @@ 280 | along with this program; if not, write to the Free Software 281 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 282 | 283 | -#include "bfd.h" 284 | #include "sysdep.h" 285 | 286 | #ifndef TARGET_LITTLE_SYM 287 | @@ -33,4 +32,5 @@ 288 | #define PCRELOFFSET true 289 | #define COFF_LONG_SECTION_NAMES 290 | 291 | +#include "bfd.h" 292 | #include "coff-arm.c" 293 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/config/arm/arm.c gcc-3.0-psion-98r2-9-src/src/gcc/config/arm/arm.c 294 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/config/arm/arm.c 2003-12-19 14:18:21.000000000 +0000 295 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/config/arm/arm.c 2021-02-16 21:44:46.426797725 +0000 296 | @@ -8994,7 +8994,7 @@ 297 | ) 298 | continue; 299 | 300 | - DECL_RTL (sym) = new; 301 | + SET_DECL_RTL (sym, new); 302 | } 303 | 304 | replace_symbols_in_block (BLOCK_SUBBLOCKS (block), orig, new); 305 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/config/arm/arm.h gcc-3.0-psion-98r2-9-src/src/gcc/config/arm/arm.h 306 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/config/arm/arm.h 2004-08-29 21:46:23.000000000 +0100 307 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/config/arm/arm.h 2021-02-16 21:19:49.147490781 +0000 308 | @@ -525,7 +525,7 @@ 309 | }; 310 | 311 | /* Recast the program mode class to be the prog_mode attribute */ 312 | -#define arm_prog_mode ((enum attr_prog_mode) arm_prgmode) 313 | +#define arm_prog_mode (/*(enum attr_prog_mode)*/ arm_prgmode) 314 | 315 | extern enum prog_mode_type arm_prgmode; 316 | 317 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/config/svr4.h gcc-3.0-psion-98r2-9-src/src/gcc/config/svr4.h 318 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/config/svr4.h 2003-10-14 15:33:45.000000000 +0100 319 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/config/svr4.h 2021-02-16 20:41:49.982533982 +0000 320 | @@ -90,7 +90,7 @@ 321 | 322 | #undef ASM_SPEC 323 | #define ASM_SPEC \ 324 | - "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}" 325 | + "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} --32" 326 | 327 | /* svr4 assemblers need the `-' (indicating input from stdin) to come after 328 | the -o option (and its argument) for some reason. If we try to put it 329 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/cfns.h gcc-3.0-psion-98r2-9-src/src/gcc/cp/cfns.h 330 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/cfns.h 2003-11-12 11:48:43.000000000 +0000 331 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/cp/cfns.h 2021-02-16 21:57:01.875950123 +0000 332 | @@ -4,9 +4,6 @@ 333 | __inline 334 | #endif 335 | static unsigned int hash PARAMS ((const char *, unsigned int)); 336 | -#ifdef __GNUC__ 337 | -__inline 338 | -#endif 339 | const char * libc_name_p PARAMS ((const char *, unsigned int)); 340 | /* maximum key range = 1020, duplicates = 1 */ 341 | 342 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/class.c gcc-3.0-psion-98r2-9-src/src/gcc/cp/class.c 343 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/class.c 2003-11-12 11:48:43.000000000 +0000 344 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/cp/class.c 2021-02-16 21:37:01.694010019 +0000 345 | @@ -3724,7 +3724,7 @@ 346 | 347 | /* Build the FIELD_DECL. */ 348 | field = build_decl (FIELD_DECL, name, type); 349 | - DECL_ASSEMBLER_NAME (field) = assembler_name; 350 | + SET_DECL_ASSEMBLER_NAME (field, assembler_name); 351 | DECL_VIRTUAL_P (field) = 1; 352 | DECL_ARTIFICIAL (field) = 1; 353 | DECL_FIELD_CONTEXT (field) = class_type; 354 | @@ -4235,7 +4235,7 @@ 355 | DECL_CLONED_FUNCTION (clone) = fn; 356 | /* Reset the function name. */ 357 | DECL_NAME (clone) = name; 358 | - DECL_ASSEMBLER_NAME (clone) = DECL_NAME (clone); 359 | + SET_DECL_ASSEMBLER_NAME (clone, DECL_NAME (clone)); 360 | /* There's no pending inline data for this function. */ 361 | DECL_PENDING_INLINE_INFO (clone) = NULL; 362 | DECL_PENDING_INLINE_P (clone) = 0; 363 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/decl2.c gcc-3.0-psion-98r2-9-src/src/gcc/cp/decl2.c 364 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/decl2.c 2003-12-11 13:05:48.000000000 +0000 365 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/cp/decl2.c 2021-02-16 21:39:19.494252294 +0000 366 | @@ -1096,7 +1096,7 @@ 367 | if (flag_new_abi) 368 | set_mangled_name_for_decl (function); 369 | else 370 | - DECL_ASSEMBLER_NAME (function) = build_destructor_name (ctype); 371 | + SET_DECL_ASSEMBLER_NAME (function, build_destructor_name (ctype)); 372 | 373 | TYPE_HAS_DESTRUCTOR (ctype) = 1; 374 | } 375 | @@ -1572,10 +1572,10 @@ 376 | { 377 | DECL_INITIAL (decl) = error_mark_node; 378 | if (flag_new_abi) 379 | - DECL_ASSEMBLER_NAME (decl) = mangle_decl (decl); 380 | + SET_DECL_ASSEMBLER_NAME (decl, mangle_decl (decl)); 381 | else 382 | - DECL_ASSEMBLER_NAME (decl) 383 | - = build_static_name (current_class_type, DECL_NAME (decl)); 384 | + SET_DECL_ASSEMBLER_NAME (decl, 385 | + build_static_name (current_class_type, DECL_NAME (decl))); 386 | } 387 | if (! processing_template_decl) 388 | { 389 | @@ -1708,14 +1708,14 @@ 390 | 391 | /* Now that we've updated the context, we need to remangle the 392 | name for this TYPE_DECL. */ 393 | - DECL_ASSEMBLER_NAME (value) = DECL_NAME (value); 394 | + SET_DECL_ASSEMBLER_NAME (value, DECL_NAME (value)); 395 | if (!uses_template_parms (value)) 396 | { 397 | if (flag_new_abi) 398 | - DECL_ASSEMBLER_NAME (value) = mangle_type (TREE_TYPE (value)); 399 | + SET_DECL_ASSEMBLER_NAME (value, mangle_type (TREE_TYPE (value))); 400 | else 401 | - DECL_ASSEMBLER_NAME (value) = 402 | - get_identifier (build_overload_name (TREE_TYPE (value), 1, 1)); 403 | + SET_DECL_ASSEMBLER_NAME (value, 404 | + get_identifier (build_overload_name (TREE_TYPE (value), 1, 1))); 405 | } 406 | 407 | if (processing_template_decl) 408 | @@ -1816,7 +1816,7 @@ 409 | /* This must override the asm specifier which was placed 410 | by grokclassfn. Lay this out fresh. */ 411 | DECL_RTL (value) = NULL_RTX; 412 | - DECL_ASSEMBLER_NAME (value) = get_identifier (asmspec); 413 | + SET_DECL_ASSEMBLER_NAME (value, get_identifier (asmspec)); 414 | } 415 | cp_finish_decl (value, init, asmspec_tree, flags); 416 | 417 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/decl.c gcc-3.0-psion-98r2-9-src/src/gcc/cp/decl.c 418 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/decl.c 2003-11-24 15:50:32.000000000 +0000 419 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/cp/decl.c 2021-02-16 21:33:54.021662012 +0000 420 | @@ -475,6 +475,10 @@ 421 | 422 | /* The binding level currently in effect. */ 423 | 424 | +#define set_current_binding_level(val) \ 425 | + if (cfun) cp_function_chain->bindings = (val); \ 426 | + else scope_chain->bindings = (val) 427 | + 428 | #define current_binding_level \ 429 | (cfun \ 430 | ? cp_function_chain->bindings \ 431 | @@ -523,7 +527,7 @@ 432 | are active. */ 433 | memset ((char*) newlevel, 0, sizeof (struct binding_level)); 434 | newlevel->level_chain = current_binding_level; 435 | - current_binding_level = newlevel; 436 | + set_current_binding_level(newlevel); 437 | newlevel->tag_transparent = tag_transparent; 438 | newlevel->more_cleanups_ok = 1; 439 | 440 | @@ -579,7 +583,7 @@ 441 | #endif /* defined(DEBUG_CP_BINDING_LEVELS) */ 442 | { 443 | register struct binding_level *level = current_binding_level; 444 | - current_binding_level = current_binding_level->level_chain; 445 | + set_current_binding_level(current_binding_level->level_chain); 446 | level->level_chain = free_binding_level; 447 | #if 0 /* defined(DEBUG_CP_BINDING_LEVELS) */ 448 | if (level->binding_depth != binding_depth) 449 | @@ -594,7 +598,7 @@ 450 | suspend_binding_level () 451 | { 452 | if (class_binding_level) 453 | - current_binding_level = class_binding_level; 454 | + set_current_binding_level(class_binding_level); 455 | 456 | if (global_binding_level) 457 | { 458 | @@ -616,7 +620,7 @@ 459 | } 460 | is_class_level = 0; 461 | #endif /* defined(DEBUG_CP_BINDING_LEVELS) */ 462 | - current_binding_level = current_binding_level->level_chain; 463 | + set_current_binding_level(current_binding_level->level_chain); 464 | find_class_binding_level (); 465 | } 466 | 467 | @@ -629,7 +633,7 @@ 468 | my_friendly_assert(!class_binding_level, 386); 469 | /* Also, resuming a non-directly nested namespace is a no-no. */ 470 | my_friendly_assert(b->level_chain == current_binding_level, 386); 471 | - current_binding_level = b; 472 | + set_current_binding_level(b); 473 | #if defined(DEBUG_CP_BINDING_LEVELS) 474 | b->binding_depth = binding_depth; 475 | indent (); 476 | @@ -2813,7 +2817,7 @@ 477 | DECL_IGNORED_P (d) = 1; 478 | 479 | TYPE_CONTEXT (type) = DECL_CONTEXT (d); 480 | - DECL_ASSEMBLER_NAME (d) = DECL_NAME (d); 481 | + SET_DECL_ASSEMBLER_NAME (d, DECL_NAME (d)); 482 | 483 | /* If this is a local class, keep track of it. We need this 484 | information for name-mangling, and so that it is possible to find 485 | @@ -2828,10 +2832,10 @@ 486 | if (!uses_template_parms (type)) 487 | { 488 | if (flag_new_abi) 489 | - DECL_ASSEMBLER_NAME (d) = mangle_type (type); 490 | + SET_DECL_ASSEMBLER_NAME (d, mangle_type (type)); 491 | else 492 | - DECL_ASSEMBLER_NAME (d) 493 | - = get_identifier (build_overload_name (type, 1, 1)); 494 | + SET_DECL_ASSEMBLER_NAME (d, 495 | + get_identifier (build_overload_name (type, 1, 1))); 496 | } 497 | } 498 | if (b->parm_flag == 2) 499 | @@ -3153,7 +3157,7 @@ 500 | will be banished. */ 501 | DECL_LANGUAGE (olddecl) = DECL_LANGUAGE (newdecl); 502 | DECL_RTL (olddecl) = DECL_RTL (newdecl); 503 | - DECL_ASSEMBLER_NAME (olddecl) = DECL_ASSEMBLER_NAME (newdecl); 504 | + SET_DECL_ASSEMBLER_NAME (olddecl, DECL_ASSEMBLER_NAME (newdecl)); 505 | SET_IDENTIFIER_GLOBAL_VALUE (DECL_ASSEMBLER_NAME (newdecl), 506 | newdecl); 507 | } 508 | @@ -3620,7 +3624,7 @@ 509 | if (! types_match) 510 | { 511 | DECL_LANGUAGE (olddecl) = DECL_LANGUAGE (newdecl); 512 | - DECL_ASSEMBLER_NAME (olddecl) = DECL_ASSEMBLER_NAME (newdecl); 513 | + SET_DECL_ASSEMBLER_NAME (olddecl, DECL_ASSEMBLER_NAME (newdecl)); 514 | DECL_RTL (olddecl) = DECL_RTL (newdecl); 515 | } 516 | if (! types_match || new_defines_function) 517 | @@ -3670,7 +3674,7 @@ 518 | TREE_ADDRESSABLE (newdecl) = TREE_ADDRESSABLE (olddecl); 519 | TREE_ASM_WRITTEN (newdecl) = TREE_ASM_WRITTEN (olddecl); 520 | DECL_COMMON (newdecl) = DECL_COMMON (olddecl); 521 | - DECL_ASSEMBLER_NAME (newdecl) = DECL_ASSEMBLER_NAME (olddecl); 522 | + SET_DECL_ASSEMBLER_NAME (newdecl, DECL_ASSEMBLER_NAME (olddecl)); 523 | 524 | if (TREE_CODE (newdecl) == FUNCTION_DECL) 525 | { 526 | @@ -4231,9 +4235,9 @@ 527 | else 528 | { 529 | b = current_binding_level; 530 | - current_binding_level = level; 531 | + set_current_binding_level(level); 532 | x = pushdecl (x); 533 | - current_binding_level = b; 534 | + set_current_binding_level(b); 535 | } 536 | current_function_decl = function_decl; 537 | return x; 538 | @@ -6327,7 +6331,7 @@ 539 | current_lang_name = lang_name_c; 540 | 541 | current_function_decl = NULL_TREE; 542 | - current_binding_level = NULL_BINDING_LEVEL; 543 | + set_current_binding_level(NULL_BINDING_LEVEL); 544 | free_binding_level = NULL_BINDING_LEVEL; 545 | 546 | build_common_tree_nodes (flag_signed_char); 547 | @@ -6671,7 +6675,7 @@ 548 | we cannot change DECL_ASSEMBLER_NAME until we have installed this 549 | function in the namespace. */ 550 | if (libname) 551 | - DECL_ASSEMBLER_NAME (decl) = get_identifier (libname); 552 | + SET_DECL_ASSEMBLER_NAME (decl, get_identifier (libname)); 553 | make_decl_rtl (decl, NULL); 554 | 555 | return decl; 556 | @@ -7514,10 +7518,10 @@ 557 | if (TREE_PUBLIC (decl)) 558 | { 559 | if (flag_new_abi) 560 | - DECL_ASSEMBLER_NAME (decl) = mangle_decl (decl); 561 | + SET_DECL_ASSEMBLER_NAME (decl, mangle_decl (decl)); 562 | else 563 | - DECL_ASSEMBLER_NAME (decl) 564 | - = build_static_name (current_function_decl, DECL_NAME (decl)); 565 | + SET_DECL_ASSEMBLER_NAME (decl, 566 | + build_static_name (current_function_decl, DECL_NAME (decl))); 567 | } 568 | else 569 | { 570 | @@ -7706,7 +7710,7 @@ 571 | 572 | /* Set the DECL_ASSEMBLER_NAME for the variable. */ 573 | if (asmspec) 574 | - DECL_ASSEMBLER_NAME (decl) = get_identifier (asmspec); 575 | + SET_DECL_ASSEMBLER_NAME (decl, get_identifier (asmspec)); 576 | 577 | /* We don't create any RTL for local variables. */ 578 | if (DECL_FUNCTION_SCOPE_P (decl) && !TREE_STATIC (decl)) 579 | @@ -8019,7 +8023,7 @@ 580 | /* This must override the asm specifier which was placed by 581 | grokclassfn. Lay this out fresh. */ 582 | DECL_RTL (TREE_TYPE (decl)) = NULL_RTX; 583 | - DECL_ASSEMBLER_NAME (decl) = get_identifier (asmspec); 584 | + SET_DECL_ASSEMBLER_NAME (decl, get_identifier (asmspec)); 585 | make_decl_rtl (decl, asmspec); 586 | } 587 | 588 | @@ -8957,10 +8961,10 @@ 589 | if (!uses_template_parms (decl)) 590 | { 591 | if (flag_new_abi) 592 | - DECL_ASSEMBLER_NAME (decl) = mangle_decl (decl); 593 | + SET_DECL_ASSEMBLER_NAME (decl, mangle_decl (decl)); 594 | else 595 | - DECL_ASSEMBLER_NAME (decl) = build_static_name (basetype, 596 | - declarator); 597 | + SET_DECL_ASSEMBLER_NAME (decl, build_static_name (basetype, 598 | + declarator)); 599 | } 600 | } 601 | else 602 | @@ -8988,10 +8992,10 @@ 603 | if (declarator && context && current_lang_name != lang_name_c) 604 | { 605 | if (flag_new_abi) 606 | - DECL_ASSEMBLER_NAME (decl) = mangle_decl (decl); 607 | + SET_DECL_ASSEMBLER_NAME (decl, mangle_decl (decl)); 608 | else 609 | - DECL_ASSEMBLER_NAME (decl) 610 | - = build_static_name (context, declarator); 611 | + SET_DECL_ASSEMBLER_NAME (decl, 612 | + build_static_name (context, declarator)); 613 | } 614 | } 615 | 616 | @@ -9860,10 +9864,10 @@ 617 | if (decl_context == NORMAL && !toplevel_bindings_p ()) 618 | { 619 | struct binding_level *b = current_binding_level; 620 | - current_binding_level = b->level_chain; 621 | + set_current_binding_level(b->level_chain); 622 | if (current_binding_level != 0 && toplevel_bindings_p ()) 623 | decl_context = PARM; 624 | - current_binding_level = b; 625 | + set_current_binding_level(b); 626 | } 627 | 628 | if (name == NULL) 629 | @@ -11027,7 +11031,7 @@ 630 | = TYPE_IDENTIFIER (type); 631 | 632 | if (flag_new_abi) 633 | - DECL_ASSEMBLER_NAME (decl) = mangle_type (type); 634 | + SET_DECL_ASSEMBLER_NAME (decl, mangle_type (type)); 635 | else 636 | { 637 | /* XXX Temporarily set the scope. 638 | @@ -11039,9 +11043,9 @@ 639 | else 640 | DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace); 641 | 642 | - DECL_ASSEMBLER_NAME (decl) = DECL_NAME (decl); 643 | - DECL_ASSEMBLER_NAME (decl) 644 | - = get_identifier (build_overload_name (type, 1, 1)); 645 | + SET_DECL_ASSEMBLER_NAME (decl, DECL_NAME (decl)); 646 | + SET_DECL_ASSEMBLER_NAME (decl, 647 | + get_identifier (build_overload_name (type, 1, 1))); 648 | DECL_CONTEXT (decl) = NULL_TREE; 649 | } 650 | 651 | @@ -13445,7 +13449,7 @@ 652 | FIXME factor out the non-RTL stuff. */ 653 | bl = current_binding_level; 654 | init_function_start (decl1, input_filename, lineno); 655 | - current_binding_level = bl; 656 | + set_current_binding_level(bl); 657 | 658 | /* Even though we're inside a function body, we still don't want to 659 | call expand_expr to calculate the size of a variable-sized array. 660 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/Make-lang.in gcc-3.0-psion-98r2-9-src/src/gcc/cp/Make-lang.in 661 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/Make-lang.in 2003-11-20 15:18:02.000000000 +0000 662 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/cp/Make-lang.in 2021-02-17 00:24:51.746832368 +0000 663 | @@ -127,9 +127,9 @@ 664 | 665 | $(srcdir)/cp/parse.h $(srcdir)/cp/parse.c: $(srcdir)/cp/parse.y 666 | @echo "Expect 33 shift/reduce conflicts and 58 reduce/reduce conflicts." 667 | - cd $(srcdir)/cp; $(BISON) $(BISONFLAGS) -d -o p$$$$.c parse.y ; \ 668 | - grep '^#define[ ]*YYEMPTY' p$$$$.c >> p$$$$.h ; \ 669 | - mv -f p$$$$.c parse.c ; mv -f p$$$$.h parse.h 670 | + cd $(srcdir)/; $(BISON) $(BISONFLAGS) -d -o cp/p$$$$.c cp/parse.y ; \ 671 | + grep '^#define[ ]*YYEMPTY' cp/p$$$$.c >> cp/p$$$$.h ; \ 672 | + mv -f cp/p$$$$.c cp/parse.c ; mv -f cp/p$$$$.h cp/parse.h 673 | 674 | # 675 | # Build hooks: 676 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/method.c gcc-3.0-psion-98r2-9-src/src/gcc/cp/method.c 677 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/method.c 2004-02-02 10:57:37.000000000 +0000 678 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/cp/method.c 2021-02-16 21:43:43.022694428 +0000 679 | @@ -1768,7 +1768,7 @@ 680 | 681 | if (flag_new_abi) 682 | { 683 | - DECL_ASSEMBLER_NAME (decl) = mangle_decl (decl); 684 | + SET_DECL_ASSEMBLER_NAME (decl, mangle_decl (decl)); 685 | return; 686 | } 687 | 688 | @@ -1785,7 +1785,7 @@ 689 | name = assignment_operator_name_info[(int) code].mangled_name; 690 | else 691 | name = operator_name_info[(int) code].mangled_name; 692 | - DECL_ASSEMBLER_NAME (decl) = get_identifier (name); 693 | + SET_DECL_ASSEMBLER_NAME (decl, get_identifier (name)); 694 | return; 695 | } 696 | } 697 | @@ -1804,11 +1804,11 @@ 698 | || TREE_CODE (TREE_TYPE (decl)) != FUNCTION_TYPE, 699 | 0); 700 | 701 | - DECL_ASSEMBLER_NAME (decl) 702 | - = build_decl_overload_real (decl, parm_types, NULL_TREE, 703 | + SET_DECL_ASSEMBLER_NAME (decl, 704 | + build_decl_overload_real (decl, parm_types, NULL_TREE, 705 | NULL_TREE, NULL_TREE, 706 | DECL_FUNCTION_MEMBER_P (decl) 707 | - + DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl)); 708 | + + DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl))); 709 | } 710 | 711 | /* Build an overload name for the type expression TYPE. */ 712 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/pt.c gcc-3.0-psion-98r2-9-src/src/gcc/cp/pt.c 713 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/pt.c 2003-11-12 11:48:44.000000000 +0000 714 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/cp/pt.c 2021-02-16 21:36:13.397922710 +0000 715 | @@ -4214,14 +4214,14 @@ 716 | is set up. */ 717 | if (TREE_CODE (t) != ENUMERAL_TYPE) 718 | DECL_NAME (type_decl) = classtype_mangled_name (t); 719 | - DECL_ASSEMBLER_NAME (type_decl) = DECL_NAME (type_decl); 720 | + SET_DECL_ASSEMBLER_NAME (type_decl, DECL_NAME (type_decl)); 721 | if (!is_partial_instantiation) 722 | { 723 | if (flag_new_abi) 724 | - DECL_ASSEMBLER_NAME (type_decl) = mangle_decl (type_decl); 725 | + SET_DECL_ASSEMBLER_NAME (type_decl, mangle_decl (type_decl)); 726 | else 727 | - DECL_ASSEMBLER_NAME (type_decl) 728 | - = get_identifier (build_overload_name (t, 1, 1)); 729 | + SET_DECL_ASSEMBLER_NAME (type_decl, 730 | + get_identifier (build_overload_name (t, 1, 1))); 731 | 732 | /* For backwards compatibility; code that uses 733 | -fexternal-templates expects looking up a template to 734 | @@ -5858,7 +5858,7 @@ 735 | if (flag_new_abi) 736 | set_mangled_name_for_decl (r); 737 | else 738 | - DECL_ASSEMBLER_NAME (r) = build_destructor_name (ctx); 739 | + SET_DECL_ASSEMBLER_NAME (r, build_destructor_name (ctx)); 740 | } 741 | else 742 | { 743 | @@ -9752,7 +9752,7 @@ 744 | functions, this is not so. See tsubst_friend_function for 745 | details. */ 746 | DECL_TI_TEMPLATE (new_decl) = DECL_TI_TEMPLATE (decl); 747 | - DECL_ASSEMBLER_NAME (new_decl) = DECL_ASSEMBLER_NAME (decl); 748 | + SET_DECL_ASSEMBLER_NAME (new_decl, DECL_ASSEMBLER_NAME (decl)); 749 | DECL_RTL (new_decl) = DECL_RTL (decl); 750 | DECL_USE_TEMPLATE (new_decl) = DECL_USE_TEMPLATE (decl); 751 | 752 | @@ -10369,11 +10369,11 @@ 753 | 0); 754 | 755 | /* Actually set the DECL_ASSEMBLER_NAME. */ 756 | - DECL_ASSEMBLER_NAME (decl) 757 | - = build_decl_overload_real (decl, parm_types, ret_type, 758 | + SET_DECL_ASSEMBLER_NAME (decl, 759 | + build_decl_overload_real (decl, parm_types, ret_type, 760 | tparms, targs, 761 | DECL_FUNCTION_MEMBER_P (decl) 762 | - + DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl)); 763 | + + DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl))); 764 | } 765 | 766 | /* Return truthvalue if we're processing a template different from 767 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/rtti.c gcc-3.0-psion-98r2-9-src/src/gcc/cp/rtti.c 768 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/rtti.c 2003-11-12 11:48:44.000000000 +0000 769 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/cp/rtti.c 2021-02-16 21:40:49.294405642 +0000 770 | @@ -446,7 +446,7 @@ 771 | TREE_PUBLIC (d) = 1; 772 | if (flag_weak || !typeinfo_in_lib_p (d)) 773 | comdat_linkage (d); 774 | - DECL_ASSEMBLER_NAME (d) = DECL_NAME (d); 775 | + SET_DECL_ASSEMBLER_NAME (d, DECL_NAME (d)); 776 | cp_finish_decl (d, NULL_TREE, NULL_TREE, 0); 777 | 778 | pushdecl_top_level (d); 779 | @@ -1343,10 +1343,10 @@ 780 | if (flag_new_abi) 781 | /* The new ABI specifies the external name of the string 782 | containing the type's name. */ 783 | - DECL_ASSEMBLER_NAME (name_decl) 784 | - = mangle_typeinfo_string_for_type (target); 785 | + SET_DECL_ASSEMBLER_NAME (name_decl, 786 | + mangle_typeinfo_string_for_type (target)); 787 | else 788 | - DECL_ASSEMBLER_NAME (name_decl) = DECL_NAME (name_decl); 789 | + SET_DECL_ASSEMBLER_NAME (name_decl, DECL_NAME (name_decl)); 790 | DECL_INITIAL (name_decl) = name_string; 791 | cp_finish_decl (name_decl, name_string, NULL_TREE, 0); 792 | pushdecl_top_level (name_decl); 793 | @@ -1753,7 +1753,7 @@ 794 | if (flag_weak || !typeinfo_in_lib_p (target_type)) 795 | comdat_linkage (decl); 796 | } 797 | - DECL_ASSEMBLER_NAME (decl) = name; 798 | + SET_DECL_ASSEMBLER_NAME (decl, name); 799 | DECL_INITIAL (decl) = init; 800 | cp_finish_decl (decl, init, NULL_TREE, 0); 801 | pushdecl_top_level (decl); 802 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/semantics.c gcc-3.0-psion-98r2-9-src/src/gcc/cp/semantics.c 803 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/semantics.c 2003-11-12 11:48:44.000000000 +0000 804 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/cp/semantics.c 2021-02-16 21:44:10.882739938 +0000 805 | @@ -1024,7 +1024,7 @@ 806 | if (DECL_NAME (decl) == NULL_TREE) 807 | { 808 | DECL_NAME (decl) = return_id; 809 | - DECL_ASSEMBLER_NAME (decl) = return_id; 810 | + SET_DECL_ASSEMBLER_NAME (decl, return_id); 811 | } 812 | else 813 | { 814 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/tree.c gcc-3.0-psion-98r2-9-src/src/gcc/cp/tree.c 815 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/tree.c 2003-11-12 11:48:44.000000000 +0000 816 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/cp/tree.c 2021-02-16 21:42:18.686555397 +0000 817 | @@ -1368,8 +1368,11 @@ 818 | break; 819 | 820 | case RECORD_TYPE: 821 | - if (TYPE_PTRMEMFUNC_P (*tp)) 822 | - WALK_SUBTREE (TYPE_PTRMEMFUNC_FN_TYPE (*tp)); 823 | + if (TYPE_PTRMEMFUNC_P (*tp)) 824 | + { 825 | + tree tr = TYPE_PTRMEMFUNC_FN_TYPE (*tp); 826 | + WALK_SUBTREE(tr); 827 | + } 828 | break; 829 | 830 | default: 831 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/gcc.c gcc-3.0-psion-98r2-9-src/src/gcc/gcc.c 832 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/gcc.c 2004-07-06 12:14:10.000000000 +0100 833 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/gcc.c 2021-02-16 20:45:03.506534921 +0000 834 | @@ -1176,8 +1176,8 @@ 835 | static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; 836 | static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; 837 | static const char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; 838 | -static const char *standard_startfile_prefix_1 = "/lib/"; 839 | -static const char *standard_startfile_prefix_2 = "/usr/lib/"; 840 | +static const char *standard_startfile_prefix_1 = "/lib32/"; 841 | +static const char *standard_startfile_prefix_2 = "/usr/lib32/"; 842 | 843 | static const char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX; 844 | static const char *tooldir_prefix; 845 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/tree.h gcc-3.0-psion-98r2-9-src/src/gcc/tree.h 846 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/tree.h 2003-12-04 15:10:07.000000000 +0000 847 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/tree.h 2021-02-16 21:45:12.978840703 +0000 848 | @@ -1381,6 +1381,7 @@ 849 | 850 | This value can be evaluated lazily for functions, variables with 851 | static storage duration, and labels. */ 852 | + 853 | #define DECL_RTL(NODE) \ 854 | (DECL_CHECK (NODE)->decl.rtl \ 855 | ? (NODE)->decl.rtl \ 856 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/Makefile.in gcc-3.0-psion-98r2-9-src/src/Makefile.in 857 | --- gcc-3.0-psion-98r2-9-src-orig/src/Makefile.in 2003-10-14 15:33:37.000000000 +0100 858 | +++ gcc-3.0-psion-98r2-9-src/src/Makefile.in 2021-02-16 20:49:30.438536138 +0000 859 | @@ -83,17 +83,18 @@ 860 | 861 | # These flag values are normally overridden by the configure script. 862 | CFLAGS = -g 863 | +CFLAGS_FOR_HOST = $(CFLAGS) -m32 864 | CXXFLAGS = -g -O2 865 | 866 | LDFLAGS = 867 | -LIBCFLAGS = $(CFLAGS) 868 | +LIBCFLAGS = $(CFLAGS_FOR_HOST) 869 | CFLAGS_FOR_TARGET = $(CFLAGS) 870 | LDFLAGS_FOR_TARGET = 871 | LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) 872 | PICFLAG = 873 | PICFLAG_FOR_TARGET = 874 | 875 | -CHILLFLAGS = $(CFLAGS) 876 | +CHILLFLAGS = $(CFLAGS_FOR_HOST) 877 | CHILL_LIB = -lchill 878 | CXX = c++ 879 | 880 | @@ -336,7 +337,7 @@ 881 | "BISON=$(BISON)" \ 882 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ 883 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ 884 | - "CFLAGS=$(CFLAGS)" \ 885 | + "CFLAGS=$(CFLAGS_FOR_HOST)" \ 886 | "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ 887 | "CHILLFLAGS=$(CHILLFLAGS)" \ 888 | "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ 889 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/tcl/unix/configure gcc-3.0-psion-98r2-9-src/src/tcl/unix/configure 890 | --- gcc-3.0-psion-98r2-9-src-orig/src/tcl/unix/configure 2003-10-14 15:34:06.000000000 +0100 891 | +++ gcc-3.0-psion-98r2-9-src/src/tcl/unix/configure 2021-02-16 21:05:50.962540270 +0000 892 | @@ -4170,9 +4170,9 @@ 893 | # Special check for weird MP-RAS system (uname returns weird 894 | # results, and the version is kept in special file). 895 | 896 | - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then 897 | - system=MP-RAS-`awk '{print $3}' /etc/.relid'` 898 | - fi 899 | +# if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then 900 | +# system=MP-RAS-`awk '{print $3}' /etc/.relid'` 901 | +# fi 902 | if test "`uname -s`" = "AIX" ; then 903 | system=AIX-`uname -v`.`uname -r` 904 | fi 905 | @@ -5072,9 +5072,9 @@ 906 | # Special check for weird MP-RAS system (uname returns weird 907 | # results, and the version is kept in special file). 908 | 909 | - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then 910 | - system=MP-RAS-`awk '{print $3}' /etc/.relid'` 911 | - fi 912 | +# if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then 913 | +# system=MP-RAS-`awk '{print $3}' /etc/.relid'` 914 | +# fi 915 | if test "`uname -s`" = "AIX" ; then 916 | system=AIX-`uname -v`.`uname -r` 917 | fi 918 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/Makefile.in gcc-3.0-psion-98r2-9-src/src/gcc/Makefile.in 919 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/Makefile.in 2003-10-14 15:33:45.000000000 +0100 920 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/Makefile.in 2021-02-20 23:50:47.203068962 +0000 921 | @@ -74,7 +74,7 @@ 922 | # TCFLAGS is used for compilations with the GCC just built. 923 | XCFLAGS = 924 | TCFLAGS = 925 | -CFLAGS = -g 926 | +CFLAGS = -g -m32 927 | STAGE1_CFLAGS = -g @stage1_cflags@ 928 | BOOT_CFLAGS = -g -O2 929 | 930 | @@ -523,7 +523,7 @@ 931 | # similar change is needed in build-make. 932 | HOST_CFLAGS=$(ALL_CFLAGS) -DGENERATOR_FILE 933 | HOST_CLIB=$(CLIB) 934 | -HOST_LDFLAGS=$(LDFLAGS) 935 | +HOST_LDFLAGS=$(LDFLAGS) -m32 936 | HOST_CPPFLAGS=$(ALL_CPPFLAGS) 937 | HOST_ALLOCA=$(ALLOCA) 938 | HOST_MALLOC=$(MALLOC) 939 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/bfd/Makefile.in gcc-3.0-psion-98r2-9-src/src/bfd/Makefile.in 940 | --- gcc-3.0-psion-98r2-9-src-orig/src/bfd/Makefile.in 2003-10-14 15:33:37.000000000 +0100 941 | +++ gcc-3.0-psion-98r2-9-src/src/bfd/Makefile.in 2021-02-21 00:02:19.563268581 +0000 942 | @@ -564,7 +564,7 @@ 943 | corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo \ 944 | syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo \ 945 | ihex.lo stabs.lo stab-syms.lo 946 | -CFLAGS = @CFLAGS@ 947 | +CFLAGS = @CFLAGS@ -m32 948 | COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 949 | LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 950 | LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ 951 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/libiberty/Makefile.in gcc-3.0-psion-98r2-9-src/src/libiberty/Makefile.in 952 | --- gcc-3.0-psion-98r2-9-src-orig/src/libiberty/Makefile.in 2003-10-14 15:34:13.000000000 +0100 953 | +++ gcc-3.0-psion-98r2-9-src/src/libiberty/Makefile.in 2021-02-21 00:07:29.260110290 +0000 954 | @@ -53,7 +53,7 @@ 955 | AR_FLAGS = rc 956 | 957 | CC = @CC@ 958 | -CFLAGS = @CFLAGS@ 959 | +CFLAGS = @CFLAGS@ -m32 960 | LIBCFLAGS = $(CFLAGS) 961 | RANLIB = @RANLIB@ 962 | 963 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/opcodes/Makefile.in gcc-3.0-psion-98r2-9-src/src/opcodes/Makefile.in 964 | --- gcc-3.0-psion-98r2-9-src-orig/src/opcodes/Makefile.in 2003-10-14 15:34:01.000000000 +0100 965 | +++ gcc-3.0-psion-98r2-9-src/src/opcodes/Makefile.in 2021-02-21 00:09:28.133827345 +0000 966 | @@ -250,7 +250,7 @@ 967 | LTLIBRARIES = $(lib_LTLIBRARIES) 968 | 969 | libopcodes_la_OBJECTS = dis-buf.lo disassemble.lo 970 | -CFLAGS = @CFLAGS@ 971 | +CFLAGS = @CFLAGS@ -m32 972 | COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 973 | LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 974 | LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ 975 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/byacc/Makefile.in gcc-3.0-psion-98r2-9-src/src/byacc/Makefile.in 976 | --- gcc-3.0-psion-98r2-9-src-orig/src/byacc/Makefile.in 2003-10-14 15:33:38.000000000 +0100 977 | +++ gcc-3.0-psion-98r2-9-src/src/byacc/Makefile.in 2021-02-21 00:12:48.548205549 +0000 978 | @@ -36,7 +36,7 @@ 979 | 980 | HDRS = defs.h 981 | 982 | -CFLAGS = -g 983 | +CFLAGS = -g -m32 984 | 985 | MORE_CFLAGS = -DNDEBUG @DEFS@ 986 | 987 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/flex/Makefile.in gcc-3.0-psion-98r2-9-src/src/flex/Makefile.in 988 | --- gcc-3.0-psion-98r2-9-src-orig/src/flex/Makefile.in 2003-10-14 15:33:41.000000000 +0100 989 | +++ gcc-3.0-psion-98r2-9-src/src/flex/Makefile.in 2021-02-21 00:14:32.761247791 +0000 990 | @@ -14,7 +14,7 @@ 991 | # For MS-DOS, add "-DMS_DOS" to DEFS. See the directory MISC/MSDOS for 992 | # additional info. 993 | 994 | -CFLAGS = @CFLAGS@ 995 | +CFLAGS = @CFLAGS@ -m32 996 | CPPFLAGS = @CPPFLAGS@ 997 | DEFS = @DEFS@ 998 | LDFLAGS = 999 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/intl/Makefile.in gcc-3.0-psion-98r2-9-src/src/intl/Makefile.in 1000 | --- gcc-3.0-psion-98r2-9-src-orig/src/intl/Makefile.in 2003-10-14 15:33:54.000000000 +0100 1001 | +++ gcc-3.0-psion-98r2-9-src/src/intl/Makefile.in 2021-02-21 00:16:16.402183608 +0000 1002 | @@ -51,8 +51,8 @@ 1003 | DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ 1004 | -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ 1005 | CPPFLAGS = @CPPFLAGS@ 1006 | -CFLAGS = @CFLAGS@ 1007 | -LDFLAGS = @LDFLAGS@ 1008 | +CFLAGS = @CFLAGS@ -m32 1009 | +LDFLAGS = @LDFLAGS@ -m32 1010 | 1011 | COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) 1012 | 1013 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/binutils/Makefile.in gcc-3.0-psion-98r2-9-src/src/binutils/Makefile.in 1014 | --- gcc-3.0-psion-98r2-9-src-orig/src/binutils/Makefile.in 2003-10-14 15:33:37.000000000 +0100 1015 | +++ gcc-3.0-psion-98r2-9-src/src/binutils/Makefile.in 2021-02-21 00:18:27.735253742 +0000 1016 | @@ -343,7 +343,7 @@ 1017 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ 1018 | LEXLIB = @LEXLIB@ 1019 | YLWRAP = $(top_srcdir)/../ylwrap 1020 | -CFLAGS = @CFLAGS@ 1021 | +CFLAGS = @CFLAGS@ -m32 1022 | COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 1023 | LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 1024 | LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ 1025 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gas/Makefile.in gcc-3.0-psion-98r2-9-src/src/gas/Makefile.in 1026 | --- gcc-3.0-psion-98r2-9-src-orig/src/gas/Makefile.in 2003-10-14 15:33:41.000000000 +0100 1027 | +++ gcc-3.0-psion-98r2-9-src/src/gas/Makefile.in 2021-02-21 00:20:29.896157034 +0000 1028 | @@ -1285,7 +1285,7 @@ 1029 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ 1030 | LEXLIB = @LEXLIB@ 1031 | YLWRAP = $(top_srcdir)/../ylwrap 1032 | -CFLAGS = @CFLAGS@ 1033 | +CFLAGS = @CFLAGS@ -m32 1034 | COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 1035 | LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 1036 | LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ 1037 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/ld/Makefile.in gcc-3.0-psion-98r2-9-src/src/ld/Makefile.in 1038 | --- gcc-3.0-psion-98r2-9-src-orig/src/ld/Makefile.in 2003-10-14 15:33:54.000000000 +0100 1039 | +++ gcc-3.0-psion-98r2-9-src/src/ld/Makefile.in 2021-02-21 00:22:28.824969604 +0000 1040 | @@ -246,7 +246,7 @@ 1041 | ld_new_LDFLAGS = 1042 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ 1043 | LEXLIB = @LEXLIB@ 1044 | -CFLAGS = @CFLAGS@ 1045 | +CFLAGS = @CFLAGS@ -m32 1046 | COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 1047 | LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 1048 | LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ 1049 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/bison/Makefile.in gcc-3.0-psion-98r2-9-src/src/bison/Makefile.in 1050 | --- gcc-3.0-psion-98r2-9-src-orig/src/bison/Makefile.in 2003-10-14 15:33:38.000000000 +0100 1051 | +++ gcc-3.0-psion-98r2-9-src/src/bison/Makefile.in 2021-02-21 00:31:07.344028015 +0000 1052 | @@ -38,7 +38,7 @@ 1053 | # -DHAVE_STRERROR If you have strerror function. 1054 | DEFS = @DEFS@ 1055 | 1056 | -CFLAGS = -g 1057 | +CFLAGS = -g -m32 1058 | LDFLAGS = 1059 | 1060 | LIBS = @LIBS@ 1061 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/c-lex.c gcc-3.0-psion-98r2-9-src/src/gcc/c-lex.c 1062 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/c-lex.c 2003-11-12 13:24:50.000000000 +0000 1063 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/c-lex.c 2021-06-14 00:05:53.028994576 +0100 1064 | @@ -73,7 +73,7 @@ 1065 | #define WCHAR_BYTES (WCHAR_TYPE_SIZE / BITS_PER_UNIT) 1066 | 1067 | int indent_level; /* Number of { minus number of }. */ 1068 | -int pending_lang_change; /* If we need to switch languages - C++ only */ 1069 | +static int pending_lang_change; /* If we need to switch languages - C++ only */ 1070 | int c_header_level; /* depth in C headers - C++ only */ 1071 | 1072 | /* Nonzero tells yylex to ignore \ in string constants. */ 1073 | diff -Naur gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/method.c gcc-3.0-psion-98r2-9-src/src/gcc/cp/method.c 1074 | --- gcc-3.0-psion-98r2-9-src-orig/src/gcc/cp/method.c 2021-06-14 00:11:02.369047710 +0100 1075 | +++ gcc-3.0-psion-98r2-9-src/src/gcc/cp/method.c 2021-06-14 00:05:14.824986856 +0100 1076 | @@ -56,7 +56,7 @@ 1077 | 1078 | /* TREE_LIST of the current inline functions that need to be 1079 | processed. */ 1080 | -struct pending_inline *pending_inlines; 1081 | +static struct pending_inline *pending_inlines; 1082 | 1083 | #define obstack_chunk_alloc xmalloc 1084 | #define obstack_chunk_free free 1085 | -------------------------------------------------------------------------------- /install/gcc-3.0-psion-98r2-9-src.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/static-void/psion_cpp_sdk_linux/7763ee8229c65eb8dde49894eb3047622da031d7/install/gcc-3.0-psion-98r2-9-src.tar.gz -------------------------------------------------------------------------------- /install/gnupoc.er5.patch.011-patch: -------------------------------------------------------------------------------- 1 | diff -Naur epoc_cpp_sdk/epoc32/tools/aiftool cpp/epoc32/tools/aiftool 2 | --- epoc_cpp_sdk/epoc32/tools/aiftool 2021-02-21 02:43:56.938833548 +0000 3 | +++ cpp/epoc32/tools/aiftool 2021-02-21 02:40:29.033744801 +0000 4 | @@ -51,7 +51,7 @@ 5 | # 6 | echo Compiling resource file 7 | arm-pe-cpp -I. -I../inc -I../../epoc32/include < $1.rss > $1.rpp 8 | -wine -- $EPOCROOT/epoc32/tools/rcomp.exe -oaif.rsc -h$1.rs~ -i$1.rss -s$1.rpp 9 | +wine $EPOCROOT/epoc32/tools/rcomp.exe -oaif.rsc -h$1.rs~ -i$1.rss -s$1.rpp 10 | cp aif.rsc $TMPDIR/aif.rsc 11 | rm -f $1.rs~ 12 | rm -f $1.rpp 13 | @@ -68,7 +68,7 @@ 14 | # run Aiftool 15 | # 16 | echo Running AIF writer 17 | -wine -- $EPOCROOT/epoc32/release/winc/deb/aiftool.exe E:\\ 18 | +wine $EPOCROOT/epoc32/release/winc/deb/aiftool.exe E:\\ 19 | cp $TMPDIR/out.aif $1.aif 20 | 21 | # 22 | diff -Naur epoc_cpp_sdk/epoc32/tools/bmconv cpp/epoc32/tools/bmconv 23 | --- epoc_cpp_sdk/epoc32/tools/bmconv 2021-02-21 02:43:56.938833548 +0000 24 | +++ cpp/epoc32/tools/bmconv 2021-02-21 02:43:00.410542004 +0000 25 | @@ -2,4 +2,4 @@ 26 | # 27 | # WINE frontend - part of GnuPoc 28 | # 29 | -wine -- $EPOCROOT/epoc32/tools/bmconv.exe "$@" 30 | +wine $EPOCROOT/epoc32/tools/bmconv.exe "$@" 31 | diff -Naur epoc_cpp_sdk/epoc32/tools/cjpeg cpp/epoc32/tools/cjpeg 32 | --- epoc_cpp_sdk/epoc32/tools/cjpeg 2021-02-21 02:43:56.938833548 +0000 33 | +++ cpp/epoc32/tools/cjpeg 2021-02-21 02:43:11.194597854 +0000 34 | @@ -2,4 +2,4 @@ 35 | # 36 | # WINE frontend - part of GnuPoc 37 | # 38 | -wine -- CJPEG.EXE "$@" 39 | +wine CJPEG.EXE "$@" 40 | diff -Naur epoc_cpp_sdk/epoc32/tools/cl_arm.pm cpp/epoc32/tools/cl_arm.pm 41 | --- epoc_cpp_sdk/epoc32/tools/cl_arm.pm 2021-02-21 02:43:56.942833569 +0000 42 | +++ cpp/epoc32/tools/cl_arm.pm 2021-02-21 02:41:09.693961557 +0000 43 | @@ -173,7 +173,7 @@ 44 | # 45 | 46 | # "GCCFLAGS= -B/usr/local/er5/lib/gcc-lib/arm-pe/cygnus-2.7.2-960323/ -c -nostdinc -Wno-ctor-dtor-privacy -mcpu-arm710 -mapcs-32 \\\n", 47 | - "GCCFLAGS= -c -nostdinc -Wno-ctor-dtor-privacy -mcpu-arm710 -mapcs-32 \\\n", 48 | + "GCCFLAGS= -c -nostdinc -Wno-ctor-dtor-privacy -mcpu=arm710 -mapcs-32 \\\n", 49 | "\t\t-mshort-load-bytes -msoft-float -O2 -fcheck-new -fvtable-thunks\n", 50 | "\n" 51 | ); 52 | @@ -650,7 +650,7 @@ 53 | } 54 | 55 | &main::Output( 56 | - "\twine -- \$(EPOCROOT)/epoc32/tools/petran.exe \$(EPOCBLD",$Bld,")\/",$Trg," \$\@ \\\n", 57 | + "\twine \$(EPOCROOT)/epoc32/tools/petran.exe \$(EPOCBLD",$Bld,")\/",$Trg," \$\@ \\\n", 58 | "\t\t" 59 | ); 60 | if (&main::AllowDllData) { 61 | @@ -861,7 +861,8 @@ 62 | } 63 | &main::Output( 64 | " < $RTWSubPrj",$Resrc," > ",$BaseResrc,".rpp\n", 65 | - "\twine -- \$(EPOCROOT)/epoc32/tools/rcomp.exe" 66 | + "\tsed -i '/# [0-9]\\+ .\\+/d' ",$BaseResrc,".rpp\n", 67 | + "\twine \$(EPOCROOT)/epoc32/tools/rcomp.exe" 68 | ); 69 | if ($Bld=~/^U/o) { 70 | &main::Output( 71 | diff -Naur epoc_cpp_sdk/epoc32/tools/cl_lin.pm cpp/epoc32/tools/cl_lin.pm 72 | --- epoc_cpp_sdk/epoc32/tools/cl_lin.pm 2021-02-21 02:43:56.942833569 +0000 73 | +++ cpp/epoc32/tools/cl_lin.pm 2021-02-21 02:42:17.854320461 +0000 74 | @@ -844,7 +844,7 @@ 75 | } 76 | &main::Output( 77 | " < $RTWSubPrj",$Resrc," > ",$BaseResrc,".rpp\n", 78 | - "\twine -- RCOMP.EXE" 79 | + "\twine RCOMP.EXE" 80 | # " < \"\$(SUBPRJ)\/",$Resrc,"\" > \"\$(SUBPRJ)\/",$BaseResrc,".rpp\"\n", 81 | # "\trcomp" 82 | ); 83 | diff -Naur epoc_cpp_sdk/epoc32/tools/cl_win.pm cpp/epoc32/tools/cl_win.pm 84 | --- epoc_cpp_sdk/epoc32/tools/cl_win.pm 2021-02-21 02:43:56.942833569 +0000 85 | +++ cpp/epoc32/tools/cl_win.pm 2021-02-21 02:39:36.393460916 +0000 86 | @@ -203,7 +203,7 @@ 87 | ); 88 | 89 | &main::Output( 90 | - "CLWINE = wine -- CL.EXE\n", 91 | + "CLWINE = wine CL.EXE\n", 92 | "\n" 93 | ); 94 | 95 | @@ -483,7 +483,7 @@ 96 | "\n", 97 | "\n", 98 | "\$(EPOCTRG",$Bld,")\/",$BaseTrg,".bsc: \$(BSC32_SBRS)\n", 99 | - "\twine -- BSCMAKE.EXE \n", 100 | + "\twine BSCMAKE.EXE \n", 101 | "\t/nologo /o\$\@ \$(BSC32_SBRS)\n", 102 | "\n", 103 | "\n" 104 | @@ -589,7 +589,7 @@ 105 | } 106 | &main::Output( 107 | " \$(LINK_OBJS_",$Bld,") \n", 108 | - "\twine -- LINK.EXE -lib\n", 109 | + "\twine LINK.EXE -lib\n", 110 | "\t\t\$(LINK_FLAGS_",$Bld,") \$(LINK_OBJS_",$Bld,")_WIN\n", 111 | "\n" 112 | ); 113 | @@ -756,13 +756,13 @@ 114 | if ($GenTrgType=~/^DLL$/o) { 115 | 116 | &main::Output( 117 | - "\twine -- LINK.EXE ", 118 | + "\twine LINK.EXE ", 119 | "\$(STAGE1_LINK_FLAGS_",$Bld,") \$(LINK_OBJS_",$Bld,"_WIN)\n", 120 | # "\n" 121 | ); 122 | 123 | &main::Output( 124 | - "\twine -- DEFMAKE.EXE" # using WINE emulator 125 | + "\twine DEFMAKE.EXE" # using WINE emulator 126 | ); 127 | if ($DefFile) { 128 | &main::Output( 129 | @@ -796,12 +796,12 @@ 130 | 131 | # create the lib file from the deffile 132 | &main::Output( 133 | - "\twine -- LIB.EXE \$(LIB_FLAGS_",$Bld,")\n" 134 | + "\twine LIB.EXE \$(LIB_FLAGS_",$Bld,")\n" 135 | ); 136 | } 137 | 138 | &main::Output( 139 | - "\twine -- LINK.EXE ", 140 | + "\twine LINK.EXE ", 141 | "\$(LINK_FLAGS_",$Bld,") \$(LINK_OBJS_",$Bld,"_WIN)\n", 142 | "\n" 143 | ); 144 | @@ -1006,7 +1006,7 @@ 145 | } 146 | &main::Output( 147 | " < $RTWSubPrj",$Resrc," > $RTWSubPrj",$BaseResrc,".rpp \n", 148 | - "\twine -- \$(EPOCROOT)/epoc32/tools/rcomp.exe" 149 | + "\twine \$(EPOCROOT)/epoc32/tools/rcomp.exe" 150 | ); 151 | if ($Bld=~/^U/o) { 152 | &main::Output( 153 | @@ -1018,7 +1018,7 @@ 154 | "\t-\$(ERASE) $RTWSubPrj",$BaseResrc,".rpp \n", 155 | # "\tcall << MayRewriteHdr.bat \n", 156 | # "\t\@echo off\n", 157 | -# "\twine -- FC4BAT.EXE $RTWSubPrj",$BaseResrc,".rs~ ",$ResrcHdr," \n", 158 | +# "\twine FC4BAT.EXE $RTWSubPrj",$BaseResrc,".rs~ ",$ResrcHdr," \n", 159 | "\tmv -f $RTWSubPrj",$BaseResrc,".rs~ ",$ResrcHdr," \n", 160 | # "\tif errorlevel==1 copy $RTWSubPrj",$BaseResrc,".rs~ ",$ResrcHdr," \n", 161 | # "<<\n", 162 | diff -Naur epoc_cpp_sdk/epoc32/tools/defmake cpp/epoc32/tools/defmake 163 | --- epoc_cpp_sdk/epoc32/tools/defmake 2021-02-21 02:43:56.942833569 +0000 164 | +++ cpp/epoc32/tools/defmake 2021-02-21 02:42:44.902461483 +0000 165 | @@ -2,4 +2,4 @@ 166 | # 167 | # WINE frontend - part of GnuPoc 168 | # 169 | -wine -- DEFMAKE.EXE "$@" 170 | +wine DEFMAKE.EXE "$@" 171 | diff -Naur epoc_cpp_sdk/epoc32/tools/deftool cpp/epoc32/tools/deftool 172 | --- epoc_cpp_sdk/epoc32/tools/deftool 2021-02-21 02:43:56.942833569 +0000 173 | +++ cpp/epoc32/tools/deftool 2021-02-21 02:41:37.806110228 +0000 174 | @@ -2,4 +2,4 @@ 175 | # 176 | # WINE frontend - part of GnuPoc 177 | # 178 | -wine -- DEFTOOL.EXE "$@" 179 | +wine DEFTOOL.EXE "$@" 180 | diff -Naur epoc_cpp_sdk/epoc32/tools/eikrs cpp/epoc32/tools/eikrs 181 | --- epoc_cpp_sdk/epoc32/tools/eikrs 2021-02-21 02:43:56.946833589 +0000 182 | +++ cpp/epoc32/tools/eikrs 2021-02-21 02:42:35.130410621 +0000 183 | @@ -23,11 +23,11 @@ 184 | # 185 | # some aliases 186 | # 187 | -RCOMP="wine -- $EPOCROOT/epoc32/tools/rcomp.exe" 188 | +RCOMP="wine $EPOCROOT/epoc32/tools/rcomp.exe" 189 | RM='rm -f' 190 | RSS=rss 191 | CPP=arm-pe-cpp 192 | -FC4BAT="wine -- $EPOCROOT/epoc32/tools/fc4bat.exe" 193 | +FC4BAT="wine $EPOCROOT/epoc32/tools/fc4bat.exe" 194 | 195 | 196 | testrscdir() 197 | diff -Naur epoc_cpp_sdk/epoc32/tools/fc4bat cpp/epoc32/tools/fc4bat 198 | --- epoc_cpp_sdk/epoc32/tools/fc4bat 2021-02-21 02:43:56.946833589 +0000 199 | +++ cpp/epoc32/tools/fc4bat 2021-02-21 02:42:51.398495242 +0000 200 | @@ -2,4 +2,4 @@ 201 | # 202 | # WINE frontend - part of GnuPoc 203 | # 204 | -wine -- FC4BAT.EXE "$@" 205 | +wine FC4BAT.EXE "$@" 206 | diff -Naur epoc_cpp_sdk/epoc32/tools/fnttran cpp/epoc32/tools/fnttran 207 | --- epoc_cpp_sdk/epoc32/tools/fnttran 2021-02-21 02:43:56.946833589 +0000 208 | +++ cpp/epoc32/tools/fnttran 2021-02-21 02:40:02.481602089 +0000 209 | @@ -2,4 +2,4 @@ 210 | # 211 | # WINE frontend - part of GnuPoc 212 | # 213 | -wine -- FNTTRAN.EXE "$@" 214 | +wine FNTTRAN.EXE "$@" 215 | diff -Naur epoc_cpp_sdk/epoc32/tools/fontcomp cpp/epoc32/tools/fontcomp 216 | --- epoc_cpp_sdk/epoc32/tools/fontcomp 2021-02-21 02:43:56.946833589 +0000 217 | +++ cpp/epoc32/tools/fontcomp 2021-02-21 02:40:38.021792898 +0000 218 | @@ -2,4 +2,4 @@ 219 | # 220 | # WINE frontend - part of GnuPoc 221 | # 222 | -wine -- FONTCOMP.EXE "$@" 223 | +wine FONTCOMP.EXE "$@" 224 | diff -Naur epoc_cpp_sdk/epoc32/tools/makesis cpp/epoc32/tools/makesis 225 | --- epoc_cpp_sdk/epoc32/tools/makesis 2021-02-21 02:43:56.946833589 +0000 226 | +++ cpp/epoc32/tools/makesis 2021-02-21 02:40:56.165889672 +0000 227 | @@ -2,4 +2,4 @@ 228 | # 229 | # WINE frontend - part of GnuPoc 230 | # 231 | -wine -- $EPOCROOT/epoc32/tools/makesis.exe "$@" 232 | +wine $EPOCROOT/epoc32/tools/makesis.exe "$@" 233 | diff -Naur epoc_cpp_sdk/epoc32/tools/makmake.pl cpp/epoc32/tools/makmake.pl 234 | --- epoc_cpp_sdk/epoc32/tools/makmake.pl 2021-02-21 02:43:56.950833610 +0000 235 | +++ cpp/epoc32/tools/makmake.pl 2021-02-21 01:33:13.173444099 +0000 236 | @@ -257,7 +257,7 @@ 237 | foreach $LoopBld (@BldList) { 238 | $CurBld=$LoopBld; 239 | @{$MacroHash{$CurBld}}=&PMGetBldMacroList; 240 | - @{$MacroHash{$CurBld}}=() if not defined @{$MacroHash{$CurBld}}; 241 | + @{$MacroHash{$CurBld}}=() if not @{$MacroHash{$CurBld}}; 242 | next unless ($MmpFlag{NoStrictDef} || (not defined $DefBaseExtHash{$CurBld})); 243 | $DefBaseExtHash{$CurBld}=''; 244 | } 245 | @@ -640,9 +640,9 @@ 246 | } 247 | @{$SubPrjHash{$SubPrj}}=(); 248 | push @{$SrcHash{$SubPrj}}, &Path_Split('File',$SRCFILE); 249 | - @{$DocHash{$SubPrj}}=() unless defined @{$DocHash{$SubPrj}}; 250 | - @{$ResrcHash{$SubPrj}}=() unless defined @{$ResrcHash{$SubPrj}}; 251 | - @{$SysResrcHash{$SubPrj}}=() unless defined @{$SysResrcHash{$SubPrj}}; 252 | + @{$DocHash{$SubPrj}}=() unless @{$DocHash{$SubPrj}}; 253 | + @{$ResrcHash{$SubPrj}}=() unless @{$ResrcHash{$SubPrj}}; 254 | + @{$SysResrcHash{$SubPrj}}=() unless @{$SysResrcHash{$SubPrj}}; 255 | } 256 | sub AddPlatMacros (@) { 257 | # allows modules to add extra macros to the platform macro list 258 | diff -Naur epoc_cpp_sdk/epoc32/tools/mmp.pm cpp/epoc32/tools/mmp.pm 259 | --- epoc_cpp_sdk/epoc32/tools/mmp.pm 2021-02-21 02:43:56.950833610 +0000 260 | +++ cpp/epoc32/tools/mmp.pm 2021-02-21 01:32:33.401248255 +0000 261 | @@ -484,10 +484,10 @@ 262 | $MyCurSubPrj=&Path_MakeAbs("$Prj\/",$MyCurSubPrj); # relative subproject paths treated as relative to the project 263 | # print "MyCurSubPrj2: \"$MyCurSubPrj\"\n"; 264 | @{$SubPrjHash{$MyCurSubPrj}}=(); # ../subprj style 265 | - @{$DocHash{$MyCurSubPrj}}=() unless defined @{$DocHash{$MyCurSubPrj}}; 266 | - @{$ResrcHash{$MyCurSubPrj}}=() unless defined @{$ResrcHash{$MyCurSubPrj}}; 267 | - @{$SrcHash{$MyCurSubPrj}}=() unless defined @{$SrcHash{$MyCurSubPrj}}; 268 | - @{$SysResrcHash{$MyCurSubPrj}}=() unless defined @{$SysResrcHash{$MyCurSubPrj}}; 269 | + @{$DocHash{$MyCurSubPrj}}=() unless @{$DocHash{$MyCurSubPrj}}; 270 | + @{$ResrcHash{$MyCurSubPrj}}=() unless @{$ResrcHash{$MyCurSubPrj}}; 271 | + @{$SrcHash{$MyCurSubPrj}}=() unless @{$SrcHash{$MyCurSubPrj}}; 272 | + @{$SysResrcHash{$MyCurSubPrj}}=() unless @{$SysResrcHash{$MyCurSubPrj}}; 273 | # if (-d &Path_ChopPath($MyCurSubPrj)) { 274 | if (-d "$MyCurSubPrj" ) { 275 | next LINE; 276 | diff -Naur epoc_cpp_sdk/epoc32/tools/pdrtran cpp/epoc32/tools/pdrtran 277 | --- epoc_cpp_sdk/epoc32/tools/pdrtran 2021-02-21 02:43:56.950833610 +0000 278 | +++ cpp/epoc32/tools/pdrtran 2021-02-21 02:41:47.838163059 +0000 279 | @@ -2,4 +2,4 @@ 280 | # 281 | # WINE frontend - part of GnuPoc 282 | # 283 | -wine -- PDRTRAN.EXE "$@" 284 | +wine PDRTRAN.EXE "$@" 285 | diff -Naur epoc_cpp_sdk/epoc32/tools/pediff cpp/epoc32/tools/pediff 286 | --- epoc_cpp_sdk/epoc32/tools/pediff 2021-02-21 02:43:56.950833610 +0000 287 | +++ cpp/epoc32/tools/pediff 2021-02-21 02:40:47.141841593 +0000 288 | @@ -2,4 +2,4 @@ 289 | # 290 | # WINE frontend - part of GnuPoc 291 | # 292 | -wine -- PEDIFF.EXE "$@" 293 | +wine PEDIFF.EXE "$@" 294 | diff -Naur epoc_cpp_sdk/epoc32/tools/petran cpp/epoc32/tools/petran 295 | --- epoc_cpp_sdk/epoc32/tools/petran 2021-02-21 02:43:56.950833610 +0000 296 | +++ cpp/epoc32/tools/petran 2021-02-21 02:42:07.830268000 +0000 297 | @@ -2,4 +2,4 @@ 298 | # 299 | # WINE frontend - part of GnuPoc 300 | # 301 | -wine -- PETRAN.EXE "$@" 302 | +wine PETRAN.EXE "$@" 303 | diff -Naur epoc_cpp_sdk/epoc32/tools/rcomp cpp/epoc32/tools/rcomp 304 | --- epoc_cpp_sdk/epoc32/tools/rcomp 2021-02-21 02:43:56.954833630 +0000 305 | +++ cpp/epoc32/tools/rcomp 2021-02-21 02:42:25.326359496 +0000 306 | @@ -2,4 +2,4 @@ 307 | # 308 | # WINE frontend - part of GnuPoc 309 | # 310 | -wine -- $EPOCROOT/epoc32/tools/RCOMP.EXE "$@" 311 | +wine $EPOCROOT/epoc32/tools/RCOMP.EXE "$@" 312 | diff -Naur epoc_cpp_sdk/epoc32/tools/rtf2ptml cpp/epoc32/tools/rtf2ptml 313 | --- epoc_cpp_sdk/epoc32/tools/rtf2ptml 2021-02-21 02:43:56.954833630 +0000 314 | +++ cpp/epoc32/tools/rtf2ptml 2021-02-21 02:42:00.342228751 +0000 315 | @@ -2,4 +2,4 @@ 316 | # 317 | # WINE frontend - part of GnuPoc 318 | # 319 | -wine -- RTF2PTML.EXE "$@" 320 | +wine RTF2PTML.EXE "$@" 321 | -------------------------------------------------------------------------------- /install/gnupoc.er5.patch.011.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/static-void/psion_cpp_sdk_linux/7763ee8229c65eb8dde49894eb3047622da031d7/install/gnupoc.er5.patch.011.tar.gz -------------------------------------------------------------------------------- /install/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # First patch and build gcc 3 | SDK=`pwd`/../ 4 | tar xf gcc-3.0-psion-98r2-9-src.tar.gz 5 | patch -p1 < gcc-3.0-psion-98r2-9-patch 6 | mkdir $SDK/gcc-3.0-psion-98r2-9 7 | mkdir $SDK/install/gcc_build 8 | cd $SDK/install/gcc_build 9 | sh $SDK/install/src/configure --prefix=$SDK/gcc-3.0-psion-98r2-9 --target=arm-epoc-pe --host=i386-pc-linux-gnu --sysroot=$SDK/epoc_cpp_sdk/epoc32 10 | cd $SDK/install/gcc_build/bfd 11 | make 12 | cd $SDK/install/gcc_build/libiberty 13 | make 14 | cd $SDK/install/gcc_build/opcodes 15 | make 16 | cd $SDK/install/gcc_build/byacc 17 | make 18 | cd $SDK/install/gcc_build/flex 19 | make 20 | cd $SDK/install/gcc_build/intl 21 | make 22 | cd $SDK/install/gcc_build/binutils 23 | make install 24 | cd $SDK/install/gcc_build/gas 25 | make install 26 | cd $SDK/install/gcc_build/ld 27 | make install 28 | cd $SDK/install/gcc_build/bison 29 | make 30 | cd $SDK/install/gcc_build/gcc 31 | make LANGUAGES="c c++" 32 | make LANGUAGES="c c++" install 33 | cd $SDK 34 | # gcc build is done, make some symlinks so the SDK can find stuff 35 | ln -s arm-epoc-pe-addr2line gcc-3.0-psion-98r2-9/bin/arm-pe-addr2line 36 | ln -s arm-epoc-pe-c++filt gcc-3.0-psion-98r2-9/bin/arm-pe-c++filt 37 | ln -s arm-epoc-pe-gasp gcc-3.0-psion-98r2-9/bin/arm-pe-gasp 38 | ln -s arm-epoc-pe-objcopy gcc-3.0-psion-98r2-9/bin/arm-pe-objcopy 39 | ln -s arm-epoc-pe-size gcc-3.0-psion-98r2-9/bin/arm-pe-size 40 | ln -s arm-epoc-pe-ar gcc-3.0-psion-98r2-9/bin/arm-pe-ar 41 | ln -s arm-epoc-pe-cpp gcc-3.0-psion-98r2-9/bin/arm-pe-cpp 42 | ln -s arm-epoc-pe-gcc gcc-3.0-psion-98r2-9/bin/arm-pe-gcc 43 | ln -s arm-epoc-pe-objdump gcc-3.0-psion-98r2-9/bin/arm-pe-objdump 44 | ln -s arm-epoc-pe-strings gcc-3.0-psion-98r2-9/bin/arm-pe-strings 45 | ln -s arm-epoc-pe-as gcc-3.0-psion-98r2-9/bin/arm-pe-as 46 | ln -s arm-epoc-pe-dlltool gcc-3.0-psion-98r2-9/bin/arm-pe-dlltool 47 | ln -s arm-epoc-pe-ld gcc-3.0-psion-98r2-9/bin/arm-pe-ld 48 | ln -s arm-epoc-pe-ranlib gcc-3.0-psion-98r2-9/bin/arm-pe-ranlib 49 | ln -s arm-epoc-pe-strip gcc-3.0-psion-98r2-9/bin/arm-pe-strip 50 | ln -s arm-epoc-pe-c++ gcc-3.0-psion-98r2-9/bin/arm-pe-c++ 51 | ln -s arm-epoc-pe-g++ gcc-3.0-psion-98r2-9/bin/arm-pe-g++ 52 | ln -s arm-epoc-pe-nm gcc-3.0-psion-98r2-9/bin/arm-pe-nm 53 | ln -s arm-epoc-pe-readelf gcc-3.0-psion-98r2-9/bin/arm-pe-readelf 54 | ln -s arm-epoc-pe-windres gcc-3.0-psion-98r2-9/bin/arm-pe-windres 55 | # remove build and src dirs 56 | rm -rf $SDK/install/gcc_build $SDK/install/src 57 | 58 | # Now build the sdk2unix tools and install them 59 | cd $SDK/install 60 | tar xf sdk2unix-1.9.tar.gz 61 | patch -p0 < sdk2unix-1.9-patch 62 | cd $SDK/install/sdk2unix-1.9/helpers/bmconv-1.1.0-2 63 | make 64 | cp $SDK/install/sdk2unix-1.9/helpers/bmconv-1.1.0-2/src/bmconv $SDK/gcc-3.0-psion-98r2-9/bin 65 | cd $SDK/install/sdk2unix-1.9/helpers/makesis-2.0.0/ 66 | make 67 | cp $SDK/install/sdk2unix-1.9/helpers/makesis-2.0.0/src/makesis $SDK/gcc-3.0-psion-98r2-9/bin 68 | cd $SDK/install/sdk2unix-1.9/helpers/petran-1.1.0/ 69 | make 70 | cp $SDK/install/sdk2unix-1.9/helpers/petran-1.1.0/e32uid/uidcrc $SDK/gcc-3.0-psion-98r2-9/bin 71 | cp $SDK/install/sdk2unix-1.9/helpers/petran-1.1.0/petran/petran $SDK/gcc-3.0-psion-98r2-9/bin 72 | cd $SDK/install/sdk2unix-1.9/helpers/rcomp-7.0.1 73 | make 74 | cp $SDK/install/sdk2unix-1.9/helpers/rcomp-7.0.1/src/rcomp $SDK/gcc-3.0-psion-98r2-9/bin 75 | cd $SDK/install/sdk2unix-1.9/genaif 76 | gcc genaif.c -o genaif 77 | cp $SDK/install/sdk2unix-1.9/genaif/genaif $SDK/gcc-3.0-psion-98r2-9/bin 78 | cp -rp $SDK/install/sdk2unix-1.9/data/gcc539/makerules $SDK/gcc-3.0-psion-98r2-9/lib 79 | cp $SDK/install/sdk2unix-1.9/bin/xmakesis.pl $SDK/gcc-3.0-psion-98r2-9/bin 80 | #bin/install_epocR5_sdk ../cpp.zip `pwd`/../epoc_r5_sdk `pwd`/../gcc-3.0-psion-98r2-9 81 | # Remove the sdk2unix install folder 82 | rm -rf $SDK/install/sdk2unix-1.9 83 | 84 | # Now install SDK via gnupoc (which converts files to unix format and lower cases everything etc) 85 | unset TMP 86 | mkdir $SDK/install/gnupoc 87 | cp $SDK/install/cpp.zip $SDK/install/gnupoc 88 | cd $SDK/install/gnupoc 89 | unzip cpp.zip 90 | mv $SDK/install/gnupoc/Cpp $SDK/install/gnupoc/epoc_cpp_sdk 91 | cd $SDK/install/gnupoc/epoc_cpp_sdk 92 | # Correct permissions 93 | find . -type d -exec chmod 755 {} + 94 | find . -type f -exec chmod 644 {} + 95 | export EPOCROOT=$SDK/install/gnupoc/epoc_cpp_sdk 96 | tar xf $SDK/install/gnupoc.er5.patch.011.tar.gz -C $SDK/install/gnupoc/epoc_cpp_sdk/EPOC32 97 | 98 | # Silly hack to rename everything to lower case using zip/unzip (to avoid using perl modules) 99 | cd $EPOCROOT/.. 100 | EPOCROOTDIR=`basename $EPOCROOT` 101 | zip -r -0 $EPOCROOTDIR.zip $EPOCROOTDIR 102 | rm -rf $EPOCROOTDIR 103 | unzip -LL $EPOCROOTDIR.zip 104 | 105 | # Get back to it 106 | cd $SDK/install/gnupoc/epoc_cpp_sdk/epoc32 107 | ./unixifysdk.sh 108 | make apply 109 | patch -p2 < $SDK/install/gnupoc.er5.patch.011-patch 110 | chmod +x $SDK/install/gnupoc/epoc_cpp_sdk/epoc32/tools/* 111 | mv $SDK/install/gnupoc/epoc_cpp_sdk/ $SDK 112 | rm -rf $SDK/install/gnupoc 113 | mkdir $SDK/epoc_cpp_sdk/tmp 114 | 115 | # Correct code in the SDK for lower case changes and ISO C++ 116 | cd $SDK/epoc_cpp_sdk/ 117 | # 1. Rename includes to lower case 118 | find . -type f \( -iname "*.c" -o -iname "*.h" -o -iname "*.cpp" \) -print0 | xargs -0 sed -i -e "s/#include\s\"\([._a-zA-Z0-9]\+\)\"/#include \"\L\1\"/" 119 | find . -type f \( -iname "*.c" -o -iname "*.h" -o -iname "*.cpp" \) -print0 | xargs -0 sed -i -e "s/#include\s<\([._a-zA-Z0-9]\+\)>/#include <\L\1>/" 120 | # 2. Remove non ISO "const xxx=123;" without a type specified, use #define instead 121 | find . -type f \( -iname "*.c" -o -iname "*.h" -o -iname "*.cpp" \) -print0 | xargs -0 sed -i -e "s/^const \([A-Za-z0-9]\+\)=\(.\+\);/#define \1 \2/" 122 | # 3. Make sure != operators have a return type TBool 123 | find . -type f \( -iname "*.c" -o -iname "*.h" -o -iname "*.cpp" \) -print0 | xargs -0 sed -i -e "s/inline operator!=/inline TBool operator !=/" 124 | # 4. Replace library names like "EUSER.LIB" with lower case versions inside project files 125 | find . -type f \( -iname "*.mmp" \) -print0 | xargs -0 sed -i -e "s/\([A-Za-z0-9]\+\)\.LIB/\L\1\.lib/g" 126 | find . -type f \( -iname "*.mmp" \) -print0 | xargs -0 sed -i -e "s/\([A-Za-z0-9]\+\)\.lib/\L\1\.lib/g" 127 | 128 | # Create a file that we will source to start using the sdk 129 | printf '%s\n' 'export EPOCROOT=`pwd`/epoc_cpp_sdk' 'export PATH=$PATH:`pwd`/gcc-3.0-psion-98r2-9/bin:`pwd`/epoc_cpp_sdk/epoc32/tools' 'export TMP=`pwd`/epoc_cpp_sdk/tmp' > $SDK/start_epoc_sdk.sh 130 | 131 | # Create a symlink for an x: drive in wine so the emulator works 132 | ln -s $SDK $HOME/.wine/dosdevices/x: 133 | -------------------------------------------------------------------------------- /install/sdk2unix-1.9-patch: -------------------------------------------------------------------------------- 1 | diff -Naur sdk2unix-1.9/helpers/bmconv-1.1.0-2/src/bmconv.h sdk2unix-1.9-new/helpers/bmconv-1.1.0-2/src/bmconv.h 2 | --- sdk2unix-1.9/helpers/bmconv-1.1.0-2/src/bmconv.h 2005-12-26 10:43:06.000000000 +0000 3 | +++ sdk2unix-1.9-new/helpers/bmconv-1.1.0-2/src/bmconv.h 2021-02-16 23:33:57.619750714 +0000 4 | @@ -7,8 +7,8 @@ 5 | #define __BMCONV_H__ 6 | 7 | #include 8 | -#include 9 | -#include 10 | +#include 11 | +#include 12 | #include 13 | 14 | // As suggested by Gerardo Lamastra 15 | @@ -222,7 +222,7 @@ 16 | int HexToInt(char aNibble); 17 | static void CopyTail(void* aDst, void* aSrc, int aFullSize, int aSkipped); 18 | private: 19 | - fstream iDestFile; 20 | + std::fstream iDestFile; 21 | char** iSourcefilenames; 22 | SEpocBitmapHeader** iPbmSources; 23 | int iNumSources; 24 | @@ -262,8 +262,8 @@ 25 | int LoadFile(char* aFilename,int aIndex); 26 | int LoadRom(char* aFilename,int aIndex); 27 | TRgb GetPixel(int aXCoord,int aYCoord); 28 | - int DoLoadFile(fstream& aFile); 29 | - int DoLoadRom(fstream& aFile); 30 | + int DoLoadFile(std::fstream& aFile); 31 | + int DoLoadRom(std::fstream& aFile); 32 | int ExpandByteRLEData(char* aDest,int aDestSize,char* aSrce,int aSrceSize); 33 | int ExpandTwelveBitRLEData(char* aDest,int aDestSizeInBytes,char* aSrce,int aSrceSizeInBytes); 34 | int ExpandSixteenBitRLEData(char* aDest,int aDestSizeInBytes,char* aSrce,int aSrceSizeInBytes); 35 | diff -Naur sdk2unix-1.9/helpers/bmconv-1.1.0-2/src/bmtopbm.cpp sdk2unix-1.9-new/helpers/bmconv-1.1.0-2/src/bmtopbm.cpp 36 | --- sdk2unix-1.9/helpers/bmconv-1.1.0-2/src/bmtopbm.cpp 2004-01-05 00:23:39.000000000 +0000 37 | +++ sdk2unix-1.9-new/helpers/bmconv-1.1.0-2/src/bmtopbm.cpp 2021-02-16 23:34:43.771884917 +0000 38 | @@ -21,7 +21,7 @@ 39 | int BitmapLoader::LoadBitmap(char* aFileName,int aBpp,TBitmapColor aColor,SEpocBitmapHeader*& aPbm) 40 | { 41 | char sig[2]; 42 | - fstream file(aFileName,ios::in|ios::binary); 43 | + std::fstream file(aFileName,std::ios::in|std::ios::binary); 44 | if (file.is_open()==0) 45 | return Files; 46 | file.read(sig,2); 47 | @@ -39,7 +39,7 @@ 48 | 49 | int BitmapLoader::DoLoad(char* aFileName) 50 | { 51 | - fstream file(aFileName,ios::in|ios::binary); 52 | + std::fstream file(aFileName,std::ios::in|std::ios::binary); 53 | if (file.is_open()==0) 54 | return Files; 55 | TBitmapFileHeader bmpfile; 56 | diff -Naur sdk2unix-1.9/helpers/bmconv-1.1.0-2/src/mainfunc.cpp sdk2unix-1.9-new/helpers/bmconv-1.1.0-2/src/mainfunc.cpp 57 | --- sdk2unix-1.9/helpers/bmconv-1.1.0-2/src/mainfunc.cpp 2004-01-05 00:23:39.000000000 +0000 58 | +++ sdk2unix-1.9-new/helpers/bmconv-1.1.0-2/src/mainfunc.cpp 2021-02-16 23:36:38.940225454 +0000 59 | @@ -3,7 +3,7 @@ 60 | // Copyright (c) 1997-2003 Symbian Ltd. All rights reserved. 61 | // 62 | 63 | -#include 64 | +#include 65 | #include 66 | #include "bmconv.h" 67 | #include 68 | @@ -53,15 +53,15 @@ 69 | 70 | void Header() 71 | { 72 | - cout << "\n"; 73 | - cout << "\n"; 74 | - cout << "BMCONV version "<< version << ".\n"; 75 | + std::cout << "\n"; 76 | + std::cout << "\n"; 77 | + std::cout << "BMCONV version "<< version << ".\n"; 78 | } 79 | 80 | void Report(int aError) 81 | { 82 | Header(); 83 | - cout << ErrorMessage(aError) << "\n"; 84 | + std::cout << ErrorMessage(aError) << "\n"; 85 | } 86 | 87 | void CompilationReport(int aQuiet,int aError,TStoreType aType,char* aDestfile,char** aBitmapFiles,int aNumFiles) 88 | @@ -69,75 +69,75 @@ 89 | if(!aQuiet || aError) 90 | { 91 | Header(); 92 | - cout << "Compiling...\n"; 93 | + std::cout << "Compiling...\n"; 94 | if(aType!=ENoStore) 95 | - cout << "Multiple bitmap store type: "; 96 | + std::cout << "Multiple bitmap store type: "; 97 | if(aType==EFileStore) 98 | - cout << "File store" << "\n"; 99 | + std::cout << "File store" << "\n"; 100 | else if(aType==ERomStore) 101 | - cout << "ROM image store" << "\n"; 102 | + std::cout << "ROM image store" << "\n"; 103 | else if(aType==ECompressedRomStore) 104 | - cout << "Compressed ROM image store" << "\n"; 105 | + std::cout << "Compressed ROM image store" << "\n"; 106 | if(aDestfile!=NULL) 107 | - cout << "Epoc file: " << aDestfile << "\n\n"; 108 | + std::cout << "Epoc file: " << aDestfile << "\n\n"; 109 | for(int count=0;count 0) 270 | - cout << "Palette entries " << h.iPaletteEntries; 271 | + std::cout << "Palette entries " << h.iPaletteEntries; 272 | 273 | int byteSize = BitmapUtils::ByteWidth(h.iWidthInPixels,h.iBitsPerPixel) * h.iHeightInPixels; 274 | int compressionRatio = 0; 275 | @@ -344,25 +344,25 @@ 276 | switch (h.iCompression) 277 | { 278 | case ENoBitmapCompression: 279 | - cout << "No compression\n"; 280 | + std::cout << "No compression\n"; 281 | break; 282 | case EByteRLECompression: 283 | - cout << "Bytewise RLE compression " << compressionRatio << "%\n"; 284 | + std::cout << "Bytewise RLE compression " << compressionRatio << "%\n"; 285 | break; 286 | case ETwelveBitRLECompression: 287 | - cout << "12 bit RLE compression " << compressionRatio << "%\n"; 288 | + std::cout << "12 bit RLE compression " << compressionRatio << "%\n"; 289 | break; 290 | case ESixteenBitRLECompression: 291 | - cout << "16 bit RLE compression " << compressionRatio << "%\n"; 292 | + std::cout << "16 bit RLE compression " << compressionRatio << "%\n"; 293 | break; 294 | case ETwentyFourBitRLECompression: 295 | - cout << "24 bit RLE compression " << compressionRatio << "%\n"; 296 | + std::cout << "24 bit RLE compression " << compressionRatio << "%\n"; 297 | break; 298 | } 299 | } 300 | } 301 | 302 | - cout << "\n"; 303 | + std::cout << "\n"; 304 | } 305 | 306 | 307 | diff -Naur sdk2unix-1.9/helpers/bmconv-1.1.0-2/src/pbmcomp.cpp sdk2unix-1.9-new/helpers/bmconv-1.1.0-2/src/pbmcomp.cpp 308 | --- sdk2unix-1.9/helpers/bmconv-1.1.0-2/src/pbmcomp.cpp 2004-01-05 00:23:39.000000000 +0000 309 | +++ sdk2unix-1.9-new/helpers/bmconv-1.1.0-2/src/pbmcomp.cpp 2021-02-16 23:35:30.384021829 +0000 310 | @@ -33,7 +33,7 @@ 311 | if (ret) 312 | return ret; 313 | 314 | - iDestFile.open(aDestfilename,ios::out|ios::binary); 315 | + iDestFile.open(aDestfilename,std::ios::out|std::ios::binary); 316 | if(iDestFile.is_open()==0) 317 | return DestFile; 318 | if (iNumSources < 1) 319 | @@ -45,7 +45,7 @@ 320 | // a filestore into a ROM image. 321 | if (aHeaderFilename) 322 | { 323 | - cout << "Header file generation is not permitted with /m\n"; 324 | + std::cout << "Header file generation is not permitted with /m\n"; 325 | aHeaderFilename = NULL; 326 | } 327 | iSourcefilenames[0]+=2; 328 | @@ -401,7 +401,7 @@ 329 | if (filesize == 0) 330 | return PaletteFile; 331 | 332 | - fstream paletteFile(aPaletteFilename,ios::in|ios::binary); 333 | + std::fstream paletteFile(aPaletteFilename,std::ios::in|std::ios::binary); 334 | if(!paletteFile.is_open()) 335 | return PaletteFile; 336 | 337 | @@ -476,7 +476,7 @@ 338 | if (!aHeaderFilename) 339 | return NoError; 340 | 341 | - fstream hf(aHeaderFilename,ios::out); 342 | + std::fstream hf(aHeaderFilename,std::ios::out); 343 | if(!hf.is_open()) 344 | return DestFile; 345 | 346 | diff -Naur sdk2unix-1.9/helpers/bmconv-1.1.0-2/src/pbmtobm.cpp sdk2unix-1.9-new/helpers/bmconv-1.1.0-2/src/pbmtobm.cpp 347 | --- sdk2unix-1.9/helpers/bmconv-1.1.0-2/src/pbmtobm.cpp 2004-01-05 00:23:39.000000000 +0000 348 | +++ sdk2unix-1.9-new/helpers/bmconv-1.1.0-2/src/pbmtobm.cpp 2021-02-16 23:37:20.528350159 +0000 349 | @@ -17,7 +17,7 @@ 350 | 351 | int EpocLoader::EpocBitmapCount(char* aFileName, int& aCount, int& isRomFormat) 352 | { 353 | - fstream file(aFileName,ios::in|ios::binary); 354 | + std::fstream file(aFileName,std::ios::in|std::ios::binary); 355 | if (file.is_open()==0) 356 | return Files; 357 | 358 | @@ -47,7 +47,7 @@ 359 | file.read((char *)wordbuffer,4); 360 | if (file.gcount()!=4) 361 | return SourceFile; 362 | - file.seekg(get_u32(wordbuffer),ios::beg); 363 | + file.seekg(get_u32(wordbuffer),std::ios::beg); 364 | } 365 | file.read((char *)wordbuffer,4); 366 | if (file.gcount()!=4) 367 | @@ -58,7 +58,7 @@ 368 | 369 | int EpocLoader::LoadEpocBitmap(char* aFileName,int aIndex) 370 | { 371 | - fstream file(aFileName,ios::in|ios::binary); 372 | + std::fstream file(aFileName,std::ios::in|std::ios::binary); 373 | if (file.is_open()==0) 374 | return Files; 375 | 376 | @@ -76,7 +76,7 @@ 377 | 378 | int EpocLoader::LoadFile(char* aFileName,int aIndex) 379 | { 380 | - fstream file(aFileName,ios::in|ios::binary); 381 | + std::fstream file(aFileName,std::ios::in|std::ios::binary); 382 | if (file.is_open()==0) 383 | return Files; 384 | 385 | @@ -96,7 +96,7 @@ 386 | file.read((char *)wordbuffer,4); 387 | if (file.gcount()!=4) 388 | return SourceFile; 389 | - file.seekg(get_u32(wordbuffer),ios::beg); 390 | + file.seekg(get_u32(wordbuffer),std::ios::beg); 391 | file.read((char *)wordbuffer,4); 392 | if (file.gcount()!=4) 393 | return SourceFile; 394 | @@ -104,11 +104,11 @@ 395 | int numsources=get_u32(wordbuffer); 396 | if (aIndex >= numsources) 397 | return OutOfRange; 398 | - file.seekg(aIndex*4,ios::cur); 399 | + file.seekg(aIndex*4,std::ios::cur); 400 | file.read((char *)wordbuffer,4); 401 | if (file.gcount()!=4) 402 | return SourceFile; 403 | - file.seekg(get_u32(wordbuffer),ios::beg); 404 | + file.seekg(get_u32(wordbuffer),std::ios::beg); 405 | int ret = DoLoadFile(file); 406 | file.close(); 407 | return ret; 408 | @@ -116,7 +116,7 @@ 409 | 410 | int EpocLoader::LoadRom(char* aFileName,int aIndex) 411 | { 412 | - fstream file(aFileName,ios::in|ios::binary); 413 | + std::fstream file(aFileName,std::ios::in|std::ios::binary); 414 | if (file.is_open()==0) 415 | return Files; 416 | 417 | @@ -131,17 +131,17 @@ 418 | return SourceFile; 419 | if (aIndex>=wordbuffer) 420 | return OutOfRange; 421 | - file.seekg(aIndex*4,ios::cur); 422 | + file.seekg(aIndex*4,std::ios::cur); 423 | file.read((char *)&wordbuffer,4); 424 | if (file.gcount()!=4) 425 | return SourceFile; 426 | - file.seekg(wordbuffer,ios::beg); 427 | + file.seekg(wordbuffer,std::ios::beg); 428 | int ret=DoLoadRom(file); 429 | file.close(); 430 | return ret; 431 | } 432 | 433 | -int EpocLoader::DoLoadFile(fstream& aFile) 434 | +int EpocLoader::DoLoadFile(std::fstream& aFile) 435 | { 436 | unsigned long size = sizeof(SEpocBitmapHeader); 437 | unsigned char epocbmhdr[size]; 438 | @@ -208,7 +208,7 @@ 439 | return NoError; 440 | } 441 | 442 | -int EpocLoader::DoLoadRom(fstream& aFile) 443 | +int EpocLoader::DoLoadRom(std::fstream& aFile) 444 | { 445 | Bitmap bmp; 446 | unsigned long size=sizeof(Bitmap); 447 | @@ -485,7 +485,7 @@ 448 | } 449 | } 450 | 451 | - fstream file(aFileName,ios::out|ios::binary); 452 | + std::fstream file(aFileName,std::ios::out|std::ios::binary); 453 | if (file.is_open()==0) 454 | { 455 | delete bmpBits; 456 | diff -Naur sdk2unix-1.9/helpers/makesis-2.0.0/src/stub.cpp sdk2unix-1.9-new/helpers/makesis-2.0.0/src/stub.cpp 457 | --- sdk2unix-1.9/helpers/makesis-2.0.0/src/stub.cpp 2003-12-29 22:37:41.000000000 +0000 458 | +++ sdk2unix-1.9-new/helpers/makesis-2.0.0/src/stub.cpp 2021-02-16 22:51:33.574498169 +0000 459 | @@ -40,7 +40,7 @@ 460 | { 461 | (void)attributes; 462 | 463 | - int fd = -1; 464 | + long long fd = -1; 465 | 466 | if(creation == OPEN_EXISTING) { 467 | fd = open(filename, O_RDONLY); 468 | @@ -68,7 +68,7 @@ 469 | BOOL ReadFile(HANDLE hFile, LPVOID buffer, DWORD bytesToRead, 470 | LPDWORD bytesRead, void *) 471 | { 472 | - int fd = (int)hFile; 473 | + long long fd = (long long)hFile; 474 | 475 | const int size = read(fd, buffer, bytesToRead); 476 | 477 | @@ -84,13 +84,13 @@ 478 | 479 | BOOL CloseHandle(HANDLE fd) 480 | { 481 | - return close((int)fd) == 0; 482 | + return close((long long)fd) == 0; 483 | } 484 | 485 | 486 | DWORD WINAPI GetFileSize(HANDLE h, LPDWORD) 487 | { 488 | - int fd = (int)h; 489 | + long long fd = (long long)h; 490 | int ret = 0; 491 | 492 | struct stat s; 493 | @@ -167,7 +167,7 @@ 494 | LPCVOID buffer, DWORD bytesToWrite, 495 | LPDWORD bytesWritten, void*) 496 | { 497 | - int fd = (int)hFile; 498 | + long long fd = (long long)hFile; 499 | 500 | ssize_t ret = write(fd, buffer, bytesToWrite); 501 | if(ret == -1) { 502 | @@ -188,7 +188,7 @@ 503 | { 504 | (void)highword; 505 | 506 | - int fd = (int)hFile; 507 | + long long fd = (long long)hFile; 508 | off_t off = 0; 509 | 510 | if(method == FILE_BEGIN) 511 | diff -Naur sdk2unix-1.9/helpers/petran-1.1.0/e32uid/Makefile sdk2unix-1.9-new/helpers/petran-1.1.0/e32uid/Makefile 512 | --- sdk2unix-1.9/helpers/petran-1.1.0/e32uid/Makefile 2005-01-31 13:36:07.000000000 +0000 513 | +++ sdk2unix-1.9-new/helpers/petran-1.1.0/e32uid/Makefile 2021-02-16 23:52:01.867111778 +0000 514 | @@ -3,9 +3,9 @@ 515 | # 516 | 517 | GCC_VERSION= 518 | -CFLAGS+=-Wall -gstabs+ 519 | +CFLAGS+=-Wall -gstabs+ -m32 520 | CFLAGS+=-I../inc 521 | -LFLAGS= 522 | +LFLAGS=-m32 523 | DEPS=\ 524 | ../inc/e32uid.h \ 525 | ../inc/e32std.h 526 | diff -Naur sdk2unix-1.9/helpers/petran-1.1.0/host/h_utl.cpp sdk2unix-1.9-new/helpers/petran-1.1.0/host/h_utl.cpp 527 | --- sdk2unix-1.9/helpers/petran-1.1.0/host/h_utl.cpp 2005-01-31 13:33:36.000000000 +0000 528 | +++ sdk2unix-1.9-new/helpers/petran-1.1.0/host/h_utl.cpp 2021-02-16 23:46:54.714132330 +0000 529 | @@ -57,44 +57,44 @@ 530 | switch (aType) 531 | { 532 | case EAlways: 533 | - cout << iText; 534 | + std::cout << iText; 535 | iLogFile << iText; 536 | break; 537 | case EScreen: 538 | - cout << iText; 539 | + std::cout << iText; 540 | break; 541 | case ELog: 542 | if (iVerbose) 543 | - cout << iText; 544 | + std::cout << iText; 545 | iLogFile << iText; 546 | break; 547 | case EWarning: 548 | - cerr << "WARNING: " << iText; 549 | + std::cerr << "WARNING: " << iText; 550 | iLogFile << "WARNING: "< 591 | +#include 592 | #include 593 | #include "pe_defs.h" 594 | #include "pe_file.h" 595 | @@ -144,6 +144,6 @@ 596 | TUint iConstOffset; 597 | TUint iCrtOffset; 598 | }; 599 | -ofstream &operator<<(ofstream &os, const E32ImageFile &aImage); 600 | -ifstream &operator>>(ifstream &is, E32ImageFile &aImage); 601 | +std::ofstream &operator<<(std::ofstream &os, const E32ImageFile &aImage); 602 | +std::ifstream &operator>>(std::ifstream &is, E32ImageFile &aImage); 603 | #endif 604 | diff -Naur sdk2unix-1.9/helpers/petran-1.1.0/inc/h_utl.h sdk2unix-1.9-new/helpers/petran-1.1.0/inc/h_utl.h 605 | --- sdk2unix-1.9/helpers/petran-1.1.0/inc/h_utl.h 2005-01-31 13:12:00.000000000 +0000 606 | +++ sdk2unix-1.9-new/helpers/petran-1.1.0/inc/h_utl.h 2021-02-16 23:47:41.950282212 +0000 607 | @@ -7,14 +7,15 @@ 608 | #define __H_UTL_H__ 609 | // 610 | #include 611 | -#include 612 | +#include 613 | #if __GNUC__ >= 3 614 | #include 615 | #define istrstream std::istringstream 616 | #else 617 | #include 618 | #endif 619 | -#include 620 | +#include 621 | +#include 622 | #include 623 | 624 | #define ALIGN4K(a) ((a+0xfff)&0xfffff000) 625 | @@ -68,7 +69,7 @@ 626 | TText iText[KMaxStringLength]; 627 | TBool iVerbose; 628 | private: 629 | - ofstream iLogFile; 630 | + std::ofstream iLogFile; 631 | }; 632 | // 633 | extern HPrint H; 634 | diff -Naur sdk2unix-1.9/helpers/petran-1.1.0/pefile/pe_img.cpp sdk2unix-1.9-new/helpers/petran-1.1.0/pefile/pe_img.cpp 635 | --- sdk2unix-1.9/helpers/petran-1.1.0/pefile/pe_img.cpp 2003-12-21 15:44:08.000000000 +0000 636 | +++ sdk2unix-1.9-new/helpers/petran-1.1.0/pefile/pe_img.cpp 2021-02-16 23:48:02.778348396 +0000 637 | @@ -7,7 +7,7 @@ 638 | #include 639 | #include 640 | #include 641 | -#include 642 | +#include 643 | 644 | // 645 | // E32 Image files 646 | diff -Naur sdk2unix-1.9/helpers/petran-1.1.0/pefile/pe_io.cpp sdk2unix-1.9-new/helpers/petran-1.1.0/pefile/pe_io.cpp 647 | --- sdk2unix-1.9/helpers/petran-1.1.0/pefile/pe_io.cpp 2003-12-21 15:44:08.000000000 +0000 648 | +++ sdk2unix-1.9-new/helpers/petran-1.1.0/pefile/pe_io.cpp 2021-02-16 23:48:49.546497224 +0000 649 | @@ -3,7 +3,7 @@ 650 | // Copyright (c) 1996-1999 Symbian Ltd. All rights reserved. 651 | // 652 | 653 | -#include 654 | +#include 655 | #include 656 | #include 657 | #include 658 | @@ -13,7 +13,7 @@ 659 | 660 | #include 661 | 662 | -ofstream &operator<<(ofstream &os, const E32ImageFile &aImage) 663 | +std::ofstream &operator<<(std::ofstream &os, const E32ImageFile &aImage) 664 | // 665 | // Output an E32ImageFile 666 | // 667 | @@ -23,7 +23,7 @@ 668 | return os; 669 | } 670 | 671 | -ifstream &operator>>(ifstream &is, E32ImageFile &aImage) 672 | +std::ifstream &operator>>(std::ifstream &is, E32ImageFile &aImage) 673 | // 674 | // Input an E32ImageFile 675 | // 676 | @@ -38,7 +38,7 @@ 677 | TInt E32ImageFile::IsE32ImageFile(char *aFileName) 678 | { 679 | 680 | - ifstream ifile(aFileName, ios::in|ios::binary); 681 | + std::ifstream ifile(aFileName, std::ios::in|std::ios::binary); 682 | if(!ifile.is_open()) 683 | return FALSE; 684 | E32ImageHeader h; 685 | @@ -62,7 +62,7 @@ 686 | return 1; 687 | } 688 | Adjust(s.st_size); 689 | - ifstream ifile((char *)aFileName, ios::in|ios::binary); 690 | + std::ifstream ifile((char *)aFileName, std::ios::in|std::ios::binary); 691 | if(!ifile.is_open()) 692 | { 693 | Print(EError,"Cannot open %s for input.\n",aFileName); 694 | diff -Naur sdk2unix-1.9/helpers/petran-1.1.0/petran/Makefile sdk2unix-1.9-new/helpers/petran-1.1.0/petran/Makefile 695 | --- sdk2unix-1.9/helpers/petran-1.1.0/petran/Makefile 2005-06-07 09:51:29.000000000 +0100 696 | +++ sdk2unix-1.9-new/helpers/petran-1.1.0/petran/Makefile 2021-02-16 23:51:09.138942927 +0000 697 | @@ -4,9 +4,9 @@ 698 | 699 | GCC_VERSION=-2.95 700 | GCC_VERSION= 701 | -CFLAGS+=-Wall -gstabs+ -Wno-deprecated -g 702 | +CFLAGS+=-Wall -gstabs+ -Wno-deprecated -g -m32 703 | CFLAGS+=-I../inc 704 | -LFLAGS= 705 | +LFLAGS=-m32 706 | DEPS=\ 707 | ../inc/pe_defs.h \ 708 | ../inc/e32def.h \ 709 | diff -Naur sdk2unix-1.9/helpers/petran-1.1.0/petran/petran.cpp sdk2unix-1.9-new/helpers/petran-1.1.0/petran/petran.cpp 710 | --- sdk2unix-1.9/helpers/petran-1.1.0/petran/petran.cpp 2005-01-31 13:17:18.000000000 +0000 711 | +++ sdk2unix-1.9-new/helpers/petran-1.1.0/petran/petran.cpp 2021-02-16 23:45:42.785904722 +0000 712 | @@ -84,7 +84,7 @@ 713 | else 714 | f.SetFixedAddress(gFixedAddress); 715 | } 716 | - ofstream ofile(ofilename, ios::binary); 717 | + std::ofstream ofile(ofilename, std::ios::binary); 718 | if (!ofile) 719 | { 720 | Print(EError,"Cannot open %s for output.\n",ofilename); 721 | @@ -113,7 +113,7 @@ 722 | 723 | f.Adjust(s.st_size); 724 | 725 | - ifstream ifile(ifilename, ios::in|ios::binary); 726 | + std::ifstream ifile(ifilename, std::ios::in|std::ios::binary); 727 | if(!ifile.is_open()) 728 | { 729 | Print(EError,"Cannot open %s for input.\n",ifilename); 730 | @@ -142,7 +142,7 @@ 731 | 732 | f.Adjust(fsize); 733 | 734 | - ifstream ifile(ifilename, ios::in|ios::binary); 735 | + std::ifstream ifile(ifilename, std::ios::in|std::ios::binary); 736 | if(!ifile.is_open()) 737 | { 738 | Print(EError,"Cannot open %s for input.\n",ifilename); 739 | @@ -185,7 +185,7 @@ 740 | else 741 | f.SetFixedAddress(gFixedAddress); 742 | } 743 | - ofstream ofile(ifilename, ios::binary); 744 | + std::ofstream ofile(ifilename, std::ios::binary); 745 | if (!ofile) 746 | { 747 | Print(EError,"Cannot open %s for output.\n",ifilename); 748 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/inc/astring.h sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/astring.h 749 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/inc/astring.h 2003-12-27 22:42:20.000000000 +0000 750 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/astring.h 2021-02-16 22:54:41.112746647 +0000 751 | @@ -6,7 +6,7 @@ 752 | #ifndef __ASTRING_H__ 753 | #define __ASTRING_H__ 754 | 755 | -#include 756 | +#include 757 | #include "array.h" 758 | 759 | 760 | @@ -15,7 +15,7 @@ 761 | 762 | class String : public ArrayItem 763 | { 764 | - friend ostream& operator<< ( ostream& os, const String & a); 765 | + friend std::ostream& operator<< ( std::ostream& os, const String & a); 766 | friend class NumericValue; 767 | friend class RCBinaryStream; 768 | public: 769 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/inc/datatype.h sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/datatype.h 770 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/inc/datatype.h 2003-12-27 22:42:20.000000000 +0000 771 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/datatype.h 2021-02-16 22:55:31.697261060 +0000 772 | @@ -24,7 +24,7 @@ 773 | const String& GetName() const; 774 | DataType GetElementType() const; 775 | unsigned short GetSize() const; 776 | - friend ostream& operator<<(ostream& os,RCType& r); 777 | + friend std::ostream& operator<<(std::ostream& os,RCType& r); 778 | private: 779 | DataType iElementType; 780 | String iName; 781 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/inc/indextab.h sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/indextab.h 782 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/inc/indextab.h 2003-12-27 22:42:20.000000000 +0000 783 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/indextab.h 2021-02-16 23:08:50.118576097 +0000 784 | @@ -3,7 +3,7 @@ 785 | // Copyright (c) 1997-1999 Symbian Ltd. All rights reserved. 786 | // 787 | 788 | -#include 789 | +#include 790 | #include "rcbinstr.h" 791 | #include "array.h" 792 | #include "resource.h" 793 | @@ -11,7 +11,7 @@ 794 | 795 | class IndexTableItem : public ArrayItem 796 | { 797 | - friend ostream& operator<<(ostream & os,const IndexTableItem& o); 798 | + friend std::ostream& operator<<(std::ostream & os,const IndexTableItem& o); 799 | friend RCBinaryStream& operator<<(RCBinaryStream & os,const IndexTableItem& o); 800 | public: 801 | IndexTableItem(ResourceHeader* aResource); 802 | @@ -25,7 +25,7 @@ 803 | 804 | class IndexTable : public Array 805 | { 806 | - friend ostream& operator<<(ostream& os,const IndexTable& o); 807 | + friend std::ostream& operator<<(std::ostream& os,const IndexTable& o); 808 | friend RCBinaryStream& operator<<(RCBinaryStream& os,const IndexTable& o); 809 | public: 810 | IndexTable(); 811 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/inc/linkarra.h sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/linkarra.h 812 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/inc/linkarra.h 2003-12-27 22:42:20.000000000 +0000 813 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/linkarra.h 2021-02-16 23:09:07.954660365 +0000 814 | @@ -14,7 +14,7 @@ 815 | public: 816 | LinkItem(ResourceDataStream& aStream,const String& aResourceName,const String& aFileName,int aLineNumber); 817 | virtual void OverwriteLink(RCBinaryStream& os) const=0; 818 | - virtual ostream& StreamOut(ostream& os)=0; 819 | + virtual std::ostream& StreamOut(std::ostream& os)=0; 820 | public: 821 | String iResourceName; // Name of resource to which link points. 822 | unsigned long iStreamPosition; 823 | @@ -24,7 +24,7 @@ 824 | 825 | class LinkArray : public Array 826 | { 827 | - friend ostream& operator<<(ostream& os,LinkArray& o); 828 | + friend std::ostream& operator<<(std::ostream& os,LinkArray& o); 829 | public: 830 | LinkArray(); 831 | ~LinkArray(); 832 | @@ -39,7 +39,7 @@ 833 | public: 834 | WordLink(ResourceDataStream& aStream,const String& aResourceName,const String& aFileName,int aLineNumber); 835 | virtual void OverwriteLink(RCBinaryStream& os) const; 836 | - virtual ostream& StreamOut(ostream& os); 837 | + virtual std::ostream& StreamOut(std::ostream& os); 838 | static int NumberOfBytesOccupiesInStream(); 839 | }; 840 | 841 | @@ -48,7 +48,7 @@ 842 | public: 843 | LongLink(ResourceDataStream& aStream,const String& aResourceName,const String& aFileName,int aLineNumber); 844 | virtual void OverwriteLink(RCBinaryStream& os) const; 845 | - virtual ostream& StreamOut(ostream& os); 846 | + virtual std::ostream& StreamOut(std::ostream& os); 847 | static int NumberOfBytesOccupiesInStream(); 848 | }; 849 | 850 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/inc/nameidma.h sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/nameidma.h 851 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/inc/nameidma.h 2003-12-27 22:42:20.000000000 +0000 852 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/nameidma.h 2021-02-16 23:07:32.182197617 +0000 853 | @@ -10,7 +10,7 @@ 854 | 855 | class NameIdItem : public ArrayItem 856 | { 857 | - friend ostream& operator<<(ostream & os, NameIdItem & o); 858 | + friend std::ostream& operator<<(std::ostream & os, NameIdItem & o); 859 | public: 860 | NameIdItem(String aNameToSet,unsigned long aIdToSet); 861 | public: 862 | @@ -20,7 +20,7 @@ 863 | 864 | class NameIdMap : public Array 865 | { 866 | - friend ostream& operator<<(ostream & os,NameIdMap& aMap); 867 | + friend std::ostream& operator<<(std::ostream & os,NameIdMap& aMap); 868 | public: 869 | NameIdMap(); 870 | ~NameIdMap(); 871 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/inc/rcbinstr.h sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/rcbinstr.h 872 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/inc/rcbinstr.h 2003-12-27 22:42:20.000000000 +0000 873 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/rcbinstr.h 2021-02-16 23:18:22.164983972 +0000 874 | @@ -10,7 +10,7 @@ 875 | #pragma warning( disable : 4710 ) // function not inlined 876 | #endif 877 | 878 | -#include 879 | +#include 880 | #include "astring.h" 881 | #include "numval.h" 882 | #include "array.h" 883 | @@ -30,7 +30,7 @@ 884 | unsigned long GetPosition(); 885 | void SetPosition(unsigned long NewPosition); 886 | private: 887 | - ofstream iOs; 888 | + std::ofstream iOs; 889 | }; 890 | 891 | class ResourceDataStream // this class knows about resources that contain compressed Unicode - i.e. that each run of alternating compressed-Unicode and other-stuff needs to be preceded by a 1-2 byte run-length 892 | @@ -73,11 +73,11 @@ 893 | class Mark : public ArrayItem 894 | { 895 | public: 896 | - inline Mark(int aBufferPosition, MarkType aMarkType, unsigned int aOtherData) :iBufferPosition(aBufferPosition), iMarkType(aMarkType), iOtherData(aOtherData) {} 897 | + inline Mark(int aBufferPosition, MarkType aMarkType, unsigned long long aOtherData) :iBufferPosition(aBufferPosition), iMarkType(aMarkType), iOtherData(aOtherData) {} 898 | public: 899 | int iBufferPosition; 900 | MarkType iMarkType; 901 | - unsigned int iOtherData; 902 | + unsigned long long iOtherData; 903 | }; 904 | class ArrayOfMarks : public Array 905 | { 906 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/inc/resource.h sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/resource.h 907 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/inc/resource.h 2003-12-27 22:42:20.000000000 +0000 908 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/resource.h 2021-02-16 23:08:20.994436683 +0000 909 | @@ -20,7 +20,7 @@ 910 | 911 | class ResourceItemArray : public Array, public StackItem, public ArrayItem 912 | { 913 | - friend ostream & operator<< ( ostream & os, ResourceItemArray & o); 914 | + friend std::ostream & operator<< ( std::ostream & os, ResourceItemArray & o); 915 | public: 916 | ResourceItemArray(); 917 | ~ResourceItemArray(); 918 | @@ -48,7 +48,7 @@ 919 | 920 | class ResourceItemArrayArray : public Array 921 | { 922 | - friend ostream & operator<< ( ostream & os, ResourceItemArrayArray & o); 923 | + friend std::ostream & operator<< ( std::ostream & os, ResourceItemArrayArray & o); 924 | public: 925 | ResourceItemArrayArray(); 926 | ~ResourceItemArrayArray(); 927 | @@ -70,13 +70,13 @@ 928 | 929 | class ResourceHeader : public ArrayItem 930 | { 931 | - friend ostream & operator<< ( ostream & os, ResourceHeader & o); 932 | + friend std::ostream & operator<< ( std::ostream & os, ResourceHeader & o); 933 | public: 934 | ResourceHeader( String LabelToSet); 935 | ResourceHeader(); 936 | ~ResourceHeader(); 937 | void AddDefault(); 938 | - void Write( ostream &os); 939 | + void Write( std::ostream &os); 940 | void SetResourceId(NameIdMap& aMap, unsigned long aId, int aFormatAsHex); 941 | void StreamOut(RCBinaryStream& aStream, int& aSizeOfLargestResourceWhenUncompressed); 942 | inline bool ContainsCompressedUnicode() const {return iContainsCompressedUnicode;} 943 | @@ -97,7 +97,7 @@ 944 | virtual ResourceItemArray * GetRIA() = 0; 945 | virtual void Set( const String & ValueToSet) = 0; 946 | virtual void Set( const StringArray & ValuesToSet) = 0; 947 | - virtual ostream & StreamOut ( ostream & os) = 0; 948 | + virtual std::ostream & StreamOut ( std::ostream & os) = 0; 949 | virtual void StreamOut(ResourceDataStream& aStream) const = 0; 950 | virtual void AddDefault() = 0; 951 | virtual void SetSRLink( unsigned long SRLinkToSet) = 0; 952 | @@ -120,8 +120,8 @@ 953 | SimpleResourceItem(SimpleStructItem*); 954 | void Set(const String& aValueToSet); 955 | void Set(const StringArray& aValuesToSet); 956 | - virtual ostream& StreamOut(ostream& os); 957 | - friend ostream& operator<<(ostream& os,SimpleResourceItem & o); 958 | + virtual std::ostream& StreamOut(std::ostream& os); 959 | + friend std::ostream& operator<<(std::ostream& os,SimpleResourceItem & o); 960 | virtual void StreamOut(ResourceDataStream& aStream) const; 961 | virtual void AddDefault(); 962 | virtual void SetSRLink(unsigned long aSRLinkToSet); 963 | @@ -139,13 +139,13 @@ 964 | 965 | class ArrayResourceItem : public ResourceItem 966 | { 967 | - friend ostream& operator<<(ostream& os,ArrayResourceItem& aItem); 968 | + friend std::ostream& operator<<(std::ostream& os,ArrayResourceItem& aItem); 969 | public: 970 | ArrayResourceItem(ArrayStructItem *); 971 | ~ArrayResourceItem(); 972 | void Set(const String& aValueToSet); 973 | void Set(const StringArray& aValuesToSet); 974 | - ostream & StreamOut(ostream& os); 975 | + std::ostream & StreamOut(std::ostream& os); 976 | virtual void StreamOut(ResourceDataStream& aStream) const; 977 | virtual void AddDefault(); 978 | virtual void SetSRLink(unsigned long aSRLinkToSet); 979 | @@ -165,8 +165,8 @@ 980 | StructTypeResourceItem(StructTypeStructItem*); 981 | void Set(const String& ValueToSet); 982 | void Set(const StringArray& ValuesToSet); 983 | - ostream& StreamOut(ostream& os); 984 | - friend ostream& operator<<(ostream& os,StructTypeResourceItem& o); 985 | + std::ostream& StreamOut(std::ostream& os); 986 | + friend std::ostream& operator<<(std::ostream& os,StructTypeResourceItem& o); 987 | virtual void StreamOut(ResourceDataStream& aStream) const; 988 | virtual void AddDefault(); 989 | virtual void SetSRLink(unsigned long aSRLinkToSet); 990 | @@ -180,13 +180,13 @@ 991 | 992 | class StructArrayResourceItem : public ResourceItem 993 | { 994 | - friend ostream& operator<<(ostream& os,StructArrayResourceItem& aItem); 995 | + friend std::ostream& operator<<(std::ostream& os,StructArrayResourceItem& aItem); 996 | public: 997 | StructArrayResourceItem(StructArrayStructItem*); 998 | void Set(const String& ValueToSet); 999 | void Set(const StringArray& ValuesToSet); 1000 | ResourceItemArray* GetRIA(); 1001 | - ostream& StreamOut(ostream& os); 1002 | + std::ostream& StreamOut(std::ostream& os); 1003 | virtual void StreamOut(ResourceDataStream& aStream) const; 1004 | virtual void AddDefault(); 1005 | virtual void SetSRLink(unsigned long SRLinkToSet); 1006 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/inc/stringar.h sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/stringar.h 1007 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/inc/stringar.h 2003-12-27 22:42:20.000000000 +0000 1008 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/stringar.h 2021-02-16 23:02:19.192454872 +0000 1009 | @@ -11,7 +11,7 @@ 1010 | 1011 | class StringArray : public Array 1012 | { 1013 | - friend ostream& operator<<(ostream & os, StringArray & s); 1014 | + friend std::ostream& operator<<(std::ostream & os, StringArray & s); 1015 | friend RCBinaryStream& operator<<(RCBinaryStream & os, StringArray & s); 1016 | public: 1017 | StringArray(); 1018 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/inc/structst.h sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/structst.h 1019 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/inc/structst.h 2003-12-27 22:42:20.000000000 +0000 1020 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/inc/structst.h 2021-02-16 23:07:57.254321283 +0000 1021 | @@ -6,7 +6,7 @@ 1022 | #ifndef __STRUCTST_H__ 1023 | #define __STRUCTST_H__ 1024 | 1025 | -#include 1026 | +#include 1027 | #include "stringar.h" 1028 | #include "datatype.h" 1029 | 1030 | @@ -18,7 +18,7 @@ 1031 | { 1032 | public: 1033 | virtual ResourceItem * NewResourceItem() = 0; 1034 | - virtual ostream& StreamOut ( ostream & os) = 0; 1035 | + virtual std::ostream& StreamOut ( std::ostream & os) = 0; 1036 | protected: 1037 | StructItem( String LabelToSet); 1038 | virtual ~StructItem(); 1039 | @@ -31,12 +31,12 @@ 1040 | 1041 | class SimpleStructItem : public StructItem // e.g. WORD a = 5 1042 | { 1043 | - friend ostream& operator<< ( ostream & os, SimpleStructItem & o); 1044 | + friend std::ostream& operator<< ( std::ostream & os, SimpleStructItem & o); 1045 | public: 1046 | SimpleStructItem(DataType aItemTypeToSet,String aLabelToSet); 1047 | SimpleStructItem(DataType aItemTypeToSet,String aLabelToSet,String aMaxLength); 1048 | ResourceItem * NewResourceItem(); 1049 | - ostream& StreamOut ( ostream & os); 1050 | + std::ostream& StreamOut ( std::ostream & os); 1051 | virtual ~SimpleStructItem(); 1052 | SimpleStructItem( SimpleStructItem & Source); 1053 | SimpleStructItem& operator=( SimpleStructItem & Source); 1054 | @@ -50,12 +50,12 @@ 1055 | 1056 | class ArrayStructItem : public StructItem // e.g. WORD a[] = {1,2,3} 1057 | { 1058 | - friend ostream& operator<< ( ostream & os, ArrayStructItem & o); 1059 | + friend std::ostream& operator<< ( std::ostream & os, ArrayStructItem & o); 1060 | public: 1061 | ArrayStructItem( DataType ItemTypeToSet, String LabelToSet); 1062 | virtual ~ArrayStructItem(); 1063 | ResourceItem * NewResourceItem(); 1064 | - ostream& StreamOut ( ostream & os); 1065 | + std::ostream& StreamOut ( std::ostream & os); 1066 | public: 1067 | DataType iItemType; 1068 | StringArray iDefaults; 1069 | @@ -67,23 +67,23 @@ 1070 | 1071 | class StructTypeStructItem : public StructItem // e.g. STRUCT a 1072 | { 1073 | - friend ostream& operator<< ( ostream & os, StructTypeStructItem & o); 1074 | + friend std::ostream& operator<< ( std::ostream & os, StructTypeStructItem & o); 1075 | public: 1076 | StructTypeStructItem( String LabelToSet); 1077 | ResourceItem * NewResourceItem(); 1078 | - ostream& StreamOut ( ostream & os); 1079 | + std::ostream& StreamOut ( std::ostream & os); 1080 | }; 1081 | 1082 | // StructArrayStructItem 1083 | 1084 | class StructArrayStructItem : public StructItem // e.g. STRUCT a[] 1085 | { 1086 | - friend ostream& operator<< ( ostream & os, StructArrayStructItem & o); 1087 | + friend std::ostream& operator<< ( std::ostream & os, StructArrayStructItem & o); 1088 | public: 1089 | StructArrayStructItem( String LabelToSet); 1090 | StructArrayStructItem( String LabelToSet, String SizeToSet); 1091 | ResourceItem * NewResourceItem(); 1092 | - ostream& StreamOut ( ostream & os); 1093 | + std::ostream& StreamOut ( std::ostream & os); 1094 | virtual ~StructArrayStructItem(); 1095 | public: 1096 | DataType iLenType; 1097 | @@ -94,7 +94,7 @@ 1098 | 1099 | class StructItemArray : public Array 1100 | { 1101 | - friend ostream& operator<< ( ostream & os, StructItemArray & o); 1102 | + friend std::ostream& operator<< ( std::ostream & os, StructItemArray & o); 1103 | public: 1104 | StructItemArray(); 1105 | ~StructItemArray(); 1106 | @@ -114,7 +114,7 @@ 1107 | 1108 | class StructHeader : public ArrayItem 1109 | { 1110 | - friend ostream& operator<< ( ostream & os, StructHeader & o); 1111 | + friend std::ostream& operator<< ( std::ostream & os, StructHeader & o); 1112 | public: 1113 | StructHeader( String LabelToSet); 1114 | StructHeader( String LabelToSet, DataType LenTypeToSet); 1115 | @@ -128,7 +128,7 @@ 1116 | 1117 | class StructHeaderArray : public Array 1118 | { 1119 | - friend ostream& operator<< ( ostream & os, StructHeaderArray & o); 1120 | + friend std::ostream& operator<< ( std::ostream & os, StructHeaderArray & o); 1121 | public: 1122 | StructHeaderArray(); 1123 | ~StructHeaderArray(); 1124 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/astring.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/astring.cpp 1125 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/astring.cpp 2003-12-27 22:42:19.000000000 +0000 1126 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/astring.cpp 2021-02-16 22:55:04.916992947 +0000 1127 | @@ -3,7 +3,7 @@ 1128 | // Copyright (c) 1997-1999 Symbian Ltd. All rights reserved. 1129 | // 1130 | 1131 | -#include 1132 | +#include 1133 | #include 1134 | #include 1135 | #include 1136 | @@ -112,7 +112,7 @@ 1137 | return iLength; 1138 | } 1139 | 1140 | -ostream& operator<< ( ostream& os, const String & a) 1141 | +std::ostream& operator<< ( std::ostream& os, const String & a) 1142 | { 1143 | return ( os << ( ( a.iLength <= 0) ? "" : a.iRep) ); 1144 | } 1145 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/derived/rcomp.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/derived/rcomp.cpp 1146 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/derived/rcomp.cpp 2003-12-27 22:42:19.000000000 +0000 1147 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/derived/rcomp.cpp 2021-02-16 23:05:14.545481514 +0000 1148 | @@ -16,7 +16,7 @@ 1149 | 1150 | #include 1151 | #include 1152 | -#include 1153 | +#include 1154 | #include "resource.h" 1155 | #include "rcstack.h" 1156 | #include "rcompl.hpp" 1157 | @@ -900,18 +900,18 @@ 1158 | 1159 | case YYr1: { /* source : statement-list */ 1160 | #line 111 "../rcomp.y" 1161 | - if(verbose) { MOFF; cout << Divider << "\n" << Divider << endl; MON; } 1162 | + if(verbose) { MOFF; std::cout << Divider << "\n" << Divider << std::endl; MON; } 1163 | 1164 | } break; 1165 | 1166 | case YYr11: { /* struct-statement : struct-statement-start struct-item-list '}' */ 1167 | #line 136 "../rcomp.y" 1168 | - if(verbose) { MOFF; cout << Divider << "\n" << * pSH << Divider << endl; MON;} 1169 | + if(verbose) { MOFF; std::cout << Divider << "\n" << * pSH << Divider << std::endl; MON;} 1170 | } break; 1171 | 1172 | case YYr12: { /* struct-statement-start : L_STRUCT L_LABEL '{' */ 1173 | #line 139 "../rcomp.y" 1174 | - if(verbose) { MOFF;cout << "struct-statement-start " << yypvt[-1].Value << endl; MON;} 1175 | + if(verbose) { MOFF;std::cout << "struct-statement-start " << yypvt[-1].Value << std::endl; MON;} 1176 | pSH = new StructHeader(yypvt[-1].Value); 1177 | REGISTER_LINE; 1178 | pG->SHA.Add(pSH); 1179 | @@ -920,7 +920,7 @@ 1180 | 1181 | case YYr13: { /* struct-statement-start : L_STRUCT L_LABEL len-declaration '{' */ 1182 | #line 145 "../rcomp.y" 1183 | - if(verbose) { RCTypeArray Types; MOFF;cout << "struct-statement-start " << yypvt[-2].Value << " " << Types.GetName(yypvt[-1].Id) << endl; MON;} 1184 | + if(verbose) { RCTypeArray Types; MOFF;std::cout << "struct-statement-start " << yypvt[-2].Value << " " << Types.GetName(yypvt[-1].Id) << std::endl; MON;} 1185 | pSH = new StructHeader(yypvt[-2].Value, yypvt[-1].Id); 1186 | REGISTER_LINE; 1187 | pG->SHA.Add(pSH); 1188 | @@ -929,7 +929,7 @@ 1189 | 1190 | case YYr14: { /* struct-statement-start : L_STRUCT L_LABEL L_LEN '{' */ 1191 | #line 151 "../rcomp.y" 1192 | - if(verbose) { MOFF;cout << "struct-statement-start " << yypvt[-2].Value << " (WORD)" << endl; MON;} 1193 | + if(verbose) { MOFF;std::cout << "struct-statement-start " << yypvt[-2].Value << " (WORD)" << std::endl; MON;} 1194 | pSH = new StructHeader(yypvt[-2].Value, L_WORD); 1195 | REGISTER_LINE; 1196 | pG->SHA.Add(pSH); 1197 | @@ -938,7 +938,7 @@ 1198 | 1199 | case YYr15: { /* struct-item-list : struct-item-list struct-item ';' */ 1200 | #line 158 "../rcomp.y" 1201 | - if(verbose) { MOFF;cout << "struct-item-list Adding struct-item." << endl; MON;} 1202 | + if(verbose) { MOFF;std::cout << "struct-item-list Adding struct-item." << std::endl; MON;} 1203 | REGISTER_LINE; 1204 | pSH->iSIA.Add(yypvt[-1].pStructItem); 1205 | 1206 | @@ -951,7 +951,7 @@ 1207 | 1208 | case YYr22: { /* simple-struct-item : simple-struct-item-start '(' natural-expression ')' */ 1209 | #line 173 "../rcomp.y" 1210 | - if(verbose) { MOFF;cout << " Limit: " << yypvt[-1].Value << endl; MON;} 1211 | + if(verbose) { MOFF;std::cout << " Limit: " << yypvt[-1].Value << std::endl; MON;} 1212 | yypvt[-3].pSimpleStructItem->iLengthLimit = yypvt[-1].Value; 1213 | yyval.pStructItem = yypvt[-3].pSimpleStructItem; 1214 | 1215 | @@ -959,7 +959,7 @@ 1216 | 1217 | case YYr23: { /* simple-struct-item : simple-struct-item-start '=' simple-initialiser */ 1218 | #line 178 "../rcomp.y" 1219 | - if(verbose) { MOFF;cout << " Default: " << yypvt[0].Value << endl; MON;} 1220 | + if(verbose) { MOFF;std::cout << " Default: " << yypvt[0].Value << std::endl; MON;} 1221 | yypvt[-2].pSimpleStructItem->iDefault = yypvt[0].Value; 1222 | yyval.pStructItem = yypvt[-2].pSimpleStructItem; 1223 | 1224 | @@ -967,7 +967,7 @@ 1225 | 1226 | case YYr24: { /* simple-struct-item : simple-struct-item-start '(' natural-expression ')' '=' string-expression */ 1227 | #line 183 "../rcomp.y" 1228 | - if(verbose) { MOFF;cout << " Limit: " << yypvt[-3].Value << ", Default: " << yypvt[0].Value << endl; MON;} 1229 | + if(verbose) { MOFF;std::cout << " Limit: " << yypvt[-3].Value << ", Default: " << yypvt[0].Value << std::endl; MON;} 1230 | NumericValue Limit(yypvt[-3].Value, L_LONG); 1231 | if(String(yypvt[0].Value).ExportLength(TargetCharacterSet,SourceCharacterSet) > Limit.GetULong() ) 1232 | { 1233 | @@ -985,7 +985,7 @@ 1234 | #line 198 "../rcomp.y" 1235 | if(verbose) 1236 | { RCTypeArray Types; 1237 | - MOFF;cout << "simple-struct-item " << Types.GetName(yypvt[-1].Id) << " " << yypvt[0].Value << endl; MON; 1238 | + MOFF;std::cout << "simple-struct-item " << Types.GetName(yypvt[-1].Id) << " " << yypvt[0].Value << std::endl; MON; 1239 | } 1240 | yyval.pSimpleStructItem = new SimpleStructItem(yypvt[-1].Id,yypvt[0].Value); 1241 | assert(yyval.pSimpleStructItem != NULL); 1242 | @@ -996,7 +996,7 @@ 1243 | #line 206 "../rcomp.y" 1244 | if(verbose) 1245 | { RCTypeArray Types; 1246 | - MOFF;cout << "simple-struct-item " << Types.GetName(yypvt[-4].Id) << " " << yypvt[0].Value << endl; MON; 1247 | + MOFF;std::cout << "simple-struct-item " << Types.GetName(yypvt[-4].Id) << " " << yypvt[0].Value << std::endl; MON; 1248 | } 1249 | String s(NumericValue::ltoa(yypvt[-2].NumInitialiser)); 1250 | yyval.pSimpleStructItem = new SimpleStructItem(yypvt[-4].Id,yypvt[0].Value,s); 1251 | @@ -1105,7 +1105,7 @@ 1252 | 1253 | case YYr44: { /* array-struct-item : array-struct-item-base '=' '{' simple-initialiser-list '}' */ 1254 | #line 263 "../rcomp.y" 1255 | - if(verbose) { MOFF;cout << "array-struct-item with simple-initialiser-list" << endl;MON;} 1256 | + if(verbose) { MOFF;std::cout << "array-struct-item with simple-initialiser-list" << std::endl;MON;} 1257 | yypvt[-4].pArrayStructItem->iDefaults = * yypvt[-1].pStringArray; 1258 | if(yypvt[-4].pArrayStructItem->iSize.Length() > 0) 1259 | { 1260 | @@ -1124,14 +1124,14 @@ 1261 | 1262 | case YYr45: { /* array-struct-item-base : array-struct-item-start ']' */ 1263 | #line 280 "../rcomp.y" 1264 | - if(verbose) { MOFF;cout << "array-struct-item-base with no size" << endl;MON;} 1265 | + if(verbose) { MOFF;std::cout << "array-struct-item-base with no size" << std::endl;MON;} 1266 | yyval.pArrayStructItem =yypvt[-1].pArrayStructItem; 1267 | 1268 | } break; 1269 | 1270 | case YYr46: { /* array-struct-item-base : array-struct-item-start natural-expression ']' */ 1271 | #line 284 "../rcomp.y" 1272 | - if(verbose) { MOFF;cout << "array-struct-item-base with size " << yypvt[-1].Value << endl;MON;} 1273 | + if(verbose) { MOFF;std::cout << "array-struct-item-base with size " << yypvt[-1].Value << std::endl;MON;} 1274 | yypvt[-2].pArrayStructItem->iSize = yypvt[-1].Value; 1275 | yyval.pArrayStructItem = yypvt[-2].pArrayStructItem; 1276 | 1277 | @@ -1141,7 +1141,7 @@ 1278 | #line 289 "../rcomp.y" 1279 | if(verbose) 1280 | { RCTypeArray Types; 1281 | - MOFF;cout << "array-struct-item-base with LenType " << Types.GetName(yypvt[-2].Id) << endl;MON; 1282 | + MOFF;std::cout << "array-struct-item-base with LenType " << Types.GetName(yypvt[-2].Id) << std::endl;MON; 1283 | } 1284 | yypvt[-1].pArrayStructItem->iLenType = yypvt[-2].Id; 1285 | yyval.pArrayStructItem = yypvt[-1].pArrayStructItem; 1286 | @@ -1152,7 +1152,7 @@ 1287 | #line 297 "../rcomp.y" 1288 | if(verbose) 1289 | { RCTypeArray Types; 1290 | - MOFF;cout << "array-struct-item-base with size " << yypvt[-1].Value << " and LenType " << Types.GetName(yypvt[-3].Id) << endl;MON; 1291 | + MOFF;std::cout << "array-struct-item-base with size " << yypvt[-1].Value << " and LenType " << Types.GetName(yypvt[-3].Id) << std::endl;MON; 1292 | } 1293 | yypvt[-2].pArrayStructItem->iLenType = yypvt[-3].Id; 1294 | yypvt[-2].pArrayStructItem->iSize = yypvt[-1].Value; 1295 | @@ -1164,7 +1164,7 @@ 1296 | #line 307 "../rcomp.y" 1297 | if(verbose) 1298 | { RCTypeArray Types; 1299 | - MOFF;cout << "array-struct-item-start " << Types.GetName(yypvt[-2].Id) << " " << yypvt[-1].Value << endl;MON; 1300 | + MOFF;std::cout << "array-struct-item-start " << Types.GetName(yypvt[-2].Id) << " " << yypvt[-1].Value << std::endl;MON; 1301 | } 1302 | yyval.pArrayStructItem = new ArrayStructItem(yypvt[-2].Id, yypvt[-1].Value); 1303 | 1304 | @@ -1182,7 +1182,7 @@ 1305 | 1306 | case YYr52: { /* struct-type-struct-item : L_STRUCT L_LABEL */ 1307 | #line 319 "../rcomp.y" 1308 | - if(verbose) { MOFF;cout << "struct-type-struct-item " << yypvt[0].Value << endl;MON;} 1309 | + if(verbose) { MOFF;std::cout << "struct-type-struct-item " << yypvt[0].Value << std::endl;MON;} 1310 | yyval.pStructItem = new StructTypeStructItem(yypvt[0].Value); 1311 | 1312 | } break; 1313 | @@ -1194,21 +1194,21 @@ 1314 | 1315 | case YYr54: { /* struct-array-struct-item : L_LEN len-declaration struct-array-struct-item-base */ 1316 | #line 326 "../rcomp.y" 1317 | - if(verbose) { RCTypeArray Types; MOFF;cout << "struct-array-struct-item - Setting Size to " << Types.GetName(yypvt[-1].Id) << endl;MON;} 1318 | + if(verbose) { RCTypeArray Types; MOFF;std::cout << "struct-array-struct-item - Setting Size to " << Types.GetName(yypvt[-1].Id) << std::endl;MON;} 1319 | yypvt[0].pStructArrayStructItem->iLenType = yypvt[-1].Id; yyval.pStructItem = yypvt[0].pStructArrayStructItem; 1320 | 1321 | } break; 1322 | 1323 | case YYr55: { /* struct-array-struct-item-base : L_STRUCT L_LABEL '[' ']' */ 1324 | #line 331 "../rcomp.y" 1325 | - if(verbose) { MOFF;cout << "struct-array-struct-item-base " << yypvt[-2].Value << endl;MON;} 1326 | + if(verbose) { MOFF;std::cout << "struct-array-struct-item-base " << yypvt[-2].Value << std::endl;MON;} 1327 | yyval.pStructArrayStructItem = new StructArrayStructItem(yypvt[-2].Value); 1328 | 1329 | } break; 1330 | 1331 | case YYr56: { /* struct-array-struct-item-base : L_STRUCT L_LABEL '[' natural-expression ']' */ 1332 | #line 335 "../rcomp.y" 1333 | - if(verbose) { MOFF;cout << "struct-array-struct-item-base " << yypvt[-3].Value << " " << yypvt[-1].Value << endl;MON;} 1334 | + if(verbose) { MOFF;std::cout << "struct-array-struct-item-base " << yypvt[-3].Value << " " << yypvt[-1].Value << std::endl;MON;} 1335 | yyval.pStructArrayStructItem = new StructArrayStructItem(yypvt[-3].Value, yypvt[-1].Value); 1336 | 1337 | } break; 1338 | @@ -1218,7 +1218,7 @@ 1339 | 1340 | pResourceHeader->AddDefault(); 1341 | CurrentId+=CurrentIdStep; 1342 | - if(verbose) { MOFF;cout << "Resource ID "<< CurrentId << endl << Divider << "\n" << * pResourceHeader << Divider << endl;MON;} 1343 | + if(verbose) { MOFF;std::cout << "Resource ID "<< CurrentId << std::endl << Divider << "\n" << * pResourceHeader << Divider << std::endl;MON;} 1344 | pResourceHeader->SetResourceId(*pResourceNameIds,CurrentId,FormatIdAsHex); 1345 | pG->Index.Add(pResourceHeader); 1346 | pResourceHeader = NULL; 1347 | @@ -1228,7 +1228,7 @@ 1348 | case YYr59: { /* resource-statement-start : L_LOCAL resource-statement-start-names */ 1349 | #line 356 "../rcomp.y" 1350 | 1351 | - if(verbose) { MOFF;cout << "resource-statement-start LOCAL" << endl;MON;} 1352 | + if(verbose) { MOFF;std::cout << "resource-statement-start LOCAL" << std::endl;MON;} 1353 | assert(pResourceHeader != NULL); 1354 | pResourceHeader->iLocal = 1; 1355 | 1356 | @@ -1236,7 +1236,7 @@ 1357 | 1358 | case YYr61: { /* resource-statement-start-names : L_RESOURCE L_LABEL L_LABEL */ 1359 | #line 364 "../rcomp.y" 1360 | - if(verbose) { MOFF;cout << "resource-statement-start-names " << yypvt[-1].Value << " " << yypvt[0].Value << endl;MON;} 1361 | + if(verbose) { MOFF;std::cout << "resource-statement-start-names " << yypvt[-1].Value << " " << yypvt[0].Value << std::endl;MON;} 1362 | assert(pResourceHeader == NULL); 1363 | pResourceHeader = new ResourceHeader(yypvt[0].Value); 1364 | pCurrentRIA = & (pResourceHeader->iRIA); 1365 | @@ -1252,7 +1252,7 @@ 1366 | 1367 | case YYr62: { /* resource-statement-start-names : L_RESOURCE L_LABEL */ 1368 | #line 376 "../rcomp.y" 1369 | - if(verbose) { MOFF;cout << "resource-statement-start-names " << yypvt[0].Value << " " << endl;MON;} 1370 | + if(verbose) { MOFF;std::cout << "resource-statement-start-names " << yypvt[0].Value << " " << std::endl;MON;} 1371 | assert(pResourceHeader == NULL); 1372 | pResourceHeader = new ResourceHeader; 1373 | pCurrentRIA = & (pResourceHeader->iRIA); 1374 | @@ -1263,7 +1263,7 @@ 1375 | 1376 | case YYr63: { /* resource-item-list : resource-item-list resource-item ';' */ 1377 | #line 385 "../rcomp.y" 1378 | - if(verbose) { MOFF;cout << "resource-item-list" << endl;MON;} 1379 | + if(verbose) { MOFF;std::cout << "resource-item-list" << std::endl;MON;} 1380 | } break; 1381 | 1382 | case YYr64: { /* resource-item-list : resource-item-list error ';' */ 1383 | @@ -1273,7 +1273,7 @@ 1384 | 1385 | case YYr66: { /* resource-item : L_LABEL '=' simple-initialiser */ 1386 | #line 390 "../rcomp.y" 1387 | - if(verbose) { MOFF;cout << "resource-item " << yypvt[-2].Value << " " << yypvt[0].Value << endl;MON;} 1388 | + if(verbose) { MOFF;std::cout << "resource-item " << yypvt[-2].Value << " " << yypvt[0].Value << std::endl;MON;} 1389 | REGISTER_LINE; 1390 | pCurrentRIA->Set(yypvt[-2].Value, yypvt[0].Value); 1391 | 1392 | @@ -1283,7 +1283,7 @@ 1393 | #line 400 "../rcomp.y" 1394 | 1395 | if (verbose) 1396 | - { MOFF;cout << "resource-simple-array-item " << yypvt[-3].Value << endl;MON;} 1397 | + { MOFF;std::cout << "resource-simple-array-item " << yypvt[-3].Value << std::endl;MON;} 1398 | 1399 | } break; 1400 | 1401 | @@ -1291,7 +1291,7 @@ 1402 | #line 405 "../rcomp.y" 1403 | 1404 | if (verbose) 1405 | - { MOFF;cout << "resource-simple-array-item " << yypvt[-4].Value << " with simple-initialiser-list" << endl;MON;} 1406 | + { MOFF;std::cout << "resource-simple-array-item " << yypvt[-4].Value << " with simple-initialiser-list" << std::endl;MON;} 1407 | REGISTER_LINE; 1408 | pCurrentRIA->Set(yypvt[-4].Value, * yypvt[-1].pStringArray); 1409 | delete yypvt[-1].pStringArray; 1410 | @@ -1300,14 +1300,14 @@ 1411 | 1412 | case YYr72: { /* struct-resource-item : struct-resource-item-start resource-item-list '}' */ 1413 | #line 434 "../rcomp.y" 1414 | - if(verbose) { MOFF;cout << "struct-resource-item" << endl;MON;} 1415 | + if(verbose) { MOFF;std::cout << "struct-resource-item" << std::endl;MON;} 1416 | pCurrentRIA = pG->RIAStack.Pop(); 1417 | 1418 | } break; 1419 | 1420 | case YYr73: { /* struct-resource-item-start : L_LABEL '=' L_LABEL '{' */ 1421 | #line 439 "../rcomp.y" 1422 | - if(verbose) { MOFF;cout << "struct-resource-item-start " << yypvt[-3].Value << " " << yypvt[-1].Value << endl;MON;} 1423 | + if(verbose) { MOFF;std::cout << "struct-resource-item-start " << yypvt[-3].Value << " " << yypvt[-1].Value << std::endl;MON;} 1424 | REGISTER_LINE; 1425 | pCurrentRIA->Set(yypvt[-3].Value, yypvt[-1].Value); 1426 | pG->RIAStack.Push(pCurrentRIA); 1427 | @@ -1317,7 +1317,7 @@ 1428 | 1429 | case YYr74: { /* struct-array-resource-item : struct-array-resource-item-start struct-array-resource-item-list-top '}' */ 1430 | #line 448 "../rcomp.y" 1431 | - if(verbose) { MOFF;cout << "struct-array-resource-item" << endl;MON;} 1432 | + if(verbose) { MOFF;std::cout << "struct-array-resource-item" << std::endl;MON;} 1433 | pG->SRIStack.Pop(); 1434 | 1435 | } break; 1436 | @@ -1329,7 +1329,7 @@ 1437 | 1438 | case YYr76: { /* struct-array-resource-item-start : L_LABEL '=' '{' L_LABEL '{' */ 1439 | #line 455 "../rcomp.y" 1440 | - if(verbose) { MOFF;cout << "struct-array-resource-item-start " << yypvt[-4].Value << " " << yypvt[-1].Value << endl;MON;} 1441 | + if(verbose) { MOFF;std::cout << "struct-array-resource-item-start " << yypvt[-4].Value << " " << yypvt[-1].Value << std::endl;MON;} 1442 | ResourceItem * p = pCurrentRIA->Find(yypvt[-4].Value); 1443 | pG->SRIStack.Push(p); 1444 | REGISTER_LINE; 1445 | @@ -1341,21 +1341,21 @@ 1446 | 1447 | case YYr80: { /* struct-array-resource-item-list-top-start : resource-item-list '}' */ 1448 | #line 470 "../rcomp.y" 1449 | - if(verbose) { MOFF;cout << "struct-array-resource-item-list-top " << endl;MON;} 1450 | + if(verbose) { MOFF;std::cout << "struct-array-resource-item-list-top " << std::endl;MON;} 1451 | pCurrentRIA = pG->RIAStack.Pop(); 1452 | 1453 | } break; 1454 | 1455 | case YYr83: { /* struct-array-resource-item-list-item : struct-array-resource-item-list-item-start resource-item-list '}' */ 1456 | #line 480 "../rcomp.y" 1457 | - if(verbose) { MOFF;cout << "struct-array-resource-item-list-item " << endl;MON;} 1458 | + if(verbose) { MOFF;std::cout << "struct-array-resource-item-list-item " << std::endl;MON;} 1459 | pCurrentRIA = pG->RIAStack.Pop(); 1460 | 1461 | } break; 1462 | 1463 | case YYr84: { /* struct-array-resource-item-list-item-start : L_LABEL '{' */ 1464 | #line 485 "../rcomp.y" 1465 | - if(verbose) { MOFF;cout << "struct-array-resource-item-list-item-start " << yypvt[-1].Value << endl;MON;} 1466 | + if(verbose) { MOFF;std::cout << "struct-array-resource-item-list-item-start " << yypvt[-1].Value << std::endl;MON;} 1467 | ResourceItem * p = pG->SRIStack.Peek(); 1468 | REGISTER_LINE; 1469 | p->Set(yypvt[-1].Value); 1470 | @@ -1403,7 +1403,7 @@ 1471 | 1472 | if(verbose) 1473 | { 1474 | - MOFF;cout << "simple-initialiser-list - single string " << yypvt[0].Value << endl;MON; 1475 | + MOFF;std::cout << "simple-initialiser-list - single string " << yypvt[0].Value << std::endl;MON; 1476 | } 1477 | yyval.pStringArray = new StringArray; 1478 | yyval.pStringArray->Add(new String(yypvt[0].Value) ); 1479 | @@ -1412,7 +1412,7 @@ 1480 | 1481 | case YYr91: { /* simple-initialiser-list : simple-initialiser-list ',' simple-initialiser */ 1482 | #line 543 "../rcomp.y" 1483 | - if(verbose) { MOFF;cout << "simple-initialiser-list - part of list " << yypvt[0].Value << endl;MON;} 1484 | + if(verbose) { MOFF;std::cout << "simple-initialiser-list - part of list " << yypvt[0].Value << std::endl;MON;} 1485 | assert(yypvt[-2].pStringArray != NULL); 1486 | yypvt[-2].pStringArray->Add(new String(yypvt[0].Value ) ); 1487 | yyval.pStringArray = yypvt[-2].pStringArray; 1488 | @@ -1426,7 +1426,7 @@ 1489 | 1490 | case YYr93: { /* natural-expression-numeric : L_NUM_NATURAL */ 1491 | #line 554 "../rcomp.y" 1492 | - if(verbose) { MOFF;cout << "Converting number " << yypvt[0].Value << endl;MON;} 1493 | + if(verbose) { MOFF;std::cout << "Converting number " << yypvt[0].Value << std::endl;MON;} 1494 | REGISTER_LINE; 1495 | NumericValue v(yypvt[0].Value, L_LONG); yyval.NumInitialiser = v.GetLong(); 1496 | 1497 | @@ -1545,7 +1545,7 @@ 1498 | 1499 | case YYr108: { /* character_set-statement : L_CHARACTER_SET L_LABEL */ 1500 | #line 655 "../rcomp.y" 1501 | - if(verbose) { MOFF;cout << "character_set-statement " << yypvt[0].Value << endl;MON;} 1502 | + if(verbose) { MOFF;std::cout << "character_set-statement " << yypvt[0].Value << std::endl;MON;} 1503 | REGISTER_LINE; 1504 | SourceCharacterSet = CharacterSetID(yypvt[0].Value); 1505 | if ( SourceCharacterSet == String::UNKNOWN ) 1506 | @@ -1566,7 +1566,7 @@ 1507 | case YYr109: { /* offset-statement : L_OFFSET natural-expression */ 1508 | #line 679 "../rcomp.y" 1509 | if(verbose) { RCTypeArray Types; 1510 | - MOFF;cout << "offset-statement " << yypvt[0].Value << endl;MON; } 1511 | + MOFF;std::cout << "offset-statement " << yypvt[0].Value << std::endl;MON; } 1512 | REGISTER_LINE; 1513 | CurrentId=((long) NumericValue(yypvt[0].Value, L_LONG).GetULong() ); 1514 | 1515 | @@ -1574,7 +1574,7 @@ 1516 | 1517 | case YYr110: { /* system-statement : L_SYSTEM */ 1518 | #line 690 "../rcomp.y" 1519 | - if(verbose) { MOFF;cout << "system-statement" << endl;MON;} 1520 | + if(verbose) { MOFF;std::cout << "system-statement" << std::endl;MON;} 1521 | CurrentIdStep=-1; 1522 | 1523 | } break; 1524 | @@ -1583,7 +1583,7 @@ 1525 | #line 704 "../rcomp.y" 1526 | 1527 | if(verbose) 1528 | - { MOFF;cout << "enum-statement" << endl;MON;} 1529 | + { MOFF;std::cout << "enum-statement" << std::endl;MON;} 1530 | CurrentEnumName = yypvt[-1].Value; 1531 | CurrentEnumValue=0; 1532 | 1533 | @@ -1593,7 +1593,7 @@ 1534 | #line 711 "../rcomp.y" 1535 | 1536 | if(verbose) 1537 | - { MOFF;cout << "enum-statement" << endl;MON;} 1538 | + { MOFF;std::cout << "enum-statement" << std::endl;MON;} 1539 | CurrentEnumName = ""; 1540 | CurrentEnumValue=0; 1541 | 1542 | @@ -1957,7 +1957,7 @@ 1543 | // ABCD corresponds to the number 4321 which becomes ( (4*27 + 3) * 27 + 2) * 27 + 1. 1544 | 1545 | if(verbose) 1546 | - { MOFF;cout << "name-statement " << NameStatementValue << endl;MON;} 1547 | + { MOFF;std::cout << "name-statement " << NameStatementValue << std::endl;MON;} 1548 | if ( NameStatementValue.Length() > 4) 1549 | { 1550 | ErrorHandler::OutputErrorLine( "Name must be no longer than four characters"); 1551 | @@ -1976,7 +1976,7 @@ 1552 | CurrentId = NewId << 12; 1553 | FormatIdAsHex = 1; 1554 | if(verbose) 1555 | - { MOFF;cout << "Current id " << CurrentId << endl;MON;} 1556 | + { MOFF;std::cout << "Current id " << CurrentId << std::endl;MON;} 1557 | } 1558 | 1559 | 1560 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/derived/rcompl.cph sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/derived/rcompl.cph 1561 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/derived/rcompl.cph 2003-12-27 22:42:19.000000000 +0000 1562 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/derived/rcompl.cph 2021-02-16 23:28:08.506794737 +0000 1563 | @@ -235,12 +235,12 @@ 1564 | 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 1565 | 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 1566 | 151, 152, 171, 173, 173, 175, 177, 178, 180, 174, 181, 170, 169, 168, 166, 165, 1567 | - 170, 169, 168, 166, 165, 164, 163, 187, 171, 152, 164, 175, ~0, ~0, 152, 174, 1568 | - ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 1569 | - ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 1570 | - ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 1571 | - ~0, ~0, ~0, 152, ~0, ~0, ~0, ~0, ~0, 152, ~0, ~0, ~0, 152, ~0, ~0, 1572 | - ~0, ~0, ~0, ~0, ~0, 152, ~0, ~0, ~0, 152, ~0, 152, ~0, 152, 162, 162, 1573 | + 170, 169, 168, 166, 165, 164, 163, 187, 171, 152, 164, 175, 255, 255, 152, 174, 1574 | + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1575 | + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1576 | + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1577 | + 255, 255, 255, 152, 255, 255, 255, 255, 255, 152, 255, 255, 255, 152, 255, 255, 1578 | + 255, 255, 255, 255, 255, 152, 255, 255, 255, 152, 255, 152, 255, 152, 162, 162, 1579 | 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 1580 | 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 1581 | 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 1582 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/errorhan.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/errorhan.cpp 1583 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/errorhan.cpp 2003-12-27 22:42:19.000000000 +0000 1584 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/errorhan.cpp 2021-02-16 23:09:32.410774591 +0000 1585 | @@ -19,6 +19,6 @@ 1586 | 1587 | void ErrorHandler::OutputErrorLine(const String& aAdditionalText) 1588 | { 1589 | - cerr << iFileName << "(" << iLineNumber << ") : " << aAdditionalText << endl; 1590 | + std::cerr << iFileName << "(" << iLineNumber << ") : " << aAdditionalText << std::endl; 1591 | } 1592 | 1593 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/indextab.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/indextab.cpp 1594 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/indextab.cpp 2005-01-31 13:56:40.000000000 +0000 1595 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/indextab.cpp 2021-02-16 23:10:28.287030220 +0000 1596 | @@ -42,10 +42,10 @@ 1597 | return os; 1598 | } 1599 | 1600 | -ostream & operator<< ( ostream & os, const IndexTableItem & o) 1601 | +std::ostream & operator<< ( std::ostream & os, const IndexTableItem & o) 1602 | { 1603 | unsigned long offset = (o.iOffset[1]<<8)|o.iOffset[0]; 1604 | - os << "IndexTableItem " << hex << offset << dec << "\t" << o.iResource->iLabel << endl; 1605 | + os << "IndexTableItem " << hex << offset << dec << "\t" << o.iResource->iLabel << std::endl; 1606 | return os; 1607 | } 1608 | 1609 | @@ -76,13 +76,13 @@ 1610 | } 1611 | 1612 | 1613 | -ostream & operator<< ( ostream & os, const IndexTable & o) 1614 | +std::ostream & operator<< ( std::ostream & os, const IndexTable & o) 1615 | { 1616 | - os << "IndexTable" << endl; 1617 | + os << "IndexTable" << std::endl; 1618 | 1619 | if ( o.Size() == 0) 1620 | { 1621 | - os << "" << endl; 1622 | + os << "" << std::endl; 1623 | return os; 1624 | } 1625 | 1626 | @@ -93,7 +93,7 @@ 1627 | os << * p; 1628 | 1629 | unsigned long offset = (o.iOffset[1]<<8)|o.iOffset[0]; 1630 | - os << "IndexTable " << hex << offset << dec << endl; 1631 | + os << "IndexTable " << hex << offset << dec << std::endl; 1632 | return os; 1633 | } 1634 | 1635 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/linkarra.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/linkarra.cpp 1636 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/linkarra.cpp 2003-12-27 22:42:19.000000000 +0000 1637 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/linkarra.cpp 2021-02-16 23:11:25.247283786 +0000 1638 | @@ -37,7 +37,7 @@ 1639 | 1640 | void LinkArray::OverwriteLinks ( RCBinaryStream & os ) const 1641 | { 1642 | - if ( verbose) { MOFF; cout << "Writing in correct links." << endl; MON;} 1643 | + if ( verbose) { MOFF; std::cout << "Writing in correct links." << std::endl; MON;} 1644 | LinkArrayIterator next( *this); 1645 | LinkItem * p; 1646 | while ( ( p = next() ) != NULL) 1647 | @@ -65,7 +65,7 @@ 1648 | 1649 | void WordLink::OverwriteLink( RCBinaryStream & os ) const 1650 | { 1651 | - if ( verbose) { MOFF; cout << "Writing WORD link: " << iResourceName << "\t" << iStreamPosition << endl; MON;} 1652 | + if ( verbose) { MOFF; std::cout << "Writing WORD link: " << iResourceName << "\t" << iStreamPosition << std::endl; MON;} 1653 | os.SetPosition(iStreamPosition); 1654 | ErrorHandler::Register(iFileName,iLineNumber); 1655 | os << NumericValue(pResourceNameIds->FindId(iResourceName),L_WORD); 1656 | @@ -73,7 +73,7 @@ 1657 | 1658 | void LongLink::OverwriteLink( RCBinaryStream & os ) const 1659 | { 1660 | - if ( verbose) { MOFF; cout << "Writing LONG link: " << iResourceName << "\t" << iStreamPosition << endl; MON;} 1661 | + if ( verbose) { MOFF; std::cout << "Writing LONG link: " << iResourceName << "\t" << iStreamPosition << std::endl; MON;} 1662 | os.SetPosition(iStreamPosition); 1663 | ErrorHandler::Register(iFileName,iLineNumber); 1664 | os << NumericValue(pResourceNameIds->FindId(iResourceName),L_LONG); 1665 | @@ -96,23 +96,23 @@ 1666 | LinkItem(aStream,aResourceName,aFileName,aLineNumber) 1667 | {} 1668 | 1669 | -ostream & WordLink::StreamOut ( ostream & os) 1670 | +std::ostream & WordLink::StreamOut ( std::ostream & os) 1671 | { 1672 | - os << "WordLink: " << iStreamPosition << "\t" << iResourceName << endl; 1673 | + os << "WordLink: " << iStreamPosition << "\t" << iResourceName << std::endl; 1674 | 1675 | return os; 1676 | } 1677 | 1678 | -ostream & LongLink::StreamOut( ostream & os) 1679 | +std::ostream & LongLink::StreamOut( std::ostream & os) 1680 | { 1681 | - os << "LongLink: " << iStreamPosition << "\t" << iResourceName << endl; 1682 | + os << "LongLink: " << iStreamPosition << "\t" << iResourceName << std::endl; 1683 | 1684 | return os; 1685 | } 1686 | 1687 | -ostream & operator<< ( ostream & os, LinkArray & o) 1688 | +std::ostream & operator<< ( std::ostream & os, LinkArray & o) 1689 | { 1690 | - os << "LinkArray *******" << endl; 1691 | + os << "LinkArray *******" << std::endl; 1692 | 1693 | LinkArrayIterator next( o); 1694 | LinkItem * p; 1695 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/main.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/main.cpp 1696 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/main.cpp 2005-02-01 13:39:46.000000000 +0000 1697 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/main.cpp 2021-02-16 23:12:03.679451245 +0000 1698 | @@ -109,22 +109,22 @@ 1699 | 1700 | if(verbose) 1701 | { 1702 | - MOFF; cout << aIndex; cout << endl; MON; 1703 | + MOFF; std::cout << aIndex; std::cout << std::endl; MON; 1704 | } 1705 | } 1706 | 1707 | void OutputHelp() 1708 | { 1709 | - cerr << "Resource compiler version " << version << " (C) 1997-2001 Symbian Ltd." << endl; 1710 | - cerr << "Usage: rcomp [-vpu] [-oRSCFile] [-{uid2,uid3}] [-hHeaderFile] [-sSourceFile] [-iBaseInputFileName]" << endl; 1711 | - cerr << "\tv" << "\tverbose" << endl; 1712 | - cerr << "\tp" << "\tParser debugging" << endl; 1713 | - cerr << endl; 1714 | - cerr << "\tu" << "\tGenerate Unicode resource binary" << endl; 1715 | - cerr << endl; 1716 | - cerr << "If no source file is specified, the source will be read from standard input." << endl; 1717 | - cerr << "(-i is used to specify the file given to the preprocessor this " << endl; 1718 | - cerr << " name is used in generating debug output.)" << endl; 1719 | + std::cerr << "Resource compiler version " << version << " (C) 1997-2001 Symbian Ltd." << std::endl; 1720 | + std::cerr << "Usage: rcomp [-vpu] [-oRSCFile] [-{uid2,uid3}] [-hHeaderFile] [-sSourceFile] [-iBaseInputFileName]" << std::endl; 1721 | + std::cerr << "\tv" << "\tverbose" << std::endl; 1722 | + std::cerr << "\tp" << "\tParser debugging" << std::endl; 1723 | + std::cerr << std::endl; 1724 | + std::cerr << "\tu" << "\tGenerate Unicode resource binary" << std::endl; 1725 | + std::cerr << std::endl; 1726 | + std::cerr << "If no source file is specified, the source will be read from standard input." << std::endl; 1727 | + std::cerr << "(-i is used to specify the file given to the preprocessor this " << std::endl; 1728 | + std::cerr << " name is used in generating debug output.)" << std::endl; 1729 | } 1730 | 1731 | 1732 | @@ -133,7 +133,7 @@ 1733 | 1734 | int main(int argc, char * argv[]) 1735 | { 1736 | - cout << "\n"; 1737 | + std::cout << "\n"; 1738 | int vParam=0; 1739 | logmemorysetting = 0; 1740 | unsigned short pParam = 0; 1741 | @@ -242,7 +242,7 @@ 1742 | { 1743 | if((pSourceFile = fopen(SourceFileName.GetBuffer(), "r") ) == NULL) 1744 | { 1745 | - cerr << "Failed to open " << SourceFileName << endl; 1746 | + std::cerr << "Failed to open " << SourceFileName << std::endl; 1747 | exit(-2); 1748 | } 1749 | } 1750 | @@ -260,7 +260,7 @@ 1751 | 1752 | if (ret != 0) 1753 | { 1754 | - cerr << "RCOMP failed with code " << ret << endl; 1755 | + std::cerr << "RCOMP failed with code " << ret << std::endl; 1756 | exit(ret); 1757 | } 1758 | // A successful parse, now generate the output files 1759 | @@ -287,7 +287,7 @@ 1760 | 1761 | if (verbose) 1762 | { 1763 | - MOFF; cout << uidcrcTool << " " << uidcrcUIDs[0] << " " << uidcrcUIDs[1] << " " << uidcrcUIDs[2] << " " << DataOutputFileName.GetBuffer(); cout << endl; MON; 1764 | + MOFF; std::cout << uidcrcTool << " " << uidcrcUIDs[0] << " " << uidcrcUIDs[1] << " " << uidcrcUIDs[2] << " " << DataOutputFileName.GetBuffer(); std::cout << std::endl; MON; 1765 | } 1766 | 1767 | char uidcrc_params[256]; 1768 | @@ -300,20 +300,20 @@ 1769 | uidcrcUIDs[2], 1770 | DataOutputFileName.GetBuffer()); 1771 | if(ret <= 0) { 1772 | - cerr << "Failed to write UIDs to " << DataOutputFileName << endl; 1773 | + std::cerr << "Failed to write UIDs to " << DataOutputFileName << std::endl; 1774 | exit(ret); 1775 | } 1776 | const int error = system(uidcrc_params); 1777 | if(error != 0) 1778 | { 1779 | - cerr << "Failed to write UIDs to " << DataOutputFileName << endl; 1780 | + std::cerr << "Failed to write UIDs to " << DataOutputFileName << std::endl; 1781 | exit(error); 1782 | } 1783 | RCBinaryStream RSCStream; 1784 | RSCStream.OpenForAppend(DataOutputFileName); 1785 | if(! RSCStream.IsOpen()) 1786 | { 1787 | - cerr << "Failed to open " << DataOutputFileName << endl; 1788 | + std::cerr << "Failed to open " << DataOutputFileName << std::endl; 1789 | exit(-2); 1790 | } 1791 | WriteResourceFile(RSCStream, pG->Index, pG->Links, thirdUidIsOffset); 1792 | @@ -325,7 +325,7 @@ 1793 | RSG = fopen(HeaderOutputFileName.GetBuffer(), "w"); 1794 | if(RSG==NULL) 1795 | { 1796 | - cerr << "Failed to open " << HeaderOutputFileName << endl; 1797 | + std::cerr << "Failed to open " << HeaderOutputFileName << std::endl; 1798 | exit(-2); 1799 | } 1800 | WriteHeaderFile(RSG, pG->Index); 1801 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/mem.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/mem.cpp 1802 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/mem.cpp 2003-12-27 22:42:19.000000000 +0000 1803 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/mem.cpp 2021-02-16 23:12:18.059513202 +0000 1804 | @@ -3,7 +3,7 @@ 1805 | // Copyright (c) 1997-1999 Symbian Ltd. All rights reserved. 1806 | // 1807 | 1808 | -#include 1809 | +#include 1810 | #include 1811 | #include "mem.h" 1812 | 1813 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/nameidma.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/nameidma.cpp 1814 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/nameidma.cpp 2003-12-27 22:42:19.000000000 +0000 1815 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/nameidma.cpp 2021-02-16 23:12:43.291621043 +0000 1816 | @@ -49,9 +49,9 @@ 1817 | return 0; 1818 | } 1819 | 1820 | -ostream & operator<<(ostream& os,NameIdMap& o) 1821 | +std::ostream & operator<<(std::ostream& os,NameIdMap& o) 1822 | { 1823 | - os << "ResourceNameIds ******" << endl; 1824 | + os << "ResourceNameIds ******" << std::endl; 1825 | NameIdMapIterator next(o); 1826 | NameIdItem* p; 1827 | while((p = next() ) != NULL) 1828 | @@ -66,9 +66,9 @@ 1829 | iId(aIdToSet) 1830 | {} 1831 | 1832 | -ostream & operator<<(ostream& os,NameIdItem& o) 1833 | +std::ostream & operator<<(std::ostream& os,NameIdItem& o) 1834 | { 1835 | - os << "NameIdItem " << o.iName << "\t" << o.iId << endl; 1836 | + os << "NameIdItem " << o.iName << "\t" << o.iId << std::endl; 1837 | return os; 1838 | } 1839 | 1840 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/numval.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/numval.cpp 1841 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/numval.cpp 2005-02-01 13:40:22.000000000 +0000 1842 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/numval.cpp 2021-02-16 23:13:12.419744215 +0000 1843 | @@ -130,7 +130,7 @@ 1844 | 1845 | double d = atof( Source.GetBuffer()); 1846 | if ( d == 0.0 && !( Source == "0.0" || Source == "0") ) 1847 | - { MOFF; cerr << "atof may have failed for " << Source << endl; MON;} 1848 | + { MOFF; std::cerr << "atof may have failed for " << Source << std::endl; MON;} 1849 | 1850 | iDoubleValue = d; 1851 | } 1852 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/rcbinstr.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/rcbinstr.cpp 1853 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/rcbinstr.cpp 2005-02-01 13:45:45.000000000 +0000 1854 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/rcbinstr.cpp 2021-02-16 23:22:41.745955209 +0000 1855 | @@ -30,8 +30,8 @@ 1856 | void RCBinaryStream::OpenForAppend(const String& FileName) 1857 | { 1858 | assert( !IsOpen()); 1859 | - //iOs.open( FileName.GetBuffer(), ios::out | ios::binary | ios::ate); 1860 | - iOs.open( FileName.GetBuffer(), ios::out | ios::in | ios::binary | ios::ate); 1861 | + //iOs.open( FileName.GetBuffer(), std::ios::out | std::ios::binary | std::ios::ate); 1862 | + iOs.open( FileName.GetBuffer(), std::ios::out | std::ios::in | std::ios::binary | std::ios::ate); 1863 | } 1864 | 1865 | int RCBinaryStream::IsOpen() 1866 | @@ -87,7 +87,7 @@ 1867 | * program would not work. someone please enlighten me. 1868 | */ 1869 | // assert(aNewPosition<=GetPosition()); TODO 1870 | - iOs.seekp(aNewPosition, ios::beg); 1871 | + iOs.seekp(aNewPosition, std::ios::beg); 1872 | } 1873 | 1874 | // ResourceDataStream - this code makes the apparently valid assumption that the decompressing of compressed Unicode (done by BAFL) will yield exactly the same length of string as what you started with before it was compressed (by RCOMP) 1875 | @@ -109,7 +109,7 @@ 1876 | { 1877 | NumericValue* const sizeOfBlockWhenUncompressed=new NumericValue(aDataTypeOfSizePrefix); 1878 | assert(sizeOfBlockWhenUncompressed!=NULL); 1879 | - iArrayOfMarks.AppendMark(iNumberOfBytesUsed, EMarkType_StartOfBlockWithSizePrefix, (unsigned int)sizeOfBlockWhenUncompressed); 1880 | + iArrayOfMarks.AppendMark(iNumberOfBytesUsed, EMarkType_StartOfBlockWithSizePrefix, (unsigned long long)sizeOfBlockWhenUncompressed); 1881 | } 1882 | 1883 | void ResourceDataStream::EndOfBlockWithSizePrefix() 1884 | @@ -140,11 +140,11 @@ 1885 | } 1886 | if (insertZeroLengthCompressedUnicodeRunAtStart) 1887 | { 1888 | - iArrayOfMarks.InsertMark(0, 0, EMarkType_StartOfCompressedUnicodeRun, (unsigned int)BinaryBuffer::New(0, NULL)); // mark the insertion point for the initial zero-length compressed-Unicode run 1889 | + iArrayOfMarks.InsertMark(0, 0, EMarkType_StartOfCompressedUnicodeRun, (unsigned long long)BinaryBuffer::New(0, NULL)); // mark the insertion point for the initial zero-length compressed-Unicode run 1890 | iArrayOfMarks.InsertMark(1, 0, EMarkType_EndOfCompressedUnicodeRun); // mark the insertion point for the subsquent run of "other stuff" 1891 | } 1892 | } 1893 | - iArrayOfMarks.AppendMark(iNumberOfBytesUsed, EMarkType_StartOfCompressedUnicodeRun, (unsigned int)BinaryBuffer::New(aUncompressedUnicodeSizeInBytes, aUncompressedUnicodeBuffer)); 1894 | + iArrayOfMarks.AppendMark(iNumberOfBytesUsed, EMarkType_StartOfCompressedUnicodeRun, (unsigned long long)BinaryBuffer::New(aUncompressedUnicodeSizeInBytes, aUncompressedUnicodeBuffer)); 1895 | iContainsCompressedUnicode=true; 1896 | } 1897 | 1898 | @@ -167,7 +167,7 @@ 1899 | 1900 | void ResourceDataStream::EnquireStreamPositionWhenKnown(unsigned long& aStreamPosition) 1901 | { 1902 | - iArrayOfMarks.AppendMark(iNumberOfBytesUsed, EMarkType_EnquireStreamPositionWhenKnown, (unsigned int)&aStreamPosition); 1903 | + iArrayOfMarks.AppendMark(iNumberOfBytesUsed, EMarkType_EnquireStreamPositionWhenKnown, (unsigned long long)&aStreamPosition); 1904 | } 1905 | 1906 | void ResourceDataStream::StreamIn(const unsigned char* aBuffer, int aNumberOfBytes) 1907 | @@ -217,13 +217,13 @@ 1908 | // do a second pass to see if there are any compressed-Unicode runs that don't actually make the resource smaller (taking into consideration the preceding run-length byte(s) and any trailing run-length byte(s)) - if so, replace the EMarkType_StartOfCompressedUnicodeRun/EMarkType_EndOfCompressedUnicodeRun mark-pair with a single EMarkType_TwoByteAlignmentPoint mark and go right back to the start of the first pass 1909 | // do a third and final pass to actually write out the resource data to aStream 1910 | const int numberOfMarks=iArrayOfMarks.Size(); // caching this is done *after* the "startOfFirstPass" as ConvertCompressedRunToUncompressed (which is called just before "goto startOfFirstPass") changes the number of items in iArrayOfMarks 1911 | - const unsigned int* lengthOfLastRun=NULL; 1912 | + const unsigned long long* lengthOfLastRun=NULL; 1913 | for (int pass=0; pass<3; ++pass) 1914 | { 1915 | const int numberOfBytesBeforeFirstMark=NumberOfBytesToNextMark(-1); 1916 | int runLength=numberOfBytesBeforeFirstMark; 1917 | int uncompressedSize=numberOfBytesBeforeFirstMark; 1918 | - unsigned int* addressToWriteSizeOfCompressedIntegerTo=NULL; // used on the first pass 1919 | + unsigned long long* addressToWriteSizeOfCompressedIntegerTo=NULL; // used on the first pass 1920 | SizePrefixStack sizePrefixStack; // used on the first pass 1921 | int bufferIndex=0; // used on the third pass 1922 | if (pass==2) 1923 | @@ -253,7 +253,7 @@ 1924 | { 1925 | aStream << *sizeOfBlockWhenUncompressed; 1926 | delete sizeOfBlockWhenUncompressed; 1927 | - mark.iOtherData=(unsigned int)(NumericValue*)NULL; 1928 | + mark.iOtherData=(unsigned long long)(NumericValue*)NULL; 1929 | } 1930 | } 1931 | break; 1932 | @@ -293,7 +293,7 @@ 1933 | } 1934 | else if (pass==1) 1935 | { 1936 | - const unsigned int* const lengthOfOtherStuffRun=&nextMark.iOtherData; 1937 | + const unsigned long long* const lengthOfOtherStuffRun=&nextMark.iOtherData; 1938 | const bool isTheFirstCompressedUnicodeRun=!encounteredCompressedUnicode[pass]; 1939 | const bool isTheLastCompressedUnicodeRun=(lengthOfLastRun==lengthOfOtherStuffRun); 1940 | if (isTheLastCompressedUnicodeRun || !isTheFirstCompressedUnicodeRun) // if this is the first compressed-Unicode run and there are others, then we can't get rid of it, hence this check 1941 | @@ -318,11 +318,11 @@ 1942 | { 1943 | assert(pass==2); 1944 | runWhenUncompressed.Destroy(); 1945 | - mark.iOtherData=(unsigned int)(BinaryBuffer*)NULL; 1946 | + mark.iOtherData=(unsigned long long)(BinaryBuffer*)NULL; 1947 | aStream.WriteCompressedInteger(numberOfBytesWhenCompressed); 1948 | aStream.Write(iBuffer+bufferIndex, numberOfBytesWhenCompressed); 1949 | bufferIndex+=numberOfBytesWhenCompressed; 1950 | - const unsigned int* const lengthOfOtherStuffRun=&nextMark.iOtherData; 1951 | + const unsigned long long* const lengthOfOtherStuffRun=&nextMark.iOtherData; 1952 | if ((lengthOfLastRun!=lengthOfOtherStuffRun) || (*lengthOfOtherStuffRun>0)) 1953 | { 1954 | aStream.WriteCompressedInteger(*lengthOfOtherStuffRun); 1955 | @@ -434,7 +434,7 @@ 1956 | Mark* markForStartOfCompressedUnicodeRun=&iArrayOfMarks.MarkAt(aMarkIndexOfStartOfCompressedUnicodeRun); 1957 | assert(markForStartOfCompressedUnicodeRun->iMarkType==EMarkType_StartOfCompressedUnicodeRun); 1958 | BinaryBuffer& runWhenUncompressed=*(BinaryBuffer*)markForStartOfCompressedUnicodeRun->iOtherData; 1959 | - markForStartOfCompressedUnicodeRun->iOtherData=(unsigned int)(BinaryBuffer*)NULL; 1960 | + markForStartOfCompressedUnicodeRun->iOtherData=(unsigned long long)(BinaryBuffer*)NULL; 1961 | Mark* markForEndOfCompressedUnicodeRun=&iArrayOfMarks.MarkAt(aMarkIndexOfStartOfCompressedUnicodeRun+1); 1962 | assert(markForEndOfCompressedUnicodeRun->iMarkType==EMarkType_EndOfCompressedUnicodeRun); 1963 | const int bufferPositionOfStartOfCompressedUnicodeRun=markForStartOfCompressedUnicodeRun->iBufferPosition; 1964 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/rcomp.y sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/rcomp.y 1965 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/rcomp.y 2003-12-27 22:42:19.000000000 +0000 1966 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/rcomp.y 2021-02-16 23:00:39.295795199 +0000 1967 | @@ -7,7 +7,7 @@ 1968 | 1969 | #include 1970 | #include 1971 | -#include 1972 | +#include 1973 | #include "resource.h" 1974 | #include "rcstack.h" 1975 | #include "rcompl.hpp" 1976 | @@ -108,7 +108,7 @@ 1977 | /*****************************************************************/ 1978 | /* TOP-MOST RULE */ 1979 | /*****************************************************************/ 1980 | -source : statement-list { if(verbose) { MOFF; cout << Divider << "\n" << Divider << endl; MON; } 1981 | +source : statement-list { if(verbose) { MOFF; std::cout << Divider << "\n" << Divider << std::endl; MON; } 1982 | } 1983 | ; 1984 | /*****************************************************************/ 1985 | @@ -133,29 +133,29 @@ 1986 | /***********************************************************************************/ 1987 | struct-statement: 1988 | struct-statement-start struct-item-list '}' 1989 | - { if(verbose) { MOFF; cout << Divider << "\n" << * pSH << Divider << endl; MON;} } 1990 | + { if(verbose) { MOFF; std::cout << Divider << "\n" << * pSH << Divider << std::endl; MON;} } 1991 | ; 1992 | struct-statement-start: 1993 | - L_STRUCT L_LABEL '{' { if(verbose) { MOFF;cout << "struct-statement-start " << $2 << endl; MON;} 1994 | + L_STRUCT L_LABEL '{' { if(verbose) { MOFF;std::cout << "struct-statement-start " << $2 << std::endl; MON;} 1995 | pSH = new StructHeader($2); 1996 | REGISTER_LINE; 1997 | pG->SHA.Add(pSH); 1998 | } 1999 | | L_STRUCT L_LABEL len-declaration '{' 2000 | - { if(verbose) { RCTypeArray Types; MOFF;cout << "struct-statement-start " << $2 << " " << Types.GetName($3) << endl; MON;} 2001 | + { if(verbose) { RCTypeArray Types; MOFF;std::cout << "struct-statement-start " << $2 << " " << Types.GetName($3) << std::endl; MON;} 2002 | pSH = new StructHeader($2, $3); 2003 | REGISTER_LINE; 2004 | pG->SHA.Add(pSH); 2005 | } 2006 | | L_STRUCT L_LABEL L_LEN '{' 2007 | - { if(verbose) { MOFF;cout << "struct-statement-start " << $2 << " (WORD)" << endl; MON;} 2008 | + { if(verbose) { MOFF;std::cout << "struct-statement-start " << $2 << " (WORD)" << std::endl; MON;} 2009 | pSH = new StructHeader($2, L_WORD); 2010 | REGISTER_LINE; 2011 | pG->SHA.Add(pSH); 2012 | } 2013 | ; 2014 | struct-item-list: 2015 | - struct-item-list struct-item ';' { if(verbose) { MOFF;cout << "struct-item-list Adding struct-item." << endl; MON;} 2016 | + struct-item-list struct-item ';' { if(verbose) { MOFF;std::cout << "struct-item-list Adding struct-item." << std::endl; MON;} 2017 | REGISTER_LINE; 2018 | pSH->iSIA.Add($2); 2019 | } 2020 | @@ -170,17 +170,17 @@ 2021 | simple-struct-item: 2022 | simple-struct-item-start { $$ = $1;} 2023 | | simple-struct-item-start '(' natural-expression ')' 2024 | - { if(verbose) { MOFF;cout << " Limit: " << $3 << endl; MON;} 2025 | + { if(verbose) { MOFF;std::cout << " Limit: " << $3 << std::endl; MON;} 2026 | $1->iLengthLimit = $3; 2027 | $$ = $1; 2028 | } 2029 | | simple-struct-item-start '=' simple-initialiser /****************************************************************/ 2030 | - { if(verbose) { MOFF;cout << " Default: " << $3 << endl; MON;} 2031 | + { if(verbose) { MOFF;std::cout << " Default: " << $3 << std::endl; MON;} 2032 | $1->iDefault = $3; 2033 | $$ = $1; 2034 | } 2035 | | simple-struct-item-start '(' natural-expression ')' '=' string-expression /****************************************************************/ 2036 | - { if(verbose) { MOFF;cout << " Limit: " << $3 << ", Default: " << $6 << endl; MON;} 2037 | + { if(verbose) { MOFF;std::cout << " Limit: " << $3 << ", Default: " << $6 << std::endl; MON;} 2038 | NumericValue Limit($3, L_LONG); 2039 | if(String($6).ExportLength(TargetCharacterSet,SourceCharacterSet) > Limit.GetULong() ) 2040 | { 2041 | @@ -197,7 +197,7 @@ 2042 | simple-struct-item-start: 2043 | data-type L_LABEL { if(verbose) 2044 | { RCTypeArray Types; 2045 | - MOFF;cout << "simple-struct-item " << Types.GetName($1) << " " << $2 << endl; MON; 2046 | + MOFF;std::cout << "simple-struct-item " << Types.GetName($1) << " " << $2 << std::endl; MON; 2047 | } 2048 | $$ = new SimpleStructItem($1,$2); 2049 | assert($$ != NULL); 2050 | @@ -205,7 +205,7 @@ 2051 | | data-type '<' natural-expression-numeric '>' L_LABEL 2052 | { if(verbose) 2053 | { RCTypeArray Types; 2054 | - MOFF;cout << "simple-struct-item " << Types.GetName($1) << " " << $5 << endl; MON; 2055 | + MOFF;std::cout << "simple-struct-item " << Types.GetName($1) << " " << $5 << std::endl; MON; 2056 | } 2057 | String s(NumericValue::ltoa($3)); 2058 | $$ = new SimpleStructItem($1,$5,s); 2059 | @@ -260,7 +260,7 @@ 2060 | array-struct-item: 2061 | array-struct-item-base { $$ = $1;} 2062 | | array-struct-item-base '=' '{' simple-initialiser-list '}' 2063 | - { if(verbose) { MOFF;cout << "array-struct-item with simple-initialiser-list" << endl;MON;} 2064 | + { if(verbose) { MOFF;std::cout << "array-struct-item with simple-initialiser-list" << std::endl;MON;} 2065 | $1->iDefaults = * $4; 2066 | if($1->iSize.Length() > 0) 2067 | { 2068 | @@ -277,18 +277,18 @@ 2069 | } 2070 | ; 2071 | array-struct-item-base: 2072 | - array-struct-item-start ']' { if(verbose) { MOFF;cout << "array-struct-item-base with no size" << endl;MON;} 2073 | + array-struct-item-start ']' { if(verbose) { MOFF;std::cout << "array-struct-item-base with no size" << std::endl;MON;} 2074 | $$ =$1; 2075 | } 2076 | | array-struct-item-start natural-expression ']' 2077 | - { if(verbose) { MOFF;cout << "array-struct-item-base with size " << $2 << endl;MON;} 2078 | + { if(verbose) { MOFF;std::cout << "array-struct-item-base with size " << $2 << std::endl;MON;} 2079 | $1->iSize = $2; 2080 | $$ = $1; 2081 | } 2082 | | L_LEN len-declaration array-struct-item-start ']' 2083 | { if(verbose) 2084 | { RCTypeArray Types; 2085 | - MOFF;cout << "array-struct-item-base with LenType " << Types.GetName($2) << endl;MON; 2086 | + MOFF;std::cout << "array-struct-item-base with LenType " << Types.GetName($2) << std::endl;MON; 2087 | } 2088 | $3->iLenType = $2; 2089 | $$ = $3; 2090 | @@ -296,7 +296,7 @@ 2091 | | L_LEN len-declaration array-struct-item-start natural-expression ']' 2092 | { if(verbose) 2093 | { RCTypeArray Types; 2094 | - MOFF;cout << "array-struct-item-base with size " << $4 << " and LenType " << Types.GetName($2) << endl;MON; 2095 | + MOFF;std::cout << "array-struct-item-base with size " << $4 << " and LenType " << Types.GetName($2) << std::endl;MON; 2096 | } 2097 | $3->iLenType = $2; 2098 | $3->iSize = $4; 2099 | @@ -306,7 +306,7 @@ 2100 | array-struct-item-start: 2101 | data-type L_LABEL '[' { if(verbose) 2102 | { RCTypeArray Types; 2103 | - MOFF;cout << "array-struct-item-start " << Types.GetName($1) << " " << $2 << endl;MON; 2104 | + MOFF;std::cout << "array-struct-item-start " << Types.GetName($1) << " " << $2 << std::endl;MON; 2105 | } 2106 | $$ = new ArrayStructItem($1, $2); 2107 | } 2108 | @@ -316,23 +316,23 @@ 2109 | | L_WORD { $$ = L_WORD;} 2110 | ; 2111 | struct-type-struct-item: 2112 | - L_STRUCT L_LABEL { if(verbose) { MOFF;cout << "struct-type-struct-item " << $2 << endl;MON;} 2113 | + L_STRUCT L_LABEL { if(verbose) { MOFF;std::cout << "struct-type-struct-item " << $2 << std::endl;MON;} 2114 | $$ = new StructTypeStructItem($2); 2115 | } 2116 | ; 2117 | struct-array-struct-item: 2118 | struct-array-struct-item-base { $$ = $1;} 2119 | | L_LEN len-declaration struct-array-struct-item-base 2120 | - { if(verbose) { RCTypeArray Types; MOFF;cout << "struct-array-struct-item - Setting Size to " << Types.GetName($2) << endl;MON;} 2121 | + { if(verbose) { RCTypeArray Types; MOFF;std::cout << "struct-array-struct-item - Setting Size to " << Types.GetName($2) << std::endl;MON;} 2122 | $3->iLenType = $2; $$ = $3; 2123 | } 2124 | ; 2125 | struct-array-struct-item-base: 2126 | - L_STRUCT L_LABEL '[' ']' { if(verbose) { MOFF;cout << "struct-array-struct-item-base " << $2 << endl;MON;} 2127 | + L_STRUCT L_LABEL '[' ']' { if(verbose) { MOFF;std::cout << "struct-array-struct-item-base " << $2 << std::endl;MON;} 2128 | $$ = new StructArrayStructItem($2); 2129 | } 2130 | | L_STRUCT L_LABEL '[' natural-expression ']' 2131 | - { if(verbose) { MOFF;cout << "struct-array-struct-item-base " << $2 << " " << $4 << endl;MON;} 2132 | + { if(verbose) { MOFF;std::cout << "struct-array-struct-item-base " << $2 << " " << $4 << std::endl;MON;} 2133 | $$ = new StructArrayStructItem($2, $4); 2134 | } 2135 | ; 2136 | @@ -344,7 +344,7 @@ 2137 | { 2138 | pResourceHeader->AddDefault(); 2139 | CurrentId+=CurrentIdStep; 2140 | - if(verbose) { MOFF;cout << "Resource ID "<< CurrentId << endl << Divider << "\n" << * pResourceHeader << Divider << endl;MON;} 2141 | + if(verbose) { MOFF;std::cout << "Resource ID "<< CurrentId << std::endl << Divider << "\n" << * pResourceHeader << Divider << std::endl;MON;} 2142 | pResourceHeader->SetResourceId(*pResourceNameIds,CurrentId,FormatIdAsHex); 2143 | pG->Index.Add(pResourceHeader); 2144 | pResourceHeader = NULL; 2145 | @@ -354,14 +354,14 @@ 2146 | L_GLOBAL resource-statement-start-names /* Ignore GLOBAL (obsolete feature).*/ 2147 | | L_LOCAL resource-statement-start-names 2148 | { 2149 | - if(verbose) { MOFF;cout << "resource-statement-start LOCAL" << endl;MON;} 2150 | + if(verbose) { MOFF;std::cout << "resource-statement-start LOCAL" << std::endl;MON;} 2151 | assert(pResourceHeader != NULL); 2152 | pResourceHeader->iLocal = 1; 2153 | } 2154 | | resource-statement-start-names 2155 | ; 2156 | resource-statement-start-names: 2157 | - L_RESOURCE L_LABEL L_LABEL { if(verbose) { MOFF;cout << "resource-statement-start-names " << $2 << " " << $3 << endl;MON;} 2158 | + L_RESOURCE L_LABEL L_LABEL { if(verbose) { MOFF;std::cout << "resource-statement-start-names " << $2 << " " << $3 << std::endl;MON;} 2159 | assert(pResourceHeader == NULL); 2160 | pResourceHeader = new ResourceHeader($3); 2161 | pCurrentRIA = & (pResourceHeader->iRIA); 2162 | @@ -373,7 +373,7 @@ 2163 | } 2164 | pCurrentRIA->FillFromStruct($2); 2165 | } 2166 | -| L_RESOURCE L_LABEL { if(verbose) { MOFF;cout << "resource-statement-start-names " << $2 << " " << endl;MON;} 2167 | +| L_RESOURCE L_LABEL { if(verbose) { MOFF;std::cout << "resource-statement-start-names " << $2 << " " << std::endl;MON;} 2168 | assert(pResourceHeader == NULL); 2169 | pResourceHeader = new ResourceHeader; 2170 | pCurrentRIA = & (pResourceHeader->iRIA); 2171 | @@ -382,12 +382,12 @@ 2172 | } 2173 | ; 2174 | resource-item-list: 2175 | - resource-item-list resource-item ';'{ if(verbose) { MOFF;cout << "resource-item-list" << endl;MON;}} 2176 | + resource-item-list resource-item ';'{ if(verbose) { MOFF;std::cout << "resource-item-list" << std::endl;MON;}} 2177 | | resource-item-list error ';' { yyerrok(); yyclearin(); } 2178 | | /* Nothing */ 2179 | ; 2180 | resource-item: 2181 | - L_LABEL '=' simple-initialiser { if(verbose) { MOFF;cout << "resource-item " << $1 << " " << $3 << endl;MON;} 2182 | + L_LABEL '=' simple-initialiser { if(verbose) { MOFF;std::cout << "resource-item " << $1 << " " << $3 << std::endl;MON;} 2183 | REGISTER_LINE;/****************************************************************/ 2184 | pCurrentRIA->Set($1, $3); 2185 | } 2186 | @@ -399,12 +399,12 @@ 2187 | L_LABEL '=' '{' '}' 2188 | { 2189 | if (verbose) 2190 | - { MOFF;cout << "resource-simple-array-item " << $1 << endl;MON;} 2191 | + { MOFF;std::cout << "resource-simple-array-item " << $1 << std::endl;MON;} 2192 | } 2193 | | L_LABEL '=' '{' simple-initialiser-list '}' 2194 | { 2195 | if (verbose) 2196 | - { MOFF;cout << "resource-simple-array-item " << $1 << " with simple-initialiser-list" << endl;MON;} 2197 | + { MOFF;std::cout << "resource-simple-array-item " << $1 << " with simple-initialiser-list" << std::endl;MON;} 2198 | REGISTER_LINE; 2199 | pCurrentRIA->Set($1, * $4); 2200 | delete $4; 2201 | @@ -431,12 +431,12 @@ 2202 | 2203 | struct-resource-item: 2204 | struct-resource-item-start resource-item-list '}' 2205 | - { if(verbose) { MOFF;cout << "struct-resource-item" << endl;MON;} 2206 | + { if(verbose) { MOFF;std::cout << "struct-resource-item" << std::endl;MON;} 2207 | pCurrentRIA = pG->RIAStack.Pop(); 2208 | } 2209 | ; 2210 | struct-resource-item-start: 2211 | - L_LABEL '=' L_LABEL '{' { if(verbose) { MOFF;cout << "struct-resource-item-start " << $1 << " " << $3 << endl;MON;} 2212 | + L_LABEL '=' L_LABEL '{' { if(verbose) { MOFF;std::cout << "struct-resource-item-start " << $1 << " " << $3 << std::endl;MON;} 2213 | REGISTER_LINE; 2214 | pCurrentRIA->Set($1, $3); 2215 | pG->RIAStack.Push(pCurrentRIA); 2216 | @@ -445,14 +445,14 @@ 2217 | ; 2218 | struct-array-resource-item: 2219 | struct-array-resource-item-start struct-array-resource-item-list-top '}' 2220 | - { if(verbose) { MOFF;cout << "struct-array-resource-item" << endl;MON;} 2221 | + { if(verbose) { MOFF;std::cout << "struct-array-resource-item" << std::endl;MON;} 2222 | pG->SRIStack.Pop(); 2223 | } 2224 | | struct-array-resource-item-start struct-array-resource-item-list-top error 2225 | { pG->SRIStack.Pop();} 2226 | ; 2227 | struct-array-resource-item-start: 2228 | - L_LABEL '=' '{' L_LABEL '{' { if(verbose) { MOFF;cout << "struct-array-resource-item-start " << $1 << " " << $4 << endl;MON;} 2229 | + L_LABEL '=' '{' L_LABEL '{' { if(verbose) { MOFF;std::cout << "struct-array-resource-item-start " << $1 << " " << $4 << std::endl;MON;} 2230 | ResourceItem * p = pCurrentRIA->Find($1); 2231 | pG->SRIStack.Push(p); 2232 | REGISTER_LINE; 2233 | @@ -467,7 +467,7 @@ 2234 | | struct-array-resource-item-list-top-start ',' error 2235 | ; 2236 | struct-array-resource-item-list-top-start: 2237 | - resource-item-list '}' { if(verbose) { MOFF;cout << "struct-array-resource-item-list-top " << endl;MON;} 2238 | + resource-item-list '}' { if(verbose) { MOFF;std::cout << "struct-array-resource-item-list-top " << std::endl;MON;} 2239 | pCurrentRIA = pG->RIAStack.Pop(); 2240 | } 2241 | ; 2242 | @@ -477,12 +477,12 @@ 2243 | ; 2244 | struct-array-resource-item-list-item: 2245 | struct-array-resource-item-list-item-start resource-item-list '}' 2246 | - { if(verbose) { MOFF;cout << "struct-array-resource-item-list-item " << endl;MON;} 2247 | + { if(verbose) { MOFF;std::cout << "struct-array-resource-item-list-item " << std::endl;MON;} 2248 | pCurrentRIA = pG->RIAStack.Pop(); 2249 | } 2250 | ; 2251 | struct-array-resource-item-list-item-start: 2252 | - L_LABEL '{' { if(verbose) { MOFF;cout << "struct-array-resource-item-list-item-start " << $1 << endl;MON;} 2253 | + L_LABEL '{' { if(verbose) { MOFF;std::cout << "struct-array-resource-item-list-item-start " << $1 << std::endl;MON;} 2254 | ResourceItem * p = pG->SRIStack.Peek(); 2255 | REGISTER_LINE; 2256 | p->Set($1); 2257 | @@ -534,13 +534,13 @@ 2258 | { 2259 | if(verbose) 2260 | { 2261 | - MOFF;cout << "simple-initialiser-list - single string " << $1 << endl;MON; 2262 | + MOFF;std::cout << "simple-initialiser-list - single string " << $1 << std::endl;MON; 2263 | } 2264 | $$ = new StringArray; 2265 | $$->Add(new String($1) ); 2266 | } 2267 | | simple-initialiser-list ',' simple-initialiser 2268 | - { if(verbose) { MOFF;cout << "simple-initialiser-list - part of list " << $3 << endl;MON;} 2269 | + { if(verbose) { MOFF;std::cout << "simple-initialiser-list - part of list " << $3 << std::endl;MON;} 2270 | assert($1 != NULL); 2271 | $1->Add(new String($3 ) ); 2272 | $$ = $1; 2273 | @@ -551,7 +551,7 @@ 2274 | natural-expression-numeric { String s(NumericValue::ltoa($1) ); strcpy($$, s.GetBuffer() ); } 2275 | ; 2276 | natural-expression-numeric: 2277 | - L_NUM_NATURAL { if(verbose) { MOFF;cout << "Converting number " << $1 << endl;MON;} 2278 | + L_NUM_NATURAL { if(verbose) { MOFF;std::cout << "Converting number " << $1 << std::endl;MON;} 2279 | REGISTER_LINE; 2280 | NumericValue v($1, L_LONG); $$ = v.GetLong(); 2281 | } 2282 | @@ -652,7 +652,7 @@ 2283 | /*****************************************************************/ 2284 | 2285 | character_set-statement: 2286 | - L_CHARACTER_SET L_LABEL { if(verbose) { MOFF;cout << "character_set-statement " << $2 << endl;MON;} 2287 | + L_CHARACTER_SET L_LABEL { if(verbose) { MOFF;std::cout << "character_set-statement " << $2 << std::endl;MON;} 2288 | REGISTER_LINE; 2289 | SourceCharacterSet = CharacterSetID($2); 2290 | if ( SourceCharacterSet == String::UNKNOWN ) 2291 | @@ -677,7 +677,7 @@ 2292 | /*****************************************************************/ 2293 | offset-statement: 2294 | L_OFFSET natural-expression { if(verbose) { RCTypeArray Types; 2295 | - MOFF;cout << "offset-statement " << $2 << endl;MON; } 2296 | + MOFF;std::cout << "offset-statement " << $2 << std::endl;MON; } 2297 | REGISTER_LINE; 2298 | CurrentId=((long) NumericValue($2, L_LONG).GetULong() ); 2299 | } 2300 | @@ -687,7 +687,7 @@ 2301 | /* system-statement */ 2302 | /*****************************************************************/ 2303 | system-statement: 2304 | - L_SYSTEM { if(verbose) { MOFF;cout << "system-statement" << endl;MON;} 2305 | + L_SYSTEM { if(verbose) { MOFF;std::cout << "system-statement" << std::endl;MON;} 2306 | CurrentIdStep=-1; 2307 | } 2308 | ; 2309 | @@ -703,14 +703,14 @@ 2310 | L_ENUM L_LABEL '{' 2311 | { 2312 | if(verbose) 2313 | - { MOFF;cout << "enum-statement" << endl;MON;} 2314 | + { MOFF;std::cout << "enum-statement" << std::endl;MON;} 2315 | CurrentEnumName = $2; 2316 | CurrentEnumValue=0; 2317 | } 2318 | | L_ENUM '{' 2319 | { 2320 | if(verbose) 2321 | - { MOFF;cout << "enum-statement" << endl;MON;} 2322 | + { MOFF;std::cout << "enum-statement" << std::endl;MON;} 2323 | CurrentEnumName = ""; 2324 | CurrentEnumValue=0; 2325 | } 2326 | @@ -792,7 +792,7 @@ 2327 | // ABCD corresponds to the number 4321 which becomes ( (4*27 + 3) * 27 + 2) * 27 + 1. 2328 | 2329 | if(verbose) 2330 | - { MOFF;cout << "name-statement " << NameStatementValue << endl;MON;} 2331 | + { MOFF;std::cout << "name-statement " << NameStatementValue << std::endl;MON;} 2332 | if ( NameStatementValue.Length() > 4) 2333 | { 2334 | ErrorHandler::OutputErrorLine( "Name must be no longer than four characters"); 2335 | @@ -811,7 +811,7 @@ 2336 | CurrentId = NewId << 12; 2337 | FormatIdAsHex = 1; 2338 | if(verbose) 2339 | - { MOFF;cout << "Current id " << CurrentId << endl;MON;} 2340 | + { MOFF;std::cout << "Current id " << CurrentId << std::endl;MON;} 2341 | } 2342 | 2343 | 2344 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/rcostrm.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/rcostrm.cpp 2345 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/rcostrm.cpp 2003-12-27 22:42:20.000000000 +0000 2346 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/rcostrm.cpp 2021-02-16 23:30:22.347146661 +0000 2347 | @@ -27,40 +27,40 @@ 2348 | 2349 | RCTypeArray gTypes; 2350 | 2351 | -// StructItem based ostream functions 2352 | +// StructItem based std::ostream functions 2353 | 2354 | -ostream& SimpleStructItem::StreamOut ( ostream & os) 2355 | +std::ostream& SimpleStructItem::StreamOut ( std::ostream & os) 2356 | { 2357 | - return ::operator<< ( os, * this); 2358 | + return operator<< ( os, * this); 2359 | } 2360 | 2361 | -ostream& ArrayStructItem::StreamOut ( ostream & os) 2362 | +std::ostream& ArrayStructItem::StreamOut ( std::ostream & os) 2363 | { 2364 | - return ::operator<< ( os, * this); 2365 | + return operator<< ( os, * this); 2366 | } 2367 | 2368 | -ostream& StructTypeStructItem::StreamOut ( ostream & os) 2369 | +std::ostream& StructTypeStructItem::StreamOut ( std::ostream & os) 2370 | { 2371 | - return ::operator<< ( os, * this); 2372 | + return operator<< ( os, * this); 2373 | } 2374 | 2375 | -ostream& StructArrayStructItem::StreamOut ( ostream & os) 2376 | +std::ostream& StructArrayStructItem::StreamOut ( std::ostream & os) 2377 | { 2378 | - return ::operator<< ( os, * this); 2379 | + return operator<< ( os, * this); 2380 | } 2381 | 2382 | -ostream& operator<< ( ostream & os, SimpleStructItem & o) 2383 | +std::ostream& operator<< ( std::ostream & os, SimpleStructItem & o) 2384 | { 2385 | os << "SimpleStructItem "; 2386 | os << o.iLabel; 2387 | os << "\t" << gTypes.GetName( o.iItemType); 2388 | os << "\tDefault: " << o.iDefault; 2389 | os << "\tLength limit: " << o.iLengthLimit; 2390 | - os << endl; 2391 | + os << std::endl; 2392 | return os ; 2393 | } 2394 | 2395 | -ostream& operator<< ( ostream & os, ArrayStructItem & o) 2396 | +std::ostream& operator<< ( std::ostream & os, ArrayStructItem & o) 2397 | { 2398 | os << "ArrayStructItem "; 2399 | os << o.iLabel; 2400 | @@ -68,29 +68,29 @@ 2401 | os << "\tDefaults: " << o.iDefaults; 2402 | os << "\tLen Type: " << ((o.iLenType == 0) ? "" : gTypes.GetName(o.iLenType)); 2403 | os << "\tSize: " << o.iSize; 2404 | - os << endl; 2405 | + os << std::endl; 2406 | return os ; 2407 | } 2408 | 2409 | -ostream& operator<< ( ostream & os, StructTypeStructItem & o) 2410 | +std::ostream& operator<< ( std::ostream & os, StructTypeStructItem & o) 2411 | { 2412 | os << "StructTypeStructItem "; 2413 | os << o.iLabel; 2414 | - os << endl; 2415 | + os << std::endl; 2416 | return os; 2417 | } 2418 | 2419 | -ostream& operator<< ( ostream & os, StructArrayStructItem & o) 2420 | +std::ostream& operator<< ( std::ostream & os, StructArrayStructItem & o) 2421 | { 2422 | os << "StructArrayStructItem "; 2423 | os << o.iLabel; 2424 | os << "\tLen Type: " << ( ( o.iLenType == 0) ? "" : gTypes.GetName( o.iLenType) ); 2425 | os << "\tSize: " << o.iSize; 2426 | - os << endl; 2427 | + os << std::endl; 2428 | return os; 2429 | } 2430 | 2431 | -ostream& operator<< ( ostream & os, StructItemArray & o) 2432 | +std::ostream& operator<< ( std::ostream & os, StructItemArray & o) 2433 | { 2434 | if (o.Size() == 0) 2435 | return ( os << ""); 2436 | @@ -101,16 +101,16 @@ 2437 | return os; 2438 | } 2439 | 2440 | -ostream& operator<< ( ostream & os, StructHeader & o) 2441 | +std::ostream& operator<< ( std::ostream & os, StructHeader & o) 2442 | { 2443 | os << "StructHeader "; 2444 | - os << o.iLabel << endl; 2445 | - os << "\tLen Type: " << ( ( o.iLenType == 0) ? "" : gTypes.GetName( o.iLenType) ) << endl; 2446 | + os << o.iLabel << std::endl; 2447 | + os << "\tLen Type: " << ( ( o.iLenType == 0) ? "" : gTypes.GetName( o.iLenType) ) << std::endl; 2448 | os << o.iSIA; 2449 | return os; 2450 | } 2451 | 2452 | -ostream& operator<< ( ostream & os, StructHeaderArray & o) 2453 | +std::ostream& operator<< ( std::ostream & os, StructHeaderArray & o) 2454 | { 2455 | if (o.Size() == 0) 2456 | return ( os << ""); 2457 | @@ -121,29 +121,29 @@ 2458 | return os; 2459 | } 2460 | 2461 | -// ResourceItem based ostream functions 2462 | +// ResourceItem based std::ostream functions 2463 | 2464 | -ostream& SimpleResourceItem::StreamOut(ostream& os) 2465 | +std::ostream& SimpleResourceItem::StreamOut(std::ostream& os) 2466 | { 2467 | - return ::operator<<(os,*this); 2468 | + return operator<<(os,*this); 2469 | } 2470 | 2471 | -ostream& ArrayResourceItem::StreamOut(ostream& os) 2472 | +std::ostream& ArrayResourceItem::StreamOut(std::ostream& os) 2473 | { 2474 | - return ::operator<<(os,*this); 2475 | + return operator<<(os,*this); 2476 | } 2477 | 2478 | -ostream& StructTypeResourceItem::StreamOut(ostream& os) 2479 | +std::ostream& StructTypeResourceItem::StreamOut(std::ostream& os) 2480 | { 2481 | - return ::operator<<(os,*this); 2482 | + return operator<<(os,*this); 2483 | } 2484 | 2485 | -ostream& StructArrayResourceItem::StreamOut(ostream& os) 2486 | +std::ostream& StructArrayResourceItem::StreamOut(std::ostream& os) 2487 | { 2488 | - return ::operator<<(os,*this); 2489 | + return operator<<(os,*this); 2490 | } 2491 | 2492 | -ostream & operator<<(ostream& os,SimpleResourceItem& o) 2493 | +std::ostream & operator<<(std::ostream& os,SimpleResourceItem& o) 2494 | { 2495 | os << "SimpleResourceItem [" << gTypes.GetName(o.iStructItem->iItemType) << " " << o.iStructItem->iLabel << "] "; 2496 | switch( o.iStructItem->iItemType) 2497 | @@ -159,59 +159,59 @@ 2498 | case L_SRLINK: 2499 | break; // Don't know value yet. 2500 | } 2501 | - os << endl; 2502 | + os << std::endl; 2503 | return os; 2504 | } 2505 | 2506 | -ostream & operator<< ( ostream & os, ArrayResourceItem & o) 2507 | +std::ostream & operator<< ( std::ostream & os, ArrayResourceItem & o) 2508 | { 2509 | os << "ArrayResourceItem [" << o.iStructItem->iLabel << "] "; 2510 | os << o.iValues; 2511 | - os << endl; 2512 | + os << std::endl; 2513 | return os; 2514 | } 2515 | 2516 | -ostream & operator<< ( ostream & os, StructTypeResourceItem & o) 2517 | +std::ostream & operator<< ( std::ostream & os, StructTypeResourceItem & o) 2518 | { 2519 | static unsigned long level = 0; // Recursion level. 2520 | - os << "StructTypeResourceItem (Level " << level++ << ") [" << o.iStructItem->iLabel << "] " << endl; 2521 | - os << "----------------------" << endl; 2522 | + os << "StructTypeResourceItem (Level " << level++ << ") [" << o.iStructItem->iLabel << "] " << std::endl; 2523 | + os << "----------------------" << std::endl; 2524 | os << o.iResourceItems; 2525 | - os << "----------------------" << endl; 2526 | + os << "----------------------" << std::endl; 2527 | level--; 2528 | return os; 2529 | } 2530 | 2531 | -ostream & operator<< ( ostream & os, StructArrayResourceItem & o) 2532 | +std::ostream & operator<< ( std::ostream & os, StructArrayResourceItem & o) 2533 | { 2534 | static unsigned long level = 0; // Recursion level. 2535 | - os << "StructArrayResourceItem (Level " << level++ << ") [" << o.iStructItem->iLabel << "] " << endl; 2536 | + os << "StructArrayResourceItem (Level " << level++ << ") [" << o.iStructItem->iLabel << "] " << std::endl; 2537 | DataType counttype = o.iStructItem->iLenType; 2538 | if (counttype==0) 2539 | counttype = L_WORD; 2540 | unsigned long nitems = o.iArrayOfResourceItemArrays.Size(); 2541 | - os << "ArrayLength [" << gTypes.GetName(counttype) << "] " << nitems << endl; 2542 | + os << "ArrayLength [" << gTypes.GetName(counttype) << "] " << nitems << std::endl; 2543 | if (nitems > 0) 2544 | { 2545 | - os << "----------------------" << endl; 2546 | + os << "----------------------" << std::endl; 2547 | os << o.iArrayOfResourceItemArrays; 2548 | - os << "----------------------" << endl; 2549 | + os << "----------------------" << std::endl; 2550 | } 2551 | level--; 2552 | return os; 2553 | } 2554 | 2555 | -ostream & operator<< ( ostream & os, ResourceHeader & o) 2556 | +std::ostream & operator<< ( std::ostream & os, ResourceHeader & o) 2557 | { 2558 | os << "ResourceHeader "; 2559 | - os << o.iLabel << endl; 2560 | + os << o.iLabel << std::endl; 2561 | os << o.iRIA; 2562 | return os; 2563 | } 2564 | 2565 | -ostream & operator<< ( ostream & os, ResourceItemArray & o) 2566 | +std::ostream & operator<< ( std::ostream & os, ResourceItemArray & o) 2567 | { 2568 | - os << "++ResourceItemArray" << endl; 2569 | + os << "++ResourceItemArray" << std::endl; 2570 | if ( o.iLenType != 0) 2571 | { 2572 | os << "LenType: " << gTypes.GetName( o.iLenType) << "\t"; 2573 | @@ -225,9 +225,9 @@ 2574 | return os; 2575 | } 2576 | 2577 | -ostream & operator<< ( ostream & os, ResourceItemArrayArray & o) 2578 | +std::ostream & operator<< ( std::ostream & os, ResourceItemArrayArray & o) 2579 | { 2580 | - os << "--ResourceItemArrayArray" << endl; 2581 | + os << "--ResourceItemArrayArray" << std::endl; 2582 | if ( o.Size() == 0) 2583 | return ( os << ""); 2584 | ResourceItemArrayArrayIterator next( o); 2585 | @@ -390,7 +390,7 @@ 2586 | case L_LONG: 2587 | case L_DOUBLE: 2588 | assert ( aValue.Length() > 0); 2589 | - if(verbose) { MOFF; cout << "Converting " << aValue << " to number." << endl; MON;} 2590 | + if(verbose) { MOFF; std::cout << "Converting " << aValue << " to number." << std::endl; MON;} 2591 | NumericValue( aValue, aItemType).StreamOut(aStream); 2592 | break; 2593 | case L_SRLINK: 2594 | @@ -424,7 +424,7 @@ 2595 | break; 2596 | } 2597 | default: 2598 | - { MOFF; cout << "RCBinaryStream:Unknown type " << gTypes.GetName( aItemType) << endl; MON;} 2599 | + { MOFF; std::cout << "RCBinaryStream:Unknown type " << gTypes.GetName( aItemType) << std::endl; MON;} 2600 | } 2601 | } 2602 | 2603 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/rcscan.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/rcscan.cpp 2604 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/rcscan.cpp 2003-12-27 22:42:19.000000000 +0000 2605 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/rcscan.cpp 2021-02-16 23:30:57.263241794 +0000 2606 | @@ -31,8 +31,8 @@ 2607 | if(yylineno) 2608 | { 2609 | MOFF; 2610 | - cerr << iFileLineHandler.GetCurrentFile() << "("; 2611 | - cerr << iFileLineHandler.GetErrorLine(yylineno) << ") : "; 2612 | + std::cerr << iFileLineHandler.GetCurrentFile() << "("; 2613 | + std::cerr << iFileLineHandler.GetErrorLine(yylineno) << ") : "; 2614 | MON; 2615 | } 2616 | 2617 | @@ -43,7 +43,7 @@ 2618 | vsprintf(buffer, aCharPtr, va ); 2619 | va_end(va); 2620 | 2621 | - cerr << buffer << endl; 2622 | + std::cerr << buffer << std::endl; 2623 | iErrorFound = 1; 2624 | } 2625 | 2626 | diff -Naur sdk2unix-1.9/helpers/rcomp-7.0.1/src/stringar.cpp sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/stringar.cpp 2627 | --- sdk2unix-1.9/helpers/rcomp-7.0.1/src/stringar.cpp 2003-12-27 22:42:19.000000000 +0000 2628 | +++ sdk2unix-1.9-new/helpers/rcomp-7.0.1/src/stringar.cpp 2021-02-16 23:31:18.867301264 +0000 2629 | @@ -31,9 +31,9 @@ 2630 | return ( String *) ArrayIterator::operator() (); 2631 | } 2632 | 2633 | -// ostream functions 2634 | +// std::ostream functions 2635 | 2636 | -ostream& operator<< ( ostream & os, StringArray & s) 2637 | +std::ostream& operator<< ( std::ostream & os, StringArray & s) 2638 | { 2639 | if (s.Size() == 0) 2640 | return ( os << ""); 2641 | -------------------------------------------------------------------------------- /install/sdk2unix-1.9.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/static-void/psion_cpp_sdk_linux/7763ee8229c65eb8dde49894eb3047622da031d7/install/sdk2unix-1.9.tar.gz -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | This is the PSION EPOC/Symbian R5 C++ SDK, adapted to work under modern (2021) 64 bit Linux. 2 | 3 | Installation 4 | ------------ 5 | You need the following dependencies: 6 | 7 | make gcc-multilib g++-multilib flex bison zlib1g-dev wine32 8 | 9 | On ubuntu just run: 10 | 11 | sudo apt install build-essential gcc-multilib g++-multilib flex bison zlib1g-dev wine32 12 | 13 | Then clone the repository: 14 | 15 | git clone https://github.com/static-void/psion_cpp_sdk_linux.git 16 | 17 | Change to the install directory: 18 | 19 | cd psion_cpp_sdk_linux/install 20 | 21 | And run the install script: 22 | 23 | ./install.sh 24 | 25 | It takes about two or three minutes to compile and generate everything on my machine. 26 | 27 | Use 28 | --- 29 | Change to the directory where the SDK was installed: 30 | 31 | cd psion_cpp_sdk_linux 32 | 33 | Load up environment variables to make everything work: 34 | 35 | source ./start_epoc_sdk.sh 36 | 37 | Now you can build some example programs: 38 | 39 | cd epoc_cpp_sdk/epoc32ex/cone/ 40 | makmake cosmiley marm 41 | make -f cosmiley.marm rel 42 | 43 | The above uses makmake on the project file cosmiley.mmp, in the cone example 44 | directory, to generate a makefile, then builds the example with make. "marm" 45 | specifies that you want to build for an actual psion instead of the EPOC "wins" 46 | emulator. Building for wins (with "mwins") may work if you have Visual Studio 47 | 6.0 installed with wine, but has not yet been attempted. 48 | 49 | After running the above example you get cosmiley.app, cosmiley.lib, 50 | cosmiley.rsc and cosmiley.map in 51 | psion_cpp_sdk_linux/epoc_cpp_sdk/epoc32/release/marm/rel/. If you copy 52 | cosmiley.app, cosmiley.lib and cosmiley.rsc to a psion System/Apps/Cosmiley 53 | directory you will be able to run the example. 54 | 55 | The wins emulator also works under wine, just run: 56 | 57 | epoc_cpp_sdk/epoc32/tools/startemul.sh 58 | 59 | The emulator does not work at different resolutions, likely due to missing 60 | registry entries, but this still needs further investigation. Note that the 61 | wins emulator does not actually emulate a psion, instead it runs an EPOC 62 | API layer on top of x86 windows. It can only run EPOC applications explicitly 63 | compiled for the wins target, and most psion software is not available for 64 | wins. It may be better to bundle WindEmu [1] with the SDK, which emulates a 65 | real 5mx, and thus makes the wins compilation target redundant. With some 66 | modification it may even be possible to add a gdbserver to WindEmu, which 67 | might allow real debugging to be done, albeit bare metal only, since gdb 68 | has no idea about the EPOC threading model etc. 69 | 70 | Background 71 | ---------- 72 | The SDK, despite being based on GCC, was never intended to work on a Linux 73 | system. However, various parties worked to make it compatible with Linux, 74 | using somewhat different approaches (though all were abandoned 10-20 years 75 | ago). The SDK presented here is a mash up of the GnuPoc [2] and sdk2unix [3] 76 | approaches. 77 | 78 | The SDK consists of three parts: 79 | 80 | 1. Compiler 81 | 2. Headers, static libraries, example programs 82 | 3. Tools: for resource compiling, exe translation, the wins "emulator" etc 83 | 84 | The C++ SDK originally relied on an ancient GCC 2.9. However thanks to a team 85 | at the University of Szeged [4] a version of GCC 3.0 was also available, with 86 | improved performance over the original gcc. With a lot of patching this 87 | version now compiles and runs just fine on a modern Linux. The changes required 88 | are based on patches from Jake Hamby (of GnuPoc), fixes for building old gccs 89 | on modern systems, taken from an archive of Trevor Pound's blog [5], a backport 90 | of the _bfd_ar_spacepad fixes to binutils [6], and various other misc changes 91 | that were required. The install script also lies to the gcc configure script 92 | and tells it its building on an i386, otherwise it falls over pretty early on 93 | (it doesn't know about the existence of x86-64). 94 | 95 | For the headers and example programs the gnupoc approach of renaming all files 96 | to lower case is taken, but the install script takes the additonal step of 97 | changing all #include "XXX.H" directives etc in the example code to lower case 98 | as well, otherwise this has to be done manually each time an example fails to 99 | build. The script also fixes some of ancient non-ISO C++ found in the example 100 | programs, for example const variables declared with no type are converted to 101 | #defines, and missing return types are added for overides of infix relational 102 | operators. 103 | 104 | GnuPoc has done a pretty good job of converting the perl based makmake tool of 105 | the windows SDK to work on Linux, so that makmake generates real gmake 106 | makefiles from the SDK .mmp project files. It mostly required only minor fixes 107 | due to changes in modern wine and perl. The windows version of the resource 108 | compiler, rcomp, just plain hates unix paths, so as a workaround makmake has 109 | been modified to use sed in the generated makefiles to remove unnecessary unix 110 | paths left by the C pre-processor before running rcomp. 111 | 112 | sdk2unix provides Linux versions of most of the tools like rcomp and petran, 113 | and although these have all been patched and now build under x64, at least rcomp 114 | does not actually produce working output (though the others have not been 115 | tested). rcomp turns out to be based on some unobtainium closed source lex and 116 | yacc ("MKS lex & yacc"), so although modifying it to support unix paths looks 117 | easy enough, there is no way to compile the modified lexer. Converting it to use 118 | flex and bison also looks non-trivial, so instead the windows version is used 119 | via wine, which works fine in combination with the sed hack to remove unix paths. 120 | 121 | [1] https://github.com/Treeki/WindEmu 122 | [2] http://gnupoc.sourceforge.net/ 123 | [3] http://www.koeniglich.de/sdk2unix/symbian_sdk_on_unix.html 124 | [4] http://www.inf.u-szeged.hu/projectdirs/symbian-gcc/dload.php 125 | [5] https://web.archive.org/web/20120516030400/https://www.trevorpounds.com/blog/?p=111 126 | [6] https://sourceware.org/legacy-ml/binutils/2005-03/msg00180.html 127 | 128 | --------------------------------------------------------------------------------