http://bugs.winehq.org/show_bug.cgi?id=15672
Summary: getpagesize() is deprecated, sysconf(_SC_PAGE_SIZE) should be used instead Product: Wine Version: 1.1.6 Platform: All OS/Version: Linux Status: NEW Keywords: patch, source Severity: enhancement Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
Created an attachment (id=16732) --> (http://bugs.winehq.org/attachment.cgi?id=16732) Patch replacing getpagesize() with sysconf(_SC_PAGE_SIZE)
Tried compiling Wine with the Linux Standard Base SDK (Beta 4), which works fine, using the following script: #!/bin/sh set -ex PATH=/opt/lsb/bin:$PATH CC=lsbcc CXX=lsbc++ LSBCC_SHAREDLIBS=wine export CC export CXX export LSBCC_SHAREDLIBS ./configure make clean make depend make
Though you may need to use the following to work around another bug, according to an old report (didn't verify): make depend LDFLAGS=-ldl make LDFLAGS=-ldl CFLAGS="-g -O2 "-DRTLD_DEFAULT=((void *)0)" -DMAP_FILE=0"
Once you've done that, try compiling. You'll get a few warnings :-P. First one: lsbcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -DWINE_UNICODE_API="" -D_REENTRANT -fPIC -Wall -pipe -fno-strength-reduce -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -Werror -o loader.o loader.c cc1: warnings being treated as errors loader.c: In function ‘map_dll’: loader.c:333: warning: ‘getpagesize’ is deprecated (declared at /opt/lsb/include/unistd.h:420) make[2]: *** [loader.o] Error 1 make[2]: Leaving directory `/home/austin/wine-git/libs/wine' make[1]: *** [wine] Error 2 make[1]: Leaving directory `/home/austin/wine-git/libs' make: *** [libs] Error 2
I've patched most of them, but didn't touch the configure stuff, wasn't sure how to handle it. Seems like Alexandre's area of expertise...
These are the areas that I didn't look at: include/wine/port.h:#ifndef HAVE_GETPAGESIZE include/wine/port.h:size_t getpagesize(void); include/wine/port.h:#endif /* HAVE_GETPAGESIZE */ include/wine/port.h:#define getpagesize ___WINE_NOT_PORTABLE(getpagesize) libs/port/getpagesize.c: * getpagesize function libs/port/getpagesize.c:#ifndef HAVE_GETPAGESIZE libs/port/getpagesize.c:size_t getpagesize(void) libs/port/getpagesize.c:#endif /* HAVE_GETPAGESIZE */ server/mapping.c:# ifdef HAVE_GETPAGESIZE server/mapping.c: page_size = getpagesize();
Though should give someone who wants to fix it somewhere to start.
http://bugs.winehq.org/show_bug.cgi?id=15672
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
--- Comment #1 from André H. nerv@dawncrow.de 2010-06-01 12:31:37 --- updates? send patches(maybe after 1.2 :) please dont touch getpagesize.c as i think this should stay untouched or enhanced
http://bugs.winehq.org/show_bug.cgi?id=15672
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|All |Other
--- Comment #2 from Austin English austinenglish@gmail.com 2012-02-23 15:27:08 CST --- Removing deprecated 'All' Platform.
http://bugs.winehq.org/show_bug.cgi?id=15672
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |61768c0775c0a5feed3c54bc75d | |9034e085d5b55 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #3 from Austin English austinenglish@gmail.com 2013-01-09 13:51:40 CST --- Lots of commits here, a few of them: http://source.winehq.org/git/wine.git/commitdiff/a81996d757a484cb4f3a41651b1... http://source.winehq.org/git/wine.git/commitdiff/2b97a064e3a2a2a6bdfc9c16064... http://source.winehq.org/git/wine.git/commitdiff/cef0fde53d4be918ea33df20f5e...
the last one: http://source.winehq.org/git/wine.git/commitdiff/61768c0775c0a5feed3c54bc75d...
http://bugs.winehq.org/show_bug.cgi?id=15672
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2013-01-18 14:56:57 CST --- Closing bugs fixed in 1.5.22.