Hi

When compiling oslib with host gcc5 I located one set of changes needed to build the depmod binary:

Most of the source files in Tools/DefMod2/ have had all occurrences of the type 'bool' replaced with type 'osbool'

vapi.c hasn't and now complains about 'bool' being unknown. Patching 'bool' to 'osbool' resolves this.

patch file vapi.c.p to do this is attached.

Thanks
John
--
Stop press! Just announced -

Most Trusted Broadband Provider in the 2014 Moneywise Customer Services Awards

For full details of see https://www.utilitywarehouse.co.uk/reviews?exref=095761
<https://www.utilitywarehouse.co.uk/reviews?exref=095761>

Intrigued? Call me

John Ballance C.Eng MIET - j...@macpcrepair.co.uk - 07976 295923

--- Tools/DefMod2/vapi.c        2015-10-29 08:31:47.733103350 +0000
+++ Tools/DefMod2/vapi.c.fixed  2015-10-29 08:26:30.000000000 +0000
@@ -214,7 +214,7 @@
 {
    int r = 0;
    int w = 0;
-   bool nextcaps = TRUE;
+   osbool nextcaps = TRUE;
 
    while (name[r] != '\0')
    {
@@ -237,7 +237,7 @@
    vapi_name[w] = '\0';
 }
 
-os_error *get_vapi_type(def_t t, bool ref, char* type)
+os_error *get_vapi_type(def_t t, osbool ref, char* type)
 {
    os_error* error = NULL;
 
@@ -272,7 +272,7 @@
    return error;
 }
 
-bool emit_as_const(const char* type)
+osbool emit_as_const(const char* type)
 {
    return
       strcmp(type, "Wimp_W") == 0 ||
@@ -280,7 +280,7 @@
       strcmp(type, "Toolbox_Class") == 0;
 }
 
-bool emit_as_enum(const def_t t)
+osbool emit_as_enum(const def_t t)
 {
    return
       t->tag == def_TYPE_ID && !emit_as_const(t->data.id);
@@ -476,9 +476,9 @@
                            def_t t
                           )
 {
-   bool first = TRUE;
+   osbool first = TRUE;
    char array[20];
-   bool multidimensional = t->tag == def_TYPE_ROW && t->data.row.base->tag == 
def_TYPE_ROW;
+   osbool multidimensional = t->tag == def_TYPE_ROW && t->data.row.base->tag 
== def_TYPE_ROW;
 
    array[0] = '\0';
    while (t->tag == def_TYPE_ROW)
@@ -504,7 +504,7 @@
                               const char* type,
                               const char* prefix,
                               const char* c_prefix,
-                              const bool skip_last
+                              const osbool skip_last
                              );
 
 os_error* emit_struct_member(FILE* file,
@@ -512,7 +512,7 @@
                              const char* type,
                              const char* prefix,
                              const char* c_prefix, 
-                             bool ellipsis 
+                             osbool ellipsis 
                             )
 {
    os_error* error = NULL;
@@ -614,7 +614,7 @@
                               const char* type,
                               const char* prefix,
                               const char* c_prefix,
-                              const bool skip_last
+                              const osbool skip_last
                              )
 {
    os_error* error = NULL;
@@ -622,7 +622,7 @@
 
    for (i = 0; i < t->data AS list.count - skip_last ? 1 : 0; i++)
    {
-      bool ellipsis =
+      osbool ellipsis =
          (i == t->data AS list.count - 1 &&
           t->tag == def_TYPE_STRUCT &&
           t->data AS list.ellipsis);
@@ -674,7 +674,7 @@
    char      vapi_struct_name [def_ID_LIMIT + 1];
    char      c_name [def_ID_LIMIT + 1];
    char      base [def_ID_LIMIT + 1] = "";
-   bool      class;
+   osbool      class;
 
    if ((error = convert_vapi_struct_name (vapi_struct_name, prefix, type)) != 
NULL) goto finish;
    def_as_extern (c_name, type);
@@ -801,7 +801,7 @@
    {
       def_as_macro(c_name, type);
       if ((error = convert_vapi_const_name (vapi_name, type)) != NULL) goto 
finish;
-      bool ref = FALSE;
+      osbool ref = FALSE;
       if (t->tag == def_TYPE_REF)
       {
          ref = TRUE;
_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

Reply via email to