source: trunk/windows/stdint.h @ 1822

Revision 1452, 1.6 KB checked in by Pedro.vicente, 2 years ago (diff)

refs #205 modified code to run with Visual Studio 2008
tested in: Linux x86_64 (gcc 4.1.2), Windows 7, (VS 2008)
changes are:

NXconvert-------------:

added a getopt.c to /windows as source file

#ifdef _MSC_VER
#include "getopt.h"
#else
#include <unistd.h>
#endif

NXsummary---------------:

added a stdint.h to /windows as source file

#ifdef HAVE_STDINT_H

#include <stdint.h>

#else

#ifdef _MSC_VER

typedef signed int64 int64_t;

typedef unsigned int64 uint64_t;

#endif _MSC_VER

NXtranslate----------------:

replaced
value
with
_value

(value is a VS keyword)

replaced

int dims[rank];

with
int dims[NX_MAXRANK];

MXvalidate---------------------:

replaced
static int mkstemp(char* template)
with
static int mkstemp(char* template_name)

Tclap: StdOutput.h -------------------------:

#if defined (_MSC_VER)

int stringLen = (std::min)( len - start, allowedLen );

#else

int stringLen = std::min( len - start, allowedLen );

#endif

Line 
1/*
2 * Copyright (c) 2010, P.Vicente <pedro.vicente@space-research.org>
3 *               
4 * Permission is hereby granted, free of charge, to any person
5 * obtaining a copy of this software and associated documentation
6 * files (the "Software"), to deal in the Software without
7 * restriction, including without limitation the rights to use, copy,
8 * modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24
25
26#ifndef STD_INT_H
27#define STD_INT_H
28
29typedef signed char             int8_t;
30typedef short int               int16_t;
31typedef int                     int32_t;
32typedef unsigned char           uint8_t;
33typedef unsigned short int      uint16_t;
34typedef unsigned int            uint32_t;
35#ifdef _MSC_VER
36typedef signed __int64          int64_t; 
37typedef unsigned __int64        uint64_t;
38#endif //_MSC_VER
39
40#endif //H5_NEXUS_H
Note: See TracBrowser for help on using the repository browser.