lib/alloca.c


Log

Author Commit Date CI Message
Paul Eggert c3dbfe95 2011-06-20T15:03:03 alloca: port to compilers that can optimize like GCC 4.6.0 * lib/alloca.c (find_stack_direction): New signature, taken from Autoconf git. This works with GCC 4.6.0. This code should never be used with GCC 4.6.0 itself, as GCC has alloca, but it might be used with other compilers that optimize as well as GCC 4.6.0 does. (alloca): Adjust to new signature. * m4/alloca.m4 (__AC_LIBOBJ_ALLOCA) [Autoconf version < 2.69]: New macro, which patches Autoconf in a similar way.
Paul Eggert 6f577299 2010-12-28T20:41:30 alloca: one step towards thread-safety * lib/alloca.c (find_stack_direction): New arg PTR, to avoid the need for a static variable. All callers changed. This does not make the alloca replacement thread-safe, but it's one step.
Bruno Haible 441aa304 2009-12-10T20:28:30 Use spaces for indentation, not tabs.
Paul Eggert 0632e115 2006-09-13T22:38:14 * _fpending.c: Include <config.h> unconditionally, since we no longer worry about uses that don't define HAVE_CONFIG_H. * acl.c, alloca.c, argmatch.c, atexit.c, backupfile.c: * basename.c, c-stack.c, c-strtod.c, calloc.c, canon-host.c: * canonicalize.c, chdir-long.c, chdir-safer.c, chown.c: * cloexec.c, close-stream.c, closeout.c, creat-safer.c: * cycle-check.c, diacrit.c, dirchownmod.c, dirfd.c, dirname.c: * dup-safer.c, dup2.c, error.c, euidaccess.c, exclude.c: * exitfail.c, fchmodat.c, fchown-stub.c, fd-safer.c: * file-type.c, fileblocks.c, filemode.c, filenamecat.c: * fnmatch.c, fopen-safer.c, fprintftime.c, free.c, fsusage.c: * ftruncate.c, fts-cycle.c, fts.c, full-write.c, gai_strerror.c: * getcwd.c, getdate.y, getdomainname.c, getgroups.c: * gethostname.c, gethrxtime.c, getloadavg.c, getlogin_r.c: * getndelim2.c, getnline.c, getopt.c, getopt1.c, getpass.c: * gettime.c, gettimeofday.c, getugroups.c, getusershell.c: * glob.c, group-member.c, hard-locale.c, hash-pjw.c, hash.c: * human.c, idcache.c, inet_ntop.c, inet_pton.c, inttostr.c: * isdir.c, lchown.c, linebuffer.c, long-options.c, lstat.c: * malloc.c, md5.c, memcasecmp.c, memchr.c, memcmp.c, memcoll.c: * memcpy.c, memmove.c, memrchr.c, mkancesdirs.c, mkdir-p.c: * mkdir.c, mkdirat.c, mkstemp-safer.c, mkstemp.c, modechange.c: * mountlist.c, nanosleep.c, obstack.c, open-safer.c: * openat-die.c, openat.c, pagealign_alloc.c, physmem.c: * pipe-safer.c, posixtm.c, posixver.c, putenv.c, quote.c: * quotearg.c, raise.c, readtokens.c, readtokens0.c, readutmp.c: * realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c, safe-read.c: * same.c, save-cwd.c, savedir.c, setenv.c, settime.c, sha1.c: * sig2str.c, snprintf.c, strdup.c, strerror.c, strftime.c: * stripslash.c, strndup.c, strnlen.c, strpbrk.c, strtod.c: * strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c: * timegm.c, tmpfile-safer.c, unlinkdir.c, userspec.c, utime.c: * utimecmp.c, utimens.c, version-etc-fsf.c, version-etc.c: * xalloc-die.c, xgetcwd.c, xgethostname.c, xmalloc.c: * xmemcoll.c, xnanosleep.c, xreadlink.c, xstrtod.c: * xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c: Likewise.
Paul Eggert 5e576318 2004-05-17T05:41:42 alloca cleanup: always include <alloca.h>.
Paul Eggert 899833c0 2003-11-24T21:38:43 Remove dependency of alloca on xalloc.
Paul Eggert d5ebcf30 2003-10-27T07:12:11 (alloca): xmalloc cannot return NULL, so don't test for that.
Paul Eggert 968cc4b0 2003-09-08T22:58:10 Remove K&R cruft.
Paul Eggert 202b2af4 2003-08-09T08:57:49 Merge from coreutils.
Paul Eggert a60e4adb 2002-12-05T20:46:03 [defined emacs]: Include "lisp.h". (xalloc_die) [defined emacs]: New macro. (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE. [! defined emacs]: Include <xalloc.h>. (POINTER_TYPE) [!defined POINTER_TYPE]: New macro. (pointer): Typedef to POINTER_TYPE *. (malloc): Remove decl; we now always use xmalloc. (alloca): Use old-style definition, since Emacs needs this. Check for arithmetic overflow when computing combined size.
Jim Meyering 19d56db8 2001-08-30T19:19:02 (alloca): Arg is of type size_t, not unsigned.
Jim Meyering 702f288a 2001-02-16T19:28:43 (malloc): Undef before defining, since stdlib.h may have defined it.
Jim Meyering 35d18110 2000-01-16T12:35:49 Sync with the version from emacs-20.5. (<string.h>): Include if HAVE_STRING_H. (<stdlib.h>): Include if HAVE_STDLIB_H. (alloca): Abort if malloc fails.
Jim Meyering cf42d3e5 1998-12-07T03:12:10 ansideclify
Jim Meyering f629cb35 1998-04-09T07:28:10 indent cpp directives
Jim Meyering 2dbc26c0 1998-04-09T07:22:52 make there be two spaces after `.' in comments
Jim Meyering b6fcba3d 1996-10-09T02:27:56 ,
Jim Meyering 43e78b97 1992-11-01T05:44:30 Initial revision