All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Mark Allen <mrallen1@yahoo.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] minor Makefile and local-pull.c edits for Darwin
Date: Mon, 09 May 2005 21:30:08 -0700	[thread overview]
Message-ID: <428038D0.5000706@zytor.com> (raw)
In-Reply-To: <20050510021105.53984.qmail@web41213.mail.yahoo.com>

Mark Allen wrote:

>  
> Index: local-pull.c
> ===================================================================
> --- 972d8624458936868e6f392b40858b7c362af8cd/local-pull.c  (mode:100644)
> +++ uncommitted/local-pull.c  (mode:100644)
> @@ -71,7 +71,7 @@
>                 close(ofd);
>                 if (status)
>                         fprintf(stderr, "cannot write %s (%ld bytes)\n",
> -                               dest_filename, st.st_size);
> +                               dest_filename, (long) st.st_size);
>                 else
>                         pull_say("copy %s\n", hex);
>                 return status;

This is just plain WRONG.  st.st_size is longer than long on many 
architectures, including Linux/i386.

The easiest way to deal with it is to #include <inttypes.h>, use %jd and 
cast it to (intmax_t).  That is, however, a C99-ism.

	-hpa

  parent reply	other threads:[~2005-05-10  4:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-10  2:11 [PATCH] minor Makefile and local-pull.c edits for Darwin Mark Allen
2005-05-10  4:23 ` Daniel Barkalow
2005-05-10  6:37   ` Junio C Hamano
2005-05-10  4:30 ` H. Peter Anvin [this message]
2005-05-10  6:44   ` Junio C Hamano
2005-05-10 14:43     ` H. Peter Anvin
2005-05-10 14:52       ` H. Peter Anvin
2005-05-10 21:05         ` Junio C Hamano
2005-05-10 21:12           ` H. Peter Anvin

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=428038D0.5000706@zytor.com \
    --to=hpa@zytor.com \
    --cc=git@vger.kernel.org \
    --cc=mrallen1@yahoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.