diff mbox

[Ada] Add DragonFly support to System.OS_Constants template

Message ID 559A8069.4050701@marino.st
State New
Headers show

Commit Message

John Marino July 6, 2015, 1:19 p.m. UTC
The System.OS_Constants templates for GNAT has three preprocessor checks
for FreeBSD.  In all three cases, DragonFly BSD needs to be treated the
same as FreeBSD.  The attached patch accomplishes this.

Please consider incorporating the patch into trunk.

Regards,
John

Comments

Thomas Quinot July 6, 2015, 2:16 p.m. UTC | #1
* John Marino, 2015-07-06 :

> The System.OS_Constants templates for GNAT has three preprocessor checks
> for FreeBSD.  In all three cases, DragonFly BSD needs to be treated the
> same as FreeBSD.  The attached patch accomplishes this.

Thanks John, looks good to me!

Thomas.
Eric Botcazou July 6, 2015, 8:52 p.m. UTC | #2
> Please consider incorporating the patch into trunk.

Applied with ChangeLog sent privately.
diff mbox

Patch

Index: gcc/ada/s-oscons-tmplt.c
===================================================================
--- gcc/ada/s-oscons-tmplt.c	(revision 225453)
+++ gcc/ada/s-oscons-tmplt.c	(working copy)
@@ -402,7 +402,7 @@ 
 
 /* ioctl(2) requests are "int" in UNIX, but "unsigned long" on FreeBSD */
 
-#ifdef __FreeBSD__
+#if defined (__FreeBSD__) || defined (__DragonFly__)
 # define CNI CNU
 # define IOCTL_Req_T "unsigned"
 #else
@@ -1014,7 +1014,7 @@ 
 
 */
 
-#if defined (__FreeBSD__) || defined (__linux__)
+#if defined (__FreeBSD__) || defined (__linux__) || defined (__DragonFly__)
 # define PTY_Library "-lutil"
 #else
 # define PTY_Library ""
@@ -1435,7 +1435,8 @@ 
 #endif
 CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU clock")
 
-#if defined(__FreeBSD__) || (defined(_AIX) && defined(_AIXVERSION_530))
+#if defined(__FreeBSD__) || (defined(_AIX) && defined(_AIXVERSION_530)) \
+ || defined(__DragonFly__)
 /** On these platforms use system provided monotonic clock instead of
  ** the default CLOCK_REALTIME. We then need to set up cond var attributes
  ** appropriately (see thread.c).