commit 2025-09-07 15:03 add _NO_USE_REEDDIR_R_ : ZCppMain/ZMainHeadEx.H
This commit is contained in:
@ -110,7 +110,7 @@ namespace ZNsMain
|
||||
class CTypeMy
|
||||
{
|
||||
public:
|
||||
typedef CLargeAVL<some param> CLargeMap;
|
||||
typedef CLargeAVL<some param> CLargeMap;
|
||||
typedef typename CLargeMap::ZCNode::TypeEqual TypeEqual;
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,16 @@
|
||||
#define __ZCPPMAIIN__MAINHEAD_EX_H__
|
||||
|
||||
|
||||
#ifndef _NO_USE_REEDDIR_R_
|
||||
|
||||
/* readdir_r() 함수가 실은 thread-safe 하지 않다고
|
||||
해서 폐기되었다. -- 2025-09-07 14:55
|
||||
*/
|
||||
#define _NO_USE_REEDDIR_R_
|
||||
|
||||
#endif // !_NO_USE_REEDDIR_R_
|
||||
|
||||
|
||||
#include<ctime>
|
||||
#include<fstream>
|
||||
#include<cstdio>
|
||||
@ -4257,7 +4267,7 @@ namespace ZNsMain
|
||||
}/*
|
||||
else*/
|
||||
|
||||
#elif defined(_REENTRANT) // && !defined(_WIN)
|
||||
#elif defined(_REENTRANT) && !defined(_NO_USE_REEDDIR_R_) // && !defined(_WIN)
|
||||
|
||||
ZCFileData VO_CFileData;
|
||||
dirent VO_DirEnt ;
|
||||
@ -4377,7 +4387,7 @@ namespace ZNsMain
|
||||
::rmdir(AP_DirName); return true ;
|
||||
|
||||
//#elif defined(_REENTRANT) // && !defined(_WIN)
|
||||
#else // !defined(_WIN) && !defined(_REENTRANT)
|
||||
#else // !defined(_WIN) && !defined(_REENTRANT) || defined(_NO_USE_REEDDIR_R_)
|
||||
|
||||
ZCFileData VO_CFileData;
|
||||
dirent* VP_DirEnt ;
|
||||
@ -4615,7 +4625,7 @@ namespace ZNsMain
|
||||
#else //!defined(_WIN)
|
||||
|
||||
ZCFileData VO_CFileData;
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
dirent VO_DirEnt;
|
||||
#endif
|
||||
dirent* VP_DirEnt;
|
||||
@ -4625,7 +4635,7 @@ namespace ZNsMain
|
||||
if(VH_File==NULL)
|
||||
return ZNsMain::ZNsEnum::ZERun_OK;
|
||||
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt = ::readdir(VH_File))!=0)
|
||||
@ -4699,7 +4709,7 @@ namespace ZNsMain
|
||||
}/*
|
||||
else // !VO_CFileData.IsDir()*/
|
||||
}/*
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt = ::readdir(VH_File))!=0)
|
||||
@ -4834,7 +4844,7 @@ namespace ZNsMain
|
||||
#else //!defined(_WIN)
|
||||
|
||||
ZCFileData VO_CFileData;
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
dirent VO_DirEnt;
|
||||
#endif
|
||||
dirent* VP_DirEnt;
|
||||
@ -4844,7 +4854,7 @@ namespace ZNsMain
|
||||
if(VH_File==NULL)
|
||||
return ZNsMain::ZNsEnum::ZERun_OK;
|
||||
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt = ::readdir(VH_File))!=0)
|
||||
@ -4906,7 +4916,7 @@ namespace ZNsMain
|
||||
}/*
|
||||
else*/
|
||||
}/*
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt = ::readdir(VH_File))!=0)
|
||||
@ -5016,7 +5026,7 @@ namespace ZNsMain
|
||||
#else //!defined(_WIN)
|
||||
|
||||
ZCFileData VO_CFileData;
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
dirent VO_DirEnt;
|
||||
#endif
|
||||
dirent* VP_DirEnt;
|
||||
@ -5025,7 +5035,7 @@ namespace ZNsMain
|
||||
|
||||
if(VH_File==NULL) return ZERun_OK;
|
||||
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt= ::readdir(VH_File))!=0)
|
||||
@ -5083,7 +5093,7 @@ namespace ZNsMain
|
||||
}/*
|
||||
else*/
|
||||
}/*
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt= ::readdir(VH_File))!=0)
|
||||
@ -5173,7 +5183,7 @@ namespace ZNsMain
|
||||
#else // !defined(_WIN)
|
||||
|
||||
ZCFileData VO_CFileData;
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
dirent VO_DirEnt;
|
||||
#endif
|
||||
dirent* VP_DirEnt;
|
||||
@ -5183,7 +5193,7 @@ namespace ZNsMain
|
||||
if(VH_File==NULL)
|
||||
return ZNsMain::ZNsEnum::ZERun_OK;
|
||||
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt= ::readdir(VH_File))!=0)
|
||||
@ -5237,7 +5247,7 @@ namespace ZNsMain
|
||||
}/*
|
||||
else*/
|
||||
}/*
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt= ::readdir(VH_File))!=0)
|
||||
@ -5338,7 +5348,7 @@ namespace ZNsMain
|
||||
#else // !defined(_WIN)
|
||||
|
||||
ZCFileData VO_CFileData;
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
dirent VO_DirEnt;
|
||||
#endif
|
||||
dirent* VP_DirEnt;
|
||||
@ -5348,7 +5358,7 @@ namespace ZNsMain
|
||||
if(VH_File==NULL)
|
||||
return ZNsMain::ZNsEnum::ZERun_OK;
|
||||
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt= ::readdir(VH_File))!=0)
|
||||
@ -5400,7 +5410,7 @@ namespace ZNsMain
|
||||
}/*
|
||||
else*/
|
||||
}/*
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt= ::readdir(VH_File))!=0)
|
||||
@ -5491,7 +5501,7 @@ namespace ZNsMain
|
||||
#else // !defined(_WIN)
|
||||
|
||||
ZCFileData VO_CFileData;
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
dirent VO_DirEnt;
|
||||
#endif
|
||||
dirent* VP_DirEnt;
|
||||
@ -5500,7 +5510,7 @@ namespace ZNsMain
|
||||
|
||||
if(VH_File==NULL) return ZNsMain::ZNsEnum::ZERun_OK;
|
||||
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt = ::readdir(VH_File))!=0)
|
||||
@ -5558,7 +5568,7 @@ namespace ZNsMain
|
||||
}/*
|
||||
else*/
|
||||
}/*
|
||||
#ifdef _REENTRANT
|
||||
#ifdef _REENTRANT && !defined(_NO_USE_REEDDIR_R_)
|
||||
while(::readdir_r(VH_File, &VO_DirEnt, &VP_DirEnt)==0 && VP_DirEnt!=0)
|
||||
#else
|
||||
while((VP_DirEnt = ::readdir(VH_File))!=0)
|
||||
|
Reference in New Issue
Block a user