⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 war.h

📁 ftpserver very good sample
💻 H
字号:
#ifndef WAR_H#define WAR_H#if defined(DEBUG) || defined(_DEBUG)#   ifndef DEBUG#       define DEBUG#   endif#   ifndef _DEBUG#       define _DEBUG#   endif#endif#ifdef WIN32#   if defined(UNICODE) && !defined(_UNICODE)#       define _UNICODE 1#   endif#   if defined(UNICODE) && !defined(WAR_WINNT)#       define WAR_WINNT 1#   endif#   define HAVE_STRICMP 1#   define HAVE_STRNICMP 1#   define HAVE_WINSOCK 1#   define HAVE_LOCALE 1#   define HAVE_STRING_H 1#   define HAVE_DECL_GETENV 1#   define HAVE_LIMITS_H 1#endif#ifdef HAVE_CONFIG_H#   include "config.h"#   if !defined(HAVE_LIBSSL)#       if WAR_CRYPTO#           error "You must install openssl or disable encryption!"#       else#           define WAR_CRYPTO 0#       endif#   endif#endif// Include header for custom modifications#include "war_custom.h"#ifndef WAR_DEBUG_PREFIX#   ifdef DEBUG#       define WAR_DEBUG_PREFIX _T("debug_")#       ifdef WIN32#           define WAR_DEBUG_PREFIXL L"debug_"#       endif#   else#       define WAR_DEBUG_PREFIX#       define WAR_DEBUG_PREFIXL#   endif#endif/* The WAR_VERSION is the major version number.   This should only be changed by the FTP engine   maintainer, and inherited (or at least be available)   by programs derived from this implementation.    The WAR_VERSION number will make the version   trackable in the bugtracking system, and return the   correct files from the CVS server.*/#ifndef WAR_VERSION#   define WAR_VERSION "3.01.12"#endif#ifndef WAR_LIBRARY_VERSION#   define WAR_LIBRARY_VERSION "warlib-" WAR_VERSION#endif#ifndef WAR_LIBRARY_NAME#   define WAR_LIBRARY_NAME "War generic C++ library"#endif#ifndef WAR_VENDOR#   define WAR_VENDOR _T("jgaa")#endif#ifndef WAR_LIBRARY_COPYRIGHT#   define WAR_LIBRARY_COPYRIGHT \        "Copyright (C) 1996 - 2001 Jarle (jgaa) Aase\n"\        "This library is free software; you can redistribute it and/or\n"\        "modify it under the terms of the GNU Lesser General Public\n"\        "License as published by the Free Software Foundation; either\n"\        "version 2.1 of the License, or (at your option) any later version.\n"#endif#define WAR_STDIO_H_INCLUDED#include <stdio.h>#ifdef HAVE_TIME_H#   define WAR_TIME_H_INCLUDED#   include <time.h>#endif#ifdef HAVE_SYS_TIME_H#   define WAR_SYS_TIME_H_INCLUDED#   include <sys/time.h>#endif#ifdef HAVE_SYS_TIMEB_H#   define WAR_SYS_TIMEB_H_INCLUDED#   include <sys/timeb.h>#endif#ifdef HAVE_SYS_TYPES_H#   define WAR_SYS_TYPES_H_INCLUDED#   include <sys/types.h>#endif#ifdef HAVE_UNISTD_H#   define WAR_UNISTD_H_INCLUDED#   include <unistd.h>#endif#ifdef WIN32#   define WAR_TCHAR_H_INCLUDED#   include <tchar.h>#endif#ifdef __cplusplus#ifndef WAR_STRING_INCLUDED#   define WAR_STRING_INCLUDED#   include <string>#endif#ifndef WAR_IOSTREAM_INCLUDED#   define WAR_IOSTREAM_INCLUDED#   include <iostream>#endif#define WarMax(a,b) ((a > b) ? a : b)#define WarMin(a,b) ((a < b) ? a : b)#ifdef UNICODE#   define WAR_CERR wcerr#   define WAR_COUT wcout#else#   define WAR_CERR cerr#   define WAR_COUT cout#endif#endif /* __cplusplus */#ifndef WAR_PATHSTRICMP#   ifdef UNICODE#       define WAR_PATHSTRICMP wcsicmp#   else#       define WAR_PATHSTRICMP strcmp#   endif#endif#ifndef WAR_PATHSTRCMP#   ifdef UNICODE#       define WAR_PATHSTRCMP wcscmp#   else#       define WAR_PATHSTRCMP strcmp#   endif#endif#ifndef WAR_PATHSTRNICMP#   ifdef UNICODE#       define WAR_PATHSTRNICMP wcsnicmp#   else#       define WAR_PATHSTRNICMP strnicmp#   endif#endif#ifndef HAVE_STRICMP#   ifdef HAVE_STRCASECMP#       define stricmp strcasecmp#   else#       error "No stricmp() substitute!"#   endif#endif#ifndef HAVE_STRNICMP#   ifdef HAVE_STRNCASECMP#       define strnicmp strncasecmp#   else#       error "No strnicmp() substitute!"#   endif#endif/* RFC's to enable. *  * The default is to enable all implemented RFC's, * - but for a minimalistic server it may be  * useful to disable the less widespread extensions. */// FILE TRANSFER PROTOCOL#ifndef WAR_RFC959#   define WAR_RFC959   1 // Must be enabled!!#endif// Feature negotiation mechanism#ifndef WAR_RFC2389#   define WAR_RFC2389  1#endif// FTP Security Considerations#ifndef WAR_RFC2577#   define WAR_RFC2577  1#endif// Internationalization of the File Transfer Protocol#ifndef WAR_RFC2640#   define WAR_RFC2640 1 #   if !defined(WAR_RFC2389)#       error "WAR_RFC2389 must be enabled in order to use WAR_RFC2640"#   endif#endif#if !WAR_RFC959#   error "RFC959 is requiered to implement the FTP protocol!"#endif// Cryptographic support. If enabled, we can encrypt// sensitive information (like passwords) in configuration// files, as well as use cryptographic protocols like SSL// WFDE use the OpenSSL (www.openssl.org) libraries#ifndef WAR_CRYPTO#   define WAR_CRYPTO 1#endif// HHTP protocol#ifndef WAR_RFC2068#   define WAR_RFC2068 1#endif#ifndef WAR_USE_WEBADM//	Use webadm by default if the http server code is enabled#	define WAR_USE_WEBADM WAR_RFC2068#endif// Scripring support trough the Python interpereter// See www.python.org// The webadm interface depend on this for server-side// scripting.#ifndef WAR_USE_PYTHON#	define WAR_USE_PYTHON 1#endif#if WAR_USE_WEBADM && (!WAR_RFC2068 || !WAR_USE_PYTHON)#	error "Cannot use webadm without http support and the Python interpeterer!"#endif#if __GNUC__    #define WAR_CPP_INTERFACE #pragma interface    #define WAR_CPP_IMPLEMENTATION #pragma implementation#endif#ifndef WAR_CPPT_DECL#   define WAR_CPPT_DECL extern template class#endif#ifndef WAR_CPPT_IMPL#   define WAR_CPPT_IMPL template class #endif#ifndef WAR_CPPTF_IMPL#   define WAR_CPPTF_IMPL template #endif#endif // WAR_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -