Git development
 help / color / mirror / Atom feed
From: Richard Lloyd <richard.lloyd@connectinternetsolutions.com>
To: git@vger.kernel.org
Subject: Systems with old regex system headers/libraries don't pick up git's compat/regex header file
Date: Thu, 6 Oct 2016 10:15:49 +0100	[thread overview]
Message-ID: <9f43a2f1-5d7e-3a2e-5a83-40e92ab0d7b5@connectinternetsolutions.com> (raw)

git ships with a compat/regex tree containing a recent regex
release, presumably with the intention of allowing systems with
either no regex or an old regex installed to use the newer compat
version.

With the release of git-2.10.1, the use of a recent regex
is now specifically checked in git-compat-util.h via a
#ifndef REG_STARTEND check at line 979.

Unfortunately, on systems with an older regex shipped as
standard (e.g. HP-UX 11), the include path picks up
/usr/include/regex.h first, which doesn't define REG_STARTEND
and the git-compat-util.h check fails.

The fix I applied on HP-UX 11 was to add -Icompat/regex
to the CFLAGS ahead of other -I directives. Another possible
change needed might be to line 69 of compat/regex/regex.c:

#include "regex.h"

This is to ensure that /usr/include/regex.h isn't picked up
(since git ships its own regex.h in the compat/regex
dir, it probably shouldn't #include <regex.h> anyway,
which risks picking up an incompatible regex.h).

Richard K. Lloyd,           E-mail: richard.lloyd@connectinternetsolutions.com
Connect Internet Solutions,    WWW: https://www.connectinternetsolutions.com/
4th Floor, New Barratt House,
47, North John Street,
Liverpool,
Merseyside, UK. L2 6SG



-- 
This e-mail (and any attachments) is private and confidential. If you have 
received it in error, please notify the sender immediately and delete it 
from your system. Do not use, copy or disclose the information in any way 
nor act in reliance on it.

Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of Connect
Internet Solutions Ltd. This e-mail and any attachments are believed to be
virus free but it is the recipient's responsibility to ensure that they are.

Connect Internet Solutions Ltd
(A company registered in England No: 04424350)
Registered Office: 4th Floor, New Barratt House, 47 North John Street,
Liverpool, L2 6SG
Telephone: +44 (0) 151 282 4321
VAT registration number: 758 2838 85

             reply	other threads:[~2016-10-06  9:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06  9:15 Richard Lloyd [this message]
2016-10-06 18:25 ` Systems with old regex system headers/libraries don't pick up git's compat/regex header file Junio C Hamano
2016-10-06 19:11 ` Jeff King
2016-10-07 15:45   ` Richard Lloyd
2016-10-07 16:06     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f43a2f1-5d7e-3a2e-5a83-40e92ab0d7b5@connectinternetsolutions.com \
    --to=richard.lloyd@connectinternetsolutions.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox