This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12817] New: strace found that wprintf always causes __llseek error
- From: "zuohsh at sohu dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Fri, 27 May 2011 10:23:36 +0000
- Subject: [Bug libc/12817] New: strace found that wprintf always causes __llseek error
- Auto-submitted: auto-generated
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.