]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
From Guido: Compiling SNMP on Windows there is a collision on the OPAQUE and OPTIONAL...
authorrobertc <>
Sun, 15 Sep 2002 12:00:21 +0000 (12:00 +0000)
committerrobertc <>
Sun, 15 Sep 2002 12:00:21 +0000 (12:00 +0000)
snmplib/parse.c

index 03f2b44b7b2304c356320f95ea3a24e2b32e3b20..863b213fed23278115d7eea3dea5da25e08856ad 100644 (file)
@@ -124,7 +124,7 @@ int Line = 1;
 #define COUNTER            9
 #define GAUGE      10
 #define TIMETICKS   11
-#define OPAQUE     12
+#define SNMP_OPAQUE        12
 #define NUL        13
 #define SEQUENCE    14
 #define OF         15          /* SEQUENCE OF */
@@ -137,7 +137,7 @@ int Line = 1;
 #define NOACCESS    21
 #define STATUS     22
 #define MANDATORY   23
-#define OPTIONAL    24
+#define SNMP_OPTIONAL    24
 #define OBSOLETE    25
 #define RECOMMENDED 26
 #define PUNCT      27
@@ -165,9 +165,9 @@ struct tok {
 struct tok tokens[] =
 {
     {"obsolete", sizeof("obsolete") - 1, OBSOLETE},
-    {"Opaque", sizeof("Opaque") - 1, OPAQUE},
+    {"Opaque", sizeof("Opaque") - 1, SNMP_OPAQUE},
     {"recommended", sizeof("recommended") - 1, RECOMMENDED},
-    {"optional", sizeof("optional") - 1, OPTIONAL},
+    {"optional", sizeof("optional") - 1, SNMP_OPTIONAL},
     {"mandatory", sizeof("mandatory") - 1, MANDATORY},
     {"current", sizeof("current") - 1, MANDATORY},
     {"not-accessible", sizeof("not-accessible") - 1, NOACCESS},
@@ -328,7 +328,7 @@ build_translation_table(void)
        case TIMETICKS:
            translation_table[count] = TYPE_TIMETICKS;
            break;
-       case OPAQUE:
+       case SNMP_OPAQUE:
            translation_table[count] = TYPE_OPAQUE;
            break;
        case NUL:
@@ -844,7 +844,7 @@ parse_objecttype(register FILE *fp, char *name)
     case COUNTER:
     case GAUGE:
     case TIMETICKS:
-    case OPAQUE:
+    case SNMP_OPAQUE:
     case NUL:
     case LABEL:
        strcpy(syntax, token);
@@ -873,7 +873,7 @@ parse_objecttype(register FILE *fp, char *name)
        return 0;
     }
     type = get_token(fp, token);
-    if (type != MANDATORY && type != OPTIONAL && type != OBSOLETE && type != RECOMMENDED) {
+    if (type != MANDATORY && type != SNMP_OPTIONAL && type != OBSOLETE && type != RECOMMENDED) {
        print_error("Bad status", token, type);
        free_node(np);
        return 0;