X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrerror.c;h=5dae1111a2974c086691006b90cf5f998184a58d;hb=9ada6e7b5cf3aa507b6b54e47775c29ffd1378d3;hp=dfe6c25f2faf121c921ee941bb802b68a90ba972;hpb=b96a57ff89d270b3711c964c379ec3ac272e503e;p=gnulib.git diff --git a/lib/strerror.c b/lib/strerror.c index dfe6c25f2..5dae1111a 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -1,6 +1,6 @@ /* strerror.c --- POSIX compatible system error routine - Copyright (C) 2007-2009 Free Software Foundation, Inc. + Copyright (C) 2007-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,6 +32,9 @@ # include "intprops.h" +/* Use the system functions, not the gnulib overrides in this file. */ +# undef sprintf + # undef strerror # if ! HAVE_DECL_STRERROR # define strerror(n) NULL @@ -319,6 +322,12 @@ rpl_strerror (int n) break; # endif +# if GNULIB_defined_EDQUOT + case EDQUOT: + msg = "Disk quota exceeded"; + break; +# endif + # if GNULIB_defined_ECANCELED case ECANCELED: msg = "Operation canceled"; @@ -334,10 +343,10 @@ rpl_strerror (int n) if (result == NULL || result[0] == '\0') { - static char const fmt[] = "Unknown error (%d)"; - static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)]; - sprintf (msg_buf, fmt, n); - return msg_buf; + static char const fmt[] = "Unknown error (%d)"; + static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)]; + sprintf (msg_buf, fmt, n); + return msg_buf; } return result;