[asterisk-bugs] [Asterisk 0015968]: Best practices for programming in C

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Sep 26 03:06:04 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15968 
====================================================================== 
Reported By:                itamarjp
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15968
Category:                   PBX/pbx_lua
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-09-26 03:04 CDT
Last Modified:              2009-09-26 03:06 CDT
====================================================================== 
Summary:                    Best practices for programming in C
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


====================================================================== 

---------------------------------------------------------------------- 
 (0111391) itamarjp (reporter) - 2009-09-26 03:06
 https://issues.asterisk.org/view.php?id=15968#c111391 
---------------------------------------------------------------------- 
if the include file in in lua5.1 directory then -L flag should be used
instead hardcoding th path 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-26 03:06 itamarjp       Note Added: 0111391                          
======================================================================




More information about the asterisk-bugs mailing list