-#define LDAP_FILTER_AND 0xa0UL /* context specific + constructed */
-#define LDAP_FILTER_OR 0xa1UL /* context specific + constructed */
-#define LDAP_FILTER_NOT 0xa2UL /* context specific + constructed */
-#define LDAP_FILTER_EQUALITY 0xa3UL /* context specific + constructed */
-#define LDAP_FILTER_SUBSTRINGS 0xa4UL /* context specific + constructed */
-#define LDAP_FILTER_GE 0xa5UL /* context specific + constructed */
-#define LDAP_FILTER_LE 0xa6UL /* context specific + constructed */
-#define LDAP_FILTER_PRESENT 0x87UL /* context specific + primitive */
-#define LDAP_FILTER_APPROX 0xa8UL /* context specific + constructed */
-#define LDAP_FILTER_EXTENDED 0xa9UL /* context specific + constructed */
-
-/* U-Mich version 3.0 compatibility filter types */
-#define LDAP_FILTER_PRESENT_30 0xa7UL /* context specific + constructed */
-
-/* old broken stuff */
-#define OLD_LDAP_FILTER_AND 0x00UL
-#define OLD_LDAP_FILTER_OR 0x01UL
-#define OLD_LDAP_FILTER_NOT 0x02UL
-#define OLD_LDAP_FILTER_EQUALITY 0x03UL
-#define OLD_LDAP_FILTER_SUBSTRINGS 0x04UL
-#define OLD_LDAP_FILTER_GE 0x05UL
-#define OLD_LDAP_FILTER_LE 0x06UL
-#define OLD_LDAP_FILTER_PRESENT 0x07UL
-#define OLD_LDAP_FILTER_APPROX 0x08UL
+#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 */