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

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


The following issue has been UPDATED. 
====================================================================== 
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:                    [patch] 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


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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-26 03:06 itamarjp       Summary                  Best practices for
programming in C => [patch] Best practices for programming in C
======================================================================




More information about the asterisk-bugs mailing list