This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fixincludes for darwin stdint.h


Hello "FX",

Getting Guile up is often a difficult hurdle.  Sorry about that.
Nowadays, on SuSE and Red Hat and Debian, you can just
say some variation of "apt get" and it gets installed.

Anyway, I have a couple of issues, please:

1.  The lines are way, way too long.  For the long, multiple line
     text fragments, you have two choices:
          whatever = "first line\n"
                           "second line";

          whatever = <<- _EOF_
		first line
		second line
		_EOF_;

   where the white space at the start of each line is a tab.

2.  These will *always* fire on all Darwin platforms.  Even if
     the issue is ultimately fixed.  There should be a selection
     stanza so it fires only when needed.  This can be most
    easily done by making the *second* "c-fix-arg" be a
    "select" clause.

So, here is an example after these changes.  (NOTE: I haven't
tested this 'cuz I'm at my day job, and I don't have Darwin anyway...)


/*
 * Darwin headers have a stdint.h that defines UINTPTR_MAX with a wrong type.
 */
fix = {
    hackname  = darwin_stdint_3;
    mach      = "*-*-darwin*";
    files     = stdint.h;
    c_fix     = format;
    c_fix_arg = <<- _EOF_
	#if __WORDSIZE == 64
	#define UINTPTR_MAX 18446744073709551615UL
	#else
	#define UINTPTR_MAX 4294967295UL
	#endif
	_EOF_;
    select = <<- _EOF_
	#if __WORDSIZE == 64
	#define UINTPTR_MAX[ \t]+UINT64_MAX
	#else
	#define UINTPTR_MAX[ \t]+UINT32_MAX
	#endif
	_EOF_;
    test_text = <<- _EOF_
	#if __WORDSIZE == 64
	#define UINTPTR_MAX       UINT64_MAX
	#else
	#define UINTPTR_MAX       UINT32_MAX
	#endif
	_EOF_;
};

I hope that isn't too confusing.

Regards, Bruce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]