-#define LDAP_FILTER_AND 0xa0L /* context specific + constructed */
-#define LDAP_FILTER_OR 0xa1L /* context specific + constructed */
-#define LDAP_FILTER_NOT 0xa2L /* context specific + constructed */
-#define LDAP_FILTER_EQUALITY 0xa3L /* context specific + constructed */
-#define LDAP_FILTER_SUBSTRINGS 0xa4L /* context specific + constructed */
-#define LDAP_FILTER_GE 0xa5L /* context specific + constructed */
-#define LDAP_FILTER_LE 0xa6L /* context specific + constructed */
-#define LDAP_FILTER_PRESENT 0x87L /* context specific + primitive */
-#define LDAP_FILTER_APPROX 0xa8L /* context specific + constructed */
-#define LDAP_FILTER_EXTENDED 0xa9L /* context specific + constructed */
-
-/* U-Mich version 3.0 compatibility filter types */
-#define LDAP_FILTER_PRESENT_30 0xa7L /* context specific + constructed */
-
-/* old broken stuff */
-#define OLD_LDAP_FILTER_AND 0x00L
-#define OLD_LDAP_FILTER_OR 0x01L
-#define OLD_LDAP_FILTER_NOT 0x02L
-#define OLD_LDAP_FILTER_EQUALITY 0x03L
-#define OLD_LDAP_FILTER_SUBSTRINGS 0x04L
-#define OLD_LDAP_FILTER_GE 0x05L
-#define OLD_LDAP_FILTER_LE 0x06L
-#define OLD_LDAP_FILTER_PRESENT 0x07L
-#define OLD_LDAP_FILTER_APPROX 0x08L
+#define LDAP_FILTER_AND (ber_tag_t) 0xa0U /* context specific + constructed */
+#define LDAP_FILTER_OR (ber_tag_t) 0xa1U /* context specific + constructed */
+#define LDAP_FILTER_NOT (ber_tag_t) 0xa2U /* context specific + constructed */
+#define LDAP_FILTER_EQUALITY (ber_tag_t) 0xa3U /* context specific + constructed */
+#define LDAP_FILTER_SUBSTRINGS (ber_tag_t) 0xa4U /* context specific + constructed */
+#define LDAP_FILTER_GE (ber_tag_t) 0xa5U /* context specific + constructed */
+#define LDAP_FILTER_LE (ber_tag_t) 0xa6U /* context specific + constructed */
+#define LDAP_FILTER_PRESENT (ber_tag_t) 0x87U /* context specific + primitive */
+#define LDAP_FILTER_APPROX (ber_tag_t) 0xa8U /* context specific + constructed */
+#define LDAP_FILTER_EXT (ber_tag_t) 0xa9U /* context specific + constructed */