diff options
author | murray <murray@FreeBSD.org> | 2002-04-07 10:27:24 +0000 |
---|---|---|
committer | murray <murray@FreeBSD.org> | 2002-04-07 10:27:24 +0000 |
commit | 14aed863caf36b58efa80d9b6579d2c188b0b208 (patch) | |
tree | d3006cdd2b2572d4e40a6043210f04b636849841 /usr.sbin | |
parent | f74fcb3febdf36b7f78d56fe363b3919bd6e1aa9 (diff) | |
download | FreeBSD-src-14aed863caf36b58efa80d9b6579d2c188b0b208.zip FreeBSD-src-14aed863caf36b58efa80d9b6579d2c188b0b208.tar.gz |
GCC >= 3 and C99 handle zero-length arrays differently than older
versions of GCC. With this change, sysinstall compiles and works fine
with GCC 3.1 or 2.95.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sade/sade.h | 6 | ||||
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index a0b26a5..6858500 100644 --- a/usr.sbin/sade/sade.h +++ b/usr.sbin/sade/sade.h @@ -214,7 +214,13 @@ typedef struct _dmenu { char *prompt; /* Our prompt */ char *helpline; /* Line of help at bottom */ char *helpfile; /* Help file for "F1" */ +#if (__STDC_VERSION__ >= 199901L) || (__GNUC__ >= 3) + dialogMenuItem items[]; /* Array of menu items */ +#elif __GNUC__ dialogMenuItem items[0]; /* Array of menu items */ +#else +#error "Create hack for C89 and K&R compilers." +#endif } DMenu; /* An rc.conf variable */ diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index a0b26a5..6858500 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -214,7 +214,13 @@ typedef struct _dmenu { char *prompt; /* Our prompt */ char *helpline; /* Line of help at bottom */ char *helpfile; /* Help file for "F1" */ +#if (__STDC_VERSION__ >= 199901L) || (__GNUC__ >= 3) + dialogMenuItem items[]; /* Array of menu items */ +#elif __GNUC__ dialogMenuItem items[0]; /* Array of menu items */ +#else +#error "Create hack for C89 and K&R compilers." +#endif } DMenu; /* An rc.conf variable */ |