Closed Bug 828003 Opened 8 years ago Closed 8 years ago

gfx/qcms/qcmstypes.h:39:23: error: conflicting types for 'uintptr_t' on FreeBSD i386

Categories

(Core :: GFX: Color Management, defect)

x86
FreeBSD
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: jbeich, Assigned: jbeich)

References

Details

Attachments

(1 file, 1 obsolete file)

gfx/qcms/qcmstypes.h:39:23: error: typedef redefinition with different type
  s ('unsigned long' vs '__uintptr_t' (aka 'unsigned int'))
  typedef unsigned long uintptr_t;
			^
  /usr/include/sys/_stdint.h:78:22: note: previous definition is here
  typedef __uintptr_t             uintptr_t;
				  ^

  /usr/include/sys/_stdint.h:78:22: note: previous definition is here
  typedef __uintptr_t             uintptr_t;
				  ^
  1 error generated.

Technically a regression from bug 594769 but every system tends to
have different guard against the type redefinition.

- FreeBSD has _UINTPTR_T_DECLARED since 9.0
  while 7.4/8.3 only have _INTPTR_T_DECLARED
- NetBSD has uintptr_t
- OpenBSD and Solaris guard whole header only

http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/include/stdint.h
http://svnweb.freebsd.org/base/head/sys/sys/_stdint.h
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/stdint.h
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/stdint.h
https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/int_types.h (included by stdint.h)

As a result every BSD patches differently.

- FreeBSD fixed in ports
  http://svnweb.freebsd.org/ports/head/www/firefox/files/patch-gfx-qcms-qcmstypes.h
- DragonFly and NetBSD fixed in pkgsrc
  http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/devel/xulrunner/patches/patch-at
- OpenBSD fixed by bug 651444
- Solaris fixed by bug 487765

However, since bug 579517 both added StandardInteger.h (wrapper for stdint.h) neither typedefs for int*_t nor already included headers are needed and the whole inclusion block can be simplified...
Attached patch don't redefine types (obsolete) — Splinter Review
Can someone do a Try run?
Attachment #699405 - Flags: review?(jmuizelaar)
Comment on attachment 699405 [details] [diff] [review]
don't redefine types

>-#ifdef __OS2__
>-/* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
>+#elif __OS2__
Why not
 #elif defined(__OS2__)
?
Hopefully, no more typos.
Attachment #699405 - Attachment is obsolete: true
Attachment #699405 - Flags: review?(jmuizelaar)
Attachment #699604 - Flags: review?(jmuizelaar)
Attachment #699604 - Flags: review?(jmuizelaar) → review+
I tested it too on OpenBSD without fallout, and all was green on try too.

https://hg.mozilla.org/integration/mozilla-inbound/rev/782e3ab94db7
https://hg.mozilla.org/mozilla-central/rev/782e3ab94db7
Assignee: nobody → jbeich
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.