Skip to content

Commit

Permalink
[12072] Apply ACE patches for FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
antiroot committed Jul 27, 2012
1 parent cea8c7f commit ef79a25
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
6 changes: 6 additions & 0 deletions dep/ACE_wrappers/ace/OS_NS_Thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
# include "ace/ACE_export.h"
# include "ace/Object_Manager_Base.h"

# include <sys/param.h>

This comment has been minimized.

Copy link
@dbauz

dbauz Jul 27, 2012

Erreur 1 error C1083: Impossible d'ouvrir le fichier include : 'sys/param.h' : No such file or directory C:\Users\Daniel\Desktop\Pour serveur Daniel\mangos\dep\ACE_wrappers\ace\OS_NS_Thread.h 41
203 times the same error

This comment has been minimized.

Copy link
@antiroot

antiroot Jul 27, 2012

Author Contributor

I'm in the process of pushing this fix, i didn't think about windows not liking this. however ACE includes param.h if the platform supports it already so these two includes actually seem unnecessary at this point. the fault was that i copied them from old patch files, just making sure everything compiles correctly without the includes before pushing

#if (defined(__FreeBSD__) && ((__FreeBSD_version >= 700110 && __FreeBSD_version < 800000) || __FreeBSD_version >= 800024))
# include <sys/cpuset.h>
# define cpu_set_t cpuset_t
#endif

# if defined (ACE_EXPORT_MACRO)
# undef ACE_EXPORT_MACRO
# endif
Expand Down
12 changes: 7 additions & 5 deletions dep/ACE_wrappers/ace/OS_NS_netdb.inl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_errno.h"

#include <sys/param.h>

#if defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
# define ACE_NETDBCALL_RETURN(OP,TYPE,FAILVALUE,TARGET,SIZE) \
Expand Down Expand Up @@ -125,7 +127,7 @@ ACE_OS::gethostbyaddr_r (const char *addr,
*h_errnop = h_errno;
return (struct hostent *) 0;
}
# elif defined (__GLIBC__)
# elif defined (__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700015)
// GNU C library has a different signature
ACE_OS::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA));

Expand Down Expand Up @@ -317,7 +319,7 @@ ACE_OS::gethostbyname_r (const char *name,
*h_errnop = h_errno;
return (struct hostent *) 0;
}
# elif defined (__GLIBC__)
# elif defined (__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700015)
// GNU C library has a different signature
ACE_OS::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA));

Expand Down Expand Up @@ -531,7 +533,7 @@ ACE_OS::getprotobyname_r (const char *name,
else
return 0;
//FUZZ: enable check_for_lack_ACE_OS
# elif defined (__GLIBC__)
# elif defined (__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700015)
// GNU C library has a different signature
//FUZZ: disable check_for_lack_ACE_OS
if (::getprotobyname_r (name,
Expand Down Expand Up @@ -612,7 +614,7 @@ ACE_OS::getprotobynumber_r (int proto,
//FUZZ: enable check_for_lack_ACE_OS
else
return 0;
# elif defined (__GLIBC__)
# elif defined (__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700015)
// GNU C library has a different signature
//FUZZ: disable check_for_lack_ACE_OS
if (::getprotobynumber_r (proto,
Expand Down Expand Up @@ -698,7 +700,7 @@ ACE_OS::getservbyname_r (const char *svc,
//FUZZ: enable check_for_lack_ACE_OS
else
return (struct servent *) 0;
# elif defined (__GLIBC__)
# elif defined (__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700015)
// GNU C library has a different signature
ACE_OS::memset (buf, 0, sizeof (ACE_SERVENT_DATA));

Expand Down
6 changes: 3 additions & 3 deletions dep/ACE_wrappers/ace/OS_NS_signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
#endif
#define ACE_EXPORT_MACRO ACE_Export

#if defined (__Lynx__)
// LynxOS defines pthread_sigmask() in pthread.h
#if defined (__Lynx__) || defined (__OpenBSD__) || defined (__FreeBSD__)
// LynxOS, OpenBSD and FreeBSD define pthread_sigmask() in pthread.h
# include "ace/os_include/os_pthread.h"
#endif /* __Lynx__ */
#endif /* __Lynx__ || OpenBSD || FreeBSD */

/*
* We inline and undef some functions that may be implemented
Expand Down
4 changes: 4 additions & 0 deletions dep/ACE_wrappers/ace/os_include/os_pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,11 @@
# undef THR_DAEMON

# define THR_BOUND 0x00000001
# if defined (__FreeBSD__)
# define THR_NEW_LWP 0x00000000
# else
# define THR_NEW_LWP 0x00000002
# endif
# define THR_DETACHED 0x00000040
# define THR_SUSPENDED 0x00000080
# define THR_DAEMON 0x00000100
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12071"
#define REVISION_NR "12072"
#endif // __REVISION_NR_H__

2 comments on commit ef79a25

@SkirnirMaNGOS
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curios, I've seen that ACE is in FreeBSD ports [1]. Why don't you use it? Stability issues?

Regards
Skirnir

[1] http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/ace/

@antiroot
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ace in ports is is 6.1.2 and mangos fails to build with it, in order to use it the core would have to be updated as well. I assume it's dependent on deprecated or changed methods that are different or no longer exist in ace-6.x.x, but i have also not researched the matter much. This is just speculation on my part

Please sign in to comment.