1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-11 01:06:34 +02:00
Commit Graph

19787 Commits

Author SHA1 Message Date
Junio C Hamano e1622bfcba Protect scripted Porcelains from GREP_OPTIONS insanity
If the user has exported the GREP_OPTIONS environment variable, the output
from "grep" and "egrep" in scripted Porcelains may be different from what
they expect.  For example, we may want to count number of matching lines,
by "grep" piped to "wc -l", and GREP_OPTIONS=-C3 will break such use.

The approach taken by this change to address this issue is to protect only
our own use of grep/egrep.  Because we do not unset it at the beginning of
our scripts, hook scripts run from the scripted Porcelains are exposed to
the same insanity this environment variable causes when grep/egrep is used
to implement logic (e.g. "grep | wc -l"), and it is entirely up to the
hook scripts to protect themselves.

On the other hand, applypatch-msg hook may want to show offending words in
the proposed commit log message using grep to the end user, and the user
might want to set GREP_OPTIONS=--color to paint the match more visibly.
The approach to protect only our own use without unsetting the environment
variable globally will allow this use case.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-23 16:31:07 -08:00
René Scharfe 7b1042292d mergetool--lib: simplify guess_merge_tool()
Use a case statement instead of calling grep to find out if the editor's
name contains the string "vim".  Remove the check for emacs, as this
branch did the same as the default one anyway.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-23 15:38:04 -08:00
Junio C Hamano 78d553b7d7 GIT 1.6.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-10 00:05:19 -07:00
Simon Arlott 85886162f1 git-svn: hide find_parent_branch output in double quiet mode
Hide find_parent_branch logging when -qq is specified.
This eliminates more unnecessary output when run from cron, e.g.:

Found possible branch point:
http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/trunk =>
http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/branches/authz,
1919
Found branch parent: (authz) ea061d76aea985dc0208d36fa5e0b2249b698557
Following parent with do_switch
Successfully followed parent

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-10 00:00:40 -07:00
Jonathan Nieder 33405be34b Documentation: clone: clarify discussion of initial branch
When saying the initial branch is equal to the currently active
remote branch, it is probably intended that the branch heads
point to the same commit.  Maybe it would be more useful to a
new user to emphasize that the tree contents and history are the
same.

More important, probably, is that this new branch is set up so
that "git pull" merges changes from the corresponding remote
branch.  The next paragraph addresses that directly.  What the
reader needs to know to begin with is that (1) the initial branch
is your own; if you do not pull, it won't get updated, and that
(2) the initial branch starts out at the same commit as the
upstream.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 17:21:46 -07:00
Junio C Hamano a17a9606e4 Merge branch 'rs/maint-archive-prefix'
* rs/maint-archive-prefix:
  Git archive and trailing "/" in prefix
2009-10-09 16:27:16 -07:00
Junio C Hamano e12bfd86c1 Merge branch 'fc/mutt-alias'
* fc/mutt-alias:
  send-email: fix mutt regex for grouped aliases
2009-10-09 16:26:49 -07:00
Junio C Hamano c2c865684b Merge branch 'ef/msvc-noreturn'
* ef/msvc-noreturn:
  add NORETURN_PTR for function pointers
  increase portability of NORETURN declarations
2009-10-09 16:26:35 -07:00
Junio C Hamano 302e99b79a Merge branch 'jk/reflog-date'
* jk/reflog-date:
  improve reflog date/number heuristic
2009-10-09 16:26:11 -07:00
Junio C Hamano 170a4814d3 Merge branch 'ch/am-header'
* ch/am-header:
  git-am: force egrep to use correct characters set
  git-am: fixed patch_format detection according to RFC2822
2009-10-09 16:25:40 -07:00
Björn Gustavsson e1c1a0674b bash: add support for 'git replace'
Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 15:36:41 -07:00
Stephen Boyd e0d7805954 completion: fix alias listings with newlines
Aliases with newlines have been a problem since commit 56fc25f (Bash
completion support for remotes in .git/config., 2006-11-05). The chance
of the problem occurring has been slim at best, until commit 518ef8f
(completion: Replace config --list with --get-regexp, 2009-09-11)
removed the case statement introduced by commit 56fc25f. Before removing
the case statement, most aliases with newlines would work unless they
were specially crafted as follows

[alias]
	foo = "log -1 --pretty='format:%s\nalias.error=broken'"

After removing the case statement, a more benign alias like

[alias]
	whowhat = "log -1 --pretty='format:%an <%ae>\n%s'"
	wont-complete = ...

would cause the completion to break badly.

For now, revert the removal of the case statement until someone comes up
with a better way to get keys from git-config.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 15:00:40 -07:00
Stephen Boyd 427e586b19 completion: fix completion of git <TAB><TAB>
After commit 511a3fc (wrap git's main usage string., 2009-09-12), the
bash completion for git commands includes COMMAND and [ARGS] when it
shouldn't. Fix this by grepping more strictly for a line with git
commands. It's doubtful whether git will ever have commands starting
with anything besides numbers and letters so this should be fine. At
least by being stricter we'll know when we break the completion earlier.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 15:00:24 -07:00
Ingmar Vanhassel b6aaaa4470 import-tars: Add missing closing bracket
This fixes an obvious syntax error that snuck in commit 7e787953:

  syntax error at /home/ingmar/bin//git-import-tars line 143, near "/^$/ { "
  syntax error at /home/ingmar/bin//git-import-tars line 145, near "} else"
  syntax error at /home/ingmar/bin//git-import-tars line 152, near "}"

Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Acked-and-Tested-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:58:13 -07:00
Jonathan Nieder 989c530e7f racy-git.txt: explain nsec problem in more detail
Idealists may want USE_NSEC to be the default on Linux some day.
Point to a patch to better explain the requirements on
filesystem code for that to happen.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:56:32 -07:00
Jonathan Nieder 580cbb58a2 Documentation: clarify "working tree" definition
It is not necessarily obvious to a git novice what it means for a
filesystem tree to be equal to the HEAD.  Spell it out.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:54:55 -07:00
Jonathan Nieder bb35f35e67 Documentation: clarify branch creation
The documentation seems to assume that the starting point for a new
branch is the tip of an existing (ordinary) branch, but that is not
the most common case.  More often, "git branch" is used to begin
a branch from a remote-tracking branch, a tag, or an interesting
commit (e.g. origin/pu^2).  Clarify the language so it can apply
to these cases.  Thanks to Sean Estabrooks for the wording.

Also add a pointer to the user's manual for the bewildered.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:54:15 -07:00
Jonathan Nieder 58d2c961b3 Documentation: branch: update --merged description
Update the documentation for --merged and --no-merged to explain
the meaning of the optional parameter introduced in commit 049716b
(branch --merged/--no-merged: allow specifying arbitrary commit,
2008-07-08).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:50:21 -07:00
Jonathan Nieder 25dcc0d64b Documentation: clarify mergeoptions description
Sounds better this way, at least to my ears.  ("The syntax and
supported options of git merge" is a plural noun.  "the same"
instead of "equal" sounds less technical and seems to convey
the meaning better here.)

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:43:04 -07:00
Jonathan Nieder 0f8a02c640 Documentation: git fmt-merge-msg does not have to be a script
The fmt-merge-message builtin can be invoked as "git fmt-merge-msg" rather
than through the hard link in GIT_EXEC_PATH.  Although this is unlikely to
confuse most script writers, it should not hurt to make the documentation
a little clearer anyway.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:40:25 -07:00
Jonathan Nieder 162213d232 Describe DOCBOOK_XSL_172, ASCIIDOC_NO_ROFF options in Makefile
There is excellent documentation for these options in
Documentation/Makefile, but some users may never find it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:38:14 -07:00
Jeff King a8c9bef4e0 pull: improve advice for unconfigured error case
There are several reasons a git-pull invocation might not
have anything marked for merge:

  1. We're not on a branch, so there is no branch
     configuration.

  2. We're on a branch, but there is no configuration for
     this branch.

  3. We fetched from the configured remote, but the
     configured branch to merge didn't get fetched (either
     it doesn't exist, or wasn't part of the fetch refspec).

  4. We fetched from the non-default remote, but didn't
     specify a branch to merge. We can't use the configured
     one because it applies to the default remote.

  5. We fetched from a specified remote, and a refspec was
     given, but it ended up not fetching anything (this is
     actually hard to do; if the refspec points to a remote
     branch and it doesn't exist, then fetch will fail and
     we never make it to this code path. But if you provide
     a wildcard refspec like

       refs/bogus/*:refs/remotes/origin/*

     then you can see this failure).

We have handled (1) and (2) for some time. Recently, commit
a6dbf88 added code to handle case (3).

This patch handles cases (4) and (5), which previously just
fell under other cases, producing a confusing message.

While we're at it, let's rewrap the text for case (3), which
looks terribly ugly as it is.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 11:22:43 -07:00
Junio C Hamano 63d129d93e Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  git-svn: Avoid spurious errors when rewriteRoot is used.
2009-10-09 02:53:46 -07:00
Alexander Gavrilov c03c1f798d git-svn: Avoid spurious errors when rewriteRoot is used.
After doing a rebase, git-svn checks that the SVN URL
is what it expects. However, it does not account for
rewriteRoot, which is a legitimate way for the URL
to change. This produces a lot of spurious errors.

[ew: fixed line wrapping]

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2009-10-09 01:31:05 -07:00
Junio C Hamano 8ba5effa26 Merge branch 'ms/msvc'
* ms/msvc:
  Fix the exit code of MSVC build scripts on cygwin
  Fix MSVC build on cygwin
2009-10-09 00:02:23 -07:00
Junio C Hamano dc3c7a7256 Update draft release notes to 1.6.5 2009-10-08 23:59:15 -07:00
Junio C Hamano bf8fc21c69 Merge branch 'maint'
* maint:
  ls-files: die instead of fprintf/exit in -i error
2009-10-08 23:51:38 -07:00
Brandon Casey 651aef3428 Makefile: add a note about the NO_MMAP setting on IRIX and IRIX64
When git is compiled with the MIPSpro 7.4.4m compiler, and NO_PTHREADS is
set, and NO_MMAP is _not_ set, then git segfaults when trying to access the
first entry in a reflog.  If NO_PTHREADS is not set (which implies that the
pthread library is linked in), or NO_MMAP _is_ set, then the segfault is
not encountered.  The conservative choice has been made to set NO_MMAP in
the Makefile to avoid this flaw.  The GNU C compiler does not produce this
behavior.

The segfault happens in refs.c:read_ref_at().  The mmap succeeds, and the
loop is executed properly until rec is rewound into the first line (reflog
entry) of the file.  The segfault is caught by test 28 of
t1400-update-ref.sh which fails when 'git rev-parse --verify "master@{May 25
2005}"' is called.

So, add a comment in the Makefile to describe why NO_MMAP is set and as a
hint to those who may be interested in unsetting it.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08 22:55:25 -07:00
Ben Walton ac78b00939 ls-files: die instead of fprintf/exit in -i error
When ls-files was called with -i but no exclude pattern, it was
calling fprintf(stderr, "...", NULL) and then exiting.  On Solaris,
passing NULL into fprintf was causing a segfault.  On glibc systems,
it was simply producing incorrect output (eg: "(null)": ...).  The
NULL pointer was a result of argv[0] not being preserved by the option
parser.  Instead of requesting that the option parser preserve
argv[0], use die() with a constant string.

A trigger for this bug was: `git ls-files -i`

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08 22:54:34 -07:00
Brandon Casey 817350d3af Makefile: enable THREADED_DELTA_SEARCH on IRIX and IRIX64
Since commit dcda3614 removed the use of a variable length array from
builtin-pack-objects.c, it is now safe to compile with the threaded delta
search feature enabled.  Formerly, the MIPSpro 7.4.4m compiler warned that
variable length arrays should not be used with pthreads.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08 22:54:09 -07:00
Ramsay Jones b5d18b8e6f Fix the exit code of MSVC build scripts on cygwin
During an MSVC build on cygwin, the make program did not notice
when the compiler or linker exited with an error. This was caused
by the scripts exiting with the value returned by system() directly.

On POSIX-like systems, such as cygwin, the return value of system()
has the exit code of the executed command encoded in the first byte
(ie the value is shifted up by 8 bits). This allows the bottom
7 bits to contain the signal number of a terminated process, while
the eighth bit indicates whether a core-dump was produced. (A value
of -1 indicates that the command failed to execute.)

The make program, however, expects the exit code to be encoded in the
bottom byte. Futhermore, it apparently masks off and ignores anything
in the upper bytes.

However, these scripts are (naturally) intended to be used on the
windows platform, where we can not assume POSIX-like semantics from
a perl implementation (eg ActiveState). So, in general, we can not
assume that shifting the return value right by eight will get us
the exit code.

In order to improve portability, we assume that a zero return from
system() indicates success, whereas anything else indicates failure.
Since we don't need to know the exact exit code from the compiler
or linker, we simply exit with 0 (success) or 1 (failure).

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08 22:53:12 -07:00
Ramsay Jones f2d50d937b Fix MSVC build on cygwin
In the MSVC section of the Makefile, BASIC_CFLAGS is set to a
value which contains the string "-DWIN32-D_CONSOLE". This results
in a (single) malformed -Define being passed to the compiler.
At least on my cygwin installation, the msvc compiler seems to
ignore this parameter, without issuing an error or warning, and
results in the WIN32 and _CONSOLE macros being undefined. This
breaks the build.

In order to fix the build, we simply insert a space between the
two -Define parameters, "-DWIN32" and "-D_CONSOLE", as originally
intended.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08 22:50:58 -07:00
René Scharfe ebfbdb340a Git archive and trailing "/" in prefix
With --prefix=string that does not end with a slash, the top-level entries
are written out with the specified prefix as expected, but no paths in the
directories are added.

Fix this by adding the prefix in write_archive_entry() instead of letting
get_pathspec() and read_tree_recursive() pair; they are designed to only
handle prefixes that are path components.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08 22:17:07 -07:00
Stephen Boyd 8fd2cfa7ac completion: add dirstat and friends to diff options
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-07 22:04:26 -07:00
Stephen Boyd af4e9e8c87 completion: update am, commit, and log
git am learned --scissors, git commit learned --dry-run and git log
learned --decorate=long|short recently.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-07 22:04:25 -07:00
Brandon Casey 294ac78d14 Makefile: enable THREADED_DELTA_SEARCH on SunOS
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-07 22:04:19 -07:00
Junio C Hamano f539cfbe8c Merge branch 'maint'
* maint:
  fast-import.c::validate_raw_date(): really validate the value
2009-10-07 21:32:39 -07:00
Junio C Hamano 1cd749cc07 fast-import.c::validate_raw_date(): really validate the value
When reading the "raw format" timestamp from the input stream, make sure
that the timezone offset is a reasonable value by imitating 7122f82
(date.c: improve guess between timezone offset and year., 2006-06-08).

We _might_ want to also check if the timestamp itself is reasonable, but
that is left for a separate commit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-07 13:05:03 -07:00
Stefan Naewe f73b3af3f0 README: git lives at http://git-scm.com these days
Signed-off-by: Stefan Naewe <stefan.naewe+git@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-07 12:47:24 -07:00
Junio C Hamano 4973aa2286 git-pull: dead code removal
Back when a74b170 (git-pull: disallow implicit merging to detached HEAD,
2007-01-15) added this check, $? referred to the error status of reading
HEAD as a symbolic-ref; but cd67e4d (Teach 'git pull' about --rebase,
2007-11-28) moved the command away from where the check is, and nobody
noticed the breakage.  Ever since, $? has always been 0 (tr at the end of
the pipe to find merge_head never fails) and other case arms were never
reached.

These days, error_on_no_merge_candidates function is prepared to handle a
detached HEAD case, which was what the code this patch removes used to
handle.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-05 12:03:25 -07:00
Junio C Hamano a7aebb9d00 Merge branch 'maint'
* maint:
  show-branch: fix segfault when showbranch.default exists
2009-10-04 14:48:51 -07:00
Junio C Hamano 04ce83e2b9 Merge branch 'jc/maint-1.6.4-show-branch-default' into maint
* jc/maint-1.6.4-show-branch-default:
  show-branch: fix segfault when showbranch.default exists
2009-10-04 14:48:44 -07:00
Junio C Hamano 3af1cae469 show-branch: fix segfault when showbranch.default exists
When running "git show-branch" without any parameter in a repository that
has showbranch.default defined, we used to rely on the fact that our
handcrafted option parsing loop never looked at av[0].

The array of default strings had the first real command line argument in
default_arg[0], but the option parser wanted to look at the array starting
at av[1], so we assigned the address of -1th element to av to force the
loop start working from default_arg[0].

This no longer worked since 5734365 (show-branch: migrate to parse-options
API, 2009-05-21), as parse_options_start() saved the incoming &av[0] in
its ctx->out and later in parse_options_end() it did memmove to ctx->out
(with ctx->cpidx == 0), overwriting the memory before default_arg[] array.

I am not sure if this is a bug in parse_options(), or a bug in the caller,
and tonight I do not have enough concentration to figure out which.  In
any case, this patch works the issue around.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-04 14:44:34 -07:00
Johan Sageryd dbc1b1f710 Fix '--relative-date'
This fixes '--relative-date' so that it does not give '0
year, 12 months', for the interval 360 <= diff < 365.

Signed-off-by: Johan Sageryd <j416@1616.se>
Signed-off-by: Jeff King <peff@peff.net>
2009-10-03 06:04:38 -04:00
Mark Rada b4ae5e2ac4 tests: make all test files executable
For consistency with the rest of the test files.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Jeff King <peff@peff.net>
2009-10-02 04:00:02 -04:00
Adam Brewster e3679ab4a8 filter-branch: add --prune-empty to option summary
Signed-off-by: Adam Brewster <adambrewster@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2009-10-02 03:58:24 -04:00
Ramsay Jones 5322ef2006 Fix some printf format warnings
commit 51ea551 ("make sure byte swapping is optimal for git"
2009-08-18) introduced a "sane definition for ntohl()/htonl()"
for use on some GNU C platforms. Unfortunately, for some of
these platforms, this results in the introduction of a problem
which is essentially the reverse of a problem that commit 6e1c234
("Fix some warnings (on cygwin) to allow -Werror" 2008-07-3) was
intended to fix.

In particular, on platforms where the uint32_t type is defined
to be unsigned long, the return type of the new ntohl()/htonl()
is causing gcc to issue printf format warnings, such as:

    warning: long unsigned int format, unsigned int arg (arg 3)

(nine such warnings, covering six different files). The earlier
commit (6e1c234) needed to suppress these same warnings, except
that the types were in the opposite direction; namely the format
specifier ("%u") was 'unsigned int' and the argument type (ie the
return type of ntohl()) was 'long unsigned int' (aka uint32_t).

In order to suppress these warnings, the earlier commit used the
(C99) PRIu32 format specifier, since the definition of this macro
is suitable for use with the uint32_t type on that platform.
This worked because the return type of the (original) platform
ntohl()/htonl() functions was uint32_t.

In order to suppress these warnings, we change the return type of
the new byte swapping functions in the compat/bswap.h header file
from 'unsigned int' to uint32_t.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Jeff King <peff@peff.net>
2009-10-02 03:32:51 -04:00
Felipe Contreras ffc01f9bad send-email: fix mutt regex for grouped aliases
For example:
alias -group friends foo Foo Bar <foo@bar.com>

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Acked(-and-tested)-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Jeff King <peff@peff.net>
2009-10-01 04:18:36 -04:00
Erik Faye-Lund 18660bc96e add NORETURN_PTR for function pointers
Some compilers (including at least MSVC and ARM RVDS) supports
NORETURN on function declarations, but not on function pointers.

This patch makes it possible to define NORETURN for these compilers,
by splitting the NORETURN macro into two - one for function
declarations and one for function pointers.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2009-10-01 04:12:21 -04:00
Erik Faye-Lund a4f3131c07 increase portability of NORETURN declarations
Some compilers (including at least MSVC) support NORETURN
on function declarations, but only before the function-name.

This patch makes it possible to define NORETURN to something
meaningful for those compilers.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2009-10-01 04:12:21 -04:00