This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] |
However, for host types we could import the printf (vsprintf-posix) module from gnulib, then always assume PRINTF_HAS_LONG_LONG as long as HAVE_LONG_LONG_INT. I did the work of adding gnulib modules already. So maybe this is a better option. What do you think?
+ /* Windows' printf does support long long, but not the usual way. + Convert %lld to %I64d. */ + int length_before_ll = f - last_arg - 1 - lcount; + strncpy (current_substring, last_arg, length_before_ll); + strcpy (current_substring + length_before_ll, "I64"); + current_substring[length_before_ll + 3] = + last_arg[length_before_ll + lcount]; + current_substring += length_before_ll + 4;
You've got enough buffer space to do this but I had to think about it a couple times to work out why :-)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |