Changeset 3eedfa6 in nscp
- Timestamp:
- 11/12/09 23:32:23 (4 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- d05c3f0
- Parents:
- 818b54e
- Files:
-
- 3 edited
-
include/settings/settings_ini.hpp (modified) (2 diffs)
-
include/simpleini/simpleini.h (modified) (4 diffs)
-
service/CMakeLists.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
include/settings/settings_ini.hpp
rb21f30b r3eedfa6 4 4 #include <map> 5 5 #include <settings/Settings.h> 6 6 7 #include <simpleini/simpleini.h> 7 8 #include <error.hpp> … … 227 228 if (_wfopen_s(&fp, filename.c_str(), L"rb") != 0) 228 229 return false; 230 #elif WIN32 231 fp = _wfopen(filename.c_str(), L"rb"); 229 232 #else 230 fp = _wfopen(filename.c_str(), L"rb");233 fp = fopen(to_string(filename).c_str(), "rb"); 231 234 #endif 232 235 if (!fp) -
include/simpleini/simpleini.h
r818b54e r3eedfa6 252 252 #endif // _WIN32 253 253 254 #define SI_CONVERT_ICU255 256 254 #if defined(SI_CONVERT_ICU) 257 255 # include <unicode/ustring.h> … … 264 262 # define SI_HAS_WIDE_FILE 265 263 # define SI_WCHAR_T UChar 264 #else 265 # define SI_HAS_WIDE_FILE 266 # define SI_WCHAR_T wchar_t 266 267 #endif 267 268 … … 1128 1129 fclose(fp); 1129 1130 return rc; 1131 #else //_WIN32 1132 #if SI_CONVERT_ICU 1133 char szFile[256]; 1134 u_austrncpy(szFile, a_pwszFile, sizeof(szFile)); 1135 return LoadFile(szFile); 1130 1136 #else // SI_CONVERT_ICU 1131 char szFile[256]; 1132 u_austrncpy(szFile, a_pwszFile, sizeof(szFile)); 1133 return LoadFile(szFile); 1134 #endif 1137 return LoadFile(to_string(std::wstring(a_pwszFile)).c_str()); 1138 #endif // SI_CONVERT_ICU 1139 #endif //_WIN32 1135 1140 } 1136 1141 #endif // SI_HAS_WIDE_FILE … … 1944 1949 fclose(fp); 1945 1950 return rc; 1951 #else // _WIN32 1952 #ifdef SI_CONVERT_ICU 1953 char szFile[256]; 1954 u_austrncpy(szFile, a_pwszFile, sizeof(szFile)); 1955 return SaveFile(szFile, a_bAddSignature); 1946 1956 #else // SI_CONVERT_ICU 1947 char szFile[256]; 1948 u_austrncpy(szFile, a_pwszFile, sizeof(szFile)); 1949 return SaveFile(szFile, a_bAddSignature); 1950 #endif 1957 return SaveFile(to_string(std::wstring(a_pwszFile)).c_str(), a_bAddSignature); 1958 #endif // SI_CONVERT_ICU 1959 #endif // _WIN32 1951 1960 } 1952 1961 #endif // SI_HAS_WIDE_FILE -
service/CMakeLists.txt
r818b54e r3eedfa6 2 2 3 3 PROJECT(NSCP) 4 SET(CMAKE_MODULE_PATH ${NSCP_SOURCE_DIR})4 #SET(CMAKE_MODULE_PATH ${NSCP_SOURCE_DIR}) 5 5 6 6 SET(VERSION_SERIES 0) … … 62 62 ENDIF(WIN32) 63 63 64 find_package(Boost COMPONENTS system filesystem thread REQUIRED) 64 #SET(CMAKE_MODULE_PATH "../cmake/") 65 FIND_PACKAGE(Boost COMPONENTS system filesystem thread REQUIRED) 65 66 66 67 #INCLUDE(../cmake/WtFindBoost.txt) 67 68 #INCLUDE(../cmake/WtFindAsio.txt) 68 69 INCLUDE(../cmake/WtFindSsl.txt) 70 #INCLUDE(../cmake/FindICU.cmake) 71 72 #IF(NOT WIN32) 73 # FIND_PACKAGE(ICU REQUIRED) 74 # IF(NOT ICU_FOUND) 75 # MESSAGE(FATAL_ERROR "ICU package not found..") 76 # ELSE(NOT ICU_FOUND) 77 # ADD_DEFINITIONS( -DSI_CONVERT_ICU ) 78 # ENDIF(NOT ICU_FOUND) 79 #ENDIF(NOT WIN32) 80 81 IF(NOT WIN32) 82 FIND_PACKAGE(Threads REQUIRED) 83 IF (NOT CMAKE_USE_PTHREADS_INIT) 84 message(FATAL_ERROR "Could not find POSIX threads") 85 ELSE (NOT CMAKE_USE_PTHREADS_INIT) 86 #add_definitions(-D_REENTRANT) 87 ENDIF (NOT CMAKE_USE_PTHREADS_INIT) 88 FIND_PACKAGE(Threads REQUIRED) 89 ENDIF(NOT WIN32) 90 91 69 92 70 93 # Boost is used nearly everywhere, so we can put these here … … 105 128 ../include/NSCHelper.cpp 106 129 ../include/arrayBuffer.cpp 130 ../include/simpleini/ConvertUTF.c 107 131 # ../include/ServiceCmd.cpp 108 132 ../include/b64/b64.c … … 112 136 ${Boost_FILESYSTEM_LIBRARY} 113 137 ${Boost_LIBRARIES} 138 ${CMAKE_THREAD_LIBS_INIT} 114 139 ${EXTRA_LIBS} 115 140 )
Note: See TracChangeset
for help on using the changeset viewer.








