~ubuntu-branches/ubuntu/karmic/cyrus-imapd-2.2/karmic

« back to all changes in this revision

Viewing changes to lib/libconfig.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-07-11 18:51:39 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060711185139-gl3oe4tppp7g3euf
Tags: 2.2.13-4ubuntu1
Synchronize with Debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 *
40
40
 */
41
41
 
42
 
/* $Id: libconfig.c,v 1.9 2004/05/22 03:45:54 rjs3 Exp $ */
 
42
/* $Id: libconfig.c,v 1.10 2005/03/23 19:44:59 shadow Exp $ */
43
43
 
44
44
#include <config.h>
45
45
 
96
96
{
97
97
    assert(opt > IMAPOPT_ZERO && opt < IMAPOPT_LAST);
98
98
    assert(imapopts[opt].t == OPT_INT);
99
 
 
 
99
#if (SIZEOF_LONG != 4)
 
100
    if ((imapopts[opt].val.i > 0x7fffffff)||
 
101
        (imapopts[opt].val.i < -0x7fffffff)) {
 
102
        syslog(LOG_ERR, "config_getint: %s: %lld too large for type",
 
103
               imapopts[opt].optname, imapopts[opt].val.i);
 
104
    }
 
105
#endif    
100
106
    return imapopts[opt].val.i;
101
107
}
102
108
 
104
110
{
105
111
    assert(opt > IMAPOPT_ZERO && opt < IMAPOPT_LAST);
106
112
    assert(imapopts[opt].t == OPT_SWITCH);
107
 
    
 
113
#if (SIZEOF_LONG != 4)
 
114
    if ((imapopts[opt].val.b > 0x7fffffff)||
 
115
        (imapopts[opt].val.b < -0x7fffffff)) {
 
116
        syslog(LOG_ERR, "config_getswitch: %s: %lld too large for type", 
 
117
               imapopts[opt].optname, imapopts[opt].val.b);
 
118
    }
 
119
#endif    
108
120
    return imapopts[opt].val.b;
109
121
}
110
122