From 765e4ee04028568ae54dc0dcc84edd6593dce8a3 Mon Sep 17 00:00:00 2001 From: Matt Phillips Date: Fri, 21 Jul 2023 18:28:16 -0400 Subject: [PATCH] add support for aix/sunos (#98) the CFLAGs being tacked on aren't compatible on those platforms, I've tried to add the equivalent. signed-char is the default on sunstudio as such have left it unadded. --- setup.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index d4dc1e73..ff39cffe 100644 --- a/setup.py +++ b/setup.py @@ -18,10 +18,16 @@ 'test': TEST_DEPENDENCIES, } +system = platform.uname().system CFLAGS = ['-O2'] -if platform.uname().system != 'Windows': - CFLAGS.extend(['-std=c99', '-fsigned-char', '-Wall', - '-Wsign-compare', '-Wconversion']) + +if system == 'AIX': + CFLAGS.extend(['-qlanglvl=stdc99', '-qchars']) +elif system == 'SUNOS': + CFLAGS.extend(['-xc99']) # -xchar=s is the default +elif system != 'Windows': + CFLAGS.extend(['-std=c99', '-fsigned-char', '-Wall', + '-Wsign-compare', '-Wconversion']) with open(os.path.join(