Summary:ASTERISK-14892: [patch] Best practices for programming in C
Reporter:Itamar Reis Peixoto (itamarjp)Labels:
Date Opened:2009-09-26 03:04:08Date Closed:2011-06-07 14:07:47
Versions:Frequency of
Environment:Attachments:( 0) 0006-Revert-changes-to-pbx_lua-from-rev-126363-that-cause.patch
Description:in file pbx/pbx_lua.c

#include <lua5.1/lua.h>
#include <lua5.1/lauxlib.h>
#include <lua5.1/lualib.h>

please read [1]

Finally, using absolute pathnames for header files is not a good idea. The "include-path'' option of the C compiler (-I (capital "eye") on many systems) is the preferred method for handling extensive private libraries of header files; it permits reorganizing the directory structure without having to alter source files.

I think this should be changed, I have attached a patch.

[1] - http://www.ibm.com/developerworks/aix/library/au-hook_duttaC.html

Comments:By: Itamar Reis Peixoto (itamarjp) 2009-09-26 03:06:04

if the include file in in lua5.1 directory then -L flag should be used instead hardcoding th path

By: Tilghman Lesher (tilghman) 2009-09-26 10:10:53

Already fixed in trunk, but using a different method.