From: Christoph <cschol2112@googlemail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: How many more gnulib imports?
Date: Sun, 20 Feb 2011 16:32:08 -0700 [thread overview]
Message-ID: <4D61A478.3000603@gmail.com> (raw)
In-Reply-To: <83mxlqty36.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]
Hi Eli
On 2/20/2011 10:28 AM, Eli Zaretskii wrote:
> However, this change will only work with MinGW, since it has stdint.h.
> To make it work with MSVC, we need to add nt/inc/stdint.h, and make
> lib/md5.$(O) depend on it. For MinGW, nt/inc/stdint.h could just say
> "#include_next<stdint.h>" (conditioned on __GNUC__ being non-zero).
> Otherwise, it should include the minimum needed for md5.c to compile.
> Paul said a few messages ago that all that's needed for now is this:
>
> typedef unsigned int uint32_t;
>
> Could you please commit such a followup change, after you test it (see
> below)? If not, I will get to it in due time.
See attached patch.
> To test this change (assuming you don't have MSVC -- neither do I,
> btw), rename MinGW's stdint.h in the MinGW include directory, create
> an nt/inc/stdint.h that has just the above 1 line, and then try
> building with MinGW. Any compilation error/warning you see probably
> means that more stuff needs to be added to nt/inc/stdint.h.
I tested it as follows:
Renamed MinGWs stdint.h to _stdint.h. Verified mingw32-make fails
because it cannot find stdint.h. Changed line "#ifdef __GNUC__" in
nt/inc/stdint.h to "#ifndef __GNUC__" to force it to execute #else
branch. mingw32-make clean, mingw32-make compiles without errors or
warnings. Then, of course I changed the line back to "#ifdef __GNUC__"
before creating the patch. :)
Christoph
[-- Attachment #2: stdint-v1.txt --]
[-- Type: text/plain, Size: 2595 bytes --]
=== modified file 'ChangeLog'
--- ChangeLog 2011-02-20 21:09:45 +0000
+++ ChangeLog 2011-02-20 23:27:44 +0000
@@ -1,3 +1,11 @@
+2011-02-20 Christoph Scholtes <cschol2112@gmail.com>
+
+ * lib/makefile.w32-in: ($(BLD)/md5.$(O)): Added dependency on
+ $(EMACS_ROOT)/nt/inc/stdint.h.
+
+ * nt/inc/stdint.h: Added to support compilation with tool chains
+ that do not have stdint.h (e.g. MSVC).
+
2011-02-20 Eli Zaretskii <eliz@gnu.org>
* lib/makefile.w32-in ($(BLD)/md5.$(O)): Don't depend on
=== modified file 'lib/makefile.w32-in'
--- lib/makefile.w32-in 2011-02-20 21:09:45 +0000
+++ lib/makefile.w32-in 2011-02-20 23:22:42 +0000
@@ -99,6 +99,7 @@
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h \
+ $(EMACS_ROOT)/nt/inc/stdint.h \
$(EMACS_ROOT)/lib/md5.h
# The following dependencies are for supporting parallel builds, where
=== modified file 'nt/ChangeLog'
--- nt/ChangeLog 2011-02-09 20:50:17 +0000
+++ nt/ChangeLog 2011-02-20 23:28:51 +0000
@@ -1,3 +1,8 @@
+2011-02-20 Christoph Scholtes <cschol2112@gmail.com>
+
+ * inc/stdint.h: Added to support compilation with tool chains that
+ do not have stdint.h (e.g. MSVC).
+
2011-02-09 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (bootstrap-nmake, bootstrap-gmake): Make the
=== added file 'nt/inc/stdint.h'
--- nt/inc/stdint.h 1970-01-01 00:00:00 +0000
+++ nt/inc/stdint.h 2011-02-20 23:11:14 +0000
@@ -0,0 +1,34 @@
+/* Replacement stdint.h file for building GNU Emacs on Windows.
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _NT_STDINT_H_
+#define _NT_STDINT_H_
+
+#ifdef __GNUC__
+# include_next <stdint.h> /* use stdint.h if available */
+#else
+
+/* Minimum definitions to allow compilation with tool chains where
+ stdint.h is not available, e.g. Microsoft Visual Studio. */
+
+typedef unsigned int uint32_t;
+
+#endif
+
+#endif /* _NT_STDINT_H_ */
next prev parent reply other threads:[~2011-02-20 23:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-20 11:17 draft patch to import gnulib's filemode module into Emacs Paul Eggert
2011-02-20 12:42 ` Eli Zaretskii
2011-02-20 17:18 ` Paul Eggert
2011-02-21 17:58 ` Paul Eggert
2011-02-20 12:43 ` How many more gnulib imports? (was: draft patch to import gnulib's filemode module into Emacs) Eli Zaretskii
2011-02-20 15:56 ` How many more gnulib imports? Christoph
2011-02-20 16:13 ` Christoph
2011-02-20 17:28 ` Eli Zaretskii
2011-02-20 17:54 ` Christoph
2011-02-20 18:54 ` Eli Zaretskii
2011-02-20 23:32 ` Christoph [this message]
2011-02-21 16:00 ` Christoph
2011-02-21 19:05 ` Eli Zaretskii
2011-02-21 19:10 ` Christoph
2011-02-21 20:19 ` Eli Zaretskii
2011-02-21 20:21 ` Eli Zaretskii
2011-02-20 17:46 ` Paul Eggert
2011-02-20 17:54 ` Eli Zaretskii
2011-02-20 18:06 ` Paul Eggert
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D61A478.3000603@gmail.com \
--to=cschol2112@googlemail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).