]> sjero.net Git - wget/blobdiff - src/safe-ctype.h
[svn] Update the license to include the OpenSSL exception.
[wget] / src / safe-ctype.h
index d5fc649051a3c10ed62acfe0de16f4dc3be3d968..17ced521e11ce23b2fef9f6e58c861961197b6bf 100644 (file)
@@ -16,8 +16,18 @@ Library General Public License for more details.
 
 You should have received a copy of the GNU Library General Public
 License along with libiberty; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite
+Boston, MA 02111-1307, USA.
+
+In addition, as a special exception, the Free Software Foundation
+gives permission to link the code of its release of Wget with the
+OpenSSL project's "OpenSSL" library (or with modified versions of it
+that use the same license as the "OpenSSL" library), and distribute
+the linked executables.  You must obey the GNU General Public License
+in all respects for all of the code used other than "OpenSSL".  If you
+modify this file, you may extend this exception to your version of the
+file, but you are not obligated to do so.  If you do not wish to do
+so, delete this exception statement from your version.  */
 
 /* This is a compatible replacement of the standard C library's <ctype.h>
    with the following properties:
@@ -35,9 +45,38 @@ Boston, MA 02111-1307, USA.  */
 #ifndef SAFE_CTYPE_H
 #define SAFE_CTYPE_H
 
-#ifdef isalpha
- #error "safe-ctype.h and ctype.h may not be used simultaneously"
-#else
+/* Catch erroneous use of ctype macros.  Files that really know what
+   they're doing can disable this check by defining the
+   I_REALLY_WANT_CTYPE_MACROS preprocessor constant. */
+
+#ifndef I_REALLY_WANT_CTYPE_MACROS
+
+#undef isalpha
+#define isalpha *** Please use ISALPHA ***
+#undef isalnum
+#define isalnum *** Please use ISALNUM ***
+#undef isblank
+#define isblank *** Please use ISBLANK ***
+#undef iscntrl
+#define iscntrl *** Please use ISCNTRL ***
+#undef isdigit
+#define isdigit *** Please use ISDIGIT ***
+#undef isgraph
+#define isgraph *** Please use ISGRAPH ***
+#undef islower
+#define islower *** Please use ISLOWER ***
+#undef isprint
+#define isprint *** Please use ISPRINT ***
+#undef ispunct
+#define ispunct *** Please use ISPUNCT ***
+#undef isspace
+#define isspace *** Please use ISSPACE ***
+#undef isupper
+#define isupper *** Please use ISUPPER ***
+#undef isxdigit
+#define isxdigit *** Please use ISXDIGIT ***
+
+#endif /* I_REALLY_WANT_CTYPE_MACROS */
 
 /* Categories.  */
 
@@ -96,5 +135,4 @@ extern const unsigned char  _sch_tolower[256];
 #define TOUPPER(c) _sch_toupper[(c) & 0xff]
 #define TOLOWER(c) _sch_tolower[(c) & 0xff]
 
-#endif /* no ctype.h */
 #endif /* SAFE_CTYPE_H */