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

Re: [Minios-devel] [PATCH v3 14/43] arm64: time.c: fix the wrong format for printk



Hi,

On 02/05/18 09:49, Huang Shijie wrote:
On Mon, Apr 30, 2018 at 10:33:07AM +0100, Julien Grall wrote:
Hi Julien,

On 24/04/18 10:16, Huang Shijie wrote:
On Mon, Apr 23, 2018 at 12:03:48PM +0100, Julien Grall wrote:
  #include <mini-os/types.h>
  #include <mini-os/time.h>
  #include <mini-os/lib.h>
+#include <inttypes.h>

Where does the include "inttypes.h" come from?
The PRIX64 is defined in that file.

This does not answer my question. That include does not belongs to the
mini-os repo. So where does "inttypes.h" will come from? I assume that it
I used the cscope(in vim) to locate the PRIX64, and it jumped to the inttypes.h.

will come from the cross-compiler but I remember MiniOS is been quite messy
with standard include.

Maybe We can use the PRIpaddr which is defined in "arch_mm.h".

No. PRIpaddr is related to a physical address. That type may change in the
future.
okay, I will add a define for PRIX64 in the minios header.

Please read my question. I didn't ask to add PRIx64 but wanted to confirm
whether it is coming from the cross-compiler or anything else...
I found PRIX64 by the CSCOPE+VIM. It is not from the cross-compiler.

Very likely cscope+vim will tell you the file where the symbol was found...

The compiler just tells us the compiling error.

The inttypes.h has many similiar macros for print, such as PRIX8.

If you think it is not okay to use PRIX64, please tell me which one we should 
use.

I hope you are aware that some version of cscope is able to look for standard include. This means you may find a symbol in the headers of your development machine (given that -nostdinc is not supported correctly on mini-os). Using standard include for an OS is usually a pretty bad idea and was hoping you knew what you were doing... hence my question to confirm.

I was asking a very simple question, where does the include inttypes.h come from? Is it /usr/include or /<mycompiler>/include/. You can easily find that thanks to gcc if you stop at after the pre-processor (see -E option) and see where does the includes come from.

Cheers,

--
Julien Grall

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.