diff options
-rw-r--r-- | generic/tkInt.h | 4 | ||||
-rw-r--r-- | generic/tkText.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/generic/tkInt.h b/generic/tkInt.h index 72fd9b4..35b7e67 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -86,7 +86,9 @@ # endif #endif -#if defined(__GNUC__) && (__GNUC__ > 2) +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define TKFLEXARRAY +#elif defined(__GNUC__) && (__GNUC__ > 2) # define TKFLEXARRAY 0 #else # define TKFLEXARRAY 1 diff --git a/generic/tkText.h b/generic/tkText.h index 9898462..f9576d7 100644 --- a/generic/tkText.h +++ b/generic/tkText.h @@ -168,7 +168,7 @@ typedef struct TkTextSegment { int size; /* Size of this segment (# of bytes of index * space it occupies). */ union { - char chars[TKFLEXARRAY]; /* Characters that make up character info. + char chars[1]; /* Characters that make up character info. * Actual length varies to hold as many * characters as needed.*/ TkTextToggle toggle; /* Information about tag toggle. */ |