Print this page
3748 zfs headers should be C++ compatible
Submitted by:   Justin Gibbs <justing@spectralogic.com>
Submitted by:   Will Andrews <willa@spectralogic.com>
Reviewed by:    Matthew Ahrens <mahrens@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libzpool/Makefile.com
          +++ new/usr/src/lib/libzpool/Makefile.com
↓ open down ↓ 71 lines elided ↑ open up ↑
  72   72  CERRWARN +=     -_gcc=-Wno-unused-variable
  73   73  CERRWARN +=     -_gcc=-Wno-uninitialized
  74   74  CERRWARN +=     -_gcc=-Wno-empty-body
  75   75  CERRWARN +=     -_gcc=-Wno-unused-function
  76   76  CERRWARN +=     -_gcc=-Wno-unused-label
  77   77  
  78   78  .KEEP_STATE:
  79   79  
  80   80  all: $(LIBS)
  81   81  
       82 +$(LIBS): libzpool_hdrck.o
       83 +
  82   84  lint: $(LINTLIB)
  83   85  
  84   86  include ../../Makefile.targ
  85   87  
  86   88  EXTPICS= $(DTRACE_OBJS:%=pics/%)
  87   89  
       90 +libzpool_hdrck.o: libzpool_hdrck.cpp
       91 +        $(COMPILE.cc) -DB_FALSE=_B_FALSE -DB_TRUE=_B_TRUE -o $@ $^
       92 +
       93 +libzpool_hdrck.cpp:
       94 +        find .. -name '*.[ch]' | xargs grep -h '^#include <' > $@
       95 +
  88   96  pics/%.o: ../../../uts/common/fs/zfs/%.c ../common/zfs.h
  89   97          $(COMPILE.c) -o $@ $<
  90   98          $(POST_PROCESS_O)
  91   99  
  92  100  pics/%.o: ../../../common/zfs/%.c ../common/zfs.h
  93  101          $(COMPILE.c) -o $@ $<
  94  102          $(POST_PROCESS_O)
  95  103  
  96  104  pics/%.o: ../common/%.d $(PICS)
  97  105          $(COMPILE.d) -C -s $< -o $@ $(PICS)
  98  106          $(POST_PROCESS_O)
  99  107  
 100  108  ../common/%.h: ../common/%.d
 101  109          $(DTRACE) -xnolibs -h -s $< -o $@
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX