Print this page
2976 remove useless offsetof() macros

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libumem/common/misc.h
          +++ new/usr/src/lib/libumem/common/misc.h
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  #ifndef _MISC_H
  28   28  #define _MISC_H
  29   29  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   30  #include <sys/types.h>
  33   31  #include <sys/time.h>
  34   32  #include <thread.h>
  35   33  #include <pthread.h>
  36   34  #include <stdarg.h>
       35 +#include <stddef.h>
  37   36  
  38   37  #ifdef  __cplusplus
  39   38  extern "C" {
  40   39  #endif
  41   40  
  42   41  extern uint_t umem_abort;               /* abort when errors occur */
  43   42  extern uint_t umem_output;              /* output error messages to stderr */
  44   43  extern caddr_t umem_min_stack;          /* max stack address for audit log */
  45   44  extern caddr_t umem_max_stack;          /* min stack address for audit log */
  46   45  
  47   46  /*
  48      - * various utility functions
  49      - * These are globally implemented.
  50      - */
  51      -
  52      -#undef  offsetof
  53      -#define offsetof(s, m)  ((size_t)(&(((s *)0)->m)))
  54      -
  55      -/*
  56   47   * a safe printf  -- do not use for error messages.
  57   48   */
  58   49  void debug_printf(const char *format, ...);
  59   50  
  60   51  /*
  61   52   * adds a message to the log without writing it out.
  62   53   */
  63   54  void log_message(const char *format, ...);
  64   55  
  65   56  /*
↓ open down ↓ 76 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX