[uClibc-cvs] uClibc/libc/misc/error error.c,1.2,1.3
Erik Andersen
andersen at uclibc.org
Thu Oct 9 09:02:08 UTC 2003
- Previous message: [uClibc-cvs] uClibc/ldso/ldso readelflib1.c,1.47,1.48
- Next message: [uClibc-cvs] uClibc/libc/pwd_grp __getgrent_r.c, NONE, 1.1 Makefile, 1.21, 1.22 __getpwent_r.c, 1.3, 1.4 __getspent_r.c, 1.5, 1.6 __sgetspent_r.c, 1.3, 1.4 config.h, 1.6, 1.7 fgetgrent.c, 1.7, 1.8 fgetpwent.c, 1.9, 1.10 fgetspent.c, 1.5, 1.6 getgrgid.c, 1.8, 1.9 getgrnam.c, 1.8, 1.9 getpw.c, 1.4, 1.5 getpwnam.c, 1.10, 1.11 getpwuid.c, 1.9, 1.10 getspnam.c, 1.5, 1.6 getspuid.c, 1.5, 1.6 grent.c, 1.9, 1.10 initgroups.c, 1.11, 1.12 lckpwdf.c, 1.3, 1.4 putpwent.c, 1.5, 1.6 putspent.c, 1.2, 1.3 pwent.c, 1.12, 1.13 sgetspent.c, 1.5, 1.6 spent.c, 1.6, 1.7 __getgrent.c, 1.9, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/uClibc/libc/misc/error
In directory winder:/tmp/cvs-serv8787/libc/misc/error
Modified Files:
error.c
Log Message:
Patch from Rob McMullen:
Here's a patch... Since they aren't SUSv3 functions, I don't know if
they'll ever get officially added, but it helps with BSD porting and
allows quite a few Gentoo ebuilds to compile without changing anything.
Rob
Index: error.c
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/error/error.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- error.c 5 Apr 2002 23:32:54 -0000 1.2
+++ error.c 9 Oct 2003 09:02:05 -0000 1.3
@@ -100,3 +100,77 @@
weak_alias (__error, error)
weak_alias (__error_at_line, error_at_line)
+
+
+#include "err.h"
+#include "errno.h"
+
+/* NORETURN */
+void verr (int status, const char *message, va_list args)
+{
+ fflush (stdout);
+
+ vfprintf (stderr, message, args);
+ if (errno) {
+ fprintf (stderr, ": %s", strerror (errno));
+ }
+ putc ('\n', stderr);
+ if (status)
+ exit (status);
+}
+
+/* NORETURN */
+void verrx (int status, const char *message, va_list args)
+{
+ fflush (stdout);
+
+ vfprintf (stderr, message, args);
+ if (status)
+ exit (status);
+}
+
+void vwarn (const char *message, va_list args)
+{
+ verr (0, message, args);
+}
+
+void vwarnx (const char *message, va_list args)
+{
+ verrx (0, message, args);
+}
+
+void err (int status, const char *message, ...)
+{
+ va_list args;
+
+ va_start (args, message);
+ verr (status, message, args);
+ va_end (args);
+}
+
+void errx (int status, const char *message, ...)
+{
+ va_list args;
+
+ va_start (args, message);
+ verrx (status, message, args);
+ va_end (args);
+}
+
+void warn (const char *message, ...)
+{
+ va_list args;
+
+ va_start (args, message);
+ verr (0, message, args);
+ va_end (args);
+}
+
+void warnx (const char *message, ...)
+{
+ va_list args;
+
+ va_start (args, message);
+ verrx (0, message, args);
+ va_end (args);
+}
- Previous message: [uClibc-cvs] uClibc/ldso/ldso readelflib1.c,1.47,1.48
- Next message: [uClibc-cvs] uClibc/libc/pwd_grp __getgrent_r.c, NONE, 1.1 Makefile, 1.21, 1.22 __getpwent_r.c, 1.3, 1.4 __getspent_r.c, 1.5, 1.6 __sgetspent_r.c, 1.3, 1.4 config.h, 1.6, 1.7 fgetgrent.c, 1.7, 1.8 fgetpwent.c, 1.9, 1.10 fgetspent.c, 1.5, 1.6 getgrgid.c, 1.8, 1.9 getgrnam.c, 1.8, 1.9 getpw.c, 1.4, 1.5 getpwnam.c, 1.10, 1.11 getpwuid.c, 1.9, 1.10 getspnam.c, 1.5, 1.6 getspuid.c, 1.5, 1.6 grent.c, 1.9, 1.10 initgroups.c, 1.11, 1.12 lckpwdf.c, 1.3, 1.4 putpwent.c, 1.5, 1.6 putspent.c, 1.2, 1.3 pwent.c, 1.12, 1.13 sgetspent.c, 1.5, 1.6 spent.c, 1.6, 1.7 __getgrent.c, 1.9, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the uClibc-cvs
mailing list