diff --git a/Make.rules.in b/Make.rules.in index 9e6488decb8..10e0f37817f 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -70,6 +70,7 @@ WIDL = $(TOOLSDIR)/tools/widl/widl WRCFLAGS = -J -m $(EXTRAWRCFLAGS) LDPATH = @LDPATH@ DLLDIR = $(TOPOBJDIR)/dlls +LIBPORT = -L$(TOPOBJDIR)/libs/port -lwine_port LIBWINE = -L$(TOPOBJDIR)/library -lwine LIBUNICODE = -L$(TOPOBJDIR)/unicode -lwine_unicode LIBUUID = -L$(TOPOBJDIR)/ole -lwine_uuid diff --git a/Makefile.in b/Makefile.in index 2eed954a215..27b8d15944b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -32,6 +32,7 @@ SUBDIRS = \ documentation \ include \ library \ + libs \ miscemu \ ole \ programs \ @@ -55,7 +56,7 @@ INSTALLDEVSUBDIRS = \ tools # Sub-directories to install for both install-lib and install-dev -INSTALLBOTHSUBDIRS = dlls +INSTALLBOTHSUBDIRS = dlls libs INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS) @@ -120,15 +121,16 @@ $(INSTALLBOTHSUBDIRS:%=%/__uninstall__): dummy # Dependencies between directories all: $(SUBDIRS) -dlls: library ole tools unicode -server: library tools unicode -miscemu programs: dlls library ole tools unicode -tools: library unicode +dlls: library libs ole tools unicode +server: library libs tools unicode +miscemu programs: dlls library libs ole tools unicode +tools: library libs unicode -dlls/__install-lib__ dlls/__install-dev__: library ole tools unicode -server/__install__: library tools unicode -miscemu/__install__ programs/__install__: library ole tools unicode dlls/__install-lib__ +dlls/__install-lib__ dlls/__install-dev__: library libs ole tools unicode +server/__install__: library libs tools unicode +miscemu/__install__ programs/__install__: library libs ole tools unicode dlls/__install-lib__ library/__install__: library +libs/__install__: libs ole/__install__: ole tools/__install__: tools unicode/__install__: unicode diff --git a/configure b/configure index 5d2b6e2f628..01430cae15a 100755 --- a/configure +++ b/configure @@ -15691,7 +15691,7 @@ MAKE_TEST_RULES=dlls/Maketest.rules MAKE_PROG_RULES=programs/Makeprog.rules - ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3dim/Makefile dlls/d3dx8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/msvideo/msrle32/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winenas/Makefile dlls/winmm/winejack/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wpp/Makefile tools/wrc/Makefile unicode/Makefile" + ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3dim/Makefile dlls/d3dx8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/msvideo/msrle32/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winenas/Makefile dlls/winmm/winejack/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile libs/Makefile libs/port/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wpp/Makefile tools/wrc/Makefile unicode/Makefile" cat >confcache <<\_ACEOF @@ -16349,6 +16349,8 @@ do "documentation/Makefile" ) CONFIG_FILES="$CONFIG_FILES documentation/Makefile" ;; "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "library/Makefile" ) CONFIG_FILES="$CONFIG_FILES library/Makefile" ;; + "libs/Makefile" ) CONFIG_FILES="$CONFIG_FILES libs/Makefile" ;; + "libs/port/Makefile" ) CONFIG_FILES="$CONFIG_FILES libs/port/Makefile" ;; "miscemu/Makefile" ) CONFIG_FILES="$CONFIG_FILES miscemu/Makefile" ;; "ole/Makefile" ) CONFIG_FILES="$CONFIG_FILES ole/Makefile" ;; "programs/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/Makefile" ;; diff --git a/configure.ac b/configure.ac index 753ffaa8ff5..b8206237307 100644 --- a/configure.ac +++ b/configure.ac @@ -1517,6 +1517,8 @@ dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile +libs/Makefile +libs/port/Makefile miscemu/Makefile ole/Makefile programs/Makefile diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in index 81cf938d813..8d7c4f91992 100644 --- a/dlls/Makedll.rules.in +++ b/dlls/Makedll.rules.in @@ -16,7 +16,7 @@ MAINSPEC = $(MODULE:%.dll=%).spec SPEC_DEF = $(MAINSPEC).def WIN16_FILES = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16) ALL_OBJS = @WIN16_FILES@ $(OBJS) $(MODULE).dbg.o -ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS) +ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LIBS) IMPORTLIBS = $(DELAYIMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) $(IMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) all: $(MODULE)$(DLLEXT) $(SUBDIRS) diff --git a/dlls/Maketest.rules.in b/dlls/Maketest.rules.in index 23d0bbb6872..a5795bc64a0 100644 --- a/dlls/Maketest.rules.in +++ b/dlls/Maketest.rules.in @@ -21,7 +21,7 @@ RUNTESTFLAGS = -q -P wine -M $(TESTDLL) -T $(TOPOBJDIR) -p $(TESTPROGRAM) C_SRCS = $(CTESTS) EXTRA_SRCS = $(TESTLIST) EXTRA_OBJS = $(TESTLIST:.c=.o) -ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS) +ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LIBS) IMPORTLIBS = $(DELAYIMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) $(IMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) CROSSTEST = $(TESTDLL:%.dll=%)_crosstest.exe diff --git a/library/port.c b/library/port.c index 89caf58a024..2d0df4dccb1 100644 --- a/library/port.c +++ b/library/port.c @@ -64,88 +64,6 @@ # include #endif -/*********************************************************************** - * usleep - */ -#ifndef HAVE_USLEEP -int usleep (unsigned int useconds) -{ -#if defined(__EMX__) - DosSleep(useconds); - return 0; -#elif defined(__BEOS__) - return snooze(useconds); -#elif defined(HAVE_SELECT) - struct timeval delay; - - delay.tv_sec = useconds / 1000000; - delay.tv_usec = useconds % 1000000; - - select( 0, 0, 0, 0, &delay ); - return 0; -#else /* defined(__EMX__) || defined(__BEOS__) || defined(HAVE_SELECT) */ - errno = ENOSYS; - return -1; -#endif /* defined(__EMX__) || defined(__BEOS__) || defined(HAVE_SELECT) */ -} -#endif /* HAVE_USLEEP */ - -/*********************************************************************** - * memmove - */ -#ifndef HAVE_MEMMOVE -void *memmove( void *dest, const void *src, size_t len ) -{ - register char *dst = dest; - - /* Use memcpy if not overlapping */ - if ((dst + len <= (char *)src) || ((char *)src + len <= dst)) - { - memcpy( dst, src, len ); - } - /* Otherwise do it the hard way (FIXME: could do better than this) */ - else if (dst < (char *)src) - { - while (len--) *dst++ = *((char *)src)++; - } - else - { - dst += len - 1; - src = (char *)src + len - 1; - while (len--) *dst-- = *((char *)src)--; - } - return dest; -} -#endif /* HAVE_MEMMOVE */ - -/*********************************************************************** - * strerror - */ -#ifndef HAVE_STRERROR -const char *strerror( int err ) -{ - /* Let's hope we have sys_errlist then */ - return sys_errlist[err]; -} -#endif /* HAVE_STRERROR */ - - -/*********************************************************************** - * getpagesize - */ -#ifndef HAVE_GETPAGESIZE -size_t getpagesize(void) -{ -# ifdef __svr4__ - return sysconf(_SC_PAGESIZE); -# elif defined(__i386__) - return 4096; -# else -# error Cannot get the page size on this platform -# endif -} -#endif /* HAVE_GETPAGESIZE */ - /*********************************************************************** * clone @@ -181,42 +99,6 @@ int clone( int (*fn)(void *), void *stack, int flags, void *arg ) } #endif /* !HAVE_CLONE && __linux__ */ -/*********************************************************************** - * strcasecmp - */ -#ifndef HAVE_STRCASECMP -int strcasecmp( const char *str1, const char *str2 ) -{ - const unsigned char *ustr1 = (const unsigned char *)str1; - const unsigned char *ustr2 = (const unsigned char *)str2; - - while (*ustr1 && toupper(*ustr1) == toupper(*ustr2)) { - ustr1++; - ustr2++; - } - return toupper(*ustr1) - toupper(*ustr2); -} -#endif /* HAVE_STRCASECMP */ - -/*********************************************************************** - * strncasecmp - */ -#ifndef HAVE_STRNCASECMP -int strncasecmp( const char *str1, const char *str2, size_t n ) -{ - const unsigned char *ustr1 = (const unsigned char *)str1; - const unsigned char *ustr2 = (const unsigned char *)str2; - int res; - - if (!n) return 0; - while ((--n > 0) && *ustr1) { - if ((res = toupper(*ustr1) - toupper(*ustr2))) return res; - ustr1++; - ustr2++; - } - return toupper(*ustr1) - toupper(*ustr2); -} -#endif /* HAVE_STRNCASECMP */ /*********************************************************************** * getsockopt @@ -241,134 +123,6 @@ unsigned long inet_network(const char *cp) } #endif /* defined(HAVE_INET_NETWORK) */ -/*********************************************************************** - * statfs - */ -#ifndef HAVE_STATFS -int statfs(const char *name, struct statfs *info) -{ -#ifdef __BEOS__ - dev_t mydev; - fs_info fsinfo; - - if(!info) { - errno = ENOSYS; - return -1; - } - - if ((mydev = dev_for_path(name)) < 0) { - errno = ENOSYS; - return -1; - } - - if (fs_stat_dev(mydev,&fsinfo) < 0) { - errno = ENOSYS; - return -1; - } - - info->f_bsize = fsinfo.block_size; - info->f_blocks = fsinfo.total_blocks; - info->f_bfree = fsinfo.free_blocks; - return 0; -#else /* defined(__BEOS__) */ - errno = ENOSYS; - return -1; -#endif /* defined(__BEOS__) */ -} -#endif /* !defined(HAVE_STATFS) */ - - -/*********************************************************************** - * lstat - */ -#ifndef HAVE_LSTAT -int lstat(const char *file_name, struct stat *buf) -{ - return stat( file_name, buf ); -} -#endif /* HAVE_LSTAT */ - -/*********************************************************************** - * mkstemp - */ -#ifndef HAVE_MKSTEMP -int mkstemp(char *tmpfn) -{ - int tries; - char *xstart; - - xstart = tmpfn+strlen(tmpfn)-1; - while ((xstart > tmpfn) && (*xstart == 'X')) - xstart--; - tries = 10; - while (tries--) { - char *newfn = mktemp(tmpfn); - int fd; - if (!newfn) /* something else broke horribly */ - return -1; - fd = open(newfn,O_CREAT|O_RDWR|O_EXCL,0600); - if (fd!=-1) - return fd; - newfn = xstart; - /* fill up with X and try again ... */ - while (*newfn) *newfn++ = 'X'; - } - return -1; -} -#endif /* HAVE_MKSTEMP */ - - -/*********************************************************************** - * pread - * - * FIXME: this is not thread-safe - */ -#ifndef HAVE_PREAD -ssize_t pread( int fd, void *buf, size_t count, off_t offset ) -{ - ssize_t ret; - off_t old_pos; - - if ((old_pos = lseek( fd, 0, SEEK_CUR )) == -1) return -1; - if (lseek( fd, offset, SEEK_SET ) == -1) return -1; - if ((ret = read( fd, buf, count )) == -1) - { - int err = errno; /* save errno */ - lseek( fd, old_pos, SEEK_SET ); - errno = err; - return -1; - } - if (lseek( fd, old_pos, SEEK_SET ) == -1) return -1; - return ret; -} -#endif /* HAVE_PREAD */ - - -/*********************************************************************** - * pwrite - * - * FIXME: this is not thread-safe - */ -#ifndef HAVE_PWRITE -ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset ) -{ - ssize_t ret; - off_t old_pos; - - if ((old_pos = lseek( fd, 0, SEEK_CUR )) == -1) return -1; - if (lseek( fd, offset, SEEK_SET ) == -1) return -1; - if ((ret = write( fd, buf, count )) == -1) - { - int err = errno; /* save errno */ - lseek( fd, old_pos, SEEK_SET ); - errno = err; - return -1; - } - if (lseek( fd, old_pos, SEEK_SET ) == -1) return -1; - return ret; -} -#endif /* HAVE_PWRITE */ - #if defined(__svr4__) || defined(__NetBSD__) /*********************************************************************** diff --git a/libs/.cvsignore b/libs/.cvsignore new file mode 100644 index 00000000000..f3c7a7c5da6 --- /dev/null +++ b/libs/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/libs/Makefile.in b/libs/Makefile.in new file mode 100644 index 00000000000..341ba0ec67e --- /dev/null +++ b/libs/Makefile.in @@ -0,0 +1,25 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = .. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = none + +SUBDIRS = \ + port + +# Sub-directories to install for install-lib +INSTALLLIBSUBDIRS = + +# Sub-directories to install for install-dev +INSTALLDEVSUBDIRS = + +INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS) + +@MAKE_RULES@ + +all: $(SUBDIRS) + +install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) +install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) + +### Dependencies: diff --git a/libs/port/.cvsignore b/libs/port/.cvsignore new file mode 100644 index 00000000000..f3c7a7c5da6 --- /dev/null +++ b/libs/port/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in new file mode 100644 index 00000000000..9a7bd6a4737 --- /dev/null +++ b/libs/port/Makefile.in @@ -0,0 +1,30 @@ +DEFS = @DLLFLAGS@ -D__WINESRC__ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = libwine_port.a + +C_SRCS = \ + getpagesize.c \ + lstat.c \ + memmove.c \ + mkstemp.c \ + pread.c \ + pwrite.c \ + statfs.c \ + strcasecmp.c \ + strerror.c \ + strncasecmp.c \ + usleep.c + +all: $(MODULE) + +@MAKE_RULES@ + +$(MODULE): $(OBJS) Makefile.in + $(RM) $@ + $(AR) $@ $(OBJS) + $(RANLIB) $@ + +### Dependencies: diff --git a/libs/port/getpagesize.c b/libs/port/getpagesize.c new file mode 100644 index 00000000000..aec565298fb --- /dev/null +++ b/libs/port/getpagesize.c @@ -0,0 +1,39 @@ +/* + * getpagesize function + * + * Copyright 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifndef HAVE_GETPAGESIZE +size_t getpagesize(void) +{ +# ifdef __svr4__ + return sysconf(_SC_PAGESIZE); +# elif defined(__i386__) + return 4096; +# else +# error Cannot get the page size on this platform +# endif +} +#endif /* HAVE_GETPAGESIZE */ diff --git a/libs/port/lstat.c b/libs/port/lstat.c new file mode 100644 index 00000000000..536796ccbce --- /dev/null +++ b/libs/port/lstat.c @@ -0,0 +1,29 @@ +/* + * lstat function + * + * Copyright 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#ifndef HAVE_LSTAT +int lstat(const char *file_name, struct stat *buf) +{ + return stat( file_name, buf ); +} +#endif /* HAVE_LSTAT */ diff --git a/libs/port/memmove.c b/libs/port/memmove.c new file mode 100644 index 00000000000..8940d778bb1 --- /dev/null +++ b/libs/port/memmove.c @@ -0,0 +1,47 @@ +/* + * memmove function + * + * Copyright 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#ifndef HAVE_MEMMOVE +void *memmove( void *dest, const void *src, size_t len ) +{ + register char *dst = dest; + + /* Use memcpy if not overlapping */ + if ((dst + len <= (char *)src) || ((char *)src + len <= dst)) + { + memcpy( dst, src, len ); + } + /* Otherwise do it the hard way (FIXME: could do better than this) */ + else if (dst < (char *)src) + { + while (len--) *dst++ = *((char *)src)++; + } + else + { + dst += len - 1; + src = (char *)src + len - 1; + while (len--) *dst-- = *((char *)src)--; + } + return dest; +} +#endif /* HAVE_MEMMOVE */ diff --git a/libs/port/mkstemp.c b/libs/port/mkstemp.c new file mode 100644 index 00000000000..17a2adc8447 --- /dev/null +++ b/libs/port/mkstemp.c @@ -0,0 +1,55 @@ +/* + * mkstemp function + * + * Copyright 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifndef HAVE_MKSTEMP +int mkstemp(char *tmpfn) +{ + int tries; + char *xstart; + + xstart = tmpfn+strlen(tmpfn)-1; + while ((xstart > tmpfn) && (*xstart == 'X')) + xstart--; + tries = 10; + while (tries--) + { + char *newfn = mktemp(tmpfn); + int fd; + if (!newfn) /* something else broke horribly */ + return -1; + fd = open(newfn,O_CREAT|O_RDWR|O_EXCL,0600); + if (fd!=-1) + return fd; + newfn = xstart; + /* fill up with X and try again ... */ + while (*newfn) *newfn++ = 'X'; + } + return -1; +} +#endif /* HAVE_MKSTEMP */ diff --git a/libs/port/pread.c b/libs/port/pread.c new file mode 100644 index 00000000000..81f219d8d41 --- /dev/null +++ b/libs/port/pread.c @@ -0,0 +1,49 @@ +/* + * pread function + * + * Copyright 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +/* FIXME: this is not thread-safe */ + +#ifndef HAVE_PREAD +ssize_t pread( int fd, void *buf, size_t count, off_t offset ) +{ + ssize_t ret; + off_t old_pos; + + if ((old_pos = lseek( fd, 0, SEEK_CUR )) == -1) return -1; + if (lseek( fd, offset, SEEK_SET ) == -1) return -1; + if ((ret = read( fd, buf, count )) == -1) + { + int err = errno; /* save errno */ + lseek( fd, old_pos, SEEK_SET ); + errno = err; + return -1; + } + if (lseek( fd, old_pos, SEEK_SET ) == -1) return -1; + return ret; +} +#endif /* HAVE_PREAD */ diff --git a/libs/port/pwrite.c b/libs/port/pwrite.c new file mode 100644 index 00000000000..3fa86728d9d --- /dev/null +++ b/libs/port/pwrite.c @@ -0,0 +1,49 @@ +/* + * pwrite function + * + * Copyright 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +/* FIXME: this is not thread-safe */ + +#ifndef HAVE_PWRITE +ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset ) +{ + ssize_t ret; + off_t old_pos; + + if ((old_pos = lseek( fd, 0, SEEK_CUR )) == -1) return -1; + if (lseek( fd, offset, SEEK_SET ) == -1) return -1; + if ((ret = write( fd, buf, count )) == -1) + { + int err = errno; /* save errno */ + lseek( fd, old_pos, SEEK_SET ); + errno = err; + return -1; + } + if (lseek( fd, old_pos, SEEK_SET ) == -1) return -1; + return ret; +} +#endif /* HAVE_PWRITE */ diff --git a/libs/port/statfs.c b/libs/port/statfs.c new file mode 100644 index 00000000000..0b2bb3350eb --- /dev/null +++ b/libs/port/statfs.c @@ -0,0 +1,76 @@ +/* + * statfs function + * + * Copyright 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#ifdef __BEOS__ +#include +#include +#endif + +#include +#ifdef HAVE_SYS_PARAM_H +# include +#endif +#ifdef STATFS_DEFINED_BY_SYS_VFS +# include +#else +# ifdef STATFS_DEFINED_BY_SYS_MOUNT +# include +# else +# ifdef STATFS_DEFINED_BY_SYS_STATFS +# include +# endif +# endif +#endif + +#ifndef HAVE_STATFS +int statfs(const char *name, struct statfs *info) +{ +#ifdef __BEOS__ + dev_t mydev; + fs_info fsinfo; + + if(!info) { + errno = ENOSYS; + return -1; + } + + if ((mydev = dev_for_path(name)) < 0) { + errno = ENOSYS; + return -1; + } + + if (fs_stat_dev(mydev,&fsinfo) < 0) { + errno = ENOSYS; + return -1; + } + + info->f_bsize = fsinfo.block_size; + info->f_blocks = fsinfo.total_blocks; + info->f_bfree = fsinfo.free_blocks; + return 0; +#else /* defined(__BEOS__) */ + errno = ENOSYS; + return -1; +#endif /* defined(__BEOS__) */ +} +#endif /* !defined(HAVE_STATFS) */ diff --git a/libs/port/strcasecmp.c b/libs/port/strcasecmp.c new file mode 100644 index 00000000000..1cedc80cc1a --- /dev/null +++ b/libs/port/strcasecmp.c @@ -0,0 +1,38 @@ +/* + * strcasecmp function + * + * Copyright 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include + +#ifndef HAVE_STRCASECMP +int strcasecmp( const char *str1, const char *str2 ) +{ + const unsigned char *ustr1 = (const unsigned char *)str1; + const unsigned char *ustr2 = (const unsigned char *)str2; + + while (*ustr1 && toupper(*ustr1) == toupper(*ustr2)) { + ustr1++; + ustr2++; + } + return toupper(*ustr1) - toupper(*ustr2); +} +#endif /* HAVE_STRCASECMP */ diff --git a/libs/port/strerror.c b/libs/port/strerror.c new file mode 100644 index 00000000000..9d27ae87768 --- /dev/null +++ b/libs/port/strerror.c @@ -0,0 +1,30 @@ +/* + * strerror function + * + * Copyright 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#ifndef HAVE_STRERROR +const char *strerror( int err ) +{ + /* Let's hope we have sys_errlist then */ + return sys_errlist[err]; +} +#endif /* HAVE_STRERROR */ diff --git a/libs/port/strncasecmp.c b/libs/port/strncasecmp.c new file mode 100644 index 00000000000..de6adcbee5f --- /dev/null +++ b/libs/port/strncasecmp.c @@ -0,0 +1,42 @@ +/* + * strncasecmp function + * + * Copyright 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include + +#ifndef HAVE_STRNCASECMP +int strncasecmp( const char *str1, const char *str2, size_t n ) +{ + const unsigned char *ustr1 = (const unsigned char *)str1; + const unsigned char *ustr2 = (const unsigned char *)str2; + int res; + + if (!n) return 0; + while ((--n > 0) && *ustr1) + { + if ((res = toupper(*ustr1) - toupper(*ustr2))) return res; + ustr1++; + ustr2++; + } + return toupper(*ustr1) - toupper(*ustr2); +} +#endif /* HAVE_STRNCASECMP */ diff --git a/libs/port/usleep.c b/libs/port/usleep.c new file mode 100644 index 00000000000..6357c949f5d --- /dev/null +++ b/libs/port/usleep.c @@ -0,0 +1,45 @@ +/* + * usleep function + * + * Copyright 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#ifndef HAVE_USLEEP +int usleep (unsigned int useconds) +{ +#if defined(__EMX__) + DosSleep(useconds); + return 0; +#elif defined(__BEOS__) + return snooze(useconds); +#elif defined(HAVE_SELECT) + struct timeval delay; + + delay.tv_sec = useconds / 1000000; + delay.tv_usec = useconds % 1000000; + + select( 0, 0, 0, 0, &delay ); + return 0; +#else /* defined(__EMX__) || defined(__BEOS__) || defined(HAVE_SELECT) */ + errno = ENOSYS; + return -1; +#endif /* defined(__EMX__) || defined(__BEOS__) || defined(HAVE_SELECT) */ +} +#endif /* HAVE_USLEEP */ diff --git a/miscemu/Makefile.in b/miscemu/Makefile.in index d2119d844a8..f0e6ef866b2 100644 --- a/miscemu/Makefile.in +++ b/miscemu/Makefile.in @@ -18,7 +18,7 @@ all: $(MODULE) ALL_OBJS = $(SPEC_SRCS:.spec=.spec.o) $(OBJS) $(MODULE): $(ALL_OBJS) - $(CC) -o $@ $(ALL_OBJS) -L$(DLLDIR) $(LDIMPORTS:%=-l%) $(LIBWINE) $(LIBUNICODE) $(LIBS) $(LDFLAGS) + $(CC) -o $@ $(ALL_OBJS) -L$(DLLDIR) $(LDIMPORTS:%=-l%) $(LIBWINE) $(LIBUNICODE) $(LIBPORT) $(LIBS) $(LDFLAGS) wine.spec.c: $(WINEBUILD) $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --exe wine -mgui -e wine_initial_task -L$(DLLDIR) $(IMPORTS:%=-l%) diff --git a/programs/Makeprog.rules.in b/programs/Makeprog.rules.in index 0cb468426eb..70344dba053 100644 --- a/programs/Makeprog.rules.in +++ b/programs/Makeprog.rules.in @@ -12,7 +12,7 @@ DEFS = @DLLFLAGS@ $(EXTRADEFS) LDDLLFLAGS = @LDDLLFLAGS@ ALL_OBJS = $(OBJS) $(MODULE).dbg.o -ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS) +ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LIBS) BASEMODULE = $(MODULE:.exe=) TESTIMPORTS = $(DELAYIMPORTS) $(IMPORTS) RUNTESTFLAGS= -q -P wine -T $(TOPOBJDIR) $(PLTESTPROGRAM:%=-p %) diff --git a/programs/avitools/Makefile.in b/programs/avitools/Makefile.in index 5dfa71fce01..cc228a2ed43 100644 --- a/programs/avitools/Makefile.in +++ b/programs/avitools/Makefile.in @@ -6,7 +6,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = none PROGRAMS = aviinfo.exe aviplay.exe icinfo.exe -ALL_LIBS = $(LIBWINE) $(LIBS) +ALL_LIBS = $(LIBWINE) $(LIBPORT) $(LIBS) C_SRCS = \ aviinfo.c \ diff --git a/server/Makefile.in b/server/Makefile.in index 6e4daa9369b..0d2794f3099 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -50,7 +50,7 @@ all: $(PROGRAMS) @MAKE_RULES@ wineserver: $(OBJS) - $(CC) -o $(PROGRAMS) $(OBJS) $(LIBWINE) $(LIBUNICODE) $(LIBS) $(LDFLAGS) + $(CC) -o $(PROGRAMS) $(OBJS) $(LIBUNICODE) $(LIBPORT) $(LIBS) $(LDFLAGS) install:: $(PROGRAMS) $(MKINSTALLDIRS) $(bindir) diff --git a/tools/Makefile.in b/tools/Makefile.in index 3756ee132c4..f02974793e9 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,9 +1,9 @@ -DEFS = -DNO_LIBWINE -DLEX_OUTPUT_ROOT="\"@LEX_OUTPUT_ROOT@\"" -DINCLUDEDIR="\"$(includedir)\"" -DBINDIR="\"$(bindir)\"" +DEFS = -DLEX_OUTPUT_ROOT="\"@LEX_OUTPUT_ROOT@\"" -DINCLUDEDIR="\"$(includedir)\"" -DBINDIR="\"$(bindir)\"" TOPSRCDIR = @top_srcdir@ TOPOBJDIR = .. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = none +MODULE = none PROGRAMS = \ bin2res \ @@ -40,19 +40,19 @@ all: $(PROGRAMS) $(SUBDIRS) widl wrc: wpp makedep: makedep.o - $(CC) $(CFLAGS) -o makedep makedep.o + $(CC) $(CFLAGS) -o makedep makedep.o $(LIBPORT) fnt2bdf: fnt2bdf.o - $(CC) $(CFLAGS) -o fnt2bdf fnt2bdf.o + $(CC) $(CFLAGS) -o fnt2bdf fnt2bdf.o $(LIBPORT) bin2res: bin2res.o - $(CC) $(CFLAGS) -o bin2res bin2res.o + $(CC) $(CFLAGS) -o bin2res bin2res.o $(LIBPORT) winegcc: winegcc.o - $(CC) $(CFLAGS) -o winegcc winegcc.o + $(CC) $(CFLAGS) -o winegcc winegcc.o $(LIBPORT) winewrap: winewrap.o - $(CC) $(CFLAGS) -o winewrap winewrap.o + $(CC) $(CFLAGS) -o winewrap winewrap.o $(LIBPORT) install:: $(MKINSTALLDIRS) $(bindir) $(mandir)/man$(prog_manext) diff --git a/tools/widl/Makefile.in b/tools/widl/Makefile.in index 042d69687c3..262f264caaf 100644 --- a/tools/widl/Makefile.in +++ b/tools/widl/Makefile.in @@ -23,11 +23,8 @@ all: $(PROGRAMS) @MAKE_RULES@ -widl: $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a - $(CC) $(CFLAGS) -o widl $(OBJS) $(EXTRALIBS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) $(LDFLAGS) - -widl.exe: $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a - $(CC) $(CFLAGS) -o widl.exe $(OBJS) $(EXTRALIBS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) -liberty $(LDFLAGS) +widl$(EXEEXT): $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a + $(CC) $(CFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(LIBPORT) $(LEXLIB) $(LDFLAGS) y.tab.c y.tab.h: parser.y $(YACC) $(YACCOPT) -d -t $(SRCDIR)/parser.y diff --git a/tools/widl/utils.c b/tools/widl/utils.c index c28d8173e67..379a36d9107 100644 --- a/tools/widl/utils.c +++ b/tools/widl/utils.c @@ -29,7 +29,6 @@ #include #include -#include "wine/unicode.h" #include "widl.h" #include "utils.h" #include "parser.h" diff --git a/tools/winebuild/Makefile.in b/tools/winebuild/Makefile.in index 4ca78c4fa3e..24322d2d7a0 100644 --- a/tools/winebuild/Makefile.in +++ b/tools/winebuild/Makefile.in @@ -23,7 +23,7 @@ all: $(PROGRAMS) winebuild.man @MAKE_RULES@ winebuild$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWINE) $(LIBUNICODE) $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBUNICODE) $(LIBPORT) $(LDFLAGS) winebuild.man: winebuild.man.in sed -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' $(SRCDIR)/winebuild.man.in >$@ || $(RM) $@ diff --git a/tools/winedump/Makefile.in b/tools/winedump/Makefile.in index 4c3c0fb4b80..52e076959c8 100644 --- a/tools/winedump/Makefile.in +++ b/tools/winedump/Makefile.in @@ -22,7 +22,7 @@ all: $(PROGRAMS) @MAKE_RULES@ winedump: $(OBJS) - $(CC) $(CFLAGS) -o winedump $(OBJS) $(LIBWINE) $(LDFLAGS) + $(CC) $(CFLAGS) -o winedump $(OBJS) $(LIBPORT) $(LDFLAGS) install:: $(PROGRAMS) $(MKINSTALLDIRS) $(bindir) diff --git a/tools/wmc/Makefile.in b/tools/wmc/Makefile.in index 2ccbaa48e9a..c42cddce649 100644 --- a/tools/wmc/Makefile.in +++ b/tools/wmc/Makefile.in @@ -24,11 +24,8 @@ mcl.o: y.tab.h @MAKE_RULES@ -wmc: $(OBJS) - $(CC) $(CFLAGS) -o wmc $(OBJS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) $(LDFLAGS) - -wmc.exe: $(OBJS) - $(CC) $(CFLAGS) -o wmc.exe $(OBJS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) -liberty $(LDFLAGS) +wmc$(EXEEXT): $(OBJS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBUNICODE) $(LIBPORT) $(LEXLIB) $(LDFLAGS) y.tab.c y.tab.h: mcy.y $(YACC) $(YACCOPT) -d -t $(SRCDIR)/mcy.y diff --git a/tools/wrc/Makefile.in b/tools/wrc/Makefile.in index 552b8d84a20..e7b9f4eee68 100644 --- a/tools/wrc/Makefile.in +++ b/tools/wrc/Makefile.in @@ -27,11 +27,8 @@ all: $(PROGRAMS) @MAKE_RULES@ -wrc: $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a - $(CC) $(CFLAGS) -o wrc $(OBJS) $(EXTRALIBS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) $(LDFLAGS) - -wrc.exe: $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a - $(CC) $(CFLAGS) -o wrc.exe $(OBJS) $(EXTRALIBS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) -liberty $(LDFLAGS) +wrc$(EXEEXT): $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a + $(CC) $(CFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(LIBUNICODE) $(LIBPORT) $(LEXLIB) $(LDFLAGS) y.tab.c y.tab.h: parser.y $(YACC) $(YACCOPT) -d -t $(SRCDIR)/parser.y