diff options
| author | Ted Zlatanov | 2011-06-24 05:29:19 -0500 |
|---|---|---|
| committer | Ted Zlatanov | 2011-06-24 05:29:19 -0500 |
| commit | 4228cf16fb166263caba0af8e3c813b3d578d0b6 (patch) | |
| tree | f8e8f2f929cddcc95d0ddd2f19b5ce4e8ef4c1b9 /src | |
| parent | 74e8193b79e4badaf098d0736110c493a6c8aa96 (diff) | |
| download | emacs-4228cf16fb166263caba0af8e3c813b3d578d0b6.tar.gz emacs-4228cf16fb166263caba0af8e3c813b3d578d0b6.zip | |
* gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/gnutls.c | 79 |
2 files changed, 27 insertions, 57 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1a26efbd34f..e2b8c7d9143 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from | ||
| 4 | character.h. | ||
| 5 | |||
| 1 | 2011-06-23 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2011-06-23 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | Integer and buffer overflow fixes (Bug#8873). | 8 | Integer and buffer overflow fixes (Bug#8873). |
diff --git a/src/gnutls.c b/src/gnutls.c index 9342ce7912e..8c5e86940f9 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | 22 | ||
| 23 | #include "lisp.h" | 23 | #include "lisp.h" |
| 24 | #include "process.h" | 24 | #include "process.h" |
| 25 | #include "character.h" | ||
| 25 | 26 | ||
| 26 | #ifdef HAVE_GNUTLS | 27 | #ifdef HAVE_GNUTLS |
| 27 | #include <gnutls/gnutls.h> | 28 | #include <gnutls/gnutls.h> |
| @@ -1101,72 +1102,36 @@ syms_of_gnutls (void) | |||
| 1101 | { | 1102 | { |
| 1102 | gnutls_global_initialized = 0; | 1103 | gnutls_global_initialized = 0; |
| 1103 | 1104 | ||
| 1104 | Qgnutls_dll = intern_c_string ("gnutls"); | 1105 | DEFSYM(Qgnutls_dll, "gnutls"); |
| 1105 | staticpro (&Qgnutls_dll); | 1106 | DEFSYM(Qgnutls_log_level, "gnutls-log-level"); |
| 1106 | 1107 | DEFSYM(Qgnutls_code, "gnutls-code"); | |
| 1107 | Qgnutls_log_level = intern_c_string ("gnutls-log-level"); | 1108 | DEFSYM(Qgnutls_anon, "gnutls-anon"); |
| 1108 | staticpro (&Qgnutls_log_level); | 1109 | DEFSYM(Qgnutls_x509pki, "gnutls-x509pki"); |
| 1109 | 1110 | DEFSYM(Qgnutls_bootprop_hostname, ":hostname"); | |
| 1110 | Qgnutls_code = intern_c_string ("gnutls-code"); | 1111 | DEFSYM(Qgnutls_bootprop_priority, ":priority"); |
| 1111 | staticpro (&Qgnutls_code); | 1112 | DEFSYM(Qgnutls_bootprop_trustfiles, ":trustfiles"); |
| 1112 | 1113 | DEFSYM(Qgnutls_bootprop_keylist, ":keylist"); | |
| 1113 | Qgnutls_anon = intern_c_string ("gnutls-anon"); | 1114 | DEFSYM(Qgnutls_bootprop_crlfiles, ":crlfiles"); |
| 1114 | staticpro (&Qgnutls_anon); | 1115 | DEFSYM(Qgnutls_bootprop_callbacks, ":callbacks"); |
| 1115 | 1116 | DEFSYM(Qgnutls_bootprop_callbacks_verify, "verify"); | |
| 1116 | Qgnutls_x509pki = intern_c_string ("gnutls-x509pki"); | 1117 | DEFSYM(Qgnutls_bootprop_loglevel, ":loglevel"); |
| 1117 | staticpro (&Qgnutls_x509pki); | 1118 | DEFSYM(Qgnutls_bootprop_verify_flags, ":verify-flags"); |
| 1118 | 1119 | DEFSYM(Qgnutls_bootprop_verify_hostname_error, ":verify-error"); | |
| 1119 | Qgnutls_bootprop_hostname = intern_c_string (":hostname"); | 1120 | DEFSYM(Qgnutls_bootprop_verify_hostname_error, ":verify-hostname-error"); |
| 1120 | staticpro (&Qgnutls_bootprop_hostname); | 1121 | |
| 1121 | 1122 | DEFSYM(Qgnutls_e_interrupted, "gnutls-e-interrupted"); | |
| 1122 | Qgnutls_bootprop_priority = intern_c_string (":priority"); | ||
| 1123 | staticpro (&Qgnutls_bootprop_priority); | ||
| 1124 | |||
| 1125 | Qgnutls_bootprop_trustfiles = intern_c_string (":trustfiles"); | ||
| 1126 | staticpro (&Qgnutls_bootprop_trustfiles); | ||
| 1127 | |||
| 1128 | Qgnutls_bootprop_keylist = intern_c_string (":keylist"); | ||
| 1129 | staticpro (&Qgnutls_bootprop_keylist); | ||
| 1130 | |||
| 1131 | Qgnutls_bootprop_crlfiles = intern_c_string (":crlfiles"); | ||
| 1132 | staticpro (&Qgnutls_bootprop_crlfiles); | ||
| 1133 | |||
| 1134 | Qgnutls_bootprop_callbacks = intern_c_string (":callbacks"); | ||
| 1135 | staticpro (&Qgnutls_bootprop_callbacks); | ||
| 1136 | |||
| 1137 | Qgnutls_bootprop_callbacks_verify = intern_c_string ("verify"); | ||
| 1138 | staticpro (&Qgnutls_bootprop_callbacks_verify); | ||
| 1139 | |||
| 1140 | Qgnutls_bootprop_loglevel = intern_c_string (":loglevel"); | ||
| 1141 | staticpro (&Qgnutls_bootprop_loglevel); | ||
| 1142 | |||
| 1143 | Qgnutls_bootprop_verify_flags = intern_c_string (":verify-flags"); | ||
| 1144 | staticpro (&Qgnutls_bootprop_verify_flags); | ||
| 1145 | |||
| 1146 | Qgnutls_bootprop_verify_hostname_error = intern_c_string (":verify-error"); | ||
| 1147 | staticpro (&Qgnutls_bootprop_verify_error); | ||
| 1148 | |||
| 1149 | Qgnutls_bootprop_verify_hostname_error = intern_c_string (":verify-hostname-error"); | ||
| 1150 | staticpro (&Qgnutls_bootprop_verify_hostname_error); | ||
| 1151 | |||
| 1152 | Qgnutls_e_interrupted = intern_c_string ("gnutls-e-interrupted"); | ||
| 1153 | staticpro (&Qgnutls_e_interrupted); | ||
| 1154 | Fput (Qgnutls_e_interrupted, Qgnutls_code, | 1123 | Fput (Qgnutls_e_interrupted, Qgnutls_code, |
| 1155 | make_number (GNUTLS_E_INTERRUPTED)); | 1124 | make_number (GNUTLS_E_INTERRUPTED)); |
| 1156 | 1125 | ||
| 1157 | Qgnutls_e_again = intern_c_string ("gnutls-e-again"); | 1126 | DEFSYM(Qgnutls_e_again, "gnutls-e-again"); |
| 1158 | staticpro (&Qgnutls_e_again); | ||
| 1159 | Fput (Qgnutls_e_again, Qgnutls_code, | 1127 | Fput (Qgnutls_e_again, Qgnutls_code, |
| 1160 | make_number (GNUTLS_E_AGAIN)); | 1128 | make_number (GNUTLS_E_AGAIN)); |
| 1161 | 1129 | ||
| 1162 | Qgnutls_e_invalid_session = intern_c_string ("gnutls-e-invalid-session"); | 1130 | DEFSYM(Qgnutls_e_invalid_session, "gnutls-e-invalid-session"); |
| 1163 | staticpro (&Qgnutls_e_invalid_session); | ||
| 1164 | Fput (Qgnutls_e_invalid_session, Qgnutls_code, | 1131 | Fput (Qgnutls_e_invalid_session, Qgnutls_code, |
| 1165 | make_number (GNUTLS_E_INVALID_SESSION)); | 1132 | make_number (GNUTLS_E_INVALID_SESSION)); |
| 1166 | 1133 | ||
| 1167 | Qgnutls_e_not_ready_for_handshake = | 1134 | DEFSYM(Qgnutls_e_not_ready_for_handshake, "gnutls-e-not-ready-for-handshake"); |
| 1168 | intern_c_string ("gnutls-e-not-ready-for-handshake"); | ||
| 1169 | staticpro (&Qgnutls_e_not_ready_for_handshake); | ||
| 1170 | Fput (Qgnutls_e_not_ready_for_handshake, Qgnutls_code, | 1135 | Fput (Qgnutls_e_not_ready_for_handshake, Qgnutls_code, |
| 1171 | make_number (GNUTLS_E_APPLICATION_ERROR_MIN)); | 1136 | make_number (GNUTLS_E_APPLICATION_ERROR_MIN)); |
| 1172 | 1137 | ||