~ubuntu-branches/ubuntu/precise/net-snmp/precise

« back to all changes in this revision

Viewing changes to agent/auto_nlist.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-11-26 01:27:00 UTC
  • mfrom: (1.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091126012700-pox7w0a5j2x305h9
Tags: 5.4.2.1~dfsg-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - Set Ubuntu maintainer address.
  - net-snmp-config: Use bash. (LP: #104738)
  - Removed multiuser option when calling update-rc.d. (LP: #254261)
  - debian/snmpd.init: LSBify the init script.
  - debian/patches/52_fix_snmpcmd_1_typo.patch: Adjust a typo in snmpcmd.1
    (LP: #250459)
  - debian/patches/99-fix-ubuntu-div0.patch: Fix dvision by zero.
    (LP: #426813).
 * Dropped patches:
   - debian/patches/101-fix-ipalias.patch: Applied upstream.
   - debian/patches/99-fix-net-snmp-syslog.patch: Applied upstream.
   - debian/patches/99-fix-perl-counter-in-subagent.patch: Applied upstream.
   - ebian/patches/103-fix-ubuntu-lmsensors.patch: No longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
         * allocate an extra byte for inclusion of a preceding '_' later 
63
63
         */
64
64
        it->nl[0].n_name = (char *) malloc(strlen(string) + 2);
65
 
#if defined(aix4) || defined(aix5)
 
65
#if defined(aix4) || defined(aix5) || defined(aix6)
66
66
        strcpy(it->nl[0].n_name, string);
67
67
#else
68
68
        sprintf(it->nl[0].n_name, "_%s", string);
69
69
#endif
70
70
        it->nl[1].n_name = 0;
71
71
        init_nlist(it->nl);
72
 
#if !(defined(aix4) || defined(aix5))
 
72
#if !(defined(aix4) || defined(aix5) || defined(aix6)) 
73
73
        if (it->nl[0].n_type == 0) {
74
74
            strcpy(it->nl[0].n_name, string);
75
75
            init_nlist(it->nl);
142
142
    }
143
143
    kvm_close(kernel);
144
144
#else                           /* ! HAVE_KVM_OPENFILES */
145
 
#if (defined(aix4) || defined(aix5)) && defined(HAVE_KNLIST)
 
145
#if (defined(aix4) || defined(aix5) || defined(aix6)) && defined(HAVE_KNLIST)
146
146
    if (knlist(nl, 1, sizeof(struct nlist)) == -1) {
147
147
        DEBUGMSGTL(("auto_nlist:init_nlist", "knlist failed on symbol:  %s\n",
148
148
                    nl[0].n_name));
172
172
#endif                          /*aix4 */
173
173
#endif                          /* ! HAVE_KVM_OPENFILES */
174
174
    for (ret = 0; nl[ret].n_name != NULL; ret++) {
175
 
#if defined(aix4) || defined(aix5)
 
175
#if defined(aix4) || defined(aix5) || defined(aix6)
176
176
        if (nl[ret].n_type == 0 && nl[ret].n_value != 0)
177
177
            nl[ret].n_type = 1;
178
178
#endif