From: Andreas Schwab <schwab@suse.de>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: Emacs-Devel <emacs-devel@gnu.org>
Subject: Re: unicode build: "comparison is always true" warnings
Date: Sat, 24 Nov 2007 14:57:42 +0100 [thread overview]
Message-ID: <jelk8nd9ux.fsf@sykes.suse.de> (raw)
In-Reply-To: <4748224C.6030602@swipnet.se> ("Jan Djärv"'s message of "Sat\, 24 Nov 2007 14\:08\:28 +0100")
Jan Djärv <jan.h.d@swipnet.se> writes:
> The patch just needs some small changes:
>
>
> *** movemail.c.~1.88.~ 2007-07-27 09:52:07.000000000 +0200
> --- movemail.c 2007-11-24 14:07:13.000000000 +0100
> ***************
> *** 324,338 ****
> --- 324,345 ----
> while (p != tempname && !IS_DIRECTORY_SEP (p[-1]))
> p--;
> *p = 0;
> + #ifndef HAVE_MKSTEMP
> strcpy (p, "EXXXXXX");
> mktemp (tempname);
> unlink (tempname);
> + #endif
>
> while (1)
> {
> /* Create the lock file, but not under the lock file name. */
> /* Give up if cannot do that. */
> + #ifndef HAVE_MKSTEMP
> desc = open (tempname, O_WRONLY | O_CREAT | O_EXCL, 0666);
> + #else
> + strcpy (p, "EXXXXXX");
> + desc = mkstemp (tempname);
> + #endif
> if (desc < 0)
> {
> char *message = (char *) xmalloc (strlen (tempname) + 50);
I'd suggest moving the mktemp into the loop as well. This will avoid
code duplication.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2007-11-24 13:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-23 4:57 unicode build: "comparison is always true" warnings Mark A. Hershberger
2007-11-23 15:09 ` Stefan Monnier
2007-11-23 17:42 ` Mark A. Hershberger
2007-11-23 18:07 ` Andreas Schwab
2007-11-23 18:40 ` Stefan Monnier
2007-11-23 18:52 ` Andreas Schwab
2007-11-23 20:02 ` Stefan Monnier
2007-11-23 20:12 ` Glenn Morris
2007-11-23 21:22 ` Andreas Schwab
2007-11-23 21:35 ` Mark A. Hershberger
2007-11-23 21:53 ` Andreas Schwab
2007-11-24 1:49 ` Mark A. Hershberger
2007-11-24 8:26 ` Andreas Schwab
2007-11-24 9:30 ` Jan Djärv
2007-11-24 9:46 ` Andreas Schwab
2007-11-24 11:23 ` Matthieu Lemerre
2007-11-24 14:16 ` Andreas Schwab
2007-11-24 14:49 ` Matthieu Lemerre
2007-11-24 15:20 ` David Kastrup
2007-11-24 17:00 ` Andreas Schwab
2007-11-24 18:21 ` David Kastrup
[not found] ` <4747FDF6.3050203@swipnet.se>
[not found] ` <je1wagrkn9.fsf@sykes.suse.de>
[not found] ` <4748064D.6010405@swipnet.se>
[not found] ` <jelk8nrido.fsf@sykes.suse.de>
2007-11-24 13:08 ` Jan Djärv
2007-11-24 13:57 ` Andreas Schwab [this message]
2007-11-24 18:24 ` Mark A. Hershberger
2007-11-23 18:42 ` Mark A. Hershberger
2007-11-23 18:54 ` Andreas Schwab
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=jelk8nd9ux.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=emacs-devel@gnu.org \
--cc=jan.h.d@swipnet.se \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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.