At 2015-04-04 16:15:54, "Nikolay Sivov" <bunglehead@gmail.com> wrote:
>On 04.04.2015 11:07, Jianqiu Zhang wrote:
>> At 2015-04-04 15:17:13, "Nikolay Sivov" <bunglehead@gmail.com> wrote:
>>
>>  >Hi, Jianqiu.
>>
>>  >This is not exactly a test, as you're just printing a result. Same thing
>>  >with patch 3/4. Also to print LONGLONG values you use
>>  >wine_dbgstr_longlong() probably.
>>
Hi~ Nikolay
I tried to use wine_dbgstr_longlong to print LONGLONG values
the code is shown below:

trace("TotalAllocationUnits 0x%s\n", wine_dbgstr_longlong(fsi.TotalAllocationUnits));
trace("CallerAvailableAllocationUnits 0x%s\n", wine_dbgstr_longlong(fsi.CallerAvailableAllocationUnits));
trace("ActualAvailableAllocationUnits 0x%s\n", wine_dbgstr_longlong(fsi.ActualAvailableAllocationUnits));

And then when I run make test , the process occurs some errors ,the error log is shown below:

dlls/ntdll/tests/file.c:1232: undefined reference to `wine_dbgstr_longlong'
dlls/ntdll/tests/file.c:1233: undefined reference to `wine_dbgstr_longlong'
dlls/ntdll/tests/file.c:1234: undefined reference to `wine_dbgstr_longlong'

I think it's because there is no compiled object file that contain wine_dbgstr_longlong function.
and i try to include wine/debug.h in file.c . But the problem still exists. And error log like this

n file included from file.c:40:0:
../../../include/wine/debug.h:31:2: error: #error This file should not be used in Wine tests
#error This file should not be used in Wine tests
^
../../../include/wine/debug.h:181:27: error: redefinition of ‘wine_dbgstr_w’
static inline const char *wine_dbgstr_w( const WCHAR *s )
                         ^
In file included from file.c:36:0:
../../../include/wine/test.h:69:27: note: previous definition of ‘wine_dbgstr_w’ was here
static inline const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
                         ^
In file included from file.c:40:0:
../../../include/wine/debug.h:186:27: error: static declaration of ‘wine_dbgstr_guid’ follows non-static declaration
static inline const char *wine_dbgstr_guid( const GUID *id )
                         ^
In file included from file.c:36:0:
../../../include/wine/test.h:68:20: note: previous declaration of ‘wine_dbgstr_guid’ was here
extern const char *wine_dbgstr_guid( const GUID *guid );
                  ^
file.c: In function ‘test_file_full_size_information’:
file.c:1233:5: error: incompatible type for argument 1 of ‘wine_dbgstr_longlong’
   trace("TotalAllocationUnits 0x%s\n", wine_dbgstr_longlong(fsi.TotalAllocationUnits));
   ^
In file included from file.c:40:0:
../../../include/wine/debug.h:215:27: note: expected ‘ULONGLONG’ but argument is of type ‘LARGE_INTEGER’
static inline const char *wine_dbgstr_longlong( ULONGLONG ll )
                         ^
file.c:1234:5: error: incompatible type for argument 1 of ‘wine_dbgstr_longlong’
   trace("CallerAvailableAllocationUnits 0x%s\n", wine_dbgstr_longlong(fsi.CallerAvailableAllocationUnits));
   ^
In file included from file.c:40:0:
../../../include/wine/debug.h:215:27: note: expected ‘ULONGLONG’ but argument is of type ‘LARGE_INTEGER’
static inline const char *wine_dbgstr_longlong( ULONGLONG ll )
                         ^
file.c:1235:5: error: incompatible type for argument 1 of ‘wine_dbgstr_longlong’
   trace("ActualAvailableAllocationUnits 0x%s\n", wine_dbgstr_longlong(fsi.ActualAvailableAllocationUnits));
   ^
In file included from file.c:40:0:
../../../include/wine/debug.h:215:27: note: expected ‘ULONGLONG’ but argument is of type ‘LARGE_INTEGER’
static inline const char *wine_dbgstr_longlong( ULONGLONG ll )

Could you please give me an explaination on why I cannot use wine_dbgstr_longlong ?
Thanks~