github.com/cellofellow/gopkg@v0.0.0-20140722061823-eec0544a62ad/database/leveldb.chai2010/include/port/port.h (about) 1 // Copyright (c) 2011 The LevelDB 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. See the AUTHORS file for names of contributors. 4 5 #ifndef STORAGE_LEVELDB_PORT_PORT_H_ 6 #define STORAGE_LEVELDB_PORT_PORT_H_ 7 8 #include <string.h> 9 10 #if defined _WIN32 || defined __CYGWIN__ 11 # define LEVELDB_PLATFORM_WINDOWS 12 # define SNAPPY 13 #else 14 # define LEVELDB_PLATFORM_POSIX 15 # define SNAPPY 16 #endif 17 18 // Include the appropriate platform specific file below. If you are 19 // porting to a new platform, see "port_example.h" for documentation 20 // of what the new port_<platform>.h file must provide. 21 #if defined(LEVELDB_PLATFORM_POSIX) 22 # include "port/port_posix.h" 23 #elif defined(LEVELDB_PLATFORM_CHROMIUM) 24 # include "port/port_chromium.h" 25 #elif defined(LEVELDB_PLATFORM_WINDOWS) 26 # include "port/port_windows.h" 27 #else 28 # error unknown platform 29 #endif 30 31 #endif // STORAGE_LEVELDB_PORT_PORT_H_