Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/regex.h
          +++ new/usr/src/head/regex.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   *
  14   14   * When distributing Covered Code, include this CDDL HEADER in each
  15   15   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16   * If applicable, add the following below this CDDL HEADER, with the
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
       23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       24 + *
  23   25   * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24   26   * Use is subject to license terms.
  25   27   */
  26   28  
  27   29  /*
  28   30   * Copyright 1989, 1994 by Mortice Kern Systems Inc.
  29   31   * All rights reserved.
  30   32   */
  31   33  /*
  32   34   * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
↓ open down ↓ 102 lines elided ↑ open up ↑
 135  137          int re_magic;
 136  138          const char *re_endp;
 137  139  
 138  140          /* here for compat */
 139  141          size_t  re_len;         /* # wchar_t chars in compiled pattern */
 140  142          struct _regex_ext_t *re_sc;     /* for binary compatibility */
 141  143  } regex_t;
 142  144  
 143  145  /* subexpression positions */
 144  146  typedef struct {
 145      -#ifdef __STDC__
 146  147          const char      *rm_sp, *rm_ep; /* Start pointer, end pointer */
 147      -#else
 148      -        char            *rm_sp, *rm_ep; /* Start pointer, end pointer */
 149      -#endif
 150  148          regoff_t        rm_so, rm_eo;   /* Start offset, end offset */
 151  149          int             rm_ss, rm_es;   /* Used internally */
 152  150  } regmatch_t;
 153  151  
 154  152  
 155  153  /*
 156  154   * Additional API and structs to support regular expression manipulations
 157  155   * on wide characters.
 158  156   */
 159  157  
 160      -#if defined(__STDC__)
 161      -
 162  158  extern int regcomp(regex_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, int);
 163  159  extern int regexec(const regex_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
 164  160          size_t, regmatch_t *_RESTRICT_KYWD, int);
 165  161  extern size_t regerror(int, const regex_t *_RESTRICT_KYWD,
 166  162          char *_RESTRICT_KYWD, size_t);
 167  163  extern void regfree(regex_t *);
 168  164  
 169      -#else  /* defined(__STDC__) */
 170      -
 171      -extern int regcomp();
 172      -extern int regexec();
 173      -extern size_t regerror();
 174      -extern void regfree();
 175      -
 176      -#endif  /* defined(__STDC__) */
 177      -
 178  165  #ifdef  __cplusplus
 179  166  }
 180  167  #endif
 181  168  
 182  169  #endif  /* _REGEX_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX