Ticket #2198 (new bug)

Opened 3 years ago

Last modified 3 years ago

Add Configure.pl check for <stdint.h>

Reported by: Andy Dougherty <doughera@…> Owned by:
Priority: normal Milestone: 2.11
Component: none Version: 3.8.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

This patch adds (and uses) a Configure.pl check for <stdint.h>.
It is needed on systems that don't have <stdint.h>.

diff --git a/config/auto/headers.pm b/config/auto/headers.pm
index 907b365..2d7eb68 100644
--- a/config/auto/headers.pm
+++ b/config/auto/headers.pm
@@ -96,7 +96,7 @@ sub _list_extra_headers {
     # hence add sys/types.h to the reprobe list, and have 2 goes at getting
     # the header.
     my @extra_headers = qw(malloc.h fcntl.h setjmp.h pthread.h signal.h
-        sys/types.h sys/socket.h netinet/in.h arpa/inet.h
+        stdint.h sys/types.h sys/socket.h netinet/in.h arpa/inet.h
         sys/stat.h sysexit.h limits.h sys/sysctl.h);
 
     # more extra_headers needed on mingw/msys; *BSD fails if they are present
diff --git a/include/parrot/runcore_subprof.h b/include/parrot/runcore_subprof.h
index ef2b345..646bedf 100644
--- a/include/parrot/runcore_subprof.h
+++ b/include/parrot/runcore_subprof.h
@@ -8,7 +8,9 @@
 #define PARROT_RUNCORE_SUBPROF_H_GUARD
 
 
-#include <stdint.h>
+#ifdef PARROT_HAS_HEADER_STDINT
+#  include <stdint.h>
+#endif /* PARROT_HAS_HEADER_STDINT */
 #include "pmc/pmc_sub.h"
 
 typedef struct subprofile subprofile;

-- 
    Andy Dougherty		doughera@lafayette.edu

Change History

Changed 3 years ago by doughera@…

This message has 0 attachment(s)

Changed 3 years ago by dukeleto

  • type set to bug

What systems require this?

Changed 3 years ago by doughera@…

On Mon, 17 Oct 2011, Parrot wrote:

> #2198: Add Configure.pl check for <stdint.h>

> Comment:
> 
>  What systems require this?

I encountered it on Solaris 8.  More generally, <stdint.h> is C99, while 
parrot generally strives for C89, when not unreasonably burdensome to do 
so.

-- 
    Andy Dougherty		doughera@lafayette.edu

Note: See TracTickets for help on using tickets.