Print this page
cpp: allow vastly more #defines
<inet/tcp.h> requires considerably more defines to preprocess than the
4,000 we previously allowed.  Allow an (equally arbitrary) 16,000
symbols instead.

Split Close
Expand all
Collapse all
          --- old/cpp/cpp.c
          +++ new/cpp/cpp.c
↓ open down ↓ 257 lines elided ↑ open up ↑
 258  258  struct symtab   *lookup(char *, int);
 259  259  static  struct symtab   *slookup(char *, char *, int);
 260  260  static  char            *subst(char *, struct symtab *);
 261  261  static  char            *trmdir(char *);
 262  262  static  char            *copy(char *);
 263  263  static  char            *strdex(char *, int);
 264  264  int             yywrap(void);
 265  265  int             main(int argc, char **argav);
 266  266  
 267  267  
 268      -#define symsiz 4000
      268 +#define symsiz 16000
 269  269  static  struct symtab stab[symsiz];
 270  270  
 271  271  static  struct symtab *defloc;
 272  272  static  struct symtab *udfloc;
 273  273  static  struct symtab *incloc;
 274  274  static  struct symtab *ifloc;
 275  275  static  struct symtab *elsloc;
 276  276  static  struct symtab *eifloc;
 277  277  static  struct symtab *elifloc;
 278  278  static  struct symtab *ifdloc;
↓ open down ↓ 1320 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX