Branch oldpackages for 14.07
[14.07/packages.git] / lang / yapsnmp / patches / 000-compile_fix.patch
1 --- a/configure
2 +++ b/configure
3 @@ -8757,13 +8757,13 @@ _ACEOF
4  fi
5  
6  
7 -echo "$as_me:$LINENO: checking for init_snmp in -lsnmp" >&5
8 -echo $ECHO_N "checking for init_snmp in -lsnmp... $ECHO_C" >&6
9 +echo "$as_me:$LINENO: checking for init_snmp in -lnetsnmp" >&5
10 +echo $ECHO_N "checking for init_snmp in -lnetsnmp... $ECHO_C" >&6
11  if test "${ac_cv_lib_snmp_init_snmp+set}" = set; then
12    echo $ECHO_N "(cached) $ECHO_C" >&6
13  else
14    ac_check_lib_save_LIBS=$LIBS
15 -LIBS="-lsnmp  $LIBS"
16 +LIBS="-lnetsnmp  $LIBS"
17  cat >conftest.$ac_ext <<_ACEOF
18  #line $LINENO "configure"
19  /* confdefs.h.  */
20 @@ -8816,7 +8816,7 @@ if test $ac_cv_lib_snmp_init_snmp = yes;
21  #define HAVE_LIBSNMP 1
22  _ACEOF
23  
24 -  LIBS="-lsnmp $LIBS"
25 +  LIBS="-lnetsnmp $LIBS"
26  
27  else
28    { { echo "$as_me:$LINENO: error: Couldn't find libsnmp" >&5
29 @@ -9291,7 +9291,7 @@ fi
30  done
31  
32  
33 -for PYTHONINCPATH in python2.3 python2.2 python2.1 python2.0 python1.6 python1.5
34 +for PYTHONINCPATH in python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5
35  do
36   as_ac_Header=`echo "ac_cv_header_$PYTHONINCPATH/Python.h" | $as_tr_sh`
37  if eval "test \"\${$as_ac_Header+set}\" = set"; then
38 --- a/src/mib.h-patch
39 +++ b/src/mib.h-patch
40 @@ -1,36 +1,11 @@
41 -*** /usr/include/net-snmp/library/mib.h        2003-11-11 08:37:02.000000000 -0800
42 ---- mib.h      2004-03-07 14:59:47.000000000 -0800
43 -***************
44 -*** 127,133 ****
45 -      int             get_wild_node(const char *, oid *, size_t *);
46 -      int             get_node(const char *, oid *, size_t *);
47 -      oid            *snmp_parse_oid(const char *, oid *, size_t *);
48 -!     struct tree    *get_symbol(oid *, size_t, struct tree *, char *);
49 -      struct tree    *get_tree(const oid *, size_t, struct tree *);
50 -      struct tree    *get_tree_head(void);
51 -      void            set_function(struct tree *);
52 ---- 127,133 ----
53 -      int             get_wild_node(const char *, oid *, size_t *);
54 -      int             get_node(const char *, oid *, size_t *);
55 -      oid            *snmp_parse_oid(const char *, oid *, size_t *);
56 -! /*    struct tree    *get_symbol(oid *, size_t, struct tree *, char *);*/
57 -      struct tree    *get_tree(const oid *, size_t, struct tree *);
58 -      struct tree    *get_tree_head(void);
59 -      void            set_function(struct tree *);
60 -***************
61 -*** 482,488 ****
62 -      const char     *parse_octet_hint(const char *hint, const char *value,
63 -                                    unsigned char **new_val, int *new_val_len);
64 -  
65 -!     void            clear_tree_flags(register struct tree *tp);
66 -  
67 -      char           *snmp_out_toggle_options(char *);
68 -      void            snmp_out_toggle_options_usage(const char *, FILE *);
69 ---- 482,488 ----
70 -      const char     *parse_octet_hint(const char *hint, const char *value,
71 -                                    unsigned char **new_val, int *new_val_len);
72 -  
73 -!     /*    void            clear_tree_flags(register struct tree *tp);*/
74 -  
75 -      char           *snmp_out_toggle_options(char *);
76 -      void            snmp_out_toggle_options_usage(const char *, FILE *);
77 +--- mib.h.old  2007-07-19 15:11:03.917123577 -0500
78 ++++ mib.h      2007-07-19 15:10:44.804034380 -0500
79 +@@ -498,7 +498,7 @@
80 +     const char     *parse_octet_hint(const char *hint, const char *value,
81 +                                    unsigned char **new_val, int *new_val_len);
82
83 +-    void            clear_tree_flags(register struct tree *tp);
84 ++    /* void            clear_tree_flags(register struct tree *tp); */
85
86 +     char           *snmp_out_toggle_options(char *);
87 +     void            snmp_out_toggle_options_usage(const char *, FILE *);
88 --- a/src/snmp_api.h-patch
89 +++ b/src/snmp_api.h-patch
90 @@ -1,147 +1,100 @@
91 -*** /usr/include/net-snmp/library/snmp_api.h   2003-11-11 08:37:07.000000000 -0800
92 ---- snmp_api.h 2004-03-07 15:02:18.000000000 -0800
93 -***************
94 -*** 82,91 ****
95 -  
96 -      /*
97 -       * The actual transport domain.  This SHOULD NOT BE FREE()D.  
98 --      */
99 -  
100 -      const oid      *tDomain;
101 -      size_t          tDomainLen;
102 -  
103 -      netsnmp_variable_list *variables;
104 -  
105 ---- 82,91 ----
106 -  
107 -      /*
108 -       * The actual transport domain.  This SHOULD NOT BE FREE()D.  
109 -  
110 -      const oid      *tDomain;
111 -      size_t          tDomainLen;
112 -+      */
113 -  
114 -      netsnmp_variable_list *variables;
115 -  
116 -***************
117 -*** 152,158 ****
118 -      /*
119 -       * Authentication function or NULL if null authentication is used 
120 -       */
121 -!     u_char         *(*authenticator) (u_char *, size_t *, u_char *, size_t);
122 -      netsnmp_callback callback;      /* Function to interpret incoming data */
123 -      /*
124 -       * Pointer to data that the callback function may consider important 
125 ---- 152,158 ----
126 -      /*
127 -       * Authentication function or NULL if null authentication is used 
128 -       */
129 -!     /*    u_char         *(*authenticator) (u_char *, size_t *, u_char *, size_t);*/
130 -      netsnmp_callback callback;      /* Function to interpret incoming data */
131 -      /*
132 -       * Pointer to data that the callback function may consider important 
133 -***************
134 -*** 384,391 ****
135 ---- 384,393 ----
136 -  
137 -  #define SNMPERR_MAX                  (-63)
138 -  
139 -+ /*
140 -  #define non_repeaters        errstat
141 -  #define max_repetitions errindex
142 -+ */
143 -  
144 -  struct variable_list {
145 -      struct variable_list *next_variable;    /* NULL for last variable */
146 -***************
147 -*** 410,416 ****
148 -      oid             name_loc[MAX_OID_LEN];  /* 90 percentile < 24. */
149 -      u_char          buf[40];        /* 90 percentile < 40. */
150 -      void           *data;   /* (Opaque) hook for additional data */
151 -!     void            (*dataFreeHook)(void *);       /* callback to free above */
152 -      int             index;
153 -  };
154 -  
155 ---- 412,418 ----
156 -      oid             name_loc[MAX_OID_LEN];  /* 90 percentile < 24. */
157 -      u_char          buf[40];        /* 90 percentile < 40. */
158 -      void           *data;   /* (Opaque) hook for additional data */
159 -!     /*    void            (*dataFreeHook)(void *); */      /* callback to free above */
160 -      int             index;
161 -  };
162 -  
163 -***************
164 -*** 601,608 ****
165 -                                           size_t);
166 -      int             netsnmp_oid_equals(const oid *, size_t, const oid *,
167 -                                         size_t);
168 -!     int             netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
169 -!                                             size_t);
170 -      int             netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
171 -                                             size_t);
172 -      int             netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
173 ---- 603,610 ----
174 -                                           size_t);
175 -      int             netsnmp_oid_equals(const oid *, size_t, const oid *,
176 -                                         size_t);
177 -! /*    int             netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
178 -!                                             size_t);*/
179 -      int             netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
180 -                                             size_t);
181 -      int             netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
182 -***************
183 -*** 619,629 ****
184 ---- 621,633 ----
185 +--- snmp_api.h.orig    Fri Jan  7 17:06:46 2005
186 ++++ snmp_api.h Fri Jan  7 17:10:01 2005
187 +@@ -112,10 +112,10 @@
188
189 +     /**
190 +      * The actual transport domain.  This SHOULD NOT BE FREE()D.  
191 +-     */
192
193 +     const oid      *tDomain;
194 +     size_t          tDomainLen;
195 ++     */
196
197 +     netsnmp_variable_list *variables;
198
199 +@@ -209,7 +209,7 @@
200 +     /**
201 +      * Authentication function or NULL if null authentication is used 
202 +      */
203 +-    u_char         *(*authenticator) (u_char *, size_t *, u_char *, size_t);
204 ++    /* u_char         *(*authenticator) (u_char *, size_t *, u_char *, size_t); */
205 +     /** Function to interpret incoming data */
206 +     netsnmp_callback callback;      
207 +     /**
208 +@@ -487,8 +487,10 @@
209
210 + #define SNMPERR_MAX                   (-63)
211
212 ++/*
213 + #define non_repeaters errstat
214 + #define max_repetitions errindex
215 ++*/
216
217 + typedef union {
218 +    long           *integer;
219 +@@ -530,7 +532,7 @@
220 +    /** (Opaque) hook for additional data */
221 +    void           *data;
222 +    /** callback to free above */
223 +-   void            (*dataFreeHook)(void *);    
224 ++   /* void            (*dataFreeHook)(void *); */
225 +    int             index;
226 + };
227
228 +@@ -721,8 +723,8 @@
229 +                                          size_t);
230 +     int             netsnmp_oid_equals(const oid *, size_t, const oid *,
231 +                                        size_t);
232 +-    int             netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
233 +-                                            size_t);
234 ++/*    int             netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
235 ++                                            size_t);*/
236 +     int             netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
237 +                                            size_t);
238 +     int             netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
239 +@@ -739,11 +741,13 @@
240 +                                         size_t * out_length,
241 +                                         u_char * pdu_data,
242 +                                         size_t pdu_data_len);
243 ++/*
244 +     int             snmpv3_packet_rbuild(netsnmp_session *,
245 +                                          netsnmp_pdu *pdu, u_char * packet,
246                                            size_t * out_length,
247                                            u_char * pdu_data,
248                                            size_t pdu_data_len);
249 -+ /*
250 -      int             snmpv3_packet_rbuild(netsnmp_session *,
251 -                                           netsnmp_pdu *pdu, u_char * packet,
252 -                                           size_t * out_length,
253 -                                           u_char * pdu_data,
254 -                                           size_t pdu_data_len);
255 -+ */
256 -      int             snmpv3_make_report(netsnmp_pdu *pdu, int error);
257 -      int             snmpv3_get_report_type(netsnmp_pdu *pdu);
258 -      int             snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data,
259 -***************
260 -*** 672,677 ****
261 ---- 676,682 ----
262 -       * Extended open; fpre_parse has changed.  
263 -       */
264 -  
265 -+     /*
266 -      netsnmp_session *snmp_open_ex(netsnmp_session *,
267 -                                    int (*fpre_parse) (netsnmp_session *,
268 -                                                       struct
269 -***************
270 -*** 689,694 ****
271 ---- 694,700 ----
272 -                                                    netsnmp_pdu *, u_char **,
273 -                                                    size_t *, size_t *),
274 -                                    int (*fcheck) (u_char *, size_t));
275 -+     */
276 -  
277 -      /*
278 -       * provided for backwards compatability.  Don't use these functions.
279 -***************
280 -*** 770,775 ****
281 ---- 776,782 ----
282 -       * 
283 -       */
284 -  
285 -+     /*
286 -      void           *snmp_sess_add_ex(netsnmp_session *,
287 -                                       struct netsnmp_transport_s *,
288 -                                       int (*fpre_parse) (netsnmp_session *,
289 -***************
290 -*** 836,841 ****
291 ---- 843,849 ----
292 -                                                                  *, void *,
293 -                                                                  size_t)
294 -          );
295 -+     */
296 -  
297 -      /*
298 -       * use return value from snmp_sess_open as void * parameter 
299 ++*/
300 +     int             snmpv3_make_report(netsnmp_pdu *pdu, int error);
301 +     int             snmpv3_get_report_type(netsnmp_pdu *pdu);
302 +     int             snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data,
303 +@@ -793,6 +797,7 @@
304 +      * Extended open; fpre_parse has changed.  
305 +      */
306
307 ++    /*
308 +     netsnmp_session *snmp_open_ex(netsnmp_session *,
309 +                                   int (*fpre_parse) (netsnmp_session *,
310 +                                                      struct
311 +@@ -810,6 +815,7 @@
312 +                                                   netsnmp_pdu *, u_char **,
313 +                                                   size_t *, size_t *),
314 +                                   int (*fcheck) (u_char *, size_t));
315 ++    */
316
317 +     /*
318 +      * provided for backwards compatability.  Don't use these functions.
319 +@@ -891,6 +897,7 @@
320 +      * 
321 +      */
322
323 ++    /*
324 +     void           *snmp_sess_add_ex(netsnmp_session *,
325 +                                      struct netsnmp_transport_s *,
326 +                                      int (*fpre_parse) (netsnmp_session *,
327 +@@ -957,6 +964,7 @@
328 +                                                                 *, void *,
329 +                                                                 size_t)
330 +         );
331 ++    */
332
333 +     /*
334 +      * use return value from snmp_sess_open as void * parameter