1// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_ 6#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_ 7 8#if !defined(CLD_WINDOWS) 9 10//#include "cld/base/strtoint.h" 11 12#else 13 14#include <stdlib.h> 15 16#include "encodings/compact_lang_det/win/cld_basictypes.h" 17 18// This implementation is not as good as the one in base/strtoint.h, 19// but it's sufficient for our purposes. 20inline int32 strto32(const char *nptr, char **endptr, int base) { 21 return static_cast<int32>(strtol(nptr, endptr, base)); 22} 23 24#endif 25 26#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_ 27