Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/memory.h
          +++ new/usr/src/head/memory.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 _MEMORY_H
  27   29  #define _MEMORY_H
  28   30  
  29      -#pragma ident   "%Z%%M% %I%     %E% SMI"        /* SVr4.0 1.4.1.2 */
  30      -
  31   31  #include <sys/types.h>
  32   32  
  33   33  #ifdef  __cplusplus
  34   34  extern "C" {
  35   35  #endif
  36   36  
  37      -#if defined(__STDC__)
  38   37  extern void *memccpy(void *, const void *, int, size_t);
  39   38  #if __cplusplus >= 199711L
  40   39  namespace std {
  41   40  extern const void *memchr(const void *, int, size_t);
  42   41  #ifndef _MEMCHR_INLINE
  43   42  #define _MEMCHR_INLINE
  44   43  extern "C++" {
  45   44          inline void *memchr(void * __s, int __c, size_t __n) {
  46   45                  return (void*)memchr((const void *) __s, __c, __n);
  47   46          }
  48   47  }
  49   48  #endif /* _MEMCHR_INLINE */
  50   49  } /* end of namespace std */
  51   50  using std::memchr;
  52   51  #else
  53   52  extern void *memchr(const void *, int, size_t);
  54   53  #endif
  55   54  extern void *memcpy(void *, const void *, size_t);
  56   55  extern void *memset(void *, int, size_t);
  57   56  extern int memcmp(const void *, const void *, size_t);
  58      -#else
  59      -extern void *memccpy();
  60      -extern void *memchr();
  61      -extern void *memcpy();
  62      -extern void *memset();
  63      -extern int memcmp();
  64      -#endif
  65   57  
  66   58  #ifdef  __cplusplus
  67   59  }
  68   60  #endif
  69   61  
  70   62  #endif  /* _MEMORY_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX