/[packages]/cauldron/dhcp/current/SOURCES/dhcp-4.3.0-64_bit_lease_parse.patch
ViewVC logotype

Diff of /cauldron/dhcp/current/SOURCES/dhcp-4.3.0-64_bit_lease_parse.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

cauldron/dhcp/current/SOURCES/dhcp-4.2.4-64_bit_lease_parse.patch revision 636123 by pterjan, Thu Jan 17 21:30:27 2013 UTC cauldron/dhcp/current/SOURCES/dhcp-4.3.0-64_bit_lease_parse.patch revision 636554 by luigiwalser, Sun Jun 15 15:59:35 2014 UTC
# Line 1  Line 1 
1  diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-4.2.4b1/common/parse.c  --- dhcp-4.3.0/common/parse.c.64-bit_lease_parse        2014-01-31 14:20:49.000000000 -0500
2  --- dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse      2012-03-09 12:28:10.000000000 +0100  +++ dhcp-4.3.0/common/parse.c   2014-06-15 11:48:48.559669323 -0400
3  +++ dhcp-4.2.4b1/common/parse.c 2012-04-16 17:30:55.867045149 +0200  @@ -932,8 +932,8 @@ TIME
 @@ -906,8 +906,8 @@ TIME  
4   parse_date_core(cfile)   parse_date_core(cfile)
5          struct parse *cfile;          struct parse *cfile;
6   {   {
# Line 12  diff -up dhcp-4.2.4b1/common/parse.c.64- Line 11  diff -up dhcp-4.2.4b1/common/parse.c.64-
11          const char *val;          const char *val;
12          enum dhcp_token token;          enum dhcp_token token;
13          static int months[11] = { 31, 59, 90, 120, 151, 181,          static int months[11] = { 31, 59, 90, 120, 151, 181,
14  @@ -933,7 +933,7 @@ parse_date_core(cfile)  @@ -959,7 +959,7 @@ parse_date_core(cfile)
15                  }                  }
16    
17                  token = next_token(&val, NULL, cfile); /* consume number */                  skip_token(&val, NULL, cfile); /* consume number */
18  -               guess = atoi(val);  -               guess = atoi(val);
19  +               guess = atol(val);  +               guess = atol(val);
20    
21                  return((TIME)guess);                  return((TIME)guess);
22          }          }
23  @@ -961,7 +961,7 @@ parse_date_core(cfile)  @@ -987,7 +987,7 @@ parse_date_core(cfile)
24             somebody invents a time machine, I think we can safely disregard             somebody invents a time machine, I think we can safely disregard
25             it.   This actually works around a stupid Y2K bug that was present             it.   This actually works around a stupid Y2K bug that was present
26             in a very early beta release of dhcpd. */             in a very early beta release of dhcpd. */
# Line 30  diff -up dhcp-4.2.4b1/common/parse.c.64- Line 29  diff -up dhcp-4.2.4b1/common/parse.c.64-
29          if (year > 1900)          if (year > 1900)
30                  year -= 1900;                  year -= 1900;
31    
32  @@ -985,7 +985,7 @@ parse_date_core(cfile)  @@ -1011,7 +1011,7 @@ parse_date_core(cfile)
33                  return((TIME)0);                  return((TIME)0);
34          }          }
35          token = next_token(&val, NULL, cfile); /* consume month */                skip_token(&val, NULL, cfile); /* consume month */      
36  -       mon = atoi(val) - 1;  -       mon = atoi(val) - 1;
37  +       mon = atol(val) - 1;  +       mon = atol(val) - 1;
38    
39          /* Slash separating month from day... */          /* Slash separating month from day... */
40          token = peek_token(&val, NULL, cfile);          token = peek_token(&val, NULL, cfile);
41  @@ -1007,7 +1007,7 @@ parse_date_core(cfile)  @@ -1033,7 +1033,7 @@ parse_date_core(cfile)
42                  return((TIME)0);                  return((TIME)0);
43          }          }
44          token = next_token(&val, NULL, cfile); /* consume day of month */          skip_token(&val, NULL, cfile); /* consume day of month */
45  -       mday = atoi(val);  -       mday = atoi(val);
46  +       mday = atol(val);  +       mday = atol(val);
47    
48          /* Hour... */          /* Hour... */
49          token = peek_token(&val, NULL, cfile);          token = peek_token(&val, NULL, cfile);
50  @@ -1018,7 +1018,7 @@ parse_date_core(cfile)  @@ -1044,7 +1044,7 @@ parse_date_core(cfile)
51                  return((TIME)0);                  return((TIME)0);
52          }          }
53          token = next_token(&val, NULL, cfile); /* consume hour */          skip_token(&val, NULL, cfile); /* consume hour */
54  -       hour = atoi(val);  -       hour = atoi(val);
55  +       hour = atol(val);  +       hour = atol(val);
56    
57          /* Colon separating hour from minute... */          /* Colon separating hour from minute... */
58          token = peek_token(&val, NULL, cfile);          token = peek_token(&val, NULL, cfile);
59  @@ -1040,7 +1040,7 @@ parse_date_core(cfile)  @@ -1066,7 +1066,7 @@ parse_date_core(cfile)
60                  return((TIME)0);                  return((TIME)0);
61          }          }
62          token = next_token(&val, NULL, cfile); /* consume minute */          skip_token(&val, NULL, cfile); /* consume minute */
63  -       min = atoi(val);  -       min = atoi(val);
64  +       min = atol(val);  +       min = atol(val);
65    
66          /* Colon separating minute from second... */          /* Colon separating minute from second... */
67          token = peek_token(&val, NULL, cfile);          token = peek_token(&val, NULL, cfile);
68  @@ -1062,13 +1062,13 @@ parse_date_core(cfile)  @@ -1088,13 +1088,13 @@ parse_date_core(cfile)
69                  return((TIME)0);                  return((TIME)0);
70          }          }
71          token = next_token(&val, NULL, cfile); /* consume second */          skip_token(&val, NULL, cfile); /* consume second */
72  -       sec = atoi(val);  -       sec = atoi(val);
73  +       sec = atol(val);  +       sec = atol(val);
74    
75          tzoff = 0;          tzoff = 0;
76          token = peek_token(&val, NULL, cfile);          token = peek_token(&val, NULL, cfile);
77          if (token == NUMBER) {          if (token == NUMBER) {
78                  token = next_token(&val, NULL, cfile); /* consume tzoff */                  skip_token(&val, NULL, cfile); /* consume tzoff */
79  -               tzoff = atoi(val);  -               tzoff = atoi(val);
80  +               tzoff = atol(val);  +               tzoff = atol(val);
81          } else if (token != SEMI) {          } else if (token != SEMI) {
82                  token = next_token(&val, NULL, cfile);                  skip_token(&val, NULL, cfile);
83                  parse_warn(cfile,                  parse_warn(cfile,

Legend:
Removed from v.636123  
changed lines
  Added in v.636554

  ViewVC Help
Powered by ViewVC 1.1.30