Skip to content

Commit

Permalink
add support for aix/sunos (MagicStack#98)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mattp- authored Jul 21, 2023
1 parent 7071a24 commit 765e4ee
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 765e4ee

Please sign in to comment.