Print this page
2976 remove useless offsetof() macros

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/ecppvar.h
          +++ new/usr/src/uts/common/sys/ecppvar.h
↓ open down ↓ 20 lines elided ↑ open up ↑
  21   21   */
  22   22  /*
  23   23   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  #ifndef _SYS_ECPPVAR_H
  28   28  #define _SYS_ECPPVAR_H
  29   29  
  30   30  #include <sys/note.h>
       31 +#include <sys/sysmacros.h>
  31   32  
  32   33  #ifdef  __cplusplus
  33   34  extern "C" {
  34   35  #endif
  35   36  
  36   37  struct ecppunit;
  37   38  
  38   39  /*
  39   40   * Hardware-abstraction structure
  40   41   */
↓ open down ↓ 465 lines elided ↑ open up ↑
 506  507                      (pp)->current_mode == ECPP_COMPAT_MODE))
 507  508  
 508  509  #define COMPAT_DMA(pp) (((pp)->io_mode == ECPP_DMA) &&          \
 509  510                      ((pp)->current_mode == ECPP_CENTRONICS ||   \
 510  511                      (pp)->current_mode == ECPP_COMPAT_MODE))
 511  512  
 512  513  /*
 513  514   * Other useful macros
 514  515   */
 515  516  #define NELEM(a)        (sizeof (a) / sizeof (*(a)))
 516      -#define offsetof(s, m)  ((size_t)(&(((s *)0)->m)))
 517  517  
 518  518  #ifdef  __cplusplus
 519  519  }
 520  520  #endif
 521  521  
 522  522  #endif  /* _SYS_ECPPVAR_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX