//####COPYRIGHTBEGIN#### // // ---------------------------------------------------------------------------- // Copyright (C) 1998, 1999, 2000 Red Hat, Inc. // // This program is part of the eCos host tools. // // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the Free // Software Foundation; either version 2 of the License, or (at your option) // any later version. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for // more details. // // You should have received a copy of the GNU General Public License along with // this program; if not, write to the Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // // ---------------------------------------------------------------------------- // //####COPYRIGHTEND#### //#####DESCRIPTIONBEGIN#### // // Author(s): sdf // Contributors: sdf // Date: 1999-04-01 // Description: Standard include file - include file // Usage: // //####DESCRIPTIONEND#### // ---------------------------------------------------------------------------- // This header sets us up with what is generally needed, both for WIN32 and UNIX // Apart from header includes it defines the time-related quantities: // Time - type to measure an absolute time // Duration - type to measure the difference between two times, or a delay // Now() - the time now. // MIN and MAX // LogFunc - a function to which output can be sent // ---------------------------------------------------------------------------- #if !defined(AFX_STDAFX_H__F20BA9C4_CFD5_11D2_BF75_00A0C949ADAC__INCLUDED_) #define AFX_STDAFX_H__F20BA9C4_CFD5_11D2_BF75_00A0C949ADAC__INCLUDED_ #if defined(__CYGWIN__) #include #include #include #include #include #define cPathsep '/' #include // malloc #include // atoi #include #define WOULDBLOCK WSAEWOULDBLOCK #include "wcharunix.h" #include #define _stat stat typedef long long Time; #define MODE_TEXT #include #elif defined(_WIN32) #ifdef _UNICODE #ifndef UNICODE #define UNICODE // UNICODE is used by Windows headers #endif #endif #include #undef NDEBUG #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #include #ifndef _WINDOWS_ #include #endif #include #define cPathsep _TCHAR('\\') #include #include #include // _heapchk #define CALLBACK __stdcall // Calling conventions for a callback #define WOULDBLOCK WSAEWOULDBLOCK // "Would blocking" error #define errno (*_errno()) #define vsnprintf _vsnprintf #pragma warning (disable:4710) // Not inlined warning typedef __int64 Time; #define MODE_TEXT _T("t") #else // UNIX #include #include #include #include #include #include // socket etc... #include // inet_addr #include // inet_addr #include // gethostbyname #include #include #define cPathsep '/' #include // malloc #include // atoi #include #define WOULDBLOCK EWOULDBLOCK #define CALLBACK #include "wcharunix.h" #include #define _stat stat typedef long long Time; #define MODE_TEXT #endif #define ECOS_VERSION "2.net" typedef int Duration; extern Time Now(); // do not use macros, which would lead to double argument evaluation: extern int MIN(int a, int b); extern int MAX(int a, int b); #include #include #include #include #include #include #include #include #include #include #include // vsnprintf #include // assert #include // strcpy #include #include // Allow user to define a function to which logged output is sent (in addition to being stored internally) typedef void (CALLBACK LogFunc)(void *, LPCTSTR ); #endif