OpenBSD: error: 'intptr_t' undeclared #4195

Closed
michaelrsweet opened this Issue Sep 30, 2012 · 3 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Sep 30, 2012

Version: 1.6.1
CUPS.org User: ajacoutot

Hi.

On OpenBSD, the build fails with:
raster.c:154: error: 'intptr_t' undeclared (first use in this function)

Including stdint.h fixed it. In the attached patch I did not ifdef the include as I don't think it matters on other OS, but if an ifdef is prefered that is fine.

Thank you.

Collaborator

michaelrsweet commented Oct 1, 2012

CUPS.org User: mike

Fixed in Subversion repository.

I added a configure check since stdint.h isn't universally available... :/

Collaborator

michaelrsweet commented Oct 1, 2012

"patch-filter_raster_c":

--- filter/raster.c.orig Fri Oct 7 22:21:45 2011
+++ filter/raster.c Sat Feb 4 10:36:51 2012
@@ -45,6 +45,7 @@

  • Include necessary headers...
    */

+#include <stdint.h>
#include <cups/raster-private.h>

Collaborator

michaelrsweet commented Oct 1, 2012

"str4195.patch":

Index: config-scripts/cups-common.m4

--- config-scripts/cups-common.m4 (revision 10619)
+++ config-scripts/cups-common.m4 (working copy)
@@ -130,6 +130,7 @@
AC_CHECK_HEADER(langinfo.h,AC_DEFINE(HAVE_LANGINFO_H))
AC_CHECK_HEADER(malloc.h,AC_DEFINE(HAVE_MALLOC_H))
AC_CHECK_HEADER(shadow.h,AC_DEFINE(HAVE_SHADOW_H))
+AC_CHECK_HEADER(stdint.h,AC_DEFINE(HAVE_STDINT_H))
AC_CHECK_HEADER(string.h,AC_DEFINE(HAVE_STRING_H))
AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H))
AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))

Index: filter/raster.c

--- filter/raster.c (revision 10619)
+++ filter/raster.c (working copy)
@@ -46,6 +46,9 @@
*/

#include <cups/raster-private.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif /* HAVE_STDINT_H */

/*

Index: config.h.in

--- config.h.in (revision 10619)
+++ config.h.in (working copy)
@@ -175,6 +175,13 @@

/*

  • * Use <stdint.h>?
  • /
    +
    +#undef HAVE_STDINT_H
    +
    +
    +/
    • Use <string.h>, <strings.h>, and/or <bstring.h>?
      */

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment