Mail Archives: djgpp-workers/2003/02/02/09:54:35
Hello.
Below is a patch that adds the EILSEQ error code, which is required by C99.
Can anyone confirm that EILSEQ definitely wasn't in C89? I am assuming
that it wasn't, because it wasn't in the header before.
OK to commit?
Thanks, bye, Rich =]
Index: include/errno.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/errno.h,v
retrieving revision 1.5
diff -p -c -3 -r1.5 errno.h
*** include/errno.h 17 Oct 2002 23:00:24 -0000 1.5
--- include/errno.h 2 Feb 2003 14:50:27 -0000
***************
*** 1,3 ****
--- 1,4 ----
+ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
*************** extern "C" {
*** 15,20 ****
--- 16,28 ----
#define ERANGE 2
extern int errno;
+
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+ || !defined(__STRICT_ANSI__)
+
+ #define EILSEQ 41
+
+ #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
#ifndef __STRICT_ANSI__
*************** extern int errno;
*** 59,64 ****
--- 67,73 ----
#define ENMFILE 38
#define ELOOP 39
#define EOVERFLOW 40
+ /* EILSEQ 41 */
extern char * sys_errlist[];
extern int sys_nerr;
Index: src/libc/ansi/string/syserr1.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/ansi/string/syserr1.c,v
retrieving revision 1.3
diff -p -c -3 -r1.3 syserr1.c
*** src/libc/ansi/string/syserr1.c 25 Jan 2001 19:54:10 -0000 1.3
--- src/libc/ansi/string/syserr1.c 2 Feb 2003 14:50:27 -0000
***************
*** 1,3 ****
--- 1,4 ----
+ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include "syserr1.h"
*************** char __syserr37[] = "Improper link (EXDE
*** 43,45 ****
--- 44,47 ----
char __syserr38[] = "No more files (ENMFILE)";
char __syserr39[] = "Too many levels of symbolic links (ELOOP)";
char __syserr40[] = "Value too large (EOVERFLOW)";
+ char __syserr41[] = "Invalid or incomplete multibyte or wide character (EILSEQ)";
Index: src/libc/ansi/string/syserr1.h
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/ansi/string/syserr1.h,v
retrieving revision 1.3
diff -p -c -3 -r1.3 syserr1.h
*** src/libc/ansi/string/syserr1.h 25 Jan 2001 19:54:10 -0000 1.3
--- src/libc/ansi/string/syserr1.h 2 Feb 2003 14:50:35 -0000
***************
*** 1,3 ****
--- 1,4 ----
+ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
extern char __syserr00[];
*************** extern char __syserr37[];
*** 41,43 ****
--- 42,45 ----
extern char __syserr38[];
extern char __syserr39[];
extern char __syserr40[];
+ extern char __syserr41[];
Index: src/libc/ansi/string/syserr2.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/ansi/string/syserr2.c,v
retrieving revision 1.4
diff -p -c -3 -r1.4 syserr2.c
*** src/libc/ansi/string/syserr2.c 17 Oct 2002 23:00:24 -0000 1.4
--- src/libc/ansi/string/syserr2.c 2 Feb 2003 14:50:35 -0000
***************
*** 1,3 ****
--- 1,4 ----
+ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
*************** __syserr20, __syserr21, __syserr22, __sy
*** 13,19 ****
__syserr25, __syserr26, __syserr27, __syserr28, __syserr29,
__syserr30, __syserr31, __syserr32, __syserr33, __syserr34,
__syserr35, __syserr36, __syserr37, __syserr38, __syserr39,
! __syserr40
};
int __sys_nerr = sizeof(__sys_errlist) / sizeof(__sys_errlist[0]);
--- 14,20 ----
__syserr25, __syserr26, __syserr27, __syserr28, __syserr29,
__syserr30, __syserr31, __syserr32, __syserr33, __syserr34,
__syserr35, __syserr36, __syserr37, __syserr38, __syserr39,
! __syserr40, __syserr41
};
int __sys_nerr = sizeof(__sys_errlist) / sizeof(__sys_errlist[0]);
Index: src/libc/ansi/string/syserr3.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/ansi/string/syserr3.c,v
retrieving revision 1.4
diff -p -c -3 -r1.4 syserr3.c
*** src/libc/ansi/string/syserr3.c 17 Oct 2002 23:00:24 -0000 1.4
--- src/libc/ansi/string/syserr3.c 2 Feb 2003 14:50:41 -0000
***************
*** 1,3 ****
--- 1,4 ----
+ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
*************** __syserr20, __syserr21, __syserr22, __sy
*** 13,19 ****
__syserr25, __syserr26, __syserr27, __syserr28, __syserr29,
__syserr30, __syserr31, __syserr32, __syserr33, __syserr34,
__syserr35, __syserr36, __syserr37, __syserr38, __syserr39,
! __syserr40
};
int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]);
--- 14,20 ----
__syserr25, __syserr26, __syserr27, __syserr28, __syserr29,
__syserr30, __syserr31, __syserr32, __syserr33, __syserr34,
__syserr35, __syserr36, __syserr37, __syserr38, __syserr39,
! __syserr40, __syserr41
};
int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]);
Index: src/docs/kb/wc204.txi
===================================================================
RCS file: /cvs/djgpp/djgpp/src/docs/kb/wc204.txi,v
retrieving revision 1.137
diff -p -c -3 -r1.137 wc204.txi
*** src/docs/kb/wc204.txi 29 Jan 2003 01:25:16 -0000 1.137
--- src/docs/kb/wc204.txi 2 Feb 2003 14:50:46 -0000
*************** The constants @code{HUGE_VALF} and @code
*** 853,855 ****
--- 853,862 ----
@tindex ssize_t
@code{ssize_t} was changed from an @code{int} to a @code{signed long int}.
@code{ssize_t} is now really a signed version of @code{size_t}.
+
+ @vindex errno AT r{, and C99 compliance}
+ @findex perror AT r{, and C99 compliance}
+ @findex strerror AT r{, and C99 compliance}
+ The error code @code{EILSEQ} was added --- @code{errno} may be assigned it.
+ @code{perror} and @code{strerror} were updated to display/return
+ an error message for @code{EILSEQ}.
- Raw text -