File happy-gcc43.diff of Package fltk2
--- fltk-2.0.x-r6149/fluid/FunctionType.cxx.orig 2008-03-20 18:11:58.000000000 +0100
+++ fltk-2.0.x-r6149/fluid/FunctionType.cxx 2008-07-30 02:34:27.951825000 +0200
@@ -531,11 +531,11 @@
const char* c = name();
if (!c) return;
// handle putting #include or extern or typedef into decl:
- if (!isalpha(*c) && *c != '~'
- || !strncmp(c,"extern",6) && isspace(c[6])
- || !strncmp(c,"class",5) && isspace(c[5])
- || !strncmp(c,"typedef",7) && isspace(c[7])
- // || !strncmp(c,"struct",6) && isspace(c[6])
+ if ((!isalpha(*c) && *c != '~')
+ || (!strncmp(c,"extern",6) && isspace(c[6]))
+ || (!strncmp(c,"class",5) && isspace(c[5]))
+ || (!strncmp(c,"typedef",7) && isspace(c[7]))
+ // || (!strncmp(c,"struct",6) && isspace(c[6]))
) {
if (public_) {
char * s = strdup(c);
@@ -1031,8 +1031,8 @@
strncpy(sFull,list[nlist-1],sizeof(sFull));
for (i=nlist-2; i>=0;i--) {
- if (i<nlist-1) strncat(sFull,"::",sizeof(sFull));
- strncat(sFull,list[i],sizeof(sFull));
+ if (i<nlist-1) strncat(sFull,"::",sizeof(sFull)-1-strlen(sFull));
+ strncat(sFull,list[i],sizeof(sFull)-1-strlen(sFull));
}
}
return sFull;