This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 22988118088f5fb0de21f8ea6ada75be2b42f446 (commit) via 02949ce0fdd4f830bdf22fee95464373933aa7ec (commit) from 5a637f76e46988a072403ed95db859f61e12193c (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/22988118088f5fb0de21f8ea6ada75be2b42f...
commit 22988118088f5fb0de21f8ea6ada75be2b42f446 Author: Cyril Hrubis metan@ucw.cz Date: Mon Oct 7 15:41:38 2013 +0200
configure: Fix _FORTIFY_SOURCE redefinition.
Some systems enables _FORTIFY_SOURCE by default which leads to tons of redefiniton warnings. Fix this by checking if _FORTIFY_SOURCE is defined in configure script (also disable _FORTIFY_SOURCE if no optimalizations are done).
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/configure b/configure index c7b7409..5af836e 100755 --- a/configure +++ b/configure @@ -23,8 +23,8 @@ def header_exists(cfg, filename): def c_try_compile(cfg, code, msg): sys.stderr.write(msg)
- ret = os.system("echo '%s' | %s -x c -o /dev/null - > /dev/null 2>&1" % - (code, cfg["CC"][0])) + ret = os.system("echo '%s' | %s %s -x c -o /dev/null - > /dev/null 2>&1" % + (code, cfg['CC'][0], cfg['CFLAGS'][0]))
if ret: sys.stderr.write("Non") @@ -38,6 +38,16 @@ def c_compiler_exists(cfg): "Checking for working compiler (%s) ... " % cfg["CC"][0])
+def define_fortify_source(cfg): + return c_try_compile(cfg, "int main(void) {n" + + "#if !defined _FORTIFY_SOURCE &&" + + "defined __OPTIMIZE__ && __OPTIMIZE__n" + + " return 0;n" + + "#elsen" + + " #error FORTIFY_SOURCE not usablen" + + "#endifn" + + "}", "Whether to define _FORTIFY_SOURCE ... "); + def python_version(cfg): sys.stderr.write("Checking for python-config Python version ... ")
@@ -209,6 +219,9 @@ def basic_checks(cfg): check_for_swig(cfg) check_for_python_config(cfg)
+ if define_fortify_source(cfg): + cfg['CFLAGS'][0] = cfg['CFLAGS'][0] + " -D_FORTIFY_SOURCE=2" + cfg['PYTHON_VER'][0] = python_version(cfg)
if cfg['libdir'][0] == '': @@ -290,7 +303,7 @@ if __name__ == '__main__': # Dictionary for default configuration parameters # cfg = {'CC' : ['gcc', 'Path/name of the C compiler'], - 'CFLAGS' : ['-pthread -W -Wall -Wextra -fPIC -O2 -ggdb -D_FORTIFY_SOURCE=2', 'C compiler flags'], + 'CFLAGS' : ['-pthread -W -Wall -Wextra -fPIC -O2 -ggdb', 'C compiler flags'], 'PYTHON_BIN' : ['python', 'Path/name of python interpreter'], 'SWIG' : ['swig', 'Simplified Wrapper and Interface Generator'], 'PYTHON_CONFIG' : ['python-config', 'Python config helper'],
http://repo.or.cz/w/gfxprim.git/commit/02949ce0fdd4f830bdf22fee95464373933aa...
commit 02949ce0fdd4f830bdf22fee95464373933aa7ec Author: Cyril Hrubis metan@ucw.cz Date: Mon Oct 7 15:22:21 2013 +0200
gen: Rename pixeltype.C_enum to pixeltype.C_type
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/pylib/gp_codegen/pixeltype.py b/pylib/gp_codegen/pixeltype.py index 2e89931..bcad7fc 100644 --- a/pylib/gp_codegen/pixeltype.py +++ b/pylib/gp_codegen/pixeltype.py @@ -51,8 +51,7 @@ class PixelType(object): self.chans = dict() # { chan_name: (offset, size) } self.pixelsize = pixelsize # C enum as defined in GP_Pixel.gen.h - self.C_enum = "GP_PIXEL_" + self.name - + self.C_type = "GP_PIXEL_" + self.name
# Verify channel bits for overlaps # also builds a bit-map of the PixelType diff --git a/tests/core/Convert.gen.c.t b/tests/core/Convert.gen.c.t index 8e9cf2a..945903a 100644 --- a/tests/core/Convert.gen.c.t +++ b/tests/core/Convert.gen.c.t @@ -39,7 +39,7 @@ static GP_Pixel get_black(GP_PixelType pixel_type) { switch (pixel_type) { %% for pt in pixeltypes - case {{ pt.C_enum }}: + case {{ pt.C_type }}: %% if pt.is_cmyk() %% set K = pt.chans['K'] /* Black in CMYK is full K rest zero */ @@ -65,7 +65,7 @@ static GP_Pixel get_white(GP_PixelType pixel_type) { switch (pixel_type) { %% for pt in pixeltypes - case {{ pt.C_enum }}: + case {{ pt.C_type }}: %% if pt.is_cmyk() /* White in CMYK is zero */ return 0x0; @@ -110,7 +110,7 @@ static GP_Pixel get_red(GP_PixelType pixel_type) { switch (pixel_type) { %% for pt in pixeltypes - case {{ pt.C_enum }}: + case {{ pt.C_type }}: %% if pt.is_cmyk() %% set M = pt.chans['M'] %% set Y = pt.chans['Y']
-----------------------------------------------------------------------
Summary of changes: configure | 19 ++++++++++++++++--- pylib/gp_codegen/pixeltype.py | 3 +-- tests/core/Convert.gen.c.t | 6 +++--- 3 files changed, 20 insertions(+), 8 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.