diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-05-25 18:34:16 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-05-25 18:34:16 +0000 |
commit | 122d2106a3ea148d3f1b42dc7530969fc63573e9 (patch) | |
tree | 8432823b0b0f1a540a102c47f1e0dc1ff66b23ef | |
parent | f264854ca9fe58101a79a450badb23905955a10c (diff) | |
download | ATCD-122d2106a3ea148d3f1b42dc7530969fc63573e9.tar.gz |
Mon May 25 18:21:40 UTC 2009 Carlos O'Ryan <coryan@atdesk.com>
-rw-r--r-- | ACE/ChangeLog | 8 | ||||
-rw-r--r-- | ACE/ace/OS_NS_dirent.h | 5 | ||||
-rw-r--r-- | ACE/ace/config-linux-common.h | 6 |
3 files changed, 18 insertions, 1 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index dc1edf25359..234070d4272 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,11 @@ +Mon May 25 18:21:40 UTC 2009 Carlos O'Ryan <coryan@atdesk.com> + + * ace/OS_NS_dirent.h: + * ace/config-linux-common.h: + Fixed bug 3681, code would not build with glibc-2.10 because the + prototype for scandir() changed. Automatically detect the + version of glibc and use the right prototype for it. + Mon May 25 11:26:05 2009 Johnny Willemsen <jwillemsen@remedy.nl> * apps/JAWS/server/IO.cpp diff --git a/ACE/ace/OS_NS_dirent.h b/ACE/ace/OS_NS_dirent.h index c9f581549a2..1521fbaa13b 100644 --- a/ACE/ace/OS_NS_dirent.h +++ b/ACE/ace/OS_NS_dirent.h @@ -40,7 +40,10 @@ // uses void*, that's handled internal to the ACE_OS::scandir() wrapper using // the ACE_SCANDIR_OS_COMPARATOR. extern "C" { -#if defined (ACE_SCANDIR_CMP_USES_VOIDPTR) +#if defined (ACE_SCANDIR_CMP_USES_CONST_DIRECT) + typedef int (*ACE_SCANDIR_OS_COMPARATOR)(ACE_DIRENT const **f1, + ACE_DIRENT const **f2); +#elif defined (ACE_SCANDIR_CMP_USES_VOIDPTR) typedef int (*ACE_SCANDIR_OS_COMPARATOR)(void *f1, void *f2); #elif defined (ACE_SCANDIR_CMP_USES_CONST_VOIDPTR) typedef int (*ACE_SCANDIR_OS_COMPARATOR)(const void *f1, const void *f2); diff --git a/ACE/ace/config-linux-common.h b/ACE/ace/config-linux-common.h index 7122d00a974..4fccec9b533 100644 --- a/ACE/ace/config-linux-common.h +++ b/ACE/ace/config-linux-common.h @@ -318,8 +318,14 @@ // Platform supplies scandir() #define ACE_HAS_SCANDIR +#if (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 10) // Although the scandir man page says otherwise, this setting is correct. #define ACE_SCANDIR_CMP_USES_CONST_VOIDPTR +#else +// The prototype was fixed in 2009/03/15, the first release after that +// is 2.10. I am curious as to what other operating systems do. +#define ACE_SCANDIR_CMP_USES_CONST_DIRENT +#endif // A conflict appears when including both <ucontext.h> and // <sys/procfs.h> with recent glibc headers. |