OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [tools/] [Utils/] [common/] [eCosStd.h] - Blame information for rev 790

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
2
// -------------------------------------------                              
3
// This file is part of the eCos host tools.                                
4
// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
5
//
6
// This program is free software; you can redistribute it and/or modify     
7
// it under the terms of the GNU General Public License as published by     
8
// the Free Software Foundation; either version 2 or (at your option) any   
9
// later version.                                                           
10
//
11
// This program is distributed in the hope that it will be useful, but      
12
// WITHOUT ANY WARRANTY; without even the implied warranty of               
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        
14
// General Public License for more details.                                 
15
//
16
// You should have received a copy of the GNU General Public License        
17
// along with this program; if not, write to the                            
18
// Free Software Foundation, Inc., 51 Franklin Street,                      
19
// Fifth Floor, Boston, MA  02110-1301, USA.                                
20
// -------------------------------------------                              
21
// ####ECOSHOSTGPLCOPYRIGHTEND####                                          
22
//#####DESCRIPTIONBEGIN####
23
//
24
// Author(s):     sdf
25
// Contributors:  sdf
26
// Date:          1999-04-01
27
// Description:   Standard include file - include file
28
// Usage:
29
//
30
//####DESCRIPTIONEND####
31
 
32
// ----------------------------------------------------------------------------
33
// This header sets us up with what is generally needed, both for WIN32 and UNIX
34
// Apart from header includes it defines the time-related quantities:
35
//     Time     - type to measure an absolute time
36
//     Duration - type to measure the difference between two times, or a delay
37
//     Now()    - the time now.
38
//     MIN and MAX
39
//     LogFunc  - a function to which output can be sent
40
// ----------------------------------------------------------------------------
41
 
42
#if !defined(AFX_STDAFX_H__F20BA9C4_CFD5_11D2_BF75_00A0C949ADAC__INCLUDED_)
43
#define AFX_STDAFX_H__F20BA9C4_CFD5_11D2_BF75_00A0C949ADAC__INCLUDED_
44
 
45
#if defined(__CYGWIN__)
46
  #include <winsock2.h>
47
  #include <winsock.h>
48
  #include <unistd.h>
49
  #include <process.h>
50
  #include <signal.h>
51
  #define cPathsep '/'
52
 
53
  #include <malloc.h>     // malloc
54
  #include <stdlib.h>     // atoi
55
  #include <errno.h>
56
  #define WOULDBLOCK WSAEWOULDBLOCK
57
 
58
  #include "wcharunix.h"
59
  #include <sys/time.h>
60
 
61
  #define _stat stat
62
 
63
  typedef long long Time;
64
  #define MODE_TEXT
65
 
66
  #include <windows.h>
67
 
68
#elif defined(_WIN32)
69
  #ifdef _UNICODE
70
    #ifndef UNICODE
71
      #define UNICODE         // UNICODE is used by Windows headers
72
    #endif
73
  #endif
74
 
75
  #include <tchar.h>
76
  #undef NDEBUG
77
 
78
  #if _MSC_VER > 1000
79
    #pragma once
80
  #endif // _MSC_VER > 1000
81
 
82
  #define VC_EXTRALEAN          // Exclude rarely-used stuff from Windows headers
83
 
84
  #include <winsock2.h>
85
  #ifndef _WINDOWS_
86
    #include <windows.h>
87
  #endif
88
  #include <direct.h>
89
  #define cPathsep _TCHAR('\\')
90
  #include <io.h>
91
  #include <process.h>
92
 
93
  #include <malloc.h> // _heapchk
94
 
95
  #define CALLBACK    __stdcall               // Calling conventions for a callback
96
  #define WOULDBLOCK WSAEWOULDBLOCK           // "Would blocking" error
97
  #define errno       (*_errno())
98
  #define vsnprintf _vsnprintf
99
  #pragma warning (disable:4710)  // Not inlined warning
100
  typedef __int64 Time;
101
  #define MODE_TEXT _T("t")
102
#else // UNIX
103
  #include <termios.h>
104
  #include <unistd.h>
105
  #include <sys/wait.h>
106
  #include <dirent.h>
107
  #include <sys/file.h>
108
  #include <sys/socket.h> // socket etc...
109
  #include <netinet/in.h> // inet_addr
110
  #include <arpa/inet.h>  // inet_addr
111
  #include <netdb.h>      // gethostbyname
112
  #include <sys/timeb.h>
113
  #include <signal.h>
114
  #define cPathsep '/'
115
 
116
  #include <malloc.h>     // malloc
117
  #include <stdlib.h>     // atoi
118
  #include <errno.h>
119
  #define WOULDBLOCK EWOULDBLOCK
120
  #define CALLBACK
121
 
122
  #include "wcharunix.h"
123
  #include <sys/time.h>
124
 
125
  #define _stat stat
126
 
127
  typedef long long Time;
128
  #define MODE_TEXT
129
#endif
130
 
131
#define ECOS_VERSION "3.net"
132
 
133
typedef int Duration;
134
 
135
extern Time Now();
136
 
137
// do not use macros, which would lead to double argument evaluation:
138
extern int MIN(int a, int b);
139
extern int MAX(int a, int b);
140
 
141
#include <string.h>
142
 
143
#include <time.h>
144
#include <sys/stat.h>
145
#include <sys/types.h>
146
#include <ctype.h>
147
#include <fcntl.h>
148
#include <assert.h>
149
#include <malloc.h>
150
#include <stdlib.h>
151
#include <time.h>
152
#include <stdarg.h>     // vsnprintf
153
 
154
#include <assert.h> // assert
155
#include <string.h> // strcpy
156
#include <stdarg.h>
157
#include <stdio.h>
158
 
159
// Allow user to define a function to which logged output is sent (in addition to being stored internally)
160
typedef void (CALLBACK LogFunc)(void *, LPCTSTR );
161
 
162
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.