Print this page
2976 remove useless offsetof() macros

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/avs/ns/rdc/rdc_io.c
          +++ new/usr/src/uts/common/avs/ns/rdc/rdc_io.c
↓ open down ↓ 21 lines elided ↑ open up ↑
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26   26  #include <sys/types.h>
  27   27  #include <sys/ksynch.h>
  28   28  #include <sys/cmn_err.h>
  29   29  #include <sys/kmem.h>
  30   30  #include <sys/conf.h>
  31   31  #include <sys/errno.h>
       32 +#include <sys/sysmacros.h>
  32   33  
  33   34  #ifdef _SunOS_5_6
  34   35  /*
  35   36   * on 2.6 both dki_lock.h and rpc/types.h define bool_t so we
  36   37   * define enum_t here as it is all we need from rpc/types.h
  37   38   * anyway and make it look like we included it. Yuck.
  38   39   */
  39   40  #define _RPC_TYPES_H
  40   41  typedef int enum_t;
  41   42  #else
↓ open down ↓ 5590 lines elided ↑ open up ↑
5632 5633  done:
5633 5634          rdc_group_exit(krdc);
5634 5635  
5635 5636          mutex_enter(&rdc_conf_lock);
5636 5637          wakeup_busy(krdc);
5637 5638          mutex_exit(&rdc_conf_lock);
5638 5639  
5639 5640          return (rc);
5640 5641  }
5641 5642  
5642      -/*
5643      - * Yet another standard thing that is not standard ...
5644      - */
5645      -#ifndef offsetof
5646      -#define offsetof(s, m)  ((size_t)(&((s *)0)->m))
5647      -#endif
5648      -
5649 5643  static int
5650 5644  rdc_status(void *arg, int mode, rdc_config_t *uparms, spcs_s_info_t kstatus)
5651 5645  {
5652 5646          rdc_k_info_t *krdc;
5653 5647          rdc_u_info_t *urdc;
5654 5648          disk_queue *dqp;
5655 5649          int rc = 0;
5656 5650          int index;
5657 5651          char *ptr;
5658 5652          extern int rdc_status_copy32(const void *, void *, size_t, int);
↓ open down ↓ 1066 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX