This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/12817] New: strace found that wprintf always causes __llseek error


http://sourceware.org/bugzilla/show_bug.cgi?id=12817

           Summary: strace found that wprintf always causes __llseek error
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: zuohsh@sohu.com


Below is the code I used.
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <wchar.h>

int main(int argc, char * argv[])
{
    int mode=0;
    wchar_t wstr[] = L"äæ";     //the string is a Chinese word
    setlocale(LC_ALL, "zh_CN.UTF-8"); 
    wprintf(L"%ls\n",wstr);    //print the Chinese word to stdout
    return 0;
}

Compile it: gcc wprintf.c -o wprintf. And then run "strace ./wprintf" ,I got a
seek error:
......
_llseek(1, 0, 0xbf97b3d0, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
......
Can you solve the issue? Thanks.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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