Summary:ASTERISK-14513: Symbol exports for strlcat and strlcpy
Reporter:Scott White (smw1218)Labels:
Date Opened:2009-07-22 13:48:13Date Closed:2009-07-22 17:36:02
Versions:Frequency of
Description:Change "2009-03-18 01:55 +0000 [r182802-182808]  Kevin P. Fleming <kpfleming@digium.com>" limited the global symbols exported from asterisk.  I would like to request that strl* be added back to the exports so that modules may use these calls on platforms which don't have native support (ie. Linux).

Modules that used these calls on 1.4.24 and before are now broken and will fail with a loader error at startup.


I like the strl* versions, thanks for providing them in the first place.  Please bring them back.
Comments:By: Tilghman Lesher (tilghman) 2009-07-22 13:59:24

I'm pretty sure that we want you to use ast_copy_string() in preference to strlcpy, since they do exactly the same thing.  As to strlcat, I'm not sure whether we want to export that symbol or not.

By: Tilghman Lesher (tilghman) 2009-07-22 14:17:20

In addition, in 1.6, we'd prefer that you use the ast_str interface, instead of trying to use either strncat OR strlcat.

By: Scott White (smw1218) 2009-07-22 14:21:29

Thanks for the suggestions.  I will see about changing my modules.  Is there a forum/discussion/document somewhere about the exported API and what are the best practices?

By: Digium Subversion (svnbot) 2009-07-22 15:23:58

Repository: asterisk
Revision: 208083

U   branches/1.4/include/asterisk/compat.h
U   branches/1.4/main/asterisk.exports

r208083 | tilghman | 2009-07-22 15:23:57 -0500 (Wed, 22 Jul 2009) | 4 lines

Export symbols for functions included in our compatibility headers.
(closes issue ASTERISK-14513)
Reported by: smw1218



By: Tilghman Lesher (tilghman) 2009-07-22 15:57:03

The CODING-GUIDELINES in our doc directory is the best place to look.

By: Digium Subversion (svnbot) 2009-07-22 17:36:01

Repository: asterisk
Revision: 208151

_U  trunk/
U   trunk/include/asterisk/compat.h
U   trunk/main/asterisk.exports
U   trunk/main/strcompat.c

r208151 | tilghman | 2009-07-22 17:36:01 -0500 (Wed, 22 Jul 2009) | 11 lines

Merged revisions 208083 via svnmerge from

 r208083 | tilghman | 2009-07-22 15:23:53 -0500 (Wed, 22 Jul 2009) | 4 lines
 Export symbols for functions included in our compatibility headers.
 (closes issue ASTERISK-14513)
  Reported by: smw1218