Skip to content

Commit 765e4ee

Browse files
authored
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.
1 parent 7071a24 commit 765e4ee

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

setup.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,16 @@
1818
'test': TEST_DEPENDENCIES,
1919
}
2020

21+
system = platform.uname().system
2122
CFLAGS = ['-O2']
22-
if platform.uname().system != 'Windows':
23-
CFLAGS.extend(['-std=c99', '-fsigned-char', '-Wall',
24-
'-Wsign-compare', '-Wconversion'])
23+
24+
if system == 'AIX':
25+
CFLAGS.extend(['-qlanglvl=stdc99', '-qchars'])
26+
elif system == 'SUNOS':
27+
CFLAGS.extend(['-xc99']) # -xchar=s is the default
28+
elif system != 'Windows':
29+
CFLAGS.extend(['-std=c99', '-fsigned-char', '-Wall',
30+
'-Wsign-compare', '-Wconversion'])
2531

2632

2733
with open(os.path.join(

0 commit comments

Comments
 (0)