Print this page
1150 libcmdutils has superfluous #define


  51 #include <string.h>
  52 #include <dirent.h>
  53 #include <attr.h>
  54 #include <sys/avl.h>
  55 #include <sys/types.h>
  56 #include <sys/stat.h>
  57 #include <sys/mman.h>
  58 #include <libnvpair.h>
  59 
  60 #ifdef  __cplusplus
  61 extern "C" {
  62 #endif
  63 
  64 /* extended system attribute support */
  65 #define _NOT_SATTR      0
  66 #define _RO_SATTR       1
  67 #define _RW_SATTR       2
  68 
  69 #define MAXMAPSIZE      (1024*1024*8)   /* map at most 8MB */
  70 #define SMALLFILESIZE   (32*1024)       /* don't use mmap on little file */
  71 #define ISREG(A)        (((A).st_mode & S_IFMT) == S_IFREG)
  72 
  73 /* avltree */
  74 #define OFFSETOF(s, m)  ((size_t)(&(((s *)0)->m)))
  75 
  76 /* Type used for a node containing a device id and inode number */
  77 typedef struct tree_node {
  78         dev_t           node_dev;
  79         ino_t           node_ino;
  80         avl_node_t      avl_link;
  81 } tree_node_t;
  82 
  83 
  84                 /* extended system attribute support */
  85 
  86 /* Determine if a file is the name of an extended system attribute file */
  87 extern int sysattr_type(char *);
  88 
  89 /* Determine if the underlying file system supports system attributes */
  90 extern int sysattr_support(char *, int);
  91 




  51 #include <string.h>
  52 #include <dirent.h>
  53 #include <attr.h>
  54 #include <sys/avl.h>
  55 #include <sys/types.h>
  56 #include <sys/stat.h>
  57 #include <sys/mman.h>
  58 #include <libnvpair.h>
  59 
  60 #ifdef  __cplusplus
  61 extern "C" {
  62 #endif
  63 
  64 /* extended system attribute support */
  65 #define _NOT_SATTR      0
  66 #define _RO_SATTR       1
  67 #define _RW_SATTR       2
  68 
  69 #define MAXMAPSIZE      (1024*1024*8)   /* map at most 8MB */
  70 #define SMALLFILESIZE   (32*1024)       /* don't use mmap on little file */

  71 
  72 /* avltree */
  73 #define OFFSETOF(s, m)  ((size_t)(&(((s *)0)->m)))
  74 
  75 /* Type used for a node containing a device id and inode number */
  76 typedef struct tree_node {
  77         dev_t           node_dev;
  78         ino_t           node_ino;
  79         avl_node_t      avl_link;
  80 } tree_node_t;
  81 
  82 
  83                 /* extended system attribute support */
  84 
  85 /* Determine if a file is the name of an extended system attribute file */
  86 extern int sysattr_type(char *);
  87 
  88 /* Determine if the underlying file system supports system attributes */
  89 extern int sysattr_support(char *, int);
  90