mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
added winetest gui program. Does not interact with server yet and requires advapi32 and comctl32 tests to be built.
svn path=/trunk/; revision=13989
This commit is contained in:
parent
0bf2971d1a
commit
bf89d5df7d
13 changed files with 3167 additions and 0 deletions
949
reactos/apps/utils/winetest/config.h
Normal file
949
reactos/apps/utils/winetest/config.h
Normal file
|
@ -0,0 +1,949 @@
|
|||
/* include/config.h. Generated by configure. */
|
||||
/* include/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
#define __WINE_CONFIG_H
|
||||
|
||||
/* Specifies the compiler flag that forces a short wchar_t */
|
||||
#define CC_FLAG_SHORT_WCHAR "-fshort-wchar"
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define if you have ALSA 1.x including devel headers */
|
||||
/* #undef HAVE_ALSA */
|
||||
|
||||
/* Define to 1 if you have the <alsa/asoundlib.h> header file. */
|
||||
/* #undef HAVE_ALSA_ASOUNDLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
/* #undef HAVE_ARPA_INET_H */
|
||||
|
||||
/* Define to 1 if you have the <arpa/nameser.h> header file. */
|
||||
/* #undef HAVE_ARPA_NAMESER_H */
|
||||
|
||||
/* Define if you have ARTS sound server */
|
||||
/* #undef HAVE_ARTS */
|
||||
|
||||
/* Define if the assembler keyword .size is accepted */
|
||||
/* #undef HAVE_ASM_DOT_SIZE */
|
||||
|
||||
/* Define to 1 if you have the <audio/audiolib.h> header file. */
|
||||
/* #undef HAVE_AUDIO_AUDIOLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <audio/soundlib.h> header file. */
|
||||
/* #undef HAVE_AUDIO_SOUNDLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <capi20.h> header file. */
|
||||
/* #undef HAVE_CAPI20_H */
|
||||
|
||||
/* Define if you have capi4linux libs and headers */
|
||||
/* #undef HAVE_CAPI4LINUX */
|
||||
|
||||
/* Define to 1 if you have the `chsize' function. */
|
||||
#define HAVE_CHSIZE 1
|
||||
|
||||
/* Define to 1 if you have the `clone' function. */
|
||||
/* #undef HAVE_CLONE */
|
||||
|
||||
/* Define to 1 if you have the `connect' function. */
|
||||
/* #undef HAVE_CONNECT */
|
||||
|
||||
/* Define if we have linux/input.h AND it contains the INPUT event API */
|
||||
/* #undef HAVE_CORRECT_LINUXINPUT_H */
|
||||
|
||||
/* Define to 1 if you have the <cups/cups.h> header file. */
|
||||
/* #undef HAVE_CUPS_CUPS_H */
|
||||
|
||||
/* Define to 1 if you have the <curses.h> header file. */
|
||||
/* #undef HAVE_CURSES_H */
|
||||
|
||||
/* Define to 1 if you have the <direct.h> header file. */
|
||||
#define HAVE_DIRECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
/* Define if you have dlopen */
|
||||
/* #undef HAVE_DLOPEN */
|
||||
|
||||
/* Define to 1 if you have the <elf.h> header file. */
|
||||
/* #undef HAVE_ELF_H */
|
||||
|
||||
/* Define to 1 if you have the `epoll_create' function. */
|
||||
/* #undef HAVE_EPOLL_CREATE */
|
||||
|
||||
/* Define to 1 if you have the `ffs' function. */
|
||||
/* #undef HAVE_FFS */
|
||||
|
||||
/* Define to 1 if you have the `finite' function. */
|
||||
#define HAVE_FINITE 1
|
||||
|
||||
/* Define to 1 if you have the <float.h> header file. */
|
||||
#define HAVE_FLOAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <fontconfig/fontconfig.h> header file. */
|
||||
/* #undef HAVE_FONTCONFIG_FONTCONFIG_H */
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
/* #undef HAVE_FORK */
|
||||
|
||||
/* Define to 1 if you have the `fpclass' function. */
|
||||
#define HAVE_FPCLASS 1
|
||||
|
||||
/* Define if FreeType 2 is installed */
|
||||
/* #undef HAVE_FREETYPE */
|
||||
|
||||
/* Define to 1 if you have the <freetype/freetype.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FREETYPE_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ftglyph.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTGLYPH_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ftnames.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTNAMES_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ftoutln.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTOUTLN_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ftsnames.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTSNAMES_H */
|
||||
|
||||
/* Define if you have the <freetype/fttrigon.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTTRIGON_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ftwinfnt.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTWINFNT_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/internal/sfnt.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_INTERNAL_SFNT_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ttnameid.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_TTNAMEID_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/tttables.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_TTTABLES_H */
|
||||
|
||||
/* Define to 1 if the system has the type `fsblkcnt_t'. */
|
||||
/* #undef HAVE_FSBLKCNT_T */
|
||||
|
||||
/* Define to 1 if the system has the type `fsfilcnt_t'. */
|
||||
/* #undef HAVE_FSFILCNT_T */
|
||||
|
||||
/* Define to 1 if you have the `fstatfs' function. */
|
||||
/* #undef HAVE_FSTATFS */
|
||||
|
||||
/* Define to 1 if you have the `fstatvfs' function. */
|
||||
/* #undef HAVE_FSTATVFS */
|
||||
|
||||
/* Define to 1 if you have the <ft2build.h> header file. */
|
||||
/* #undef HAVE_FT2BUILD_H */
|
||||
|
||||
/* Define to 1 if you have the `ftruncate' function. */
|
||||
#define HAVE_FTRUNCATE 1
|
||||
|
||||
/* Define to 1 if you have the `futimes' function. */
|
||||
/* #undef HAVE_FUTIMES */
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME */
|
||||
|
||||
/* Define to 1 if you have the `getnetbyname' function. */
|
||||
/* #undef HAVE_GETNETBYNAME */
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#define HAVE_GETOPT_H 1
|
||||
|
||||
/* Define to 1 if you have the `getopt_long' function. */
|
||||
#define HAVE_GETOPT_LONG 1
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define to 1 if you have the `getprotobyname' function. */
|
||||
/* #undef HAVE_GETPROTOBYNAME */
|
||||
|
||||
/* Define to 1 if you have the `getprotobynumber' function. */
|
||||
/* #undef HAVE_GETPROTOBYNUMBER */
|
||||
|
||||
/* Define to 1 if you have the `getpwuid' function. */
|
||||
/* #undef HAVE_GETPWUID */
|
||||
|
||||
/* Define to 1 if you have the `getservbyport' function. */
|
||||
/* #undef HAVE_GETSERVBYPORT */
|
||||
|
||||
/* Define to 1 if you have the `gettid' function. */
|
||||
/* #undef HAVE_GETTID */
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
/* #undef HAVE_GETTIMEOFDAY */
|
||||
|
||||
/* Define to 1 if you have the `getuid' function. */
|
||||
/* #undef HAVE_GETUID */
|
||||
|
||||
/* Define to 1 if you have the <gif_lib.h> header file. */
|
||||
/* #undef HAVE_GIF_LIB_H */
|
||||
|
||||
/* Define to 1 if you have the <GL/glext.h> header file. */
|
||||
/* #undef HAVE_GL_GLEXT_H */
|
||||
|
||||
/* Define to 1 if you have the <GL/glx.h> header file. */
|
||||
/* #undef HAVE_GL_GLX_H */
|
||||
|
||||
/* Define to 1 if you have the <GL/gl.h> header file. */
|
||||
/* #undef HAVE_GL_GL_H */
|
||||
|
||||
/* Define to 1 if the ICU libraries are installed */
|
||||
/* #undef HAVE_ICU */
|
||||
|
||||
/* Define to 1 if you have the <ieeefp.h> header file. */
|
||||
/* #undef HAVE_IEEEFP_H */
|
||||
|
||||
/* Define to 1 if you have the `inet_aton' function. */
|
||||
/* #undef HAVE_INET_ATON */
|
||||
|
||||
/* Define to 1 if you have the `inet_network' function. */
|
||||
/* #undef HAVE_INET_NETWORK */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
#define HAVE_IO_H 1
|
||||
|
||||
/* Define if IPX should use netipx/ipx.h from libc */
|
||||
/* #undef HAVE_IPX_GNU */
|
||||
|
||||
/* Define if IPX includes are taken from Linux kernel */
|
||||
/* #undef HAVE_IPX_LINUX */
|
||||
|
||||
/* Define to 1 if you have the `iswalnum' function. */
|
||||
#define HAVE_ISWALNUM 1
|
||||
|
||||
/* Define to 1 if you have the <jack/jack.h> header file. */
|
||||
/* #undef HAVE_JACK_JACK_H */
|
||||
|
||||
/* Define to 1 if you have the <jpeglib.h> header file. */
|
||||
/* #undef HAVE_JPEGLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <lcms.h> header file. */
|
||||
/* #undef HAVE_LCMS_H */
|
||||
|
||||
/* Define to 1 if you have the <lcms/lcms.h> header file. */
|
||||
/* #undef HAVE_LCMS_LCMS_H */
|
||||
|
||||
/* Define if you have libaudioIO */
|
||||
/* #undef HAVE_LIBAUDIOIO */
|
||||
|
||||
/* Define to 1 if you have the <libaudioio.h> header file. */
|
||||
/* #undef HAVE_LIBAUDIOIO_H */
|
||||
|
||||
/* Define if you have the curses library (-lcurses) */
|
||||
/* #undef HAVE_LIBCURSES */
|
||||
|
||||
/* Define to 1 if you have the `i386' library (-li386). */
|
||||
/* #undef HAVE_LIBI386 */
|
||||
|
||||
/* Define if you have the ncurses library (-lncurses) */
|
||||
/* #undef HAVE_LIBNCURSES */
|
||||
|
||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||
/* #undef HAVE_LIBNSL */
|
||||
|
||||
/* Define to 1 if you have the `ossaudio' library (-lossaudio). */
|
||||
/* #undef HAVE_LIBOSSAUDIO */
|
||||
|
||||
/* Define to 1 if you have the `poll' library (-lpoll). */
|
||||
/* #undef HAVE_LIBPOLL */
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
/* #undef HAVE_LIBRESOLV */
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
/* #undef HAVE_LIBSOCKET */
|
||||
|
||||
/* Define to 1 if you have the `w' library (-lw). */
|
||||
/* #undef HAVE_LIBW */
|
||||
|
||||
/* Define to 1 if you have the `xpg4' library (-lxpg4). */
|
||||
/* #undef HAVE_LIBXPG4 */
|
||||
|
||||
/* Define if you have the Xrandr library */
|
||||
/* #undef HAVE_LIBXRANDR */
|
||||
|
||||
/* Define if you have the X Shape extension */
|
||||
/* #undef HAVE_LIBXSHAPE */
|
||||
|
||||
/* Define if you have the Xxf86dga library version 2 */
|
||||
/* #undef HAVE_LIBXXF86DGA2 */
|
||||
|
||||
/* Define if you have the Xxf86vm library */
|
||||
/* #undef HAVE_LIBXXF86VM */
|
||||
|
||||
/* Define if you have the X Shm extension */
|
||||
/* #undef HAVE_LIBXXSHM */
|
||||
|
||||
/* Define to 1 if you have the <link.h> header file. */
|
||||
/* #undef HAVE_LINK_H */
|
||||
|
||||
/* Define if <linux/joystick.h> defines the Linux 2.2 joystick API */
|
||||
/* #undef HAVE_LINUX_22_JOYSTICK_API */
|
||||
|
||||
/* Define to 1 if you have the <linux/capi.h> header file. */
|
||||
/* #undef HAVE_LINUX_CAPI_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/cdrom.h> header file. */
|
||||
/* #undef HAVE_LINUX_CDROM_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/compiler.h> header file. */
|
||||
/* #undef HAVE_LINUX_COMPILER_H */
|
||||
|
||||
/* Define if Linux-style gethostbyname_r and gethostbyaddr_r are available */
|
||||
/* #undef HAVE_LINUX_GETHOSTBYNAME_R_6 */
|
||||
|
||||
/* Define to 1 if you have the <linux/hdreg.h> header file. */
|
||||
/* #undef HAVE_LINUX_HDREG_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/input.h> header file. */
|
||||
/* #undef HAVE_LINUX_INPUT_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/ioctl.h> header file. */
|
||||
/* #undef HAVE_LINUX_IOCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/joystick.h> header file. */
|
||||
/* #undef HAVE_LINUX_JOYSTICK_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/major.h> header file. */
|
||||
/* #undef HAVE_LINUX_MAJOR_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/param.h> header file. */
|
||||
/* #undef HAVE_LINUX_PARAM_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/serial.h> header file. */
|
||||
/* #undef HAVE_LINUX_SERIAL_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/ucdrom.h> header file. */
|
||||
/* #undef HAVE_LINUX_UCDROM_H */
|
||||
|
||||
/* Define to 1 if the system has the type `long long'. */
|
||||
#define HAVE_LONG_LONG 1
|
||||
|
||||
/* Define to 1 if you have the `lstat' function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
/* Define to 1 if you have the <machine/cpu.h> header file. */
|
||||
/* #undef HAVE_MACHINE_CPU_H */
|
||||
|
||||
/* Define to 1 if you have the <machine/soundcard.h> header file. */
|
||||
/* #undef HAVE_MACHINE_SOUNDCARD_H */
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define to 1 if you have the <mntent.h> header file. */
|
||||
/* #undef HAVE_MNTENT_H */
|
||||
|
||||
/* Define to 1 if the system has the type `mode_t'. */
|
||||
#define HAVE_MODE_T 1
|
||||
|
||||
/* Define if you have NAS including devel headers */
|
||||
/* #undef HAVE_NAS */
|
||||
|
||||
/* Define to 1 if you have the <ncurses.h> header file. */
|
||||
/* #undef HAVE_NCURSES_H */
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
/* #undef HAVE_NETDB_H */
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
/* #undef HAVE_NETINET_IN_H */
|
||||
|
||||
/* Define to 1 if you have the <netinet/in_systm.h> header file. */
|
||||
/* #undef HAVE_NETINET_IN_SYSTM_H */
|
||||
|
||||
/* Define to 1 if you have the <netinet/tcp_fsm.h> header file. */
|
||||
/* #undef HAVE_NETINET_TCP_FSM_H */
|
||||
|
||||
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||
/* #undef HAVE_NETINET_TCP_H */
|
||||
|
||||
/* Define to 1 if you have the <net/if_arp.h> header file. */
|
||||
/* #undef HAVE_NET_IF_ARP_H */
|
||||
|
||||
/* Define to 1 if you have the <net/if_dl.h> header file. */
|
||||
/* #undef HAVE_NET_IF_DL_H */
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
/* #undef HAVE_NET_IF_H */
|
||||
|
||||
/* Define to 1 if you have the <net/if_types.h> header file. */
|
||||
/* #undef HAVE_NET_IF_TYPES_H */
|
||||
|
||||
/* Define to 1 if you have the <net/route.h> header file. */
|
||||
/* #undef HAVE_NET_ROUTE_H */
|
||||
|
||||
/* Define to 1 if the system has the type `off_t'. */
|
||||
#define HAVE_OFF_T 1
|
||||
|
||||
/* Define if OpenGL is present on the system */
|
||||
/* #undef HAVE_OPENGL */
|
||||
|
||||
/* Define to 1 if you have the <openssl/ssl.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_SSL_H */
|
||||
|
||||
/* Define if you have the Open Sound system */
|
||||
/* #undef HAVE_OSS */
|
||||
|
||||
/* Define if you have the Open Sound system (MIDI interface) */
|
||||
/* #undef HAVE_OSS_MIDI */
|
||||
|
||||
/* Define to 1 if you have the `pclose' function. */
|
||||
#define HAVE_PCLOSE 1
|
||||
|
||||
/* Define to 1 if the system has the type `pid_t'. */
|
||||
#define HAVE_PID_T 1
|
||||
|
||||
/* Define to 1 if you have the `popen' function. */
|
||||
#define HAVE_POPEN 1
|
||||
|
||||
/* Define if we can use ppdev.h for parallel port access */
|
||||
/* #undef HAVE_PPDEV */
|
||||
|
||||
/* Define to 1 if you have the `pread' function. */
|
||||
/* #undef HAVE_PREAD */
|
||||
|
||||
/* Define to 1 if you have the <process.h> header file. */
|
||||
#define HAVE_PROCESS_H 1
|
||||
|
||||
/* Define to 1 if you have the `pthread_getattr_np' function. */
|
||||
/* #undef HAVE_PTHREAD_GETATTR_NP */
|
||||
|
||||
/* Define to 1 if you have the `pthread_get_stackaddr_np' function. */
|
||||
/* #undef HAVE_PTHREAD_GET_STACKADDR_NP */
|
||||
|
||||
/* Define to 1 if you have the `pthread_get_stacksize_np' function. */
|
||||
/* #undef HAVE_PTHREAD_GET_STACKSIZE_NP */
|
||||
|
||||
/* Define to 1 if you have the <pthread.h> header file. */
|
||||
/* #undef HAVE_PTHREAD_H */
|
||||
|
||||
/* Define to 1 if the system has the type `pthread_rwlockattr_t'. */
|
||||
/* #undef HAVE_PTHREAD_RWLOCKATTR_T */
|
||||
|
||||
/* Define to 1 if the system has the type `pthread_rwlock_t'. */
|
||||
/* #undef HAVE_PTHREAD_RWLOCK_T */
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
/* #undef HAVE_PWD_H */
|
||||
|
||||
/* Define to 1 if you have the `pwrite' function. */
|
||||
/* #undef HAVE_PWRITE */
|
||||
|
||||
/* Define to 1 if you have the `readlink' function. */
|
||||
/* #undef HAVE_READLINK */
|
||||
|
||||
/* Define to 1 if you have the <regex.h> header file. */
|
||||
/* #undef HAVE_REGEX_H */
|
||||
|
||||
/* Define to 1 if you have the <resolv.h> header file. */
|
||||
/* #undef HAVE_RESOLV_H */
|
||||
|
||||
/* Define to 1 if you have the `rfork' function. */
|
||||
/* #undef HAVE_RFORK */
|
||||
|
||||
/* Define if we have SANE development environment */
|
||||
/* #undef HAVE_SANE */
|
||||
|
||||
/* Define to 1 if you have the <sched.h> header file. */
|
||||
/* #undef HAVE_SCHED_H */
|
||||
|
||||
/* Define to 1 if you have the `sched_yield' function. */
|
||||
/* #undef HAVE_SCHED_YIELD */
|
||||
|
||||
/* Define to 1 if you have the <scsi/scsi.h> header file. */
|
||||
/* #undef HAVE_SCSI_SCSI_H */
|
||||
|
||||
/* Define to 1 if you have the <scsi/scsi_ioctl.h> header file. */
|
||||
/* #undef HAVE_SCSI_SCSI_IOCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <scsi/sg.h> header file. */
|
||||
/* #undef HAVE_SCSI_SG_H */
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
/* #undef HAVE_SELECT */
|
||||
|
||||
/* Define to 1 if you have the `sendmsg' function. */
|
||||
/* #undef HAVE_SENDMSG */
|
||||
|
||||
/* Define to 1 if you have the `settimeofday' function. */
|
||||
/* #undef HAVE_SETTIMEOFDAY */
|
||||
|
||||
/* Define if sigaddset is supported */
|
||||
/* #undef HAVE_SIGADDSET */
|
||||
|
||||
/* Define to 1 if you have the `sigaltstack' function. */
|
||||
/* #undef HAVE_SIGALTSTACK */
|
||||
|
||||
/* Define to 1 if `si_fd' is member of `siginfo_t'. */
|
||||
/* #undef HAVE_SIGINFO_T_SI_FD */
|
||||
|
||||
/* Define to 1 if you have the `sigprocmask' function. */
|
||||
/* #undef HAVE_SIGPROCMASK */
|
||||
|
||||
/* Define to 1 if you have the sigsetjmp (and siglongjmp) function */
|
||||
/* #undef HAVE_SIGSETJMP */
|
||||
|
||||
/* Define to 1 if the system has the type `sigset_t'. */
|
||||
/* #undef HAVE_SIGSET_T */
|
||||
|
||||
/* Define to 1 if the system has the type `size_t'. */
|
||||
#define HAVE_SIZE_T 1
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#define HAVE_SNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the <soundcard.h> header file. */
|
||||
/* #undef HAVE_SOUNDCARD_H */
|
||||
|
||||
/* Define to 1 if you have the `spawnvp' function. */
|
||||
#define HAVE_SPAWNVP 1
|
||||
|
||||
/* Define to 1 if the system has the type `ssize_t'. */
|
||||
#define HAVE_SSIZE_T 1
|
||||
|
||||
/* Define to 1 if you have the `statfs' function. */
|
||||
/* #undef HAVE_STATFS */
|
||||
|
||||
/* Define to 1 if you have the `statvfs' function. */
|
||||
/* #undef HAVE_STATVFS */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strncasecmp' function. */
|
||||
#define HAVE_STRNCASECMP 1
|
||||
|
||||
/* Define to 1 if `msg_accrights' is member of `struct msghdr'. */
|
||||
/* #undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */
|
||||
|
||||
/* Define to 1 if `name' is member of `struct option'. */
|
||||
#define HAVE_STRUCT_OPTION_NAME 1
|
||||
|
||||
/* Define to 1 if `sa_len' is member of `struct sockaddr'. */
|
||||
/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
|
||||
|
||||
/* Define to 1 if `sun_len' is member of `struct sockaddr_un'. */
|
||||
/* #undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN */
|
||||
|
||||
/* Define to 1 if `f_bavail' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_BAVAIL */
|
||||
|
||||
/* Define to 1 if `f_bfree' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_BFREE */
|
||||
|
||||
/* Define to 1 if `f_favail' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_FAVAIL */
|
||||
|
||||
/* Define to 1 if `f_ffree' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_FFREE */
|
||||
|
||||
/* Define to 1 if `f_frsize' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_FRSIZE */
|
||||
|
||||
/* Define to 1 if `f_namelen' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_NAMELEN */
|
||||
|
||||
/* Define to 1 if `f_blocks' is member of `struct statvfs'. */
|
||||
/* #undef HAVE_STRUCT_STATVFS_F_BLOCKS */
|
||||
|
||||
/* Define to 1 if `st_blocks' is member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_BLOCKS */
|
||||
|
||||
/* Define to 1 if you have the <syscall.h> header file. */
|
||||
/* #undef HAVE_SYSCALL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/asoundlib.h> header file. */
|
||||
/* #undef HAVE_SYS_ASOUNDLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/cdio.h> header file. */
|
||||
/* #undef HAVE_SYS_CDIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/elf32.h> header file. */
|
||||
/* #undef HAVE_SYS_ELF32_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
/* #undef HAVE_SYS_EPOLL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/errno.h> header file. */
|
||||
/* #undef HAVE_SYS_ERRNO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/exec_elf.h> header file. */
|
||||
/* #undef HAVE_SYS_EXEC_ELF_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/filio.h> header file. */
|
||||
/* #undef HAVE_SYS_FILIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
/* #undef HAVE_SYS_IOCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ipc.h> header file. */
|
||||
/* #undef HAVE_SYS_IPC_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/link.h> header file. */
|
||||
/* #undef HAVE_SYS_LINK_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/lwp.h> header file. */
|
||||
/* #undef HAVE_SYS_LWP_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||
/* #undef HAVE_SYS_MMAN_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/modem.h> header file. */
|
||||
/* #undef HAVE_SYS_MODEM_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/mount.h> header file. */
|
||||
/* #undef HAVE_SYS_MOUNT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/msg.h> header file. */
|
||||
/* #undef HAVE_SYS_MSG_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
/* #undef HAVE_SYS_POLL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ptrace.h> header file. */
|
||||
/* #undef HAVE_SYS_PTRACE_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/reg.h> header file. */
|
||||
/* #undef HAVE_SYS_REG_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/scsiio.h> header file. */
|
||||
/* #undef HAVE_SYS_SCSIIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/shm.h> header file. */
|
||||
/* #undef HAVE_SYS_SHM_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/signal.h> header file. */
|
||||
/* #undef HAVE_SYS_SIGNAL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
/* #undef HAVE_SYS_SOCKET_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
/* #undef HAVE_SYS_SOCKIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/soundcard.h> header file. */
|
||||
/* #undef HAVE_SYS_SOUNDCARD_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/statfs.h> header file. */
|
||||
/* #undef HAVE_SYS_STATFS_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/statvfs.h> header file. */
|
||||
/* #undef HAVE_SYS_STATVFS_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/strtio.h> header file. */
|
||||
/* #undef HAVE_SYS_STRTIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/syscall.h> header file. */
|
||||
/* #undef HAVE_SYS_SYSCALL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/sysctl.h> header file. */
|
||||
/* #undef HAVE_SYS_SYSCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/times.h> header file. */
|
||||
/* #undef HAVE_SYS_TIMES_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||
/* #undef HAVE_SYS_UIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||
/* #undef HAVE_SYS_UN_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/user.h> header file. */
|
||||
/* #undef HAVE_SYS_USER_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/vfs.h> header file. */
|
||||
/* #undef HAVE_SYS_VFS_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/vm86.h> header file. */
|
||||
/* #undef HAVE_SYS_VM86_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define to 1 if you have the `tcgetattr' function. */
|
||||
/* #undef HAVE_TCGETATTR */
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
/* #undef HAVE_TERMIOS_H */
|
||||
|
||||
/* Define to 1 if you have the `timegm' function. */
|
||||
/* #undef HAVE_TIMEGM */
|
||||
|
||||
/* Define to 1 if you have the <ucontext.h> header file. */
|
||||
/* #undef HAVE_UCONTEXT_H */
|
||||
|
||||
/* Define to 1 if you have the <unicode/ubidi.h> header file. */
|
||||
/* #undef HAVE_UNICODE_UBIDI_H */
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `usleep' function. */
|
||||
/* #undef HAVE_USLEEP */
|
||||
|
||||
/* Define to 1 if you have the <utime.h> header file. */
|
||||
#define HAVE_UTIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
|
||||
/* #undef HAVE_VALGRIND_MEMCHECK_H */
|
||||
|
||||
/* Define if we have va_copy */
|
||||
#define HAVE_VA_COPY 1
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `wait4' function. */
|
||||
/* #undef HAVE_WAIT4 */
|
||||
|
||||
/* Define to 1 if you have the `waitpid' function. */
|
||||
/* #undef HAVE_WAITPID */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/shape.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_SHAPE_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/xf86dga.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XF86DGA_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/xf86vmode.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XF86VMODE_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/XInput.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XINPUT_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XRANDR_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/Xrender.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XRENDER_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/XShm.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XSHM_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/XKBlib.h> header file. */
|
||||
/* #undef HAVE_X11_XKBLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/Xlib.h> header file. */
|
||||
/* #undef HAVE_X11_XLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/Xutil.h> header file. */
|
||||
/* #undef HAVE_X11_XUTIL_H */
|
||||
|
||||
/* Define if you have the XKB extension */
|
||||
/* #undef HAVE_XKB */
|
||||
|
||||
/* Define if Xrender has the XRenderSetPictureTransform function */
|
||||
/* #undef HAVE_XRENDERSETPICTURETRANSFORM */
|
||||
|
||||
/* Define to 1 if you have the `_lwp_create' function. */
|
||||
/* #undef HAVE__LWP_CREATE */
|
||||
|
||||
/* Define to 1 if you have the `_lwp_self' function. */
|
||||
/* #undef HAVE__LWP_SELF */
|
||||
|
||||
/* Define to 1 if you have the `_pclose' function. */
|
||||
#define HAVE__PCLOSE 1
|
||||
|
||||
/* Define to 1 if you have the `_popen' function. */
|
||||
#define HAVE__POPEN 1
|
||||
|
||||
/* Define to 1 if you have the `_snprintf' function. */
|
||||
#define HAVE__SNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `_spawnvp' function. */
|
||||
#define HAVE__SPAWNVP 1
|
||||
|
||||
/* Define to 1 if you have the `_stricmp' function. */
|
||||
#define HAVE__STRICMP 1
|
||||
|
||||
/* Define to 1 if you have the `_strnicmp' function. */
|
||||
#define HAVE__STRNICMP 1
|
||||
|
||||
/* Define to 1 if you have the `_vsnprintf' function. */
|
||||
#define HAVE__VSNPRINTF 1
|
||||
|
||||
/* Define if we have __va_copy */
|
||||
#define HAVE___VA_COPY 1
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "wine-devel@winehq.org"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "Wine"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "Wine 20050211"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "wine"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "20050211"
|
||||
|
||||
/* Define to the soname of the libcapi20 library. */
|
||||
/* #undef SONAME_LIBCAPI20 */
|
||||
|
||||
/* Define to the soname of the libcrypto library. */
|
||||
/* #undef SONAME_LIBCRYPTO */
|
||||
|
||||
/* Define to the soname of the libcups library. */
|
||||
/* #undef SONAME_LIBCUPS */
|
||||
|
||||
/* Define to the soname of the libcurses library. */
|
||||
/* #undef SONAME_LIBCURSES */
|
||||
|
||||
/* Define to the soname of the libfontconfig library. */
|
||||
/* #undef SONAME_LIBFONTCONFIG */
|
||||
|
||||
/* Define to the soname of the libfreetype library. */
|
||||
/* #undef SONAME_LIBFREETYPE */
|
||||
|
||||
/* Define to the soname of the libgif library. */
|
||||
/* #undef SONAME_LIBGIF */
|
||||
|
||||
/* Define to the soname of the libGL library. */
|
||||
/* #undef SONAME_LIBGL */
|
||||
|
||||
/* Define to the soname of the libjack library. */
|
||||
/* #undef SONAME_LIBJACK */
|
||||
|
||||
/* Define to the soname of the libjpeg library. */
|
||||
/* #undef SONAME_LIBJPEG */
|
||||
|
||||
/* Define to the soname of the liblcms library. */
|
||||
/* #undef SONAME_LIBLCMS */
|
||||
|
||||
/* Define to the soname of the libncurses library. */
|
||||
/* #undef SONAME_LIBNCURSES */
|
||||
|
||||
/* Define to the soname of the libssl library. */
|
||||
/* #undef SONAME_LIBSSL */
|
||||
|
||||
/* Define to the soname of the libtxc_dxtn library. */
|
||||
/* #undef SONAME_LIBTXC_DXTN */
|
||||
|
||||
/* Define to the soname of the libungif library. */
|
||||
/* #undef SONAME_LIBUNGIF */
|
||||
|
||||
/* Define to the soname of the libX11 library. */
|
||||
/* #undef SONAME_LIBX11 */
|
||||
|
||||
/* Define to the soname of the libXext library. */
|
||||
/* #undef SONAME_LIBXEXT */
|
||||
|
||||
/* Define to the soname of the libXi library. */
|
||||
/* #undef SONAME_LIBXI */
|
||||
|
||||
/* Define to the soname of the libXrandr library. */
|
||||
/* #undef SONAME_LIBXRANDR */
|
||||
|
||||
/* Define to the soname of the libXrender library. */
|
||||
/* #undef SONAME_LIBXRENDER */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define if the struct statfs is defined by <sys/mount.h> */
|
||||
/* #undef STATFS_DEFINED_BY_SYS_MOUNT */
|
||||
|
||||
/* Define if the struct statfs is defined by <sys/statfs.h> */
|
||||
/* #undef STATFS_DEFINED_BY_SYS_STATFS */
|
||||
|
||||
/* Define if the struct statfs is defined by <sys/vfs.h> */
|
||||
/* #undef STATFS_DEFINED_BY_SYS_VFS */
|
||||
|
||||
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if the X Window System is missing or not being used. */
|
||||
#define X_DISPLAY_MISSING 1
|
||||
|
||||
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
|
||||
`char[]'. */
|
||||
#define YYTEXT_POINTER 1
|
||||
|
||||
/* Set this to 64 to enable 64-bit file support on Linux */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* Define to a macro to generate an assembly function directive */
|
||||
#define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"
|
||||
|
||||
/* Define to a macro to generate an assembly name from a C symbol */
|
||||
#define __ASM_NAME(name) "_" name
|
||||
|
||||
/* Define to the assembler keyword used to specify a word value */
|
||||
#define __ASM_SHORT ".short"
|
||||
|
||||
/* Define to the assembler keyword used to specify an ASCII string */
|
||||
#define __ASM_STRING ".string"
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
25
reactos/apps/utils/winetest/dist.rc
Normal file
25
reactos/apps/utils/winetest/dist.rc
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Resources for the binary we distribute to testers
|
||||
*
|
||||
* Copyright 2004 Ferenc Wagner
|
||||
*
|
||||
* 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 "winetest.rc"
|
||||
|
||||
WINE_BUILD STRINGRES "build.id"
|
||||
BUILD_INFO STRINGRES "build.nfo"
|
||||
TESTS_URL STRINGRES "tests.url"
|
473
reactos/apps/utils/winetest/gui.c
Normal file
473
reactos/apps/utils/winetest/gui.c
Normal file
|
@ -0,0 +1,473 @@
|
|||
/*
|
||||
* GUI support
|
||||
*
|
||||
* Copyright 2004 Ferenc Wagner
|
||||
*
|
||||
* 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 <windows.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "resource.h"
|
||||
#include "winetest.h"
|
||||
|
||||
/* Event object to signal successful window creation to main thread.
|
||||
*/
|
||||
HANDLE initEvent;
|
||||
|
||||
/* Dialog handle
|
||||
*/
|
||||
HWND dialog;
|
||||
|
||||
/* Progress data for the text* functions and for scaling.
|
||||
*/
|
||||
unsigned int progressMax, progressCurr;
|
||||
double progressScale;
|
||||
|
||||
/* Progress group counter for the gui* functions.
|
||||
*/
|
||||
int progressGroup;
|
||||
|
||||
char *
|
||||
renderString (va_list ap)
|
||||
{
|
||||
const char *fmt = va_arg (ap, char*);
|
||||
static char buffer[128];
|
||||
|
||||
vsnprintf (buffer, sizeof buffer, fmt, ap);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
int
|
||||
MBdefault (int uType)
|
||||
{
|
||||
static const int matrix[][4] = {{IDOK, 0, 0, 0},
|
||||
{IDOK, IDCANCEL, 0, 0},
|
||||
{IDABORT, IDRETRY, IDIGNORE, 0},
|
||||
{IDYES, IDNO, IDCANCEL, 0},
|
||||
{IDYES, IDNO, 0, 0},
|
||||
{IDRETRY, IDCANCEL, 0, 0}};
|
||||
int type = uType & MB_TYPEMASK;
|
||||
int def = (uType & MB_DEFMASK) / MB_DEFBUTTON2;
|
||||
|
||||
return matrix[type][def];
|
||||
}
|
||||
|
||||
/* report (R_STATUS, fmt, ...) */
|
||||
int
|
||||
textStatus (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
fputs (str, stderr);
|
||||
fputc ('\n', stderr);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiStatus (va_list ap)
|
||||
{
|
||||
size_t len;
|
||||
char *str = vstrmake (&len, ap);
|
||||
|
||||
if (len > 128) str[129] = 0;
|
||||
SetDlgItemText (dialog, IDC_SB, str);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_PROGRESS, barnum, steps) */
|
||||
int
|
||||
textProgress (va_list ap)
|
||||
{
|
||||
progressGroup = va_arg (ap, int);
|
||||
progressMax = va_arg (ap, int);
|
||||
progressCurr = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiProgress (va_list ap)
|
||||
{
|
||||
unsigned int max;
|
||||
HWND pb;
|
||||
|
||||
progressGroup = va_arg (ap, int);
|
||||
progressMax = max = va_arg (ap, int);
|
||||
progressCurr = 0;
|
||||
if (max > 0xffff) {
|
||||
progressScale = (double)0xffff / max;
|
||||
max = 0xffff;
|
||||
}
|
||||
else progressScale = 1;
|
||||
pb = GetDlgItem (dialog, IDC_PB0 + progressGroup * 2);
|
||||
SendMessage (pb, PBM_SETRANGE, 0, MAKELPARAM (0, max));
|
||||
SendMessage (pb, PBM_SETSTEP, (WPARAM)1, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_STEP, fmt, ...) */
|
||||
int
|
||||
textStep (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
progressCurr++;
|
||||
fputs (str, stderr);
|
||||
fprintf (stderr, " (%d of %d)\n", progressCurr, progressMax);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiStep (va_list ap)
|
||||
{
|
||||
const int pgID = IDC_ST0 + progressGroup * 2;
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
progressCurr++;
|
||||
SetDlgItemText (dialog, pgID, str);
|
||||
SendDlgItemMessage (dialog, pgID+1, PBM_SETPOS,
|
||||
(WPARAM)(progressScale * progressCurr), 0);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_DELTA, inc, fmt, ...) */
|
||||
int
|
||||
textDelta (va_list ap)
|
||||
{
|
||||
const int inc = va_arg (ap, int);
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
progressCurr += inc;
|
||||
fputs (str, stderr);
|
||||
fprintf (stderr, " (%d of %d)\n", progressCurr, progressMax);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiDelta (va_list ap)
|
||||
{
|
||||
const int inc = va_arg (ap, int);
|
||||
const int pgID = IDC_ST0 + progressGroup * 2;
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
progressCurr += inc;
|
||||
SetDlgItemText (dialog, pgID, str);
|
||||
SendDlgItemMessage (dialog, pgID+1, PBM_SETPOS,
|
||||
(WPARAM)(progressScale * progressCurr), 0);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_DIR, fmt, ...) */
|
||||
int
|
||||
textDir (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
fputs ("Temporary directory: ", stderr);
|
||||
fputs (str, stderr);
|
||||
fputc ('\n', stderr);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiDir (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
SetDlgItemText (dialog, IDC_DIR, str);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_OUT, fmt, ...) */
|
||||
int
|
||||
textOut (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
fputs ("Log file: ", stderr);
|
||||
fputs (str, stderr);
|
||||
fputc ('\n', stderr);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiOut (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
SetDlgItemText (dialog, IDC_OUT, str);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_WARNING, fmt, ...) */
|
||||
int
|
||||
textWarning (va_list ap)
|
||||
{
|
||||
fputs ("Warning: ", stderr);
|
||||
textStatus (ap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiWarning (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
MessageBox (dialog, str, "Warning", MB_ICONWARNING | MB_OK);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_ERROR, fmt, ...) */
|
||||
int
|
||||
textError (va_list ap)
|
||||
{
|
||||
fputs ("Error: ", stderr);
|
||||
textStatus (ap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiError (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
MessageBox (dialog, str, "Error", MB_ICONERROR | MB_OK);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_FATAL, fmt, ...) */
|
||||
int
|
||||
textFatal (va_list ap)
|
||||
{
|
||||
textError (ap);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
int
|
||||
guiFatal (va_list ap)
|
||||
{
|
||||
guiError (ap);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/* report (R_ASK, type, fmt, ...) */
|
||||
int
|
||||
textAsk (va_list ap)
|
||||
{
|
||||
int uType = va_arg (ap, int);
|
||||
int ret = MBdefault (uType);
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
fprintf (stderr, "Question of type %d: %s\n"
|
||||
"Returning default: %d\n", uType, str, ret);
|
||||
free (str);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
guiAsk (va_list ap)
|
||||
{
|
||||
int uType = va_arg (ap, int);
|
||||
char *str = vstrmake (NULL, ap);
|
||||
int ret = MessageBox (dialog, str, "Question",
|
||||
MB_ICONQUESTION | uType);
|
||||
|
||||
free (str);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Quiet functions */
|
||||
int
|
||||
qNoOp (va_list ap)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
qFatal (va_list ap)
|
||||
{
|
||||
exit (1);
|
||||
}
|
||||
|
||||
int
|
||||
qAsk (va_list ap)
|
||||
{
|
||||
return MBdefault (va_arg (ap, int));
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
AboutProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD (wParam)) {
|
||||
case IDCANCEL:
|
||||
EndDialog (hwnd, IDCANCEL);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
DlgProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
SendMessage (hwnd, WM_SETICON, ICON_SMALL,
|
||||
(LPARAM)LoadIcon (GetModuleHandle (NULL),
|
||||
MAKEINTRESOURCE (IDI_WINE)));
|
||||
SendMessage (hwnd, WM_SETICON, ICON_BIG,
|
||||
(LPARAM)LoadIcon (GetModuleHandle (NULL),
|
||||
MAKEINTRESOURCE (IDI_WINE)));
|
||||
dialog = hwnd;
|
||||
if (!SetEvent (initEvent)) {
|
||||
report (R_STATUS, "Can't signal main thread: %d",
|
||||
GetLastError ());
|
||||
EndDialog (hwnd, 2);
|
||||
}
|
||||
return TRUE;
|
||||
case WM_CLOSE:
|
||||
EndDialog (hwnd, 3);
|
||||
return TRUE;
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD (wParam)) {
|
||||
case IDHELP:
|
||||
DialogBox (GetModuleHandle (NULL),
|
||||
MAKEINTRESOURCE (IDD_ABOUT), hwnd, AboutProc);
|
||||
return TRUE;
|
||||
case IDABORT:
|
||||
report (R_WARNING, "Not implemented");
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD WINAPI
|
||||
DlgThreadProc ()
|
||||
{
|
||||
int ret;
|
||||
|
||||
InitCommonControls ();
|
||||
ret = DialogBox (GetModuleHandle (NULL),
|
||||
MAKEINTRESOURCE (IDD_STATUS),
|
||||
NULL, DlgProc);
|
||||
switch (ret) {
|
||||
case 0:
|
||||
report (R_WARNING, "Invalid parent handle");
|
||||
break;
|
||||
case 1:
|
||||
report (R_WARNING, "DialogBox failed: %d",
|
||||
GetLastError ());
|
||||
break;
|
||||
case 3:
|
||||
exit (0);
|
||||
default:
|
||||
report (R_STATUS, "Dialog exited: %d", ret);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
report (enum report_type t, ...)
|
||||
{
|
||||
typedef int r_fun_t (va_list);
|
||||
|
||||
va_list ap;
|
||||
int ret = 0;
|
||||
static r_fun_t * const text_funcs[] =
|
||||
{textStatus, textProgress, textStep, textDelta,
|
||||
textDir, textOut,
|
||||
textWarning, textError, textFatal, textAsk};
|
||||
static r_fun_t * const GUI_funcs[] =
|
||||
{guiStatus, guiProgress, guiStep, guiDelta,
|
||||
guiDir, guiOut,
|
||||
guiWarning, guiError, guiFatal, guiAsk};
|
||||
static r_fun_t * const quiet_funcs[] =
|
||||
{qNoOp, qNoOp, qNoOp, qNoOp,
|
||||
qNoOp, qNoOp,
|
||||
qNoOp, qNoOp, qFatal, qAsk};
|
||||
static r_fun_t * const * funcs = NULL;
|
||||
|
||||
switch (t) {
|
||||
case R_TEXTMODE:
|
||||
funcs = text_funcs;
|
||||
return 0;
|
||||
case R_QUIET:
|
||||
funcs = quiet_funcs;
|
||||
return 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!funcs) {
|
||||
HANDLE DlgThread;
|
||||
DWORD DlgThreadID;
|
||||
|
||||
funcs = text_funcs;
|
||||
initEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
|
||||
if (!initEvent)
|
||||
report (R_STATUS, "Can't create event object: %d",
|
||||
GetLastError ());
|
||||
else {
|
||||
DlgThread = CreateThread (NULL, 0, DlgThreadProc,
|
||||
NULL, 0, &DlgThreadID);
|
||||
if (!DlgThread)
|
||||
report (R_STATUS, "Can't create GUI thread: %d",
|
||||
GetLastError ());
|
||||
else {
|
||||
DWORD ret = WaitForSingleObject (initEvent, INFINITE);
|
||||
switch (ret) {
|
||||
case WAIT_OBJECT_0:
|
||||
funcs = GUI_funcs;
|
||||
break;
|
||||
case WAIT_TIMEOUT:
|
||||
report (R_STATUS, "GUI creation timed out");
|
||||
break;
|
||||
case WAIT_FAILED:
|
||||
report (R_STATUS, "Wait for GUI failed: %d",
|
||||
GetLastError ());
|
||||
break;
|
||||
default:
|
||||
report (R_STATUS, "Wait returned %d",
|
||||
ret);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
va_start (ap, t);
|
||||
if (t < sizeof text_funcs / sizeof text_funcs[0] &&
|
||||
t < sizeof GUI_funcs / sizeof GUI_funcs[0] &&
|
||||
t >= 0) ret = funcs[t](ap);
|
||||
else report (R_WARNING, "unimplemented report type: %d", t);
|
||||
va_end (ap);
|
||||
return ret;
|
||||
}
|
621
reactos/apps/utils/winetest/main.c
Normal file
621
reactos/apps/utils/winetest/main.c
Normal file
|
@ -0,0 +1,621 @@
|
|||
/*
|
||||
* Wine Conformance Test EXE
|
||||
*
|
||||
* Copyright 2003, 2004 Jakob Eriksson (for Solid Form Sweden AB)
|
||||
* Copyright 2003 Dimitrie O. Paun
|
||||
* Copyright 2003 Ferenc Wagner
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* This program is dedicated to Anna Lindh,
|
||||
* Swedish Minister of Foreign Affairs.
|
||||
* Anna was murdered September 11, 2003.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
#include "winetest.h"
|
||||
#include "resource.h"
|
||||
|
||||
struct wine_test
|
||||
{
|
||||
char *name;
|
||||
int resource;
|
||||
int subtest_count;
|
||||
char **subtests;
|
||||
char *exename;
|
||||
};
|
||||
|
||||
struct rev_info
|
||||
{
|
||||
const char* file;
|
||||
const char* rev;
|
||||
};
|
||||
|
||||
static struct wine_test *wine_tests;
|
||||
static struct rev_info *rev_infos = NULL;
|
||||
static const char whitespace[] = " \t\r\n";
|
||||
|
||||
static int running_under_wine ()
|
||||
{
|
||||
HMODULE module = GetModuleHandleA("ntdll.dll");
|
||||
|
||||
if (!module) return 0;
|
||||
return (GetProcAddress(module, "wine_server_call") != NULL);
|
||||
}
|
||||
|
||||
static int running_on_visible_desktop ()
|
||||
{
|
||||
FARPROC pGetProcessWindowStation = GetProcAddress(GetModuleHandle("user32.dll"), "GetProcessWindowStation");
|
||||
|
||||
if (pGetProcessWindowStation)
|
||||
{
|
||||
DWORD len;
|
||||
HWINSTA wstation;
|
||||
USEROBJECTFLAGS uoflags;
|
||||
FARPROC pGetUserObjectInformationA = GetProcAddress(GetModuleHandle("user32.dll"), "GetUserObjectInformationA");
|
||||
|
||||
wstation = (HWINSTA)pGetProcessWindowStation();
|
||||
assert(pGetUserObjectInformationA(wstation, UOI_FLAGS, &uoflags, sizeof(uoflags), &len));
|
||||
return (uoflags.dwFlags & WSF_VISIBLE) != 0;
|
||||
}
|
||||
else
|
||||
return IsWindowVisible(GetDesktopWindow());
|
||||
}
|
||||
|
||||
void print_version ()
|
||||
{
|
||||
OSVERSIONINFOEX ver;
|
||||
BOOL ext;
|
||||
|
||||
ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
if (!(ext = GetVersionEx ((OSVERSIONINFO *) &ver)))
|
||||
{
|
||||
ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
if (!GetVersionEx ((OSVERSIONINFO *) &ver))
|
||||
report (R_FATAL, "Can't get OS version.");
|
||||
}
|
||||
|
||||
xprintf (" bRunningUnderWine=%d\n", running_under_wine ());
|
||||
xprintf (" bRunningOnVisibleDesktop=%d\n", running_on_visible_desktop ());
|
||||
xprintf (" dwMajorVersion=%ld\n dwMinorVersion=%ld\n"
|
||||
" dwBuildNumber=%ld\n PlatformId=%ld\n szCSDVersion=%s\n",
|
||||
ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber,
|
||||
ver.dwPlatformId, ver.szCSDVersion);
|
||||
|
||||
if (!ext) return;
|
||||
|
||||
xprintf (" wServicePackMajor=%d\n wServicePackMinor=%d\n"
|
||||
" wSuiteMask=%d\n wProductType=%d\n wReserved=%d\n",
|
||||
ver.wServicePackMajor, ver.wServicePackMinor, ver.wSuiteMask,
|
||||
ver.wProductType, ver.wReserved);
|
||||
}
|
||||
|
||||
static inline int is_dot_dir(const char* x)
|
||||
{
|
||||
return ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0))));
|
||||
}
|
||||
|
||||
void remove_dir (const char *dir)
|
||||
{
|
||||
HANDLE hFind;
|
||||
WIN32_FIND_DATA wfd;
|
||||
char path[MAX_PATH];
|
||||
size_t dirlen = strlen (dir);
|
||||
|
||||
/* Make sure the directory exists before going further */
|
||||
memcpy (path, dir, dirlen);
|
||||
strcpy (path + dirlen++, "\\*");
|
||||
hFind = FindFirstFile (path, &wfd);
|
||||
if (hFind == INVALID_HANDLE_VALUE) return;
|
||||
|
||||
do {
|
||||
char *lp = wfd.cFileName;
|
||||
|
||||
if (!lp[0]) lp = wfd.cAlternateFileName; /* ? FIXME not (!lp) ? */
|
||||
if (is_dot_dir (lp)) continue;
|
||||
strcpy (path + dirlen, lp);
|
||||
if (FILE_ATTRIBUTE_DIRECTORY & wfd.dwFileAttributes)
|
||||
remove_dir(path);
|
||||
else if (!DeleteFile (path))
|
||||
report (R_WARNING, "Can't delete file %s: error %d",
|
||||
path, GetLastError ());
|
||||
} while (FindNextFile (hFind, &wfd));
|
||||
FindClose (hFind);
|
||||
if (!RemoveDirectory (dir))
|
||||
report (R_WARNING, "Can't remove directory %s: error %d",
|
||||
dir, GetLastError ());
|
||||
}
|
||||
|
||||
const char* get_test_source_file(const char* test, const char* subtest)
|
||||
{
|
||||
static const char* special_dirs[][2] = {
|
||||
{ "gdi32", "gdi"}, { "kernel32", "kernel" },
|
||||
{ "msacm32", "msacm" },
|
||||
{ "user32", "user" }, { "winspool.drv", "winspool" },
|
||||
{ "ws2_32", "winsock" }, { 0, 0 }
|
||||
};
|
||||
static char buffer[MAX_PATH];
|
||||
int i;
|
||||
|
||||
for (i = 0; special_dirs[i][0]; i++) {
|
||||
if (strcmp(test, special_dirs[i][0]) == 0) {
|
||||
test = special_dirs[i][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "dlls/%s/tests/%s.c", test, subtest);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const char* get_file_rev(const char* file)
|
||||
{
|
||||
const struct rev_info* rev;
|
||||
|
||||
for(rev = rev_infos; rev->file; rev++) {
|
||||
if (strcmp(rev->file, file) == 0) return rev->rev;
|
||||
}
|
||||
|
||||
return "-";
|
||||
}
|
||||
|
||||
void extract_rev_infos ()
|
||||
{
|
||||
char revinfo[256], *p;
|
||||
int size = 0, i, len;
|
||||
HMODULE module = GetModuleHandle (NULL);
|
||||
|
||||
for (i = 0; TRUE; i++) {
|
||||
if (i >= size) {
|
||||
size += 100;
|
||||
rev_infos = xrealloc (rev_infos, size * sizeof (*rev_infos));
|
||||
}
|
||||
memset(rev_infos + i, 0, sizeof(rev_infos[i]));
|
||||
|
||||
len = LoadStringA (module, REV_INFO+i, revinfo, sizeof(revinfo));
|
||||
if (len == 0) break; /* end of revision info */
|
||||
if (len >= sizeof(revinfo) - 1)
|
||||
report (R_FATAL, "Revision info too long.");
|
||||
if(!(p = strrchr(revinfo, ':')))
|
||||
report (R_FATAL, "Revision info malformed (i=%d)", i);
|
||||
*p = 0;
|
||||
rev_infos[i].file = strdup(revinfo);
|
||||
rev_infos[i].rev = strdup(p + 1);
|
||||
}
|
||||
}
|
||||
|
||||
void* extract_rcdata (int id, int type, DWORD* size)
|
||||
{
|
||||
HRSRC rsrc;
|
||||
HGLOBAL hdl;
|
||||
LPVOID addr;
|
||||
|
||||
if (!(rsrc = FindResource (NULL, (LPTSTR)id, MAKEINTRESOURCE(type))) ||
|
||||
!(*size = SizeofResource (0, rsrc)) ||
|
||||
!(hdl = LoadResource (0, rsrc)) ||
|
||||
!(addr = LockResource (hdl)))
|
||||
return NULL;
|
||||
return addr;
|
||||
}
|
||||
|
||||
/* Fills in the name and exename fields */
|
||||
void
|
||||
extract_test (struct wine_test *test, const char *dir, int id)
|
||||
{
|
||||
BYTE* code;
|
||||
DWORD size;
|
||||
FILE* fout;
|
||||
int strlen, bufflen = 128;
|
||||
char *exepos;
|
||||
|
||||
code = extract_rcdata (id, TESTRES, &size);
|
||||
if (!code) report (R_FATAL, "Can't find test resource %d: %d",
|
||||
id, GetLastError ());
|
||||
test->name = xmalloc (bufflen);
|
||||
while ((strlen = LoadStringA (NULL, id, test->name, bufflen))
|
||||
== bufflen - 1) {
|
||||
bufflen *= 2;
|
||||
test->name = xrealloc (test->name, bufflen);
|
||||
}
|
||||
if (!strlen) report (R_FATAL, "Can't read name of test %d.", id);
|
||||
test->exename = strmake (NULL, "%s/%s", dir, test->name);
|
||||
exepos = strstr (test->name, "_test.exe");
|
||||
if (!exepos) report (R_FATAL, "Not an .exe file: %s", test->name);
|
||||
*exepos = 0;
|
||||
test->name = xrealloc (test->name, exepos - test->name + 1);
|
||||
report (R_STEP, "Extracting: %s", test->name);
|
||||
|
||||
if (!(fout = fopen (test->exename, "wb")) ||
|
||||
(fwrite (code, size, 1, fout) != 1) ||
|
||||
fclose (fout)) report (R_FATAL, "Failed to write file %s.",
|
||||
test->exename);
|
||||
}
|
||||
|
||||
/* Run a command for MS milliseconds. If OUT != NULL, also redirect
|
||||
stdout to there.
|
||||
|
||||
Return the exit status, -2 if can't create process or the return
|
||||
value of WaitForSingleObject.
|
||||
*/
|
||||
int
|
||||
run_ex (char *cmd, const char *out, DWORD ms)
|
||||
{
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
int fd, oldstdout = -1;
|
||||
DWORD wait, status;
|
||||
|
||||
GetStartupInfo (&si);
|
||||
si.wShowWindow = SW_HIDE;
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||
|
||||
if (out) {
|
||||
fd = open (out, O_WRONLY | O_CREAT, 0666);
|
||||
if (-1 == fd)
|
||||
report (R_FATAL, "Can't open '%s': %d", out, errno);
|
||||
oldstdout = dup (1);
|
||||
if (-1 == oldstdout)
|
||||
report (R_FATAL, "Can't save stdout: %d", errno);
|
||||
if (-1 == dup2 (fd, 1))
|
||||
report (R_FATAL, "Can't redirect stdout: %d", errno);
|
||||
close (fd);
|
||||
}
|
||||
|
||||
if (!CreateProcessA (NULL, cmd, NULL, NULL, TRUE, 0,
|
||||
NULL, NULL, &si, &pi)) {
|
||||
status = -2;
|
||||
} else {
|
||||
CloseHandle (pi.hThread);
|
||||
wait = WaitForSingleObject (pi.hProcess, ms);
|
||||
if (wait == WAIT_OBJECT_0) {
|
||||
GetExitCodeProcess (pi.hProcess, &status);
|
||||
} else {
|
||||
switch (wait) {
|
||||
case WAIT_FAILED:
|
||||
report (R_ERROR, "Wait for '%s' failed: %d", cmd,
|
||||
GetLastError ());
|
||||
break;
|
||||
case WAIT_TIMEOUT:
|
||||
report (R_ERROR, "Process '%s' timed out.", cmd);
|
||||
break;
|
||||
default:
|
||||
report (R_ERROR, "Wait returned %d", wait);
|
||||
}
|
||||
status = wait;
|
||||
if (!TerminateProcess (pi.hProcess, 257))
|
||||
report (R_ERROR, "TerminateProcess failed: %d",
|
||||
GetLastError ());
|
||||
wait = WaitForSingleObject (pi.hProcess, 5000);
|
||||
switch (wait) {
|
||||
case WAIT_FAILED:
|
||||
report (R_ERROR,
|
||||
"Wait for termination of '%s' failed: %d",
|
||||
cmd, GetLastError ());
|
||||
break;
|
||||
case WAIT_OBJECT_0:
|
||||
break;
|
||||
case WAIT_TIMEOUT:
|
||||
report (R_ERROR, "Can't kill process '%s'", cmd);
|
||||
break;
|
||||
default:
|
||||
report (R_ERROR, "Waiting for termination: %d",
|
||||
wait);
|
||||
}
|
||||
}
|
||||
CloseHandle (pi.hProcess);
|
||||
}
|
||||
|
||||
if (out) {
|
||||
close (1);
|
||||
if (-1 == dup2 (oldstdout, 1))
|
||||
report (R_FATAL, "Can't recover stdout: %d", errno);
|
||||
close (oldstdout);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
void
|
||||
get_subtests (const char *tempdir, struct wine_test *test, int id)
|
||||
{
|
||||
char *subname;
|
||||
FILE *subfile;
|
||||
size_t total;
|
||||
char buffer[8192], *index;
|
||||
static const char header[] = "Valid test names:";
|
||||
int allocated;
|
||||
|
||||
test->subtest_count = 0;
|
||||
|
||||
subname = tempnam (0, "sub");
|
||||
if (!subname) report (R_FATAL, "Can't name subtests file.");
|
||||
|
||||
extract_test (test, tempdir, id);
|
||||
run_ex (test->exename, subname, 5000);
|
||||
|
||||
subfile = fopen (subname, "r");
|
||||
if (!subfile) {
|
||||
report (R_ERROR, "Can't open subtests output of %s: %d",
|
||||
test->name, errno);
|
||||
goto quit;
|
||||
}
|
||||
total = fread (buffer, 1, sizeof buffer, subfile);
|
||||
fclose (subfile);
|
||||
if (sizeof buffer == total) {
|
||||
report (R_ERROR, "Subtest list of %s too big.",
|
||||
test->name, sizeof buffer);
|
||||
goto quit;
|
||||
}
|
||||
buffer[total] = 0;
|
||||
|
||||
index = strstr (buffer, header);
|
||||
if (!index) {
|
||||
report (R_ERROR, "Can't parse subtests output of %s",
|
||||
test->name);
|
||||
goto quit;
|
||||
}
|
||||
index += sizeof header;
|
||||
|
||||
allocated = 10;
|
||||
test->subtests = xmalloc (allocated * sizeof(char*));
|
||||
index = strtok (index, whitespace);
|
||||
while (index) {
|
||||
if (test->subtest_count == allocated) {
|
||||
allocated *= 2;
|
||||
test->subtests = xrealloc (test->subtests,
|
||||
allocated * sizeof(char*));
|
||||
}
|
||||
test->subtests[test->subtest_count++] = strdup (index);
|
||||
index = strtok (NULL, whitespace);
|
||||
}
|
||||
test->subtests = xrealloc (test->subtests,
|
||||
test->subtest_count * sizeof(char*));
|
||||
|
||||
quit:
|
||||
if (remove (subname))
|
||||
report (R_WARNING, "Can't delete file '%s': %d",
|
||||
subname, errno);
|
||||
free (subname);
|
||||
}
|
||||
|
||||
void
|
||||
run_test (struct wine_test* test, const char* subtest)
|
||||
{
|
||||
int status;
|
||||
const char* file = get_test_source_file(test->name, subtest);
|
||||
const char* rev = get_file_rev(file);
|
||||
char *cmd = strmake (NULL, "%s %s", test->exename, subtest);
|
||||
|
||||
xprintf ("%s:%s start %s %s\n", test->name, subtest, file, rev);
|
||||
status = run_ex (cmd, NULL, 120000);
|
||||
free (cmd);
|
||||
xprintf ("%s:%s done (%d)\n", test->name, subtest, status);
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
EnumTestFileProc (HMODULE hModule, LPCTSTR lpszType,
|
||||
LPTSTR lpszName, LONG_PTR lParam)
|
||||
{
|
||||
(*(int*)lParam)++;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
char *
|
||||
run_tests (char *logname, const char *tag)
|
||||
{
|
||||
int nr_of_files = 0, nr_of_tests = 0, i;
|
||||
char *tempdir;
|
||||
int logfile;
|
||||
char *strres, *eol, *nextline;
|
||||
DWORD strsize;
|
||||
|
||||
SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
|
||||
|
||||
if (!logname) {
|
||||
logname = tempnam (0, "res");
|
||||
if (!logname) report (R_FATAL, "Can't name logfile.");
|
||||
}
|
||||
report (R_OUT, logname);
|
||||
|
||||
logfile = open (logname, O_WRONLY | O_CREAT | O_EXCL | O_APPEND,
|
||||
0666);
|
||||
if (-1 == logfile) {
|
||||
if (EEXIST == errno)
|
||||
report (R_FATAL, "File %s already exists.", logname);
|
||||
else report (R_FATAL, "Could not open logfile: %d", errno);
|
||||
}
|
||||
if (-1 == dup2 (logfile, 1))
|
||||
report (R_FATAL, "Can't redirect stdout: %d", errno);
|
||||
close (logfile);
|
||||
|
||||
tempdir = tempnam (0, "wct");
|
||||
if (!tempdir)
|
||||
report (R_FATAL, "Can't name temporary dir (check %%TEMP%%).");
|
||||
report (R_DIR, tempdir);
|
||||
if (!CreateDirectory (tempdir, NULL))
|
||||
report (R_FATAL, "Could not create directory: %s", tempdir);
|
||||
|
||||
xprintf ("Version 3\n");
|
||||
strres = extract_rcdata (WINE_BUILD, STRINGRES, &strsize);
|
||||
xprintf ("Tests from build ");
|
||||
if (strres) xprintf ("%.*s", strsize, strres);
|
||||
else xprintf ("-\n");
|
||||
strres = extract_rcdata (TESTS_URL, STRINGRES, &strsize);
|
||||
xprintf ("Archive: ");
|
||||
if (strres) xprintf ("%.*s", strsize, strres);
|
||||
else xprintf ("-\n");
|
||||
xprintf ("Tag: %s\n", tag?tag:"");
|
||||
xprintf ("Build info:\n");
|
||||
strres = extract_rcdata (BUILD_INFO, STRINGRES, &strsize);
|
||||
while (strres) {
|
||||
eol = memchr (strres, '\n', strsize);
|
||||
if (!eol) {
|
||||
nextline = NULL;
|
||||
eol = strres + strsize;
|
||||
} else {
|
||||
strsize -= eol - strres + 1;
|
||||
nextline = strsize?eol+1:NULL;
|
||||
if (eol > strres && *(eol-1) == '\r') eol--;
|
||||
}
|
||||
xprintf (" %.*s\n", eol-strres, strres);
|
||||
strres = nextline;
|
||||
}
|
||||
xprintf ("Operating system version:\n");
|
||||
print_version ();
|
||||
xprintf ("Test output:\n" );
|
||||
|
||||
report (R_STATUS, "Counting tests");
|
||||
if (!EnumResourceNames (NULL, MAKEINTRESOURCE(TESTRES),
|
||||
EnumTestFileProc, (LPARAM)&nr_of_files))
|
||||
report (R_FATAL, "Can't enumerate test files: %d",
|
||||
GetLastError ());
|
||||
wine_tests = xmalloc (nr_of_files * sizeof wine_tests[0]);
|
||||
|
||||
report (R_STATUS, "Extracting tests");
|
||||
report (R_PROGRESS, 0, nr_of_files);
|
||||
for (i = 0; i < nr_of_files; i++) {
|
||||
get_subtests (tempdir, wine_tests+i, i);
|
||||
nr_of_tests += wine_tests[i].subtest_count;
|
||||
}
|
||||
report (R_DELTA, 0, "Extracting: Done");
|
||||
|
||||
report (R_STATUS, "Running tests");
|
||||
report (R_PROGRESS, 1, nr_of_tests);
|
||||
for (i = 0; i < nr_of_files; i++) {
|
||||
struct wine_test *test = wine_tests + i;
|
||||
int j;
|
||||
|
||||
for (j = 0; j < test->subtest_count; j++) {
|
||||
report (R_STEP, "Running: %s:%s", test->name,
|
||||
test->subtests[j]);
|
||||
run_test (test, test->subtests[j]);
|
||||
}
|
||||
}
|
||||
report (R_DELTA, 0, "Running: Done");
|
||||
|
||||
report (R_STATUS, "Cleaning up");
|
||||
close (1);
|
||||
remove_dir (tempdir);
|
||||
free (tempdir);
|
||||
free (wine_tests);
|
||||
|
||||
return logname;
|
||||
}
|
||||
|
||||
void
|
||||
usage ()
|
||||
{
|
||||
fprintf (stderr, "\
|
||||
Usage: winetest [OPTION]...\n\n\
|
||||
-c console mode, no GUI\n\
|
||||
-e preserve the environment\n\
|
||||
-h print this message and exit\n\
|
||||
-q quiet mode, no output at all\n\
|
||||
-o FILE put report into FILE, do not submit\n\
|
||||
-s FILE submit FILE, do not run tests\n\
|
||||
-t TAG include TAG of characters [-.0-9a-zA-Z] in the report\n");
|
||||
}
|
||||
|
||||
int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
||||
LPSTR cmdLine, int cmdShow)
|
||||
{
|
||||
char *logname = NULL;
|
||||
const char *cp, *submit = NULL, *tag = NULL;
|
||||
int reset_env = 1;
|
||||
|
||||
if (!running_on_visible_desktop ()) {
|
||||
report (R_ERROR, "Tests must be run on a visible desktop");
|
||||
exit (2);
|
||||
}
|
||||
|
||||
/* initialize the revision information first */
|
||||
extract_rev_infos();
|
||||
|
||||
cmdLine = strtok (cmdLine, whitespace);
|
||||
while (cmdLine) {
|
||||
if (cmdLine[0] != '-' || cmdLine[2]) {
|
||||
report (R_ERROR, "Not a single letter option: %s", cmdLine);
|
||||
usage ();
|
||||
exit (2);
|
||||
}
|
||||
switch (cmdLine[1]) {
|
||||
case 'c':
|
||||
report (R_TEXTMODE);
|
||||
break;
|
||||
case 'e':
|
||||
reset_env = 0;
|
||||
break;
|
||||
case 'h':
|
||||
usage ();
|
||||
exit (0);
|
||||
case 'q':
|
||||
report (R_QUIET);
|
||||
break;
|
||||
case 's':
|
||||
submit = strtok (NULL, whitespace);
|
||||
if (tag)
|
||||
report (R_WARNING, "ignoring tag for submission");
|
||||
send_file (submit);
|
||||
break;
|
||||
case 'o':
|
||||
logname = strtok (NULL, whitespace);
|
||||
break;
|
||||
case 't':
|
||||
tag = strtok (NULL, whitespace);
|
||||
cp = badtagchar (tag);
|
||||
if (cp) {
|
||||
report (R_ERROR, "invalid char in tag: %c", *cp);
|
||||
usage ();
|
||||
exit (2);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
report (R_ERROR, "invalid option: -%c", cmdLine[1]);
|
||||
usage ();
|
||||
exit (2);
|
||||
}
|
||||
cmdLine = strtok (NULL, whitespace);
|
||||
}
|
||||
if (!submit) {
|
||||
if (reset_env && (putenv ("WINETEST_PLATFORM=windows") ||
|
||||
putenv ("WINETEST_DEBUG=1") ||
|
||||
putenv ("WINETEST_INTERACTIVE=0") ||
|
||||
putenv ("WINETEST_REPORT_SUCCESS=0")))
|
||||
report (R_FATAL, "Could not reset environment: %d", errno);
|
||||
|
||||
report (R_STATUS, "Starting up");
|
||||
if (!logname) {
|
||||
logname = run_tests (NULL, tag);
|
||||
if (report (R_ASK, MB_YESNO, "Do you want to submit the "
|
||||
"test results?") == IDYES)
|
||||
if (!send_file (logname) && remove (logname))
|
||||
report (R_WARNING, "Can't remove logfile: %d.", errno);
|
||||
free (logname);
|
||||
} else run_tests (logname, tag);
|
||||
report (R_STATUS, "Finished");
|
||||
}
|
||||
exit (0);
|
||||
}
|
23
reactos/apps/utils/winetest/makefile
Normal file
23
reactos/apps/utils/winetest/makefile
Normal file
|
@ -0,0 +1,23 @@
|
|||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = winetest
|
||||
|
||||
TARGET_SDKLIBS = comctl32.a comdlg32.a ws2_32.a
|
||||
|
||||
TARGET_OBJECTS = \
|
||||
main.o \
|
||||
send.o \
|
||||
util.o \
|
||||
gui.o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror -D__USE_W32API
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
469
reactos/apps/utils/winetest/port.h
Normal file
469
reactos/apps/utils/winetest/port.h
Normal file
|
@ -0,0 +1,469 @@
|
|||
/*
|
||||
* Wine porting definitions
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WINE_PORT_H
|
||||
#define __WINE_WINE_PORT_H
|
||||
|
||||
#ifndef __WINE_CONFIG_H
|
||||
# error You must include config.h to use this header
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE /* for pread/pwrite */
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_DIRECT_H
|
||||
# include <direct.h>
|
||||
#endif
|
||||
#ifdef HAVE_IO_H
|
||||
# include <io.h>
|
||||
#endif
|
||||
#ifdef HAVE_PROCESS_H
|
||||
# include <process.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* Type definitions
|
||||
*/
|
||||
|
||||
#ifndef HAVE_MODE_T
|
||||
typedef int mode_t;
|
||||
#endif
|
||||
#ifndef HAVE_OFF_T
|
||||
typedef long off_t;
|
||||
#endif
|
||||
#ifndef HAVE_PID_T
|
||||
typedef int pid_t;
|
||||
#endif
|
||||
#ifndef HAVE_SIZE_T
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
#ifndef HAVE_SSIZE_T
|
||||
typedef int ssize_t;
|
||||
#endif
|
||||
#ifndef HAVE_FSBLKCNT_T
|
||||
typedef unsigned long fsblkcnt_t;
|
||||
#endif
|
||||
#ifndef HAVE_FSFILCNT_T
|
||||
typedef unsigned long fsfilcnt_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRUCT_STATVFS_F_BLOCKS
|
||||
struct statvfs
|
||||
{
|
||||
unsigned long f_bsize;
|
||||
unsigned long f_frsize;
|
||||
fsblkcnt_t f_blocks;
|
||||
fsblkcnt_t f_bfree;
|
||||
fsblkcnt_t f_bavail;
|
||||
fsfilcnt_t f_files;
|
||||
fsfilcnt_t f_ffree;
|
||||
fsfilcnt_t f_favail;
|
||||
unsigned long f_fsid;
|
||||
unsigned long f_flag;
|
||||
unsigned long f_namemax;
|
||||
};
|
||||
#endif /* HAVE_STRUCT_STATVFS_F_BLOCKS */
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* Macro definitions
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#else
|
||||
#define RTLD_LAZY 0x001
|
||||
#define RTLD_NOW 0x002
|
||||
#define RTLD_GLOBAL 0x100
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_FTRUNCATE) && defined(HAVE_CHSIZE)
|
||||
#define ftruncate chsize
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_POPEN) && defined(HAVE__POPEN)
|
||||
#define popen _popen
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_PCLOSE) && defined(HAVE__PCLOSE)
|
||||
#define pclose _pclose
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_VSNPRINTF) && defined(HAVE__VSNPRINTF)
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
|
||||
#ifndef S_ISLNK
|
||||
# define S_ISLNK(mod) (0)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISSOCK
|
||||
# define S_ISSOCK(mod) (0)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISDIR
|
||||
# define S_ISDIR(mod) (((mod) & _S_IFMT) == _S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISCHR
|
||||
# define S_ISCHR(mod) (((mod) & _S_IFMT) == _S_IFCHR)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISFIFO
|
||||
# define S_ISFIFO(mod) (((mod) & _S_IFMT) == _S_IFIFO)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISREG
|
||||
# define S_ISREG(mod) (((mod) & _S_IFMT) == _S_IFREG)
|
||||
#endif
|
||||
|
||||
#ifndef S_IWUSR
|
||||
# define S_IWUSR 0
|
||||
#endif
|
||||
|
||||
/* So we open files in 64 bit access mode on Linux */
|
||||
#ifndef O_LARGEFILE
|
||||
# define O_LARGEFILE 0
|
||||
#endif
|
||||
|
||||
#ifndef O_NONBLOCK
|
||||
# define O_NONBLOCK 0
|
||||
#endif
|
||||
|
||||
#ifndef O_BINARY
|
||||
# define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#if !defined(S_IXUSR) && defined(S_IEXEC)
|
||||
# define S_IXUSR S_IEXEC
|
||||
#endif
|
||||
#if !defined(S_IXGRP) && defined(S_IEXEC)
|
||||
# define S_IXGRP S_IEXEC
|
||||
#endif
|
||||
#if !defined(S_IXOTH) && defined(S_IEXEC)
|
||||
# define S_IXOTH S_IEXEC
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* Constants
|
||||
*/
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
#ifndef M_PI_2
|
||||
#define M_PI_2 1.570796326794896619
|
||||
#endif
|
||||
|
||||
|
||||
/* Macros to define assembler functions somewhat portably */
|
||||
|
||||
#if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__APPLE__)
|
||||
# define __ASM_GLOBAL_FUNC(name,code) \
|
||||
__asm__( ".text\n\t" \
|
||||
".align 4\n\t" \
|
||||
".globl " __ASM_NAME(#name) "\n\t" \
|
||||
__ASM_FUNC(#name) "\n" \
|
||||
__ASM_NAME(#name) ":\n\t" \
|
||||
code \
|
||||
"\n\t.previous" );
|
||||
#else /* defined(__GNUC__) && !defined(__MINGW32__) && !defined(__APPLE__) */
|
||||
# define __ASM_GLOBAL_FUNC(name,code) \
|
||||
void __asm_dummy_##name(void) { \
|
||||
asm( ".align 4\n\t" \
|
||||
".globl " __ASM_NAME(#name) "\n\t" \
|
||||
__ASM_FUNC(#name) "\n" \
|
||||
__ASM_NAME(#name) ":\n\t" \
|
||||
code ); \
|
||||
}
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
|
||||
/* Constructor functions */
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define DECL_GLOBAL_CONSTRUCTOR(func) \
|
||||
static void func(void) __attribute__((constructor)); \
|
||||
static void func(void)
|
||||
#elif defined(__i386__)
|
||||
# define DECL_GLOBAL_CONSTRUCTOR(func) \
|
||||
static void __dummy_init_##func(void) { \
|
||||
asm(".section .init,\"ax\"\n\t" \
|
||||
"call " #func "\n\t" \
|
||||
".previous"); } \
|
||||
static void func(void)
|
||||
#elif defined(__sparc__)
|
||||
# define DECL_GLOBAL_CONSTRUCTOR(func) \
|
||||
static void __dummy_init_##func(void) { \
|
||||
asm("\t.section \".init\",#alloc,#execinstr\n" \
|
||||
"\tcall " #func "\n" \
|
||||
"\tnop\n" \
|
||||
"\t.section \".text\",#alloc,#execinstr\n" ); } \
|
||||
static void func(void)
|
||||
#else
|
||||
# error You must define the DECL_GLOBAL_CONSTRUCTOR macro for your platform
|
||||
#endif
|
||||
|
||||
|
||||
/* Register functions */
|
||||
|
||||
#ifdef __i386__
|
||||
#define DEFINE_REGS_ENTRYPOINT( name, fn, args, pop_args ) \
|
||||
__ASM_GLOBAL_FUNC( name, \
|
||||
"call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
|
||||
".long " __ASM_NAME(#fn) "\n\t" \
|
||||
".byte " #args "," #pop_args )
|
||||
/* FIXME: add support for other CPUs */
|
||||
#endif /* __i386__ */
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* Function definitions (only when using libwine_port)
|
||||
*/
|
||||
|
||||
#ifndef NO_LIBWINE_PORT
|
||||
|
||||
#ifndef HAVE_FSTATVFS
|
||||
int fstatvfs( int fd, struct statvfs *buf );
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
extern int opterr;
|
||||
extern int optopt;
|
||||
struct option;
|
||||
|
||||
#ifndef HAVE_STRUCT_OPTION_NAME
|
||||
struct option
|
||||
{
|
||||
const char *name;
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
#endif
|
||||
|
||||
extern int getopt_long (int ___argc, char *const *___argv,
|
||||
const char *__shortopts,
|
||||
const struct option *__longopts, int *__longind);
|
||||
extern int getopt_long_only (int ___argc, char *const *___argv,
|
||||
const char *__shortopts,
|
||||
const struct option *__longopts, int *__longind);
|
||||
#endif /* HAVE_GETOPT_LONG */
|
||||
|
||||
#ifndef HAVE_FFS
|
||||
int ffs( int x );
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FUTIMES
|
||||
struct timeval;
|
||||
int futimes(int fd, const struct timeval tv[2]);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETPAGESIZE
|
||||
size_t getpagesize(void);
|
||||
#endif /* HAVE_GETPAGESIZE */
|
||||
|
||||
#ifndef HAVE_GETTID
|
||||
pid_t gettid(void);
|
||||
#endif /* HAVE_GETTID */
|
||||
|
||||
#ifndef HAVE_LSTAT
|
||||
int lstat(const char *file_name, struct stat *buf);
|
||||
#endif /* HAVE_LSTAT */
|
||||
|
||||
#ifndef HAVE_MEMMOVE
|
||||
void *memmove(void *dest, const void *src, size_t len);
|
||||
#endif /* !defined(HAVE_MEMMOVE) */
|
||||
|
||||
#ifndef HAVE_PREAD
|
||||
ssize_t pread( int fd, void *buf, size_t count, off_t offset );
|
||||
#endif /* HAVE_PREAD */
|
||||
|
||||
#ifndef HAVE_PWRITE
|
||||
ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset );
|
||||
#endif /* HAVE_PWRITE */
|
||||
|
||||
#ifndef HAVE_READLINK
|
||||
int readlink( const char *path, char *buf, size_t size );
|
||||
#endif /* HAVE_READLINK */
|
||||
|
||||
#ifndef HAVE_SIGSETJMP
|
||||
# include <setjmp.h>
|
||||
typedef jmp_buf sigjmp_buf;
|
||||
int sigsetjmp( sigjmp_buf buf, int savesigs );
|
||||
void siglongjmp( sigjmp_buf buf, int val );
|
||||
#endif /* HAVE_SIGSETJMP */
|
||||
|
||||
#ifndef HAVE_STATVFS
|
||||
int statvfs( const char *path, struct statvfs *buf );
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
# ifndef HAVE__STRNICMP
|
||||
int strncasecmp(const char *str1, const char *str2, size_t n);
|
||||
# else
|
||||
# define strncasecmp _strnicmp
|
||||
# endif
|
||||
#endif /* !defined(HAVE_STRNCASECMP) */
|
||||
|
||||
#ifndef HAVE_STRERROR
|
||||
const char *strerror(int err);
|
||||
#endif /* !defined(HAVE_STRERROR) */
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
# ifndef HAVE__STRICMP
|
||||
int strcasecmp(const char *str1, const char *str2);
|
||||
# else
|
||||
# define strcasecmp _stricmp
|
||||
# endif
|
||||
#endif /* !defined(HAVE_STRCASECMP) */
|
||||
|
||||
#ifndef HAVE_USLEEP
|
||||
int usleep (unsigned int useconds);
|
||||
#endif /* !defined(HAVE_USLEEP) */
|
||||
|
||||
#ifdef __i386__
|
||||
static inline void *memcpy_unaligned( void *dst, const void *src, size_t size )
|
||||
{
|
||||
return memcpy( dst, src, size );
|
||||
}
|
||||
#else
|
||||
extern void *memcpy_unaligned( void *dst, const void *src, size_t size );
|
||||
#endif /* __i386__ */
|
||||
|
||||
extern int mkstemps(char *template, int suffix_len);
|
||||
|
||||
/* Process creation flags */
|
||||
#ifndef _P_WAIT
|
||||
# define _P_WAIT 0
|
||||
# define _P_NOWAIT 1
|
||||
# define _P_OVERLAY 2
|
||||
# define _P_NOWAITO 3
|
||||
# define _P_DETACH 4
|
||||
#endif
|
||||
#ifndef HAVE_SPAWNVP
|
||||
extern int spawnvp(int mode, const char *cmdname, const char * const argv[]);
|
||||
#endif
|
||||
|
||||
/* Interlocked functions */
|
||||
|
||||
#if defined(__i386__) && defined(__GNUC__)
|
||||
|
||||
extern inline long interlocked_cmpxchg( long *dest, long xchg, long compare );
|
||||
extern inline void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare );
|
||||
extern inline long interlocked_xchg( long *dest, long val );
|
||||
extern inline void *interlocked_xchg_ptr( void **dest, void *val );
|
||||
extern inline long interlocked_xchg_add( long *dest, long incr );
|
||||
|
||||
extern inline long interlocked_cmpxchg( long *dest, long xchg, long compare )
|
||||
{
|
||||
long ret;
|
||||
__asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
|
||||
: "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern inline void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare )
|
||||
{
|
||||
void *ret;
|
||||
__asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
|
||||
: "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern inline long interlocked_xchg( long *dest, long val )
|
||||
{
|
||||
long ret;
|
||||
__asm__ __volatile__( "lock; xchgl %0,(%1)"
|
||||
: "=r" (ret) : "r" (dest), "0" (val) : "memory" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern inline void *interlocked_xchg_ptr( void **dest, void *val )
|
||||
{
|
||||
void *ret;
|
||||
__asm__ __volatile__( "lock; xchgl %0,(%1)"
|
||||
: "=r" (ret) : "r" (dest), "0" (val) : "memory" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern inline long interlocked_xchg_add( long *dest, long incr )
|
||||
{
|
||||
long ret;
|
||||
__asm__ __volatile__( "lock; xaddl %0,(%1)"
|
||||
: "=r" (ret) : "r" (dest), "0" (incr) : "memory" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else /* __i386___ && __GNUC__ */
|
||||
|
||||
extern long interlocked_cmpxchg( long *dest, long xchg, long compare );
|
||||
extern void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare );
|
||||
extern long interlocked_xchg( long *dest, long val );
|
||||
extern void *interlocked_xchg_ptr( void **dest, void *val );
|
||||
extern long interlocked_xchg_add( long *dest, long incr );
|
||||
|
||||
#endif /* __i386___ && __GNUC__ */
|
||||
|
||||
#else /* NO_LIBWINE_PORT */
|
||||
|
||||
#define __WINE_NOT_PORTABLE(func) func##_is_not_portable func##_is_not_portable
|
||||
|
||||
#define ffs __WINE_NOT_PORTABLE(ffs)
|
||||
#define fstatvfs __WINE_NOT_PORTABLE(fstatvfs)
|
||||
#define futimes __WINE_NOT_PORTABLE(futimes)
|
||||
#define getopt_long __WINE_NOT_PORTABLE(getopt_long)
|
||||
#define getopt_long_only __WINE_NOT_PORTABLE(getopt_long_only)
|
||||
#define getpagesize __WINE_NOT_PORTABLE(getpagesize)
|
||||
#define interlocked_cmpxchg __WINE_NOT_PORTABLE(interlocked_cmpxchg)
|
||||
#define interlocked_cmpxchg_ptr __WINE_NOT_PORTABLE(interlocked_cmpxchg_ptr)
|
||||
#define interlocked_xchg __WINE_NOT_PORTABLE(interlocked_xchg)
|
||||
#define interlocked_xchg_ptr __WINE_NOT_PORTABLE(interlocked_xchg_ptr)
|
||||
#define interlocked_xchg_add __WINE_NOT_PORTABLE(interlocked_xchg_add)
|
||||
#define lstat __WINE_NOT_PORTABLE(lstat)
|
||||
#define memcpy_unaligned __WINE_NOT_PORTABLE(memcpy_unaligned)
|
||||
#define memmove __WINE_NOT_PORTABLE(memmove)
|
||||
#define pread __WINE_NOT_PORTABLE(pread)
|
||||
#define pwrite __WINE_NOT_PORTABLE(pwrite)
|
||||
#define spawnvp __WINE_NOT_PORTABLE(spawnvp)
|
||||
#define statvfs __WINE_NOT_PORTABLE(statvfs)
|
||||
#define strcasecmp __WINE_NOT_PORTABLE(strcasecmp)
|
||||
#define strerror __WINE_NOT_PORTABLE(strerror)
|
||||
#define strncasecmp __WINE_NOT_PORTABLE(strncasecmp)
|
||||
#define usleep __WINE_NOT_PORTABLE(usleep)
|
||||
|
||||
#endif /* NO_LIBWINE_PORT */
|
||||
|
||||
#endif /* !defined(__WINE_WINE_PORT_H) */
|
53
reactos/apps/utils/winetest/resource.h
Normal file
53
reactos/apps/utils/winetest/resource.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Resource definitions
|
||||
*
|
||||
* Copyright 2004 Ferenc Wagner
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#define IDI_WINE 1
|
||||
|
||||
#define IDD_STATUS 100
|
||||
#define IDD_ABOUT 101
|
||||
|
||||
#define IDC_ST0 1000
|
||||
#define IDC_PB0 1001
|
||||
#define IDC_ST1 1002
|
||||
#define IDC_PB1 1003
|
||||
#define IDC_ST2 1004
|
||||
#define IDC_PB2 1005
|
||||
|
||||
#define IDC_DIR 2000
|
||||
#define IDC_OUT 2001
|
||||
|
||||
#define IDC_SB 3000
|
||||
|
||||
#define IDC_EDIT 4000
|
||||
#define IDC_ABOUT 4001
|
||||
|
||||
/* Resource types */
|
||||
|
||||
#define TESTRES 1000
|
||||
#define STRINGRES 1001
|
||||
|
||||
/* String resources */
|
||||
|
||||
#define WINE_BUILD 10000
|
||||
#define BUILD_INFO 10001
|
||||
#define TESTS_URL 10002
|
||||
|
||||
/* Revision info strings start from this index: */
|
||||
#define REV_INFO 30000
|
223
reactos/apps/utils/winetest/send.c
Normal file
223
reactos/apps/utils/winetest/send.c
Normal file
|
@ -0,0 +1,223 @@
|
|||
/*
|
||||
* HTTP handling functions.
|
||||
*
|
||||
* Copyright 2003 Ferenc Wagner
|
||||
*
|
||||
* 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 <winsock.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "winetest.h"
|
||||
|
||||
SOCKET
|
||||
open_http (const char *server)
|
||||
{
|
||||
WSADATA wsad;
|
||||
struct sockaddr_in sa;
|
||||
SOCKET s;
|
||||
|
||||
report (R_STATUS, "Opening HTTP connection to %s", server);
|
||||
if (WSAStartup (MAKEWORD (2,2), &wsad)) return INVALID_SOCKET;
|
||||
|
||||
sa.sin_family = AF_INET;
|
||||
sa.sin_port = htons (80);
|
||||
sa.sin_addr.s_addr = inet_addr (server);
|
||||
if (sa.sin_addr.s_addr == INADDR_NONE) {
|
||||
struct hostent *host = gethostbyname (server);
|
||||
if (!host) {
|
||||
report (R_ERROR, "Hostname lookup failed for %s", server);
|
||||
goto failure;
|
||||
}
|
||||
sa.sin_addr.s_addr = ((struct in_addr *)host->h_addr)->s_addr;
|
||||
}
|
||||
s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
if (s == INVALID_SOCKET) {
|
||||
report (R_ERROR, "Can't open network socket: %d",
|
||||
WSAGetLastError ());
|
||||
goto failure;
|
||||
}
|
||||
if (!connect (s, (struct sockaddr*)&sa, sizeof (struct sockaddr_in)))
|
||||
return s;
|
||||
|
||||
report (R_ERROR, "Can't connect: %d", WSAGetLastError ());
|
||||
closesocket (s);
|
||||
failure:
|
||||
WSACleanup ();
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
int
|
||||
close_http (SOCKET s)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = closesocket (s);
|
||||
return (WSACleanup () || ret);
|
||||
}
|
||||
|
||||
int
|
||||
send_buf (SOCKET s, const char *buf, size_t length)
|
||||
{
|
||||
int sent;
|
||||
|
||||
while (length > 0) {
|
||||
sent = send (s, buf, length, 0);
|
||||
if (sent == SOCKET_ERROR) return 1;
|
||||
buf += sent;
|
||||
length -= sent;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
send_str (SOCKET s, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char *p;
|
||||
int ret;
|
||||
size_t len;
|
||||
|
||||
va_start (ap, s);
|
||||
p = vstrmake (&len, ap);
|
||||
va_end (ap);
|
||||
if (!p) return 1;
|
||||
ret = send_buf (s, p, len);
|
||||
free (p);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
send_file (const char *name)
|
||||
{
|
||||
SOCKET s;
|
||||
FILE *f;
|
||||
#define BUFLEN 8192
|
||||
unsigned char buffer[BUFLEN+1];
|
||||
size_t bytes_read, total, filesize;
|
||||
char *str;
|
||||
int ret;
|
||||
|
||||
/* RFC 2616 */
|
||||
#define SEP "--8<--cut-here--8<--"
|
||||
static const char head[] = "POST /submit HTTP/1.0\r\n"
|
||||
"Host: test.winehq.org\r\n"
|
||||
"User-Agent: Winetest Shell\r\n"
|
||||
"Content-Type: multipart/form-data; boundary=\"" SEP "\"\r\n"
|
||||
"Content-Length: %u\r\n\r\n";
|
||||
static const char body1[] = "--" SEP "\r\n"
|
||||
"Content-Disposition: form-data; name=\"reportfile\"; filename=\"%s\"\r\n"
|
||||
"Content-Type: application/octet-stream\r\n\r\n";
|
||||
static const char body2[] = "\r\n--" SEP "\r\n"
|
||||
"Content-Disposition: form-data; name=\"submit\"\r\n\r\n"
|
||||
"Upload File\r\n"
|
||||
"--" SEP "--\r\n";
|
||||
|
||||
s = open_http ("test.winehq.org");
|
||||
if (s == INVALID_SOCKET) return 1;
|
||||
|
||||
f = fopen (name, "rb");
|
||||
if (!f) {
|
||||
report (R_WARNING, "Can't open file '%s': %d", name, errno);
|
||||
goto abort1;
|
||||
}
|
||||
fseek (f, 0, SEEK_END);
|
||||
filesize = ftell (f);
|
||||
if (filesize > 1024*1024) {
|
||||
report (R_WARNING,
|
||||
"File too big (%.1f MB > 1 MB); submitting partial report.",
|
||||
filesize/1024.0/1024);
|
||||
filesize = 1024*1024;
|
||||
}
|
||||
fseek (f, 0, SEEK_SET);
|
||||
|
||||
report (R_STATUS, "Sending header");
|
||||
str = strmake (&total, body1, name);
|
||||
ret = send_str (s, head, filesize + total + sizeof body2 - 1) ||
|
||||
send_buf (s, str, total);
|
||||
free (str);
|
||||
if (ret) {
|
||||
report (R_WARNING, "Error sending header: %d, %d",
|
||||
errno, WSAGetLastError ());
|
||||
goto abort2;
|
||||
}
|
||||
|
||||
report (R_STATUS, "Sending %u bytes of data", filesize);
|
||||
report (R_PROGRESS, 2, filesize);
|
||||
total = 0;
|
||||
while (total < filesize && (bytes_read = fread (buffer, 1, BUFLEN/2, f))) {
|
||||
if ((signed)bytes_read == -1) {
|
||||
report (R_WARNING, "Error reading log file: %d", errno);
|
||||
goto abort2;
|
||||
}
|
||||
total += bytes_read;
|
||||
if (total > filesize) bytes_read -= total - filesize;
|
||||
if (send_buf (s, buffer, bytes_read)) {
|
||||
report (R_WARNING, "Error sending body: %d, %d",
|
||||
errno, WSAGetLastError ());
|
||||
goto abort2;
|
||||
}
|
||||
report (R_DELTA, bytes_read, "Network transfer: In progress");
|
||||
}
|
||||
fclose (f);
|
||||
|
||||
if (send_buf (s, body2, sizeof body2 - 1)) {
|
||||
report (R_WARNING, "Error sending trailer: %d, %d",
|
||||
errno, WSAGetLastError ());
|
||||
goto abort2;
|
||||
}
|
||||
report (R_DELTA, 0, "Network transfer: Done");
|
||||
|
||||
total = 0;
|
||||
while ((bytes_read = recv (s, buffer+total, BUFLEN-total, 0))) {
|
||||
if ((signed)bytes_read == SOCKET_ERROR) {
|
||||
report (R_WARNING, "Error receiving reply: %d, %d",
|
||||
errno, WSAGetLastError ());
|
||||
goto abort1;
|
||||
}
|
||||
total += bytes_read;
|
||||
if (total == BUFLEN) {
|
||||
report (R_WARNING, "Buffer overflow");
|
||||
goto abort1;
|
||||
}
|
||||
}
|
||||
if (close_http (s)) {
|
||||
report (R_WARNING, "Error closing connection: %d, %d",
|
||||
errno, WSAGetLastError ());
|
||||
return 1;
|
||||
}
|
||||
|
||||
str = strmake (&bytes_read, "Received %s (%d bytes).\n",
|
||||
name, filesize);
|
||||
ret = memcmp (str, buffer + total - bytes_read, bytes_read);
|
||||
free (str);
|
||||
if (ret) {
|
||||
buffer[total] = 0;
|
||||
str = strstr (buffer, "\r\n\r\n");
|
||||
if (!str) str = buffer;
|
||||
else str = str + 4;
|
||||
report (R_ERROR, "Can't submit logfile '%s'. "
|
||||
"Server response: %s", name, str);
|
||||
}
|
||||
return ret;
|
||||
|
||||
abort2:
|
||||
fclose (f);
|
||||
abort1:
|
||||
close_http (s);
|
||||
return 1;
|
||||
}
|
20
reactos/apps/utils/winetest/tests.rc
Normal file
20
reactos/apps/utils/winetest/tests.rc
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* Automatically generated -- do not edit! */
|
||||
#include "resource.h"
|
||||
STRINGTABLE {
|
||||
0 "advapi32_test.exe"
|
||||
1 "comctl32_test.exe"
|
||||
REV_INFO+0 "lib/advapi32/winetests/crypt_lmhash.c:1.1"
|
||||
REV_INFO+1 "lib/advapi32/winetests/crypt_md4.c:1.1"
|
||||
REV_INFO+2 "lib/advapi32/winetests/crypt_md5.c:1.1"
|
||||
REV_INFO+3 "lib/advapi32/winetests/crypt_sha.c:1.1"
|
||||
REV_INFO+4 "lib/advapi32/winetests/registry.c:1.1"
|
||||
REV_INFO+5 "lib/advapi32/winetests/security.c:1."
|
||||
REV_INFO+6 "lib/advapi32/winetests/crypt.c:1.1"
|
||||
REV_INFO+7 "dlls/comctl32/tests/imagelist.c:1.1"
|
||||
REV_INFO+8 "dlls/comctl32/tests/mru.c:1.1"
|
||||
REV_INFO+9 "dlls/comctl32/tests/subclass.c:1.1"
|
||||
REV_INFO+10 "dlls/comctl32/tests/tab.c:1.1"
|
||||
|
||||
}
|
||||
0 TESTRES "../../../lib/advapi32/winetests/advapi32_test.exe"
|
||||
1 TESTRES "../../../lib/comctl32/winetests/comctl32_test.exe"
|
118
reactos/apps/utils/winetest/util.c
Normal file
118
reactos/apps/utils/winetest/util.c
Normal file
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* Utility functions.
|
||||
*
|
||||
* Copyright 2003 Dimitrie O. Paun
|
||||
* Copyright 2003 Ferenc Wagner
|
||||
*
|
||||
* 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 <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "winetest.h"
|
||||
|
||||
void *xmalloc (size_t len)
|
||||
{
|
||||
void *p = malloc (len);
|
||||
|
||||
if (!p) report (R_FATAL, "Out of memory.");
|
||||
return p;
|
||||
}
|
||||
|
||||
void *xrealloc (void *op, size_t len)
|
||||
{
|
||||
void *p = realloc (op, len);
|
||||
|
||||
if (!p) report (R_FATAL, "Out of memory.");
|
||||
return p;
|
||||
}
|
||||
|
||||
char *vstrfmtmake (size_t *lenp, const char *fmt, va_list ap)
|
||||
{
|
||||
size_t size = 1000;
|
||||
char *p, *q;
|
||||
int n;
|
||||
|
||||
p = malloc (size);
|
||||
if (!p) return NULL;
|
||||
while (1) {
|
||||
n = vsnprintf (p, size, fmt, ap);
|
||||
if (n < 0) size *= 2; /* Windows */
|
||||
else if ((unsigned)n >= size) size = n+1; /* glibc */
|
||||
else break;
|
||||
q = realloc (p, size);
|
||||
if (!q) {
|
||||
free (p);
|
||||
return NULL;
|
||||
}
|
||||
p = q;
|
||||
}
|
||||
if (lenp) *lenp = n;
|
||||
return p;
|
||||
}
|
||||
|
||||
char *vstrmake (size_t *lenp, va_list ap)
|
||||
{
|
||||
const char *fmt;
|
||||
|
||||
fmt = va_arg (ap, const char*);
|
||||
return vstrfmtmake (lenp, fmt, ap);
|
||||
}
|
||||
|
||||
char *strmake (size_t *lenp, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char *p;
|
||||
|
||||
va_start (ap, lenp);
|
||||
p = vstrmake (lenp, ap);
|
||||
if (!p) report (R_FATAL, "Out of memory.");
|
||||
va_end (ap);
|
||||
return p;
|
||||
}
|
||||
|
||||
void xprintf (const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
size_t size;
|
||||
ssize_t written;
|
||||
char *buffer, *head;
|
||||
|
||||
va_start (ap, fmt);
|
||||
buffer = vstrfmtmake (&size, fmt, ap);
|
||||
head = buffer;
|
||||
va_end (ap);
|
||||
while ((written = write (1, head, size)) != size) {
|
||||
if (written == -1)
|
||||
report (R_FATAL, "Can't write logs: %d", errno);
|
||||
head += written;
|
||||
size -= written;
|
||||
}
|
||||
free (buffer);
|
||||
}
|
||||
|
||||
const char *
|
||||
badtagchar (const char *tag)
|
||||
{
|
||||
while (*tag)
|
||||
if (('a'<=*tag && *tag<='z') ||
|
||||
('A'<=*tag && *tag<='Z') ||
|
||||
('0'<=*tag && *tag<='9') ||
|
||||
*tag=='-' || *tag=='.')
|
||||
tag++;
|
||||
else return tag;
|
||||
return NULL;
|
||||
}
|
BIN
reactos/apps/utils/winetest/wine.ico
Normal file
BIN
reactos/apps/utils/winetest/wine.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
61
reactos/apps/utils/winetest/winetest.h
Normal file
61
reactos/apps/utils/winetest/winetest.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* winetest definitions
|
||||
*
|
||||
* Copyright 2003 Dimitrie O. Paun
|
||||
* Copyright 2003 Ferenc Wagner
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef __WINETESTS_H
|
||||
#define __WINETESTS_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
void fatal (const char* msg);
|
||||
void warning (const char* msg);
|
||||
void *xmalloc (size_t len);
|
||||
void *xrealloc (void *op, size_t len);
|
||||
void xprintf (const char *fmt, ...);
|
||||
char *vstrmake (size_t *lenp, va_list ap);
|
||||
char *strmake (size_t *lenp, ...);
|
||||
const char *badtagchar (const char *tag);
|
||||
|
||||
int send_file (const char *name);
|
||||
|
||||
/* GUI definitions */
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
enum report_type {
|
||||
R_STATUS = 0,
|
||||
R_PROGRESS,
|
||||
R_STEP,
|
||||
R_DELTA,
|
||||
R_DIR,
|
||||
R_OUT,
|
||||
R_WARNING,
|
||||
R_ERROR,
|
||||
R_FATAL,
|
||||
R_ASK,
|
||||
R_TEXTMODE,
|
||||
R_QUIET
|
||||
};
|
||||
|
||||
int report (enum report_type t, ...);
|
||||
|
||||
#endif /* __WINETESTS_H */
|
132
reactos/apps/utils/winetest/winetest.rc
Normal file
132
reactos/apps/utils/winetest/winetest.rc
Normal file
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* Winetest resources
|
||||
*
|
||||
* Copyright 2004 Ferenc Wagner
|
||||
*
|
||||
* 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 <windows.h>
|
||||
#include <winres.h>
|
||||
#include "resource.h"
|
||||
#include "tests.rc"
|
||||
|
||||
IDD_STATUS DIALOG 0, 0, 160, 140
|
||||
STYLE WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
|
||||
CAPTION "Wine Test Shell"
|
||||
BEGIN
|
||||
LTEXT "Extracting:", IDC_ST0, 10, 5, 140, 10
|
||||
CONTROL "PB0", IDC_PB0, PROGRESS_CLASS, 0, 5, 15, 150, 10
|
||||
LTEXT "Running:", IDC_ST1, 10, 30, 140, 10
|
||||
CONTROL "PB1", IDC_PB1, PROGRESS_CLASS, 0, 5, 40, 150, 15
|
||||
LTEXT "Network transfer:", IDC_ST2, 10, 60, 140, 10
|
||||
CONTROL "PB2", IDC_PB2, PROGRESS_CLASS, 0, 5, 70, 150, 10
|
||||
|
||||
LTEXT "Working directory:", IDC_STATIC, 10, 89, 100, 10
|
||||
EDITTEXT IDC_DIR, 71, 88, 79, 10,
|
||||
ES_READONLY | ES_AUTOHSCROLL
|
||||
LTEXT "Output file:", IDC_STATIC, 10, 100, 100, 10
|
||||
EDITTEXT IDC_OUT, 46, 99, 104, 10,
|
||||
ES_READONLY | ES_AUTOHSCROLL
|
||||
|
||||
DEFPUSHBUTTON "About", IDHELP, 20, 113, 30, 14
|
||||
PUSHBUTTON "Edit", IDCANCEL, 65, 113, 30, 14,
|
||||
WS_DISABLED
|
||||
PUSHBUTTON "Stop", IDABORT, 110, 113, 30, 14
|
||||
|
||||
CONTROL "Created", IDC_SB, STATUSCLASSNAME, 0, 0,0,0,0
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOG 0, 0, 150, 60
|
||||
STYLE WS_POPUP
|
||||
CAPTION "About Wine Test Shell"
|
||||
BEGIN
|
||||
CTEXT "This program extracts and runs a series of tests which check Wine's conformance to the Windows API.",
|
||||
IDC_STATIC, 10, 5, 130, 30
|
||||
DEFPUSHBUTTON "Close", IDCANCEL, 55, 40, 40, 14
|
||||
END
|
||||
|
||||
/* BINRES wine.ico */
|
||||
IDI_WINE ICON "wine.ico"
|
||||
/* {
|
||||
'00 00 01 00 02 00 20 20 10 00 00 00 00 00 E8 02'
|
||||
'00 00 26 00 00 00 10 10 10 00 00 00 00 00 28 01'
|
||||
'00 00 0E 03 00 00 28 00 00 00 20 00 00 00 40 00'
|
||||
'00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00'
|
||||
'00 00 00 00 00 00 10 00 00 00 00 00 00 00 39 02'
|
||||
'B1 00 23 02 6C 00 0F 03 29 00 1B 02 51 00 FF FF'
|
||||
'FF 00 1B 1A 1B 00 1E 02 63 00 33 02 A1 00 08 08'
|
||||
'08 00 14 03 3C 00 0C 04 1E 00 2E 02 8E 00 10 0F'
|
||||
'10 00 2A 02 82 00 29 02 7D 00 03 02 04 00 44 44'
|
||||
'44 44 44 44 44 44 55 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 8F FF 84 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 8F F8 F8 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 8F FF F5 44 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 5C F8 C8 F5 44 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 85 44 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 4C 44 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 4C 44 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 45 54 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 45 F4 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 45 FF 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 48 FF F4 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 48 23 9A 84 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 42 B7 7E AF 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 49 00 00 EA C4 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 46 00 00 01 F4 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 46 00 00 00 9F 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 46 00 70 00 EF 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 43 00 00 00 79 F4 44 44 44 44 44 44'
|
||||
'44 44 44 44 49 00 00 00 0E F4 44 44 44 44 44 44'
|
||||
'44 44 44 44 42 00 00 00 07 24 44 44 44 44 44 44'
|
||||
'44 44 44 44 43 B0 00 00 00 34 44 44 44 44 44 44'
|
||||
'44 44 44 44 4C 30 00 00 00 1F 44 44 44 44 44 44'
|
||||
'44 44 44 44 48 27 E1 1D B1 2C 44 44 44 44 44 44'
|
||||
'44 44 44 44 44 A9 CC CF F8 48 C4 44 44 44 44 44'
|
||||
'44 44 44 44 44 58 44 44 44 45 C4 44 44 44 44 44'
|
||||
'44 44 44 44 44 4C 44 44 44 44 84 44 44 44 44 44'
|
||||
'44 44 44 44 44 48 44 44 44 44 C4 44 44 44 44 44'
|
||||
'44 44 44 44 44 48 C4 44 44 44 C4 44 44 44 44 44'
|
||||
'44 44 44 44 44 44 F4 44 44 4C C4 44 44 44 44 44'
|
||||
'44 44 44 44 44 44 84 44 F8 84 44 44 44 44 44 44'
|
||||
'44 44 44 44 44 44 48 F8 44 44 44 44 44 44 FF FF'
|
||||
'3F FF FF F0 7F FF FF C0 FF FF FF 03 FF FF FC 03'
|
||||
'FF FF FF F3 FF FF FF FB FF FF FF FB FF FF FF F9'
|
||||
'FF FF FF F9 FF FF FF F8 FF FF FF F8 7F FF FF F8'
|
||||
'1F FF FF F8 0F FF FF F8 07 FF FF F8 07 FF FF F8'
|
||||
'03 FF FF F8 03 FF FF F8 01 FF FF F8 01 FF FF F8'
|
||||
'01 FF FF F8 01 FF FF F8 00 FF FF F8 00 FF FF FC'
|
||||
'02 7F FF FC FE 7F FF FE FF 7F FF FE FF 7F FF FE'
|
||||
'7F 7F FF FF 7E 7F FF FF 71 FF FF FF 8F FF 28 00'
|
||||
'00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00'
|
||||
'00 00 80 00 00 00 00 00 00 00 00 00 00 00 10 00'
|
||||
'00 00 00 00 00 00 3A 02 B1 00 0A 06 14 00 12 03'
|
||||
'33 00 FF FF FF 00 12 12 12 00 0B 0B 0B 00 1B 1B'
|
||||
'1B 00 25 02 6F 00 2E 02 92 00 1A 02 52 00 36 02'
|
||||
'A6 00 15 03 3E 00 04 04 05 00 13 11 19 00 1E 02'
|
||||
'62 00 2A 02 82 00 33 33 33 CC 43 33 33 33 33 33'
|
||||
'CC 5C 33 33 33 33 33 36 C5 53 33 33 33 33 33 33'
|
||||
'33 43 33 33 33 33 33 33 33 65 33 33 33 33 33 33'
|
||||
'33 DC 33 33 33 33 33 33 33 17 EC 33 33 33 33 33'
|
||||
'33 B0 07 53 33 33 33 33 33 90 00 B3 33 33 33 33'
|
||||
'33 B0 00 FC 33 33 33 33 33 BA 00 A2 33 33 33 33'
|
||||
'33 C7 88 82 33 33 33 33 33 3D D5 14 43 33 33 33'
|
||||
'33 35 33 33 53 33 33 33 33 33 53 33 53 33 33 33'
|
||||
'33 33 C5 5C 33 33 FC 7F 00 00 F0 FF 00 00 E1 FF'
|
||||
'00 00 FD FF 00 00 FC FF 00 00 FC FF 00 00 FC 3F'
|
||||
'00 00 FC 1F 00 00 FC 1F 00 00 FC 0F 00 00 FC 0F'
|
||||
'00 00 FC 0F 00 00 FE 07 00 00 FE F7 00 00 FF 77'
|
||||
'00 00 FF 0F 00 00'
|
||||
} */
|
Loading…
Reference in a new issue