1 /* $NetBSD: ctype.h,v 1.3 2021/08/14 16:14:55 christos Exp $ */ 2 3 /* Generic ctype.h */ 4 /* $OpenLDAP$ */ 5 /* This work is part of OpenLDAP Software <http://www.openldap.org/>. 6 * 7 * Copyright 1998-2021 The OpenLDAP Foundation. 8 * All rights reserved. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted only as authorized by the OpenLDAP 12 * Public License. 13 * 14 * A copy of this license is available in file LICENSE in the 15 * top-level directory of the distribution or, alternatively, at 16 * <http://www.OpenLDAP.org/license.html>. 17 */ 18 19 #ifndef _AC_CTYPE_H 20 #define _AC_CTYPE_H 21 22 #include <ctype.h> 23 24 #undef TOUPPER 25 #undef TOLOWER 26 27 #ifdef C_UPPER_LOWER 28 # define TOUPPER(c) (islower(c) ? toupper(c) : (c)) 29 # define TOLOWER(c) (isupper(c) ? tolower(c) : (c)) 30 #else 31 # define TOUPPER(c) toupper(c) 32 # define TOLOWER(c) tolower(c) 33 #endif 34 35 #endif /* _AC_CTYPE_H */ 36