Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/malloc.h
          +++ new/usr/src/head/malloc.h
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12   * and limitations under the License.
  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 +/*
       23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       24 + */
  22   25  /*      Copyright (c) 1988 AT&T */
  23   26  /*        All Rights Reserved   */
  24   27  
  25      -
  26   28  #ifndef _MALLOC_H
  27   29  #define _MALLOC_H
  28   30  
  29   31  #include <sys/types.h>
  30   32  
  31   33  #ifdef  __cplusplus
  32   34  extern "C" {
  33   35  #endif
  34   36  
  35   37  /*
↓ open down ↓ 14 lines elided ↑ open up ↑
  50   52          unsigned long smblks;   /* number of small blocks */
  51   53          unsigned long hblks;    /* number of holding blocks */
  52   54          unsigned long hblkhd;   /* space in holding block headers */
  53   55          unsigned long usmblks;  /* space in small blocks in use */
  54   56          unsigned long fsmblks;  /* space in free small blocks */
  55   57          unsigned long uordblks; /* space in ordinary blocks in use */
  56   58          unsigned long fordblks; /* space in free ordinary blocks */
  57   59          unsigned long keepcost; /* cost of enabling keep option */
  58   60  };
  59   61  
  60      -#if defined(__STDC__)
  61      -
  62   62  #if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
  63   63          defined(_XPG3)
  64   64  #if __cplusplus >= 199711L
  65   65  namespace std {
  66   66  #endif
  67   67  
  68   68  void *malloc(size_t);
  69   69  void free(void *);
  70   70  void *realloc(void *, size_t);
  71   71  void *calloc(size_t, size_t);
↓ open down ↓ 4 lines elided ↑ open up ↑
  76   76  using std::malloc;
  77   77  using std::free;
  78   78  using std::realloc;
  79   79  using std::calloc;
  80   80  #endif /* __cplusplus >= 199711L */
  81   81  #endif /* (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || ... */
  82   82  
  83   83  int mallopt(int, int);
  84   84  struct mallinfo mallinfo(void);
  85   85  
  86      -#else
  87      -
  88      -void *malloc();
  89      -void free();
  90      -void *realloc();
  91      -void *calloc();
  92      -int mallopt();
  93      -struct mallinfo mallinfo();
  94      -
  95      -#endif  /* __STDC__ */
  96      -
  97   86  #ifdef  __cplusplus
  98   87  }
  99   88  #endif
 100   89  
 101   90  #endif  /* _MALLOC_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX