summaryrefslogtreecommitdiff
path: root/main/strcompat.c
AgeCommit message (Collapse)Author
2013-01-19Add builtin roundf() for systems lacking it.Walter Doekes
(closes issue ASTERISK-16854) Review: https://reviewboard.asterisk.org/r/2276 Reported-by: Ovidiu Sas ........ Merged revisions 379547 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 379548 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Clean up and ensure proper usage of alloca()Kinsey Moore
This replaces all calls to alloca() with ast_alloca() which calls gcc's __builtin_alloca() to avoid BSD semantics and removes all NULL checks on memory allocated via ast_alloca() and ast_strdupa(). (closes issue ASTERISK-20125) Review: https://reviewboard.asterisk.org/r/2032/ Patch-by: Walter Doekes (wdoekes) ........ Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Multiple revisions 369001-369002Kevin P. Fleming
........ r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines Add support-level indications to many more source files. Since we now have tools that scan through the source tree looking for files with specific support levels, we need to ensure that every file that is a component of a 'core' or 'extended' module (or the main Asterisk binary) is explicitly marked with its support level. This patch adds support-level indications to many more source files in tree, but avoids adding them to third-party libraries that are included in the tree and to source files that don't end up involved in Asterisk itself. ........ r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines Add a script to enable finding source files without support-levels defined. ........ Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-22Kill off red blobs in most of main/*Kinsey Moore
Everything still compiled after making these changes, so I assume these whitespace-only changes didn't break anything (and shouldn't have). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-10Merged revisions 301263 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r301263 | tilghman | 2011-01-10 16:39:31 -0600 (Mon, 10 Jan 2011) | 8 lines Little endian machines were not converted properly. (closes issue #18583) Reported by: jcovert Patches: 20110110__issue18583.diff.txt uploaded by tilghman (license 14) Tested by: jcovert ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@301264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-28Merged revisions 289104 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r289104 | tilghman | 2010-09-28 13:18:43 -0500 (Tue, 28 Sep 2010) | 4 lines Solaris compatibility fixes Review: https://reviewboard.asterisk.org/r/942/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-24Merged revisions 288638 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r288638 | tilghman | 2010-09-23 22:39:29 -0500 (Thu, 23 Sep 2010) | 16 lines Merged revisions 288637 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r288637 | tilghman | 2010-09-23 22:36:01 -0500 (Thu, 23 Sep 2010) | 9 lines Merged revisions 288636 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r288636 | tilghman | 2010-09-23 22:20:24 -0500 (Thu, 23 Sep 2010) | 2 lines Solaris compatibility fixes ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-30Don't allow file descriptors to go above 64k, when we're closing them in a ↵Tilghman Lesher
fork(2). This saves time, when, even though the system allows the process limit to be that high, the practical limit is much lower. Also introduce an additional optimization, in the form of using the CLOEXEC flag to close descriptors at the right time. (closes issue #17223) Reported by: dbackeberg Patches: 20100423__issue17223.diff.txt uploaded by tilghman (license 14) Tested by: dbackeberg git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@260292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-06Move implementation of closefrom(3) from app.c to strcompat.cTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@233358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-02So apparently, some platforms don't have ffsll(3).Tilghman Lesher
The manpage lies; it says that the function is in POSIX, but that's only for ffs(3), not ffsll(3). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04Expand codec bitfield from 32 bits to 64 bits.Tilghman Lesher
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-22Merged revisions 208083 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ 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 #15556) Reported by: smw1218 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04Whitespace changes onlyTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16Start untangling header inclusion in a way that does not affectLuigi Rizzo
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07Merged revisions 68192 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r68192 | russell | 2007-06-07 14:30:30 -0500 (Thu, 07 Jun 2007) | 3 lines Include stdarg.h for build issues on Solaris (issue #9381) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07Reverting part of #67864 to be able to compile agi/eagi-test that relies on ↵Olle Johansson
this without having ast_log and other asterisk api functions available - I could not compile on OS/X without reverting this. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵Tilghman Lesher
guidelines changes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-06Merged revisions 60603 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r60603 | russell | 2007-04-06 15:58:43 -0500 (Fri, 06 Apr 2007) | 13 lines To be able to achieve the things that we would like to achieve with the Asterisk GUI project, we need a fully functional HTTP interface with access to the Asterisk manager interface. One of the things that was intended to be a part of this system, but was never actually implemented, was the ability for the GUI to be able to upload files to Asterisk. So, this commit adds this in the most minimally invasive way that we could come up with. A lot of work on minimime was done by Steve Murphy. He fixed a lot of bugs in the parser, and updated it to be thread-safe. The ability to check permissions of active manager sessions was added by Dwayne Hubbard. Then, hacking this all together and do doing the modifications necessary to the HTTP interface was done by me. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@60604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18Only use alloca.h on OSes that have it.Jason Parker
Reported by jontow on IRC in #asterisk-dev git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-15Many Solaris fixes - this moves some of the stuff from utils.c to strcompat.cJason Parker
Every OS uses strcompat now - this was done on purpose. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21merge new_loader_completion branch, including (at least):Kevin P. Fleming
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3