From: "Joachim Schmitz" <jojo@schmitz-digital.de>
To: "'Junio C Hamano'" <gitster@pobox.com>
Cc: <git@vger.kernel.org>
Subject: RE: [PATCH v2] Support for setitimer() on platforms lacking it
Date: Tue, 4 Sep 2012 12:45:34 +0200 [thread overview]
Message-ID: <002401cd8a8a$6a43ca80$3ecb5f80$@schmitz-digital.de> (raw)
In-Reply-To:
> From: Joachim Schmitz [mailto:jojo@schmitz-digital.de]
> Sent: Tuesday, September 04, 2012 12:31 PM
> To: 'Junio C Hamano'
> Cc: 'git@vger.kernel.org'
> Subject: RE: [PATCH v2] Support for setitimer() on platforms lacking it
>
>
> Poor man's getitimer(), simply based on alarm().
>
> Currently needed on HP NonStop ("#ifdef __TANDEM"),
> which does provide "struct itimerval", but no setitimer().
> Alarm times are rounded up to the next full second.
>
> Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
> ---
> Revert/remove my previous 2 patches for this first (from 'pu').
Actually: https://github.com/git/git/commit/55c96a1325
> git-compat-util.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/git-compat-util.h b/git-compat-util.h
> index 18089f0..55b9421 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h@@ -163,6 +163,10 @@
> #define probe_utf8_pathname_composition(a,b)
> #endif
>
> +#ifdef NO_SETITIMER /* poor man's setitimer() */
> +#define setitimer(w,v,o) alarm((v)->it_value.tv_sec+((v)->it_value.tv_usec>0))
> +#endif
> +
> #ifdef MKDIR_WO_TRAILING_SLASH
> #define mkdir(a,b) compat_mkdir_wo_trailing_slash((a),(b))
> extern int compat_mkdir_wo_trailing_slash(const char*, mode_t);
> --
> 1.7.12
Bye, Jojo
next reply other threads:[~2012-09-04 10:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-04 10:45 Joachim Schmitz [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-09-04 10:30 [PATCH v2] Support for setitimer() on platforms lacking it Joachim Schmitz
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='002401cd8a8a$6a43ca80$3ecb5f80$@schmitz-digital.de' \
--to=jojo@schmitz-digital.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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;
as well as URLs for NNTP newsgroup(s).