Home | History | Annotate | Download | only in windows
      1 /*
      2  * Copyright (C) 2005 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 /*
     18  * Android config -- "CYGWIN_NT-5.1".
     19  *
     20  * Cygwin has pthreads, but GDB seems to get confused if you use it to
     21  * create threads.  By "confused", I mean it freezes up the first time the
     22  * debugged process creates a thread, even if you use CreateThread.  The
     23  * mere presence of pthreads linkage seems to cause problems.
     24  */
     25 #ifndef _ANDROID_CONFIG_H
     26 #define _ANDROID_CONFIG_H
     27 
     28 /*
     29  * ===========================================================================
     30  *                              !!! IMPORTANT !!!
     31  * ===========================================================================
     32  *
     33  * This file is included by ALL C/C++ source files.  Don't put anything in
     34  * here unless you are absolutely certain it can't go anywhere else.
     35  *
     36  * Any C++ stuff must be wrapped with "#ifdef __cplusplus".  Do not use "//"
     37  * comments.
     38  */
     39 
     40 /* MingW doesn't define __BEGIN_DECLS / __END_DECLS. */
     41 
     42 #ifndef __BEGIN_DECLS
     43 #  ifdef __cplusplus
     44 #    define __BEGIN_DECLS extern "C" {
     45 #  else
     46 #    define __BEGIN_DECLS
     47 #  endif
     48 #endif
     49 
     50 #ifndef __END_DECLS
     51 #  ifdef __cplusplus
     52 #    define __END_DECLS }
     53 #  else
     54 #    define __END_DECLS
     55 #  endif
     56 #endif
     57 
     58 /* TODO: replace references to this. */
     59 #define HAVE_WIN32_IPC
     60 
     61 #ifdef __CYGWIN__
     62 #error "CYGWIN is unsupported for platform builds"
     63 #endif
     64 
     65 /*
     66  * Define this if you build against MSVCRT.DLL
     67  */
     68 #define HAVE_MS_C_RUNTIME
     69 
     70 /*
     71  * Define this if we want to use WinSock.
     72  */
     73 #define HAVE_WINSOCK
     74 
     75 /*
     76  * We need to choose between 32-bit and 64-bit off_t.  All of our code should
     77  * agree on the same size.  For desktop systems, use 64-bit values,
     78  * because some of our libraries (e.g. wxWidgets) expect to be built that way.
     79  */
     80 #define _FILE_OFFSET_BITS 64
     81 #define _LARGEFILE_SOURCE 1
     82 
     83 /*
     84  * Add any extra platform-specific defines here.
     85  */
     86 #define WIN32 1                 /* stock Cygwin doesn't define these */
     87 #define _WIN32 1
     88 #define _WIN32_WINNT 0x0500     /* admit to using >= Win2K */
     89 
     90 #define HAVE_WINDOWS_PATHS      /* needed by simulator */
     91 
     92 /*
     93  * The default path separator for the platform
     94  */
     95 #define OS_PATH_SEPARATOR '\\'
     96 
     97 /*
     98  * Various definitions missing in MinGW
     99  */
    100 #ifdef USE_MINGW
    101 #define S_IRGRP 0
    102 #endif
    103 
    104 #endif /*_ANDROID_CONFIG_H*/
    105