全部博文(512)
分类: LINUX
2006-11-08 09:21:13
x86 平台上的 Linux到 SPARC 平台上的 Solaris的说明
由于目前没有 Solaris开发环境,移植过程,主要是参考本文档的说明。具体是对函数调用、字节序列、数据类型、内存对齐等方面进行移植,然后等开发环境准备好后,再进行测试确认。由于一些问题需要对solaris和SPARC系统环境进行测试,才能够明确系统性能、特点。希望尽快提供Solaris环境。 下面是通过查阅资料获得的一些关于从x86 平台上的 Linux到 SPARC 平台上的
Solaris移植说明。
1.1、
安装gcc4.0和调试gdb6.3。编译器也可以选择SUN Studio。具体要看测试时候的问题。用为在linux下采用的是gcc4.0,所以在solaris下,先考虑它。
2.1、
针对sparc体系和solaris,修改编译选项。
2.2、
测试ultra 10 是否支持32位
2.3、
测试其他编译选项。参看后面面附录
从x86 平台上的 Linux到 SPARC 平台上的 Solaris。因为用程序目前是 32 位的,那么还要考虑将应用程序移植到 64 位。不过,不需要 64 位功能的 32 位应用程序应该保持 32 位。涉及迁移到 64 位的任何移植工作都应该分为两步:首先,以 32 位形式迁移到目标平台,然后才能迁移到 64 位。否则,因为平台迁移导致的问题很容易与因为迁移到 64 位导致的问题混淆。也就是说,如果应用程序可以满足下列条件,则应该移植到 64 位:
·
受益于大于 4GB 的虚拟地址空间。
·
受益于更多的物理内存(大于
4GB),同时用户可能在拥有大于 4GB 的物理内存的系统中进行部署。
·
受益于 64 位序列长度。
·
受益于完整 64 位注册,以便进行有效的 64 位运算。
·
使用大于 2GB 的文件。
应用程序可以保持 32 位,同时仍旧在 64 位 Solaris on SPARC上运行,但是SPARC 不知道是否支持32位运行,需要测试,目前不能确定。如果支持32位,则先移植32位,再移植到64位。如果不支持,则只能一次移到64位。
4.1、
32位到64位
如果是从IA32直接移植到SPARC64上,要重点考虑一下问题。
l 数据类型问题,特别注意 指针大小变为8个字节(原先是4)。长整形long 变为8个字节(原先是4)。另外long double 变为16(原先是12)
l 要考虑字节对齐问题。特别是Double、long、指针。Struct结构
4.2、 Endianness 字节序
在将应用程序从一种架构类型迁移至另一种架构类型的过程中,经常会遇到字节排列顺序(endianness)问题。字节排列顺序是数据元素及其单个字节在内存中存储和表示时的顺序。有两类字节排列顺序:big-endian 和 little-endian。对于 big-endian 处理器,如 SPARC,在将字放在内存中时,是从最低位地址开始的,首先放入最重要的字节。另一方面,对于 little-endian 处理器,如 Intel 和 Alpha 处理器,首先放入的是最不重要的字节。
因为 Inter构架litle-endian的,SPARC 架构是 big-endian 的,所以在平台之间移植应用程序时,会存在字符排列顺序问题。
要注意几个问题是,网络字节序列也是大字序,所以不需要转换,磁盘数据到内存后的转转换(需要测试,目前不很清楚)。另外,出现字节排列顺序问题的原因之一是不一致的数据引用。它经常表现为由于数据元素转换、使用联合数据结构或使用和操作位域导致数据类型不匹配。
一些Linux系统调用和库函数可能不能用于Solaris中。
l Solaris 中的 Dirent 结构与 Linux 中的不同
中的 Dirent 结构
typedef struct dirent { ino_t
d_ino; /* "inode number" of entry */ off_t
d_off; /* offset of disk directory entry */ unsigned
short d_reclen; /* length of this record */ char
d_name[1]; /* name of file */ } dirent_t; |
中的 Dirent 结构
struct dirent { #ifndef __USE_FILE_OFFSET64 __ino_t
d_ino; __off_t
d_off; #else __ino64_t
d_ino; __off64_t
d_off; #endif unsigned
short int d_reclen; unsigned
char d_type; char
d_name[256]; }; |
l
regexp()
和 regcmp()
:
Solaris 中的例程 regexp()
和 regcmp()
在 Linux
l
文件系统接口例程
Solaris 文件系统例程使用 vfstab 结构,函数名中包含 vfs,如 getvfsent。Linux 提供等同的接口,但是例程使用 fstab 结构,例程名称中包含 fs,如 getfsent。Solaris 中的 vfstab 结构是在 /usr/include/sys/vfstab.h 中定义的。Linux 中的 fstab 则是在 /usr/include/fstab.h 中定义的。
l
Device Information Library
Functions (libdevinfo):
libdevinfo 库包含一组接口,用于访问设备配置数据,如主号码和辅助号码。标准
Linux 安装不支持这一点。
l
CPU Affinity
在默认情况下,多处理器系统中的进程在多个 CPU 之间跳来跳去。在某些情况下,通过明确地将进程绑定到特定 CPU(分配 CPU 亲和力)可以提高性能。Solaris 中 CPU 亲和力的系统调用与 Linux 中的不同。
l
相关的一些函数
n
Getdents -> Getdents读取目录条目,并以单独格式将其放入文件系统中。Linux 中的 Dirent 结构与 Solaris 中的不同
n
_llseek –> llseek 移动扩展读/写文件指针
n
Msgrcv- -->msgrcv
消息接收操作。Linux 在其一个参数中使用 struct
msgbuf 类型
n
Open-> open、openat: 打开文件。openat() 不能在 Linux 中使用
n
sched_setaffinity -> processor_bind
. 将 LWP 绑定到处理器
n
rename -> rename、renameat
n
sched_yield-> yield 放弃对其他轻量级进程的执行
信号用于向进程或线程通知特定事件。对于 Solaris,SIGSTOP 的信号编号是 23,但是对于 Linux,其信号编号则为 19。/usr/include/bits/signum 中可以找到 Linux 上的信号编号定义。有关 Linux 信号的完整列表,包括每个信号的简短描述及发出信号时的默认行为,请通过调用下列命令查看 Section 7 中的信号手册:
l
对于 Linux,SIGPWR 的默认操作是终止进程,而在 Solaris 中则忽略该操作。
l
Solaris 支持下列信号, Linux不支持
名称 |
默认操作 |
描述 |
SIGEMT |
core |
模拟陷阱 |
SIGWAITING |
ignore |
线程库使用的并发信号 |
SIGLWP |
ignore |
线程库使用的 Inter-LWP 信号 |
SIGFREEZE |
ignore |
检查点暂停 |
SIGTHAW |
ignore |
检查点继续 |
SIGCANCEL |
ignore |
线程库使用的取消信号 |
SIGLOST |
ignore |
资源丢失(运行于 Sparc 上的 Linux 支持该项) |
SIGXRES |
ignore |
资源控制超出 |
l 在 Soalris 和 Linux 上,sigset_t 的定义有所不同。
在 Linux 中,sigset_t
在 /usr/include/bits/sigset.h 中定义
为:
# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned
long int))) typedef struct { unsigned
long int __val[_SIGSET_NWORDS]; } __sigset_t; #endif |
在 Solaris 中,sigset_t
在 /usr/include/sys/signal.h 中
定义为:
typedef struct
{
/* signal set type */
unsigned int __sigbits[4]; } sigset_t; |
l
sigaction
结构不相同
中的 sigaction 结构
struct sigaction { /* Signal
handler. */ #ifdef __USE_POSIX199309 union { /* Used
if SA_SIGINFO is not set. */
__sighandler_t sa_handler; /* Used
if SA_SIGINFO is set. */ void
(*sa_sigaction) (int, siginfo_t *, void *); }
__sigaction_handler; # define sa_handler
__sigaction_handler.sa_handler # define sa_sigaction
__sigaction_handler.sa_sigaction #else
__sighandler_t sa_handler; #endif /* Additional
set of signals to be blocked. */ __sigset_t
sa_mask; /* Special
flags. */ int sa_flags; /* Restore handler. */ void
(*sa_restorer) (void); }; |
中的 sigaction 结构
struct sigaction { int
sa_flags; union { #ifdef
__cplusplus
void (*_handler)(int); #else
void (*_handler)(); #endif #if defined(__EXTENSIONS__) || ((__STDC__ - 0 == 0)
&& \
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE > 2) || defined(_XPG4_2)
void (*_sigaction)(int, siginfo_t *, void *); #endif } _funcptr; sigset_t
sa_mask; #ifndef _LP64 int
sa_resv[2]; #endif }; |
4.5、 线程
Solaris 支持两种线程实现:Solaris
线程和 POSIX 线程(pthreads)。有一些函数由 Solaris 线程 API 实现,而不是由 pthreads API 实现,有一些则相反。对于那些符合以上情况的函数,关联的参数可能不符合。下列是专门由 Solaris 线程 API 支持的功能:
l
可以创建端口监控程序。端口监控程序不影响进程退出状态。进程可以通过调用 exit() 退出,也可以通过让进程中的每个非端口监控程序调用 thr_exit() 来退出。
l
可以使用 thr_suspend()
和 thr_continue() 来暂停或继续线程的执行。注意
thr_suspend() 可以暂停目标线程,而不涉及线程可能拥有的锁。如果暂停线程调用某一个函数,而该函数需要已暂停的目标线程所拥有的锁,那么就会出现死锁。
l
可以允许线程等待进程中任何未检验出的线程终止。当 thr_join() 的第一个参数设为 0 时就会这样。如果将 pthread_join() 的第一个参数设为 0,程序将因段错误而终止。
l
下表将关键 Solaris 线程函数与 pthreads 函数进行了比较。
Solaris 线程 API |
Linux POSIX 线程 API |
描述 |
thr_create() |
pthread_create() |
创建新的控制线程 |
thr_exit() |
pthread_exit() |
终止执行调用线程 |
thr_join() |
pthread_join() |
暂停调用线程,直到目标线程完成 |
thr_kill() |
pthread_kill() |
向其他线程发送信号 |
thr_self() |
pthread_self() |
返回调用进程的线程 ID |
thr_yield() |
sched_yield() |
用其他线程替换当前线程 |
thr_getprio() |
pthread_getschedparam() |
检索线程的优先级参数 |
thr_setprio() |
pthread_setschedparam() |
修改线程的优先级参数 |
thr_getspecific() |
pthread_getspecific() |
将新的线程特定值绑定到特定键 |
thr_setspecific() |
pthread_setspecific() |
将新的线程特定值绑定到特定键 |
thr_getconcurrency() |
pthread_getconcurrency() |
获取线程并发级别 |
thr_setconcurrency() |
pthread_setconcurrency() |
设置线程并发级别 |
thr_sigsetmask() |
pthread_sigmask() |
更改或检查调用线程的信号掩码 |
thr_keycreate() |
pthread_key_create() |
创建确定线程特定数据的位置的键 |
N/A |
pthread_key_delete() |
删除确定线程特定数据的位置的键 |
thr_suspend() |
N/A |
暂停执行指定的线程 |
thr_continue() |
N/A |
继续执行暂停的线程 |
fork1() |
fork() |
常规分支 |
forkall() |
N/A |
复制所有分支 |
比较
SUN Studio 选项 |
GNU GCC 选项 |
XL C/C++ 选项 |
描述 |
-# |
-v |
-v |
指示编译器报告编译进度信息 |
-### |
-### |
-# |
跟踪编译,而不调用任何东西 |
-Bstatic |
-static |
-qstaticlink |
让连接编辑程序仅查找名为 libx.a 的文件 |
-Bdynamic |
(Default) |
(Default) |
指示连接编辑程序在给定了 -lx 选项时查找文件名
libx.so,然后查找 libx.a |
-G |
-shared |
-qmkshrobj |
生成共享对象,而不是生成动态链接可执行程序 |
-xmemalign |
-malign-natural、 |
-qalign |
指定最大假定内存对齐(memory alignment),以及未对齐数据访问的行为 |
-xO1、-xO2、-xO3、-xO4、-xO5 |
-O、-O2、-O3 |
-O、-O2、-O3、-O4、-O5 |
编译过程中在所有级别上优化代码 |
-KPIC |
-fPIC |
-qpic=large |
生成位置无关代码以用于共享库中(大模型) |
-Kpic |
-fpic |
-qpic=small |
生成位置无关代码以用于共享库中(小模型) |
-mt |
-pthread |
Use _r invocation mode |
编译和链接多线程代码 |
-R dirlist |
-Wl、-rpath、dirlist |
-Wl、-rpath、dirlist |
构建可执行文件的动态库搜索路径 |
-xarch |
-mcpu、-march |
-qarch、-qtune |
指定目标架构指令集合 |
//移植记录
1、Main.cpp
修改函数void
SetupServiceInterrupt(),原因sigaction结构不兼容
2、修改blkdev.cpp
#ifdef _SOLARIS_
#include
#endif
BTreeBuilder.h 和BTreeBuilder.cpp 未修改
BufForExlDup.cpp和BufForExlDup.h
DetUnionQuery.cpp和DetUnionQuery.h
dictutil.cpp
////////////////////////////周二
dobfile.cpp和dobfile.h
文件dobdef.h 内存是按照2字节对齐,如果按照64位编译,struct DOB_ITEMPAGE0_HEAD结构,要出现问题,因为long在64位平台上是8个字节,不再是4字节。未修改
ExecMgr.cpp和ExecMgr.cp.h
DOBHeaderQueue.cpp和DOBHeaderQueue.h
FactorIndexer.cpp和FactorIndexer.h
FtsSocket.cpp和FtsSocket.h
FullTextMemSearcher.cpp和FullTextMemSearcher.h
Hotstar.cpp
HotStarCfgFileCtrl.cpp
HS_LogFile.cpp和HS_LogFile.h
Hsapi.cpp和hsapi.h
hsapidef.cpp和hsapidef.h
增加宏_SPARC64_,控制在64位平台上编译
#ifdef _SPARC64_
typedef int HSINT32;
typedef unsigned int HSUINT32;
#else
typedef long HSINT32;
typedef unsigned long HSUINT32;
#endif
hsarrayhitrecord.cpp和hsarrayhitrecord.h
在文件hsarrayhitrecord.h内, 内存对齐按照#pragma pack(push, 2)
如果按照64位编译,struct HitRecord结构,要出现问题,因为long在64位平台上是8个字节,不再是4字节。未修改
hsbtree.cpp和hsbtree.h
在文件hsbtree.h内, #pragma pack(push, 2)
如果按照64位编译,struct BTREE_BLOCK_HEADER等结构,要出现问题,因为long在64位平台上是8个字节,不再是4字节。未修改
///////////////////////////////////////////周三
hscatgdict.cpp和hscatgdict.h
hscltidx.cpp和hscltidx.h
hscmd.cpp和hscmd.h
hsconfig.cpp 修改函数bool Config::LoadConfigFile()和函数SaveConfigFile
#ifdef _LINUX_
fp = open(m_fileName, O_RDONLY,
S_IRUSR|S_IWUSR|S_IROTH|S_IWOTH);
#else
fp = open(m_fileName, O_RDONLY,
S_IREAD|S_IWRITE);
#endif
修改为
#ifdef _WIN32
fp = open(m_fileName, O_RDONLY, S_IREAD|S_IWRITE);
#else
fp = open(m_fileName, O_RDONLY,
S_IRUSR|S_IWUSR|S_IROTH|S_IWOTH);
#endif
hsdict.cpp和hsdict.h
如果按照64位编译,struct HS_WORD_ITEM
等结构,要出现问题,因为long在64位平台上是8个字节,不再是4字节。struct HS_WORD_ITEM
{
short wordLen;
unsigned long tag;
};未修改
hsfile.cpp和hsfile.h
hsfmgr.cpp和hsfmgr.h
如果按照64位编译,struct Text_Prg_Sen_Pos_ItemEx等结构,要出现问题,因为long在64位平台上是8个字节,不再是4字节。
hshuf.cpp和hshuf.h
hsindex.cpp和hsindex.h
hsindex300.cpp
HSIntlg.cpp
hsivtstr.cpp
如果按照64位编译,struct STRING_WORD_ID_POS_ITEMx等结构,要出现问题,因为long在64位平台上是8个字节,不再是4字节。
hsivtvsm.h
如果按照64位编译,struct VSM_WORD_ID_FREQ_ITEM等结构,要出现问题,因为long在64位平台上是8个字节,不再是4字节。
hsivtxt.h
如果按照64位编译,struct Text_Prg_Sen_Pos_Item等结构,要出现问题,因为long在64位平台上是8个字节,不再是4字节。
HSLocHSTable.cpp内
int HS_LocHSTable::RenameTableFileTo(char* path)
#ifdef _LINUX_
if(
access( fileName, F_OK ) == 0) /// 如果文件存在
#else
if(_access(
fileName, 0 ) != -1) /// 如果文件存在
#endif
修改为
#ifdef _WIN32
if(_access(
fileName, 0 ) != -1) /// 如果文件存在
#else
if( access( fileName, F_OK ) == 0) /// 如果文件存在
#endif
hslock.cpp
hslog.cpp
hsmem.cpp
hsmixtxtidx.cpp
hsndict.cpp
hsnetsvr.cpp 内
DWORD
HS_NetServer::DoUserCMD(SOCKET consocket, int
iThreadNo)函数
#ifdef _LINUX_
timeout.tv_usec = 5000;
#else
timeout.tv_usec = 50;
#endif
修改为
#ifdef _WIN32
timeout.tv_usec = 50;
#else
timeout.tv_usec = 5000;
#endif
在函数void HS_NetServer::OnUserCMD(int
i)内
增加#
ifdef _SOLARIS_
if(iRet==0)
pthread_mutex_unlock(listenmutex);
#endif
在void HS_NetServer::Close()
#ifdef _SOLARIS_
pthread_mutex_unlock(checkmutex);
pthread_mutex_unlock(listenmutex);
#endif
在void HS_NetServer::Main()函数内
#ifdef _SOLARIS_
pthread_mutex_unlock(listenmutex);
#endif
在void HS_NetServer::CheckConnectSocket()函数内增加
#ifdef _SOLARIS_
if(nSelectSckNo
< m_connectSocketList[checkfrom].sck)
nSelectSckNo =
m_connectSocketList[checkfrom].sck;
#endif
在void HS_NetServer::CheckConnectSocket()内
#ifdef _LINUX_
timeout.tv_usec = 1000;
#else
timeout.tv_usec = 10;
#endif
修改为
#ifdef _WIN32
timeout.tv_usec = 10;
#else
timeout.tv_usec = 1000;
#endif
修改#ifdef _LINUX_
FD_ZERO(&exceptfds);
timeout.tv_usec = 1000;
for(i=0;
i
{
FD_ZERO(&readfds);
FD_SET(tmp[i], &readfds);
if(select(tmp[i]+1,
NULL,NULL,&readfds,&timeout)<0)
{
FD_SET(tmp[i],
&exceptfds);
}
}
FD_ZERO(&readfds);
#else
FD_ZERO(&exceptfds);
timeout.tv_usec = 1;
for(i=0;
i
{
FD_ZERO(&readfds);
FD_SET(tmp[i], &readfds);
if((iRet=select(0,NULL,NULL,&readfds,
&timeout))<0)
{
FD_SET(tmp[i],
&exceptfds);
char
szLog[256];
sprintf( szLog, "check socket syserrno=%d", iRet );
TPISvr.WriteSysDBLog(
DEBUG_LEVEL, szLog );
// TPISvr.WriteDebug("check socket
syserrno=%d", iRet);
}
}
FD_ZERO(&readfds);
#endif
为
#ifdef _WIN32
FD_ZERO(&exceptfds);
timeout.tv_usec = 1;
for(i=0;
i
{
FD_ZERO(&readfds);
FD_SET(tmp[i], &readfds);
if((iRet=select(0,NULL,NULL,&readfds,
&timeout))<0)
{
FD_SET(tmp[i],
&exceptfds);
char
szLog[256];
sprintf( szLog, "check socket syserrno=%d", iRet );
TPISvr.WriteSysDBLog( DEBUG_LEVEL,
szLog );
// TPISvr.WriteDebug("check socket
syserrno=%d", iRet);
}
}
FD_ZERO(&readfds);
#else
FD_ZERO(&exceptfds);
timeout.tv_usec = 1000;
for(i=0;
i
{
FD_ZERO(&readfds);
FD_SET(tmp[i], &readfds);
if(select(tmp[i]+1,
NULL,NULL,&readfds,&timeout)<0)
{
FD_SET(tmp[i],
&exceptfds);
}
}
FD_ZERO(&readfds);
///
#endif
在int HS_NetServer::Init(int port)函数内
#ifdef _SOLARIS_
for ( i =
0; i < nThreadNum+3; i++ )
{
pthread_mutex_init(&(m_listThread[i].mutex),NULL);
}
listenmutex =
&m_listThread[nThreadNum].mutex;
checkmutex =
&m_listThread[nThreadNum+1].mutex;
pthread_mutex_lock(listenmutex);
#endif
//////////////////////////
hsntidx.cpp
hsocket.cpp文件,函数bool WriteLog(const char *str)
{
#ifdef _LINUX_
/// 在Linux下,不测试
#else
/// 在 Windows 下,测试目录是否存在,并有权限读写,因被IIS调用时,有权限控制
if (
_access(LOGFILE_PATH, 0) != 0 )
return false;
#endif
修改为
#ifdef _WIN32
if (
_access(LOGFILE_PATH, 0) != 0 )
return false;
#else
//在solarish和Linux下,不测试
#endif
hsocket.h
#ifdef _LINUX_
#define LOGFILE_PATH "/etc/log/" /// LINUX 日志保存路径
#else
#define LOGFILE_PATH "LogFiles\\" /// 日志保存路径
#endif
修改为
#ifdef _WIN32
#define LOGFILE_PATH "LogFiles\\" /// 日志保存路径
#else
#define LOGFILE_PATH "/etc/log/" /// LINUX 日志保存路径
#endif
hsocketclient.cpp
int CHSocketClient::InitSocket(const char *ip, WORD
port)函数
#ifdef _LINUX_
closesocket(conn);
#else
iRet = WSAGetLastError();
closesocket(conn);
WSASetLastError(iRet); //set error code
#endif
修改为
#ifdef _WIN32
iRet = WSAGetLastError();
closesocket(conn);
WSASetLastError(iRet); //set error code
#else
closesocket(conn);
#endif
hsosfile.cpp 函数int HS_File::DeleteFile(const char *src)
增加
#ifdef _SOLARIS_
if( access(
src, F_OK ) != 0) /// 如果文件不存在
return
HS_FAILURE;
#endif
hsquery.cpp
hsrecfile.cpp
HSRecordset.cpp
hssql.cpp
hsstridx.cpp
hstable.cpp
HSTeleHSTable.cpp
hstxtidx.cpp
hsuniontable.cpp
HSUspTable.cpp
hsutf.cpp
hsutil.cpp
hsutil_inner.cpp
hsutil_os.cpp
hsvsmidx.cpp
hsxarray.cpp
hsxarray.cpp
MainUnionQuery.cpp
memres.cpp
nchindex.cpp
regcode.h
server.cpp 函数
int CServer::OnCreateUSPTable(const
char *pCmdBuf, int
nCmdLen, char *pRetBuf, int *nRetBufLen)
增加
#elif _SOLARIS_
fixpath_win2lux(pPath, pPath);
OnCreateParallelTable(const char *pCmdBuf, int nCmdLen, char
*pRetBuf, int *nRetBufLen)
增加
#elif _SOLARIS_
fixpath_win2lux(pPath,
pPath);
int CServer::OnRenameFile(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)
增加
#elif _SOLARIS_
fixpath_win2lux( pPath->szDesPath,
pPath->szDesPath );
fixpath_win2lux( pPath->szSrcPath,
pPath->szSrcPath );
int CServer::OnCopyFile(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)
增加
#elif _SOLARIS_
fixpath_win2lux( pPath->szDesPath,
pPath->szDesPath );
fixpath_win2lux( pPath->szSrcPath,
pPath->szSrcPath );
int CServer::OnCopyDir(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)
增加
#elif _SOLARIS_
fixpath_win2lux( pPath->szDesPath,
pPath->szDesPath );
fixpath_win2lux( pPath->szSrcPath,
pPath->szSrcPath );
int CServer::OnMakeDir(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)
增加
#elif _SOLARIS_
char
pPath[MAX_PATH];
fixpath_win2lux( pCmdHead->pCmdData,
pPath );
int CServer::OnRemoveDir(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)
增加
#elif _SOLARIS_
char
pPath[MAX_PATH];
fixpath_win2lux( pCmdHead->pCmdData,
pPath );
int CServer::OnFileIsExist(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)
增加
#elif _SOLARIS_
char pPath[MAX_PATH];
fixpath_win2lux( pCmdHead->pCmdData,
pPath );
int CServer::OnFileFullPath(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)增加
#elif _SOLARIS_
char
pPath[MAX_PATH];
fixpath_win2lux( pCmdHead->pCmdData,
pPath );
int CServer::OnDeleteFiles(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)
函数
增加、
#elif _SOLARIS_
char
pPath[MAX_PATH];
fixpath_win2lux( pCmdHead->pCmdData,
pPath );
int CServer::OnWriteFile(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)
增加
#ifdef _SOLARIS_
fixpath_win2lux(para->szFile,para->szFile);
#endif
#ifdef _SOLARIS_
fixpath_win2lux(para->szFile,para->szFile);
#endif
函数
int CServer::OnReadFile(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)
增加
#ifdef _SOLARIS_
fixpath_win2lux(para->szFile,para->szFile);
#endif
int CServer::OnWritePrivateProfile(const
char* pCmdBuf, int
nCmdLen, char *pRetBuf, int *nRetBufLen)
增加
#ifdef _SOLARIS_
fixpath_win2lux(para->szFile,para->szFile);
#endif
函数int CServer::OnReadPrivateProfile(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)
增加
#ifdef _SOLARIS_
fixpath_win2lux(
para->szFile,para->szFile );
#endif
int CServer::OnReloadDict(const
char* pCmdBuf, int
nCmdLen ,char *pRetBuf, int *nRetBufLen)
增加
#elif _SOLARIS_
char
pPath[MAX_PATH];
fixpath_win2lux( pCmdHead->pCmdData,
pPath );
int CServer::File_AppendTable(const char *pCmdBuf, int nCmdLen, char
*pRetBuf, int *nRetBufLen)
增加
#ifdef _SOLARIS_
fixpath_win2lux(AppendTable->szPackFile,AppendTable->szPackFile);
#endif
GetSubDirAndFile 函数
等待修改
int CServer::BulkLoadFile(int
hTable,const char*
pPathName)
增加
#elif _SOLARIS_
fixpath_win2lux(pPathName, szName,
MAX_PATH);
///
strlwr(szName);
if( 1 ) /// 判断是不是文件
return
HotStar_BulkLoad(hTable,szName);
ShExLock.cpp
Stmt.cpp
StoredProc.cpp
sysfilectrl.cpp
threadpool.cpp
tpiaccount.cpp
tpibase.cpp 函数ImportTable
增加
#elif _SOLARIS_
fixpath_win2lux(path, szName, MAX_PATH);
还有LoadMounts寒暑
usercmd.cpp
USP_Scheduler.cpp
USPInterface.h
增加
USPSock.cpp
增加
#ifdef _SOLARIS_
int WSAGetLastError() {return -1;}
const int WSAENOTSOCK = -1;
#endif
函数AcceptClient
增加
#elif _SOLARIS_
s.m_hSocket=accept(this->m_hSocket,(sockaddr*)&s.m_Server,(socklen_t
*)&s.m_iSockAddrLen);
#ifdef _LINUX_
#define _T(str) (str)
#define _ttoi atoi
#define _ttol atol
#endif
Variant.cpp
VarUnionQuery.cpp
ZConnection.cpp
ZRecCNMARC.cpp
ZRecUSMARC.cpp
ZSearchRecord.cpp