summaryrefslogtreecommitdiff
path: root/cpp/include/IceUtil/InputUtil.h
blob: 9f9f47a80fbb62d14328ee37505a29a1ab2ee123 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// **********************************************************************
//
// Copyright (c) 2001
// MutableRealms, Inc.
// Huntsville, AL, USA
//
// All Rights Reserved
//
// **********************************************************************

#ifndef ICE_UTIL_INPUT_UTIL_H
#define ICE_UTIL_INPUT_UTIL_H

#include <IceUtil/Config.h>
#include <string>
#include <limits.h>

namespace IceUtil
{

#if defined(_WIN32)
    typedef __int64 Int64;
    const Int64 INT64MIN = -9223372036854775808i64;
    const Int64 INT64MAX =  9223372036854775807i64;
#elif defined(__linux__) && defined(i386)
    typedef long long Int64;
    const Int64 INT64MIN = LONGLONG_MIN;
    const Int64 INT64MAX = LONGLONG_MAX;
#else
#   error "Unsupported operating system or platform!"
#endif

ICE_UTIL_API Int64 strToInt64(const char*, char**, int);
ICE_UTIL_API bool stringToInt64(const std::string&, Int64&, std::string::size_type&);

}

#endif