Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/ndbm.h
          +++ new/usr/src/head/ndbm.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 1989 Sun Microsystems, Inc.  All rights reserved.
  24   26   * Use is subject to license terms.
  25   27   */
  26   28  
  27   29  /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
  28   30  /*        All Rights Reserved   */
  29   31  
  30   32  /*
  31   33   * Portions of this source code were derived from Berkeley 4.3 BSD
  32   34   * under license from the Regents of the University of California.
  33   35   */
  34   36  
  35   37  /*
  36   38   * Hashed key data base library.
  37   39   */
  38   40  
  39   41  #ifndef _NDBM_H
  40   42  #define _NDBM_H
  41   43  
  42      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  43      -
  44   44  #include <sys/feature_tests.h>
  45   45  #include <sys/types.h>
  46   46  
  47   47  #ifdef  __cplusplus
  48   48  extern "C" {
  49   49  #endif
  50   50  
  51   51  /*
  52   52   * flags to dbm_store()
  53   53   */
↓ open down ↓ 29 lines elided ↑ open up ↑
  83   83          void    *dptr;
  84   84          size_t  dsize;
  85   85  } datum;
  86   86  #else
  87   87  typedef struct {
  88   88          char    *dptr;
  89   89          long    dsize;
  90   90  } datum;
  91   91  #endif
  92   92  
  93      -#ifdef  __STDC__
  94   93  DBM     *dbm_open(const char *, int, mode_t);
  95   94  void    dbm_close(DBM *);
  96   95  datum   dbm_fetch(DBM *, datum);
  97   96  datum   dbm_firstkey(DBM *);
  98   97  datum   dbm_nextkey(DBM *);
  99   98  int     dbm_delete(DBM *, datum);
 100   99  int     dbm_store(DBM *, datum, datum, int);
 101  100  int     dbm_clearerr(DBM *);
 102  101  int     dbm_error(DBM *);
 103      -#else
 104      -DBM     *dbm_open();
 105      -void    dbm_close();
 106      -datum   dbm_fetch();
 107      -datum   dbm_firstkey();
 108      -datum   dbm_nextkey();
 109      -int     dbm_delete();
 110      -int     dbm_store();
 111      -int     dbm_clearerr();
 112      -int     dbm_error();
 113      -#endif
 114  102  
 115  103  #define _DBM_RDONLY     0x1     /* data base open read-only */
 116  104  #define _DBM_IOERR      0x2     /* data base I/O error */
 117  105  
 118  106  #define dbm_rdonly(__db)        ((__db)->dbm_flags & _DBM_RDONLY)
 119  107  #define dbm_error(__db)         ((__db)->dbm_flags & _DBM_IOERR)
 120  108  /* use this one at your own risk! */
 121  109  #define dbm_clearerr(__db)      ((__db)->dbm_flags &= ~_DBM_IOERR)
 122  110  /* for fstat(2) */
 123  111  #define dbm_dirfno(__db)        ((__db)->dbm_dirf)
 124  112  #define dbm_pagfno(__db)        ((__db)->dbm_pagf)
 125  113  
 126  114  #ifdef  __cplusplus
 127  115  }
 128  116  #endif
 129  117  
 130  118  #endif  /* _NDBM_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX