]> eyrie.org Git - kerberos/krb5-strength.git/blobdiff - cracklib/packer.h
Declare fast forward from 3.1-2
[kerberos/krb5-strength.git] / cracklib / packer.h
index 1bf32da427cd6de49a6d23a2e4269ef933e3feda..2f9d5508931d52a9237f9c204e731cf7bb12ec93 100644 (file)
@@ -9,12 +9,16 @@
 /*
  * Modified as part of the krb5-strength project as follows:
  *
- * 2007-03-23  Russ Allbery <rra@stanford.edu>
+ * 2007-03-23  Russ Allbery <eagle@eyrie.org>
  *   - Add ANSI C prototypes and prototype additional functions.
- * 2009-10-14  Russ Allbery <rra@stanford.edu>
+ * 2009-10-14  Russ Allbery <eagle@eyrie.org>
  *   - Prototype changes for const cleanliness.
- * 2010-03-14  Russ Allbery <rra@stanford.edu>
+ * 2010-03-14  Russ Allbery <eagle@eyrie.org>
  *   - Fix int8, int16, and int32 definitions.
+ * 2013-10-01  Russ Allbery <eagle@eyrie.org>
+ *   - Set hidden visibility on all symbols by default.
+ * 2020-05-16  Russ Allbery <eagle@eyrie.org>
+ *   - Cast CRACK_TOLOWER and CRACK_TOUPPER to char.
  */
 
 #include <config.h>
@@ -64,6 +68,9 @@ typedef struct
 #define PW_WORDS(x) ((x)->header.pih_numwords)
 #define PIH_MAGIC 0x70775631
 
+/* Default to a hidden visibility for all CrackLib functions. */
+#pragma GCC visibility push(hidden)
+
 extern PWDICT *PWOpen(const char *, const char *);
 extern int32 FindPW(PWDICT *, const char *);
 extern int PutPW(PWDICT *, const char *);
@@ -76,6 +83,9 @@ extern int PMatch(const char *, const char *);
 extern char *Reverse(const char *);
 extern char *Lowercase(const char *);
 
-#define CRACK_TOLOWER(a)       (isupper(a)?tolower(a):(a)) 
-#define CRACK_TOUPPER(a)       (islower(a)?toupper(a):(a)) 
+/* Undo default visibility change. */
+#pragma GCC visibility pop
+
+#define CRACK_TOLOWER(a)       ((char)(isupper(a)?tolower(a):(a)))
+#define CRACK_TOUPPER(a)       ((char)(islower(a)?toupper(a):(a)))
 #define STRCMP(a,b)            strcmp((a),(b))