mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
linux: build with thread safety and REENTRANT enabled.
There was a check in linux.cf for the Linux libc version that didn't work, since these were never set anywhere. Presumably current Xorg imake sets these, but since we aren't using that... (yet) As a result, the build assumed that thread-safe API's were not supported. Setting the default libc major version to '6' allows the proper build to take place. libc5 was never threadsafe and no one has probably used it in over 10 years. As a result, some earlier porting fixes that referenced '__fds_bits' on linux systems had to be reverted as these are not valid in an MT environment. They are also not neccessary when building in such an environment, as the normal 'fds_bits' works fine. This patch defintely needs testing on many linux systems.
This commit is contained in:
parent
2f4072ee69
commit
9b699d3fb1
3 changed files with 17 additions and 13 deletions
|
@ -34,6 +34,17 @@ XCOMM platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess $
|
|||
LinuxYggdrasil (12)
|
||||
*/
|
||||
#endif
|
||||
|
||||
#ifndef DefaultLinuxCLibMajorVersion
|
||||
# define DefaultLinuxCLibMajorVersion 6
|
||||
#endif
|
||||
#ifndef DefaultLinuxCLibMinorVersion
|
||||
# define DefaultLinuxCLibMinorVersion 0
|
||||
#endif
|
||||
#ifndef DefaultLinuxCLibTeenyVersion
|
||||
# define DefaultLinuxCLibTeenyVersion 0
|
||||
#endif
|
||||
|
||||
#ifndef LinuxCLibMajorVersion
|
||||
# define LinuxCLibMajorVersion DefaultLinuxCLibMajorVersion
|
||||
#endif
|
||||
|
@ -43,6 +54,7 @@ XCOMM platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess $
|
|||
#ifndef LinuxCLibTeenyVersion
|
||||
# define LinuxCLibTeenyVersion DefaultLinuxCLibTeenyVersion
|
||||
#endif
|
||||
|
||||
#ifndef LinuxBinUtilsMajorVersion
|
||||
# define LinuxBinUtilsMajorVersion DefaultLinuxBinUtilsMajorVersion
|
||||
#endif
|
||||
|
|
|
@ -69,11 +69,8 @@ _DtCm_register_xtcallback(XtAppContext appct)
|
|||
return;
|
||||
|
||||
/* assuming only 1 bit is set */
|
||||
#if defined(linux)
|
||||
bits = fdset.__fds_bits;
|
||||
#else
|
||||
bits = fdset.fds_bits;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < FD_SETSIZE; i += NFDBITS) {
|
||||
fmask = *bits;
|
||||
for (j = 0; fmask != 0; j++, fmask >>= 1) {
|
||||
|
|
|
@ -86,13 +86,8 @@ void SPCD_MainLoopUntil(Boolean *flag)
|
|||
int result;
|
||||
do {
|
||||
for (n=0; n<fd_vec_size; n++) {
|
||||
#if defined(linux)
|
||||
input_mask.__fds_bits[n] = Sb_Input_Mask.__fds_bits[n];
|
||||
except_mask.__fds_bits[n] = Sb_Except_Mask.__fds_bits[n];
|
||||
#else
|
||||
input_mask.fds_bits[n] = Sb_Input_Mask.fds_bits[n];
|
||||
except_mask.fds_bits[n] = Sb_Except_Mask.fds_bits[n];
|
||||
#endif
|
||||
}
|
||||
|
||||
do result=select(SPCD_max_fd + 1, FD_SET_CAST(&input_mask),
|
||||
|
|
Loading…
Reference in a new issue