[Bug 15672] New: getpagesize() is deprecated, sysconf(_SC_PAGE_SIZE) should be used instead
wine-bugs at winehq.org
wine-bugs at winehq.org
Sat Oct 18 22:55:35 CDT 2008
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 at winehq.org
ReportedBy: austinenglish at 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.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list