Re: [PATCH] Add qword read/write support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

> > Even though it is probably OK to assume that <inttypes.h> exists whenever
> > <stdint.h> does, keeping using PCI_HAVE_STDINT_H for that is confusing :)
> 
> Are you suggesting just removing the defined(PCI_HAVE_STDINT_H) part?

I suggest either removing the test altogether (if we come to a conclusion
that we can rely on C99 includes everywhere), or renaming the symbol
to PCI_HAVE_INTTYPES_H.

> Also, I looked at the configure script and it looks like
> PCI_HAVE_STDINT_H is only defined on sunos. That doesn't make much
> since to me.

AFAIK old versions of Solaris had some C99 includes, but not a C99 compiler,
so the STDC_VERSION test did not trigger.

> For non-MS Windows systems, what systems do we support that don't have
> those c99 headers?

As I have already said, I am not sure about that as I have never seen
some of the supported systems myself. Current versions of all systems
except Windows should be safe, but older versions frequently lack them.

> I found that AIX 4.x, which has been end of lifed for a while, doesn't
> have the headers, but AIX 5.3 does. Do we really need to maintain
> support of systems as old as AIX 4.x?

Judging from the occasional bug reports I receive, people still use such
systems, so as long as supporting the old systems is a matter of a couple of
lines, I would really like not to break them.

I would therefore keep the fallback to u_intXX_t types, but instead of u_int64_t
(for which we do not know the format sequence) use either long or long long,
depending on ULONG_MAX.

> Also, do we have a list of supported platforms somewhere?

They are listed in README, but only names of the platforms, not specific versions.

> I don't understand this comment fully. Previously, these values were
> u32. Didn't they get printed the same way, that is using the non-u32
> format strings?

In exec_op(), we call:

	printf(formats[width]+1, x);

(and similarly trace()). I.e., we are printing the same variable `x', but
with different format strings. As long as the format strings were "%<something>x",
it worked, because all those required `unsigned int' as an argument. If you
change `x' to u64, you have to change _all_ format strings used on it.

				Have a nice fortnight
-- 
Martin `MJ' Mares                          <mj@xxxxxx>   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
Q: How many Prolog programmers does it take to change a light bulb?  A: No.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux