Ticket #5728: twisted-5728-fix-build-on-sunos.2.patch

File twisted-5728-fix-build-on-sunos.2.patch, 1016 bytes (added by xaka, 19 months ago)
  • twisted/python/dist.py

     
    367367            self.define_macros = [("WIN32", 1)] 
    368368        else: 
    369369            self.define_macros = [] 
     370 
     371        # standards(5) man page 
     372        # X/Open CAE To build or compile an application that conforms to one 
     373        # of the X/Open CAE specifications, use the following guidelines. 
     374        # Applications need not set the POSIX feature test macros if they 
     375        # require both CAE and POSIX functionality. 
     376        if sys.platform.startswith('sunos'): 
     377            self.define_macros.append(('_XOPEN_SOURCE', 1)) 
     378            self.define_macros.append(('_XOPEN_SOURCE_EXTENDED', 1)) 
     379 
    370380        self.extensions = [x for x in self.conditionalExtensions 
    371381                           if x.condition(self)] 
     382 
    372383        for ext in self.extensions: 
    373384            ext.define_macros.extend(self.define_macros) 
    374385