Mail Archives: djgpp/2017/08/04/19:06:02
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
X-Recipient: | djgpp AT delorie DOT com
|
Message-ID: | <5984FE96.9040905@gmx.de>
|
Date: | Sat, 05 Aug 2017 01:09:10 +0200
|
From: | "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
|
User-Agent: | Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.13) Gecko/20101206 SUSE/3.1.7 Thunderbird/3.1.7
|
MIME-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
Subject: | Re: ANNOUNCE: DJGPP port of GNU binutils 2.29 uploaded.
|
References: | <201707301540 DOT v6UFecLb017840 AT delorie DOT com> <CAA2C=vBWY7HYeu+tdO=WYN=wEmWfhLXWgH-9PtSvZkMs54rs1Q AT mail DOT gmail DOT com> <5980C3AA DOT 2080305 AT gmx DOT de> <euccrcFp8kqU1 AT mid DOT dfncis DOT de> <598108FD DOT 5060908 AT gmx DOT de> <83ini6zmsv DOT fsf AT gnu DOT org>
|
In-Reply-To: | <83ini6zmsv.fsf@gnu.org>
|
X-Provags-ID: | V03:K0:7Rov+Cuwjj3aypHmHx3gBpAG2RrZycF/znJXPaziOihk831PHDf
|
| qLiAFegiHgzqpXC7gBz2yT+WGee8M+huNHQPUIaY/WZ9lh9g/tHa7YKh+gTMVq4AA23t51Y
|
| zDAmebsCuY85j2XjkjU0cNq3cFCV6CebgAQL+YODaoc6k/YJj+ZU+djga3w/Vs9B4BiOvfA
|
| NZleTPoPmmbKogyrIDPVw==
|
X-UI-Out-Filterresults: | notjunk:1;V01:K0:VNd5wdmPCLg=:vvaQgg//spy5sTUfhV0aI9
|
| iMwb+cCaS/EtaCBYdWZJdHU4ukmTLs5k//5que3O64VIlzrHnKpfXF8n8dc9xCbssiuJ7k/Na
|
| 2kjFMsPnTP4HQBPmZGvRVcQxLrqGtMTBFPzHp+0flpg6jXqMfi1x3iJ0jzsqnADxkxw6djQEk
|
| zHjMvptWwo3U9dx6PKHFMZd8Z7RLOVQg+aDbsZM+Wk1OZVwybdZJIYIqhAiIRTv3d8QImKI1H
|
| joeZ7qHEFK4W8MNJxwTQjMF+nGyEHPLec0bOk5CCbq0vekVmUeXZ/SKSlNne58qbxT3kTjT6j
|
| OU2O3/xcSGegta5hKo0YQsenLRzCJQgCMAaSV1sMOwfZMOvpb+LYpbsio7ueuR6esVNziPgt2
|
| z+TuWMvcdKAYWWBrH5abSKwpPdEA0XJT/rkUBlkHmNgx9rjcSWwvl5j1NtRkCLgdT0D4CYvjr
|
| Fav1FxPGGlrPG2/IwzXD2hfpUrbpVrEJunswvd0BQMLn0VO2mpJJ3zr+SWlTY3E0eQbM4K3M3
|
| 7AN3fFdcqz8bpyufRpEyi6WcoHO1Uv99rufSq0SHGy/fsn+ny47LUilWiIKd8PBSxGRyoCLhK
|
| ULLVkDJloKlq6qRjE2gmmt47VEwknY7H0zu5RfIaAn/cROh65ai2+I7NoPLz/cR9mEC0+hc7p
|
| Er1hhc3daCSyR5OzypNe/GqaNArPwhF9YYkqC/NpsKBc00fFNkrJ3E/+RQ2MBUGP1l6RMFz9j
|
| 0ywHoDoc2hEUTcFCbqftvnJARSIBDSd/mi6Ls2Oq5rLfZv1SsSCpIjmc4f3Xu1Tty1HBkApus
|
| PhjRUQVziQl3xIlNjUFAVFHZd126x6qcI8lM+GKV/tlg4oOvr0=
|
Reply-To: | djgpp AT delorie DOT com
|
Am 02.08.2017 05:11, schrieb Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com]:
>> Date: Wed, 02 Aug 2017 01:04:29 +0200
>> From: "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp AT delorie DOT com]"<djgpp AT delorie DOT com>
>>
>> IMHO it is easier to fix stdio.h than start endless discussion with the binutils
>> maintainers. I do not think that the DJGPP user group is still so large that
>> some one will be hurd if we change _doprnt by __doprnt or something similar.
>
> Renaming our _doprnt is certainly doable, but it means some
> application that really needs our _doprnt will now become broken.
>
> An alternative would be to move _doprint to some other header, like
> libc/doprnt.h.
I have moved the _doprnt, _doscan and _doscan_low declarations to libc/doprnt.
The file name is arbitrary. If some one has a more appropriate one, please
let me know. I have intentionaly moved also _doscan and _doscan_low together
with _doprnt. I have seen no reasons to move one of them and let the other
ones. This shall avoid possible future issues.
It is ok with me if someone likes to send a DJGPP specific fix to the binutils
maintainers. I have checked that binutils can be compiled without changes
with a libc modified by this patch.
If no one complains about these changes in a period of 3 or 4 weeks I will
assume that the changes have been accepted and will commit them.
Regards,
Juan M. Guerrero
diff -aprNU3 djgpp.orig/include/libc/doprnt.h djgpp/include/libc/doprnt.h
--- djgpp.orig/include/libc/doprnt.h 1970-01-01 00:00:00 +0000
+++ djgpp/include/libc/doprnt.h 2017-08-02 23:22:06 +0000
@@ -0,0 +1,37 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
+#ifndef __dj_include_doprnt_h_
+#define __dj_include_doprnt_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef __dj_ENFORCE_ANSI_FREESTANDING
+
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+ || !defined(__STRICT_ANSI__) || defined(__cplusplus)
+
+#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
+
+#ifndef __STRICT_ANSI__
+
+#ifndef _POSIX_SOURCE
+
+#include <stdio.h>
+
+int _doprnt(const char *_fmt, va_list _args, FILE *_f);
+int _doscan(FILE *_f, const char *_fmt, va_list _args);
+int _doscan_low(FILE *, int (*)(FILE *_get), int (*_unget)(int, FILE *), const char *_fmt, va_list _args);
+
+#endif /* !_POSIX_SOURCE */
+#endif /* !__STRICT_ANSI__ */
+#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
+
+#ifndef __dj_ENFORCE_FUNCTION_CALLS
+#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !__dj_include_doprnt_h_ */
diff -aprNU3 djgpp.orig/include/stdio.h djgpp/include/stdio.h
--- djgpp.orig/include/stdio.h 2014-01-28 19:52:36 +0000
+++ djgpp/include/stdio.h 2017-08-04 22:12:38 +0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2014 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2013 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
@@ -158,9 +159,6 @@ extern FILE __dj_stdprn, __dj_stdaux;
#define P_tmpdir "c:/"
void _djstat_describe_lossage(FILE *_to_where);
-int _doprnt(const char *_fmt, va_list _args, FILE *_f);
-int _doscan(FILE *_f, const char *_fmt, va_list _args);
-int _doscan_low(FILE *, int (*)(FILE *_get), int (*_unget)(int, FILE *), const char *_fmt, va_list _args);
int fpurge(FILE *_f);
int getw(FILE *_f);
char * mktemp(char *_template);
diff -aprNU3 djgpp.orig/src/docs/kb/wc206.txi djgpp/src/docs/kb/wc206.txi
--- djgpp.orig/src/docs/kb/wc206.txi 2017-05-07 13:21:30 +0000
+++ djgpp/src/docs/kb/wc206.txi 2017-08-04 22:10:58 +0000
@@ -27,3 +27,11 @@ If the passed file descriptors are not v
the call of @code{fcntl} will fail and @code{errno} will be set to @code{EINVAL}.
With this adjustment, the @acronym{Posix} compliance of the @code{fcntl} implementation
is increased.
+
+@cindex @file{libc/doprnt.h}, declarations of _doprnt, _doscan and _doscan_low
+@findex _doprnt AT r{, and declaration moved}
+@findex _doscan AT r{, and declaration moved}
+@findex _doscan_low AT r{, and declaration moved}
+To avoid function name and declaration clashes with third party libraries, the
+prototypes of @code{_doprnt}, @code{_doscan} and @code{_doscan_low} have been
+moved from @file{stdio.h} to @file{libc/doprnt.h}.
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/doprnt.c djgpp/src/libc/ansi/stdio/doprnt.c
--- djgpp.orig/src/libc/ansi/stdio/doprnt.c 2015-06-04 17:55:16 +0000
+++ djgpp/src/libc/ansi/stdio/doprnt.c 2017-08-02 23:21:58 +0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2015 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2014 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2013 DJ Delorie, see COPYING.DJ for details */
@@ -25,6 +26,7 @@
#include <libc/file.h>
#include <libc/local.h>
#include <libc/ieee.h>
+#include <libc/doprnt.h>
#include <sys/cdefs.h>
typedef enum {
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/doscan.c djgpp/src/libc/ansi/stdio/doscan.c
--- djgpp.orig/src/libc/ansi/stdio/doscan.c 2015-05-23 08:50:04 +0000
+++ djgpp/src/libc/ansi/stdio/doscan.c 2017-08-02 23:21:50 +0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2015 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2013 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2012 DJ Delorie, see COPYING.DJ for details */
@@ -16,6 +17,7 @@
#include <errno.h>
#include <libc/file.h>
#include <libc/local.h>
+#include <libc/doprnt.h>
typedef enum {
false = 0, true = 1
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/fprintf.c djgpp/src/libc/ansi/stdio/fprintf.c
--- djgpp.orig/src/libc/ansi/stdio/fprintf.c 2015-05-02 07:32:00 +0000
+++ djgpp/src/libc/ansi/stdio/fprintf.c 2017-08-02 23:21:26 +0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2015 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2007 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
@@ -5,6 +6,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
fprintf(register FILE *iop, const char *fmt, ...)
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/fscanf.c djgpp/src/libc/ansi/stdio/fscanf.c
--- djgpp.orig/src/libc/ansi/stdio/fscanf.c 1994-12-26 20:34:44 +0000
+++ djgpp/src/libc/ansi/stdio/fscanf.c 2017-08-02 23:21:34 +0000
@@ -1,7 +1,9 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <stdio.h>
#include <stdarg.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
fscanf(FILE *f, const char *fmt, ...)
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/printf.c djgpp/src/libc/ansi/stdio/printf.c
--- djgpp.orig/src/libc/ansi/stdio/printf.c 2002-06-08 10:14:18 +0000
+++ djgpp/src/libc/ansi/stdio/printf.c 2017-08-02 23:22:14 +0000
@@ -1,9 +1,11 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <stdarg.h>
#include <stdio.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
printf(const char *fmt, ...)
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/scanf.c djgpp/src/libc/ansi/stdio/scanf.c
--- djgpp.orig/src/libc/ansi/stdio/scanf.c 1994-12-26 20:34:50 +0000
+++ djgpp/src/libc/ansi/stdio/scanf.c 2017-08-02 23:21:46 +0000
@@ -1,7 +1,9 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <stdio.h>
#include <stdarg.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
scanf(const char *fmt, ...)
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/sprintf.c djgpp/src/libc/ansi/stdio/sprintf.c
--- djgpp.orig/src/libc/ansi/stdio/sprintf.c 2015-05-02 07:32:02 +0000
+++ djgpp/src/libc/ansi/stdio/sprintf.c 2017-08-02 23:21:40 +0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2015 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2004 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
@@ -7,6 +8,7 @@
#include <stdio.h>
#include <limits.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
sprintf(char *str, const char *fmt, ...)
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/sscanf.c djgpp/src/libc/ansi/stdio/sscanf.c
--- djgpp.orig/src/libc/ansi/stdio/sscanf.c 2015-05-02 07:32:02 +0000
+++ djgpp/src/libc/ansi/stdio/sscanf.c 2017-08-02 23:36:40 +0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2015 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2004 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
@@ -5,6 +6,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
sscanf(const char *str, const char *fmt, ...)
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/vfprintf.c djgpp/src/libc/ansi/stdio/vfprintf.c
--- djgpp.orig/src/libc/ansi/stdio/vfprintf.c 1994-12-26 20:34:54 +0000
+++ djgpp/src/libc/ansi/stdio/vfprintf.c 2017-08-02 23:36:36 +0000
@@ -1,7 +1,9 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <stdio.h>
#include <stdarg.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
vfprintf(FILE *f, const char *fmt, va_list ap)
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/vprintf.c djgpp/src/libc/ansi/stdio/vprintf.c
--- djgpp.orig/src/libc/ansi/stdio/vprintf.c 1994-12-26 20:34:54 +0000
+++ djgpp/src/libc/ansi/stdio/vprintf.c 2017-08-02 23:36:30 +0000
@@ -1,7 +1,9 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <stdio.h>
#include <stdarg.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
vprintf(const char *fmt, va_list ap)
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/vsnprntf.c djgpp/src/libc/ansi/stdio/vsnprntf.c
--- djgpp.orig/src/libc/ansi/stdio/vsnprntf.c 2015-05-02 07:32:02 +0000
+++ djgpp/src/libc/ansi/stdio/vsnprntf.c 2017-08-02 23:36:22 +0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2015 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2004 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
@@ -7,6 +8,7 @@
#include <limits.h>
#include <errno.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
vsnprintf(char *str, size_t n, const char *fmt, va_list ap)
diff -aprNU3 djgpp.orig/src/libc/ansi/stdio/vsprintf.c djgpp/src/libc/ansi/stdio/vsprintf.c
--- djgpp.orig/src/libc/ansi/stdio/vsprintf.c 2015-05-02 07:32:02 +0000
+++ djgpp/src/libc/ansi/stdio/vsprintf.c 2017-08-02 23:36:18 +0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2015 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2004 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
@@ -6,6 +7,7 @@
#include <stdarg.h>
#include <limits.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
vsprintf(char *str, const char *fmt, va_list ap)
diff -aprNU3 djgpp.orig/src/libc/compat/stdio/vasnprtf.c djgpp/src/libc/compat/stdio/vasnprtf.c
--- djgpp.orig/src/libc/compat/stdio/vasnprtf.c 2014-01-26 20:44:44 +0000
+++ djgpp/src/libc/compat/stdio/vasnprtf.c 2017-08-02 23:49:00 +0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2014 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2008 DJ Delorie, see COPYING.DJ for details */
#include <stdio.h>
@@ -7,6 +8,7 @@
#include <limits.h>
#include <errno.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
char *
vasnprintf(char *str, size_t *np, const char *fmt, va_list argsp)
diff -aprNU3 djgpp.orig/src/libc/compat/stdio/vasprntf.c djgpp/src/libc/compat/stdio/vasprntf.c
--- djgpp.orig/src/libc/compat/stdio/vasprntf.c 2008-04-06 23:51:10 +0000
+++ djgpp/src/libc/compat/stdio/vasprntf.c 2017-08-02 23:49:04 +0000
@@ -1,8 +1,10 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2008 DJ Delorie, see COPYING.DJ for details */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
vasprintf(char **strp, const char *fmt, va_list argsp)
diff -aprNU3 djgpp.orig/src/libc/compat/stdio/vscanf.c djgpp/src/libc/compat/stdio/vscanf.c
--- djgpp.orig/src/libc/compat/stdio/vscanf.c 1998-06-28 17:45:46 +0000
+++ djgpp/src/libc/compat/stdio/vscanf.c 2017-08-02 23:48:54 +0000
@@ -1,6 +1,8 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
#include <stdio.h>
#include <stdarg.h>
+#include <libc/doprnt.h>
int
vscanf(const char *fmt, va_list ap)
diff -aprNU3 djgpp.orig/src/libc/compat/stdio/vsscanf.c djgpp/src/libc/compat/stdio/vsscanf.c
--- djgpp.orig/src/libc/compat/stdio/vsscanf.c 2015-05-02 07:32:12 +0000
+++ djgpp/src/libc/compat/stdio/vsscanf.c 2017-08-02 23:48:44 +0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2015 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2004 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
@@ -5,6 +6,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <libc/file.h>
+#include <libc/doprnt.h>
int
vsscanf(const char *str, const char *fmt, va_list ap)
diff -aprNU3 djgpp.orig/src/libc/pc_hw/co80/conio.c djgpp/src/libc/pc_hw/co80/conio.c
--- djgpp.orig/src/libc/pc_hw/co80/conio.c 2002-06-14 14:20:10 +0000
+++ djgpp/src/libc/pc_hw/co80/conio.c 2017-08-03 22:36:48 +0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2017 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
@@ -14,6 +15,7 @@
#include <go32.h>
#include <dpmi.h>
#include <libc/farptrgs.h>
+#include <libc/doprnt.h>
#include <conio.h>
#include <libc/bss.h>
#include <libc/unconst.h>
- Raw text -