[ros-diffs] [reactos] 01/01: [GDI] Fix metafile crashes and null driver issues.

2017-11-26 Thread James Tabor
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e1e79f248b354f0a0f257b8001932704e3eee7a5

commit e1e79f248b354f0a0f257b8001932704e3eee7a5
Author: James Tabor 
AuthorDate: Sun Nov 26 14:48:06 2017 -0600

[GDI] Fix metafile crashes and null driver issues.

Patch by Jérôme Gardou modified by me.
CORE-14023 : Fix SetWorldTransform for metafiles #137
Includes CORE-12832 and CORE-13627.
---
 win32ss/gdi/gdi32/include/gdi32p.h   |  1 +
 win32ss/gdi/gdi32/objects/coord.c|  9 -
 win32ss/gdi/gdi32/wine/enhmetafile.c |  1 -
 win32ss/gdi/gdi32/wine/gdi_private.h |  4 ++--
 win32ss/gdi/gdi32/wine/rosglue.c | 21 +++--
 5 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/win32ss/gdi/gdi32/include/gdi32p.h 
b/win32ss/gdi/gdi32/include/gdi32p.h
index 773192df76..dddbfd74b3 100644
--- a/win32ss/gdi/gdi32/include/gdi32p.h
+++ b/win32ss/gdi/gdi32/include/gdi32p.h
@@ -633,6 +633,7 @@ typedef enum _DCFUNC
 DCFUNC_SetViewportOrgEx,
 DCFUNC_SetWindowExtEx,
 DCFUNC_SetWindowOrgEx,
+DCFUNC_SetWorldTransform,
 DCFUNC_StretchBlt,
 DCFUNC_StrokeAndFillPath,
 DCFUNC_StrokePath,
diff --git a/win32ss/gdi/gdi32/objects/coord.c 
b/win32ss/gdi/gdi32/objects/coord.c
index 2caa575352..dd74b33946 100644
--- a/win32ss/gdi/gdi32/objects/coord.c
+++ b/win32ss/gdi/gdi32/objects/coord.c
@@ -318,7 +318,14 @@ ModifyWorldTransform(
 if (GDI_HANDLE_GET_TYPE(hdc) == GDILoObjType_LO_METADC16_TYPE)
 return FALSE;
 
-HANDLE_METADC(BOOL, ModifyWorldTransform, FALSE, hdc, pxform, dwMode);
+if (dwMode == MWT_SET)
+{
+   HANDLE_METADC(BOOL, SetWorldTransform, FALSE, hdc, pxform);
+}
+else
+{
+   HANDLE_METADC(BOOL, ModifyWorldTransform, FALSE, hdc, pxform, dwMode);
+}
 
 /* Get the DC attribute */
 pdcattr = GdiGetDcAttr(hdc);
diff --git a/win32ss/gdi/gdi32/wine/enhmetafile.c 
b/win32ss/gdi/gdi32/wine/enhmetafile.c
index 2358a86f46..07faf2a24d 100644
--- a/win32ss/gdi/gdi32/wine/enhmetafile.c
+++ b/win32ss/gdi/gdi32/wine/enhmetafile.c
@@ -546,7 +546,6 @@ static void EMF_Update_MF_Xform(HDC hdc, const 
enum_emh_data *info)
 
 if (!SetWorldTransform(hdc, _trans))
 {
-__debugbreak();
 ERR("World transform failed!\n");
 }
 }
diff --git a/win32ss/gdi/gdi32/wine/gdi_private.h 
b/win32ss/gdi/gdi32/wine/gdi_private.h
index 2857095d86..0bce298918 100644
--- a/win32ss/gdi/gdi32/wine/gdi_private.h
+++ b/win32ss/gdi/gdi32/wine/gdi_private.h
@@ -180,10 +180,10 @@ HGDIOBJ WINAPI GdiFixUpHandle(HGDIOBJ hGdiObj);
 
 extern void push_dc_driver_ros(PHYSDEV *dev, PHYSDEV physdev, const struct 
gdi_dc_funcs *funcs);
 #define push_dc_driver push_dc_driver_ros
-
+#if 0
 BOOL WINAPI SetWorldTransformForMetafile(HDC hdc, const XFORM *pxform);
 #define SetWorldTransform SetWorldTransformForMetafile
-
+#endif
 #ifdef _M_ARM
 #define DbgRaiseAssertionFailure() __emit(0xdefc)
 #else
diff --git a/win32ss/gdi/gdi32/wine/rosglue.c b/win32ss/gdi/gdi32/wine/rosglue.c
index fbf26fe0d9..230510148f 100644
--- a/win32ss/gdi/gdi32/wine/rosglue.c
+++ b/win32ss/gdi/gdi32/wine/rosglue.c
@@ -42,6 +42,10 @@ static INT   NULL_ExtSelectClipRgn(PHYSDEV dev, HRGN hrgn, 
INT iMode) { return 1
 static INT   NULL_IntersectClipRect(PHYSDEV dev, INT left, INT top, INT right, 
INT bottom) { return 1; }
 static INT   NULL_OffsetClipRgn(PHYSDEV dev, INT x, INT y) { return 
SIMPLEREGION; }
 static INT   NULL_ExcludeClipRect(PHYSDEV dev, INT left, INT top, INT right, 
INT bottom) { return 1; }
+static BOOL  NULL_ExtTextOutW(PHYSDEV dev, INT x, INT y, UINT fuOptions, const 
RECT *lprc, LPCWSTR lpString, UINT cwc, const INT *lpDx) { return TRUE; }
+static BOOL  NULL_ModifyWorldTransform( PHYSDEV dev, const XFORM* xform, DWORD 
mode ) { return TRUE; }
+static BOOL  NULL_SetWorldTransform( PHYSDEV dev, const XFORM* xform ) { 
return TRUE; }
+static BOOL  NULL_PolyPolyline(PHYSDEV dev, const POINT *pt, const DWORD *lpt, 
DWORD cw) { return TRUE; }
 
 static const struct gdi_dc_funcs DummyPhysDevFuncs =
 {
@@ -73,7 +77,7 @@ static const struct gdi_dc_funcs DummyPhysDevFuncs =
 (PVOID)NULL_Unused, //INT  
(*pExtEscape)(PHYSDEV,INT,INT,LPCVOID,INT,LPVOID);
 (PVOID)NULL_Unused, //BOOL 
(*pExtFloodFill)(PHYSDEV,INT,INT,COLORREF,UINT);
 NULL_ExtSelectClipRgn, //INT  (*pExtSelectClipRgn)(PHYSDEV,HRGN,INT);
-(PVOID)NULL_Unused, //BOOL (*pExtTextOut)(PHYSDEV,INT,INT,UINT,const 
RECT*,LPCWSTR,UINT,const INT*);
+NULL_ExtTextOutW, //BOOL (*pExtTextOut)(PHYSDEV,INT,INT,UINT,const 
RECT*,LPCWSTR,UINT,const INT*);
 nulldrv_FillPath,   //BOOL (*pFillPath)(PHYSDEV);
 (PVOID)NULL_Unused, //BOOL (*pFillRgn)(PHYSDEV,HRGN,HBRUSH);
 nulldrv_FlattenPath, //BOOL (*pFlattenPath)(PHYSDEV);
@@ -108,7 +112,7 @@ static const struct gdi_dc_funcs DummyPhysDevFuncs =
 NULL_IntersectClipRect, //INT  
(*pIntersectClipRect)(PHYSDEV,INT,INT,INT,INT);
 (PVOID)NULL_Unused, 

[ros-diffs] [reactos] 01/01: [LIBTIRPC] Add a PCH.

2017-11-26 Thread Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=53d3f00b2b25dbee9c3d8e56e6790479f72ad440

commit 53d3f00b2b25dbee9c3d8e56e6790479f72ad440
Author: Amine Khaldi 
AuthorDate: Sun Nov 26 13:19:19 2017 +0100

[LIBTIRPC] Add a PCH.
---
 dll/3rdparty/libtirpc/CMakeLists.txt |  4 +++-
 dll/3rdparty/libtirpc/precomp.h  | 32 
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/dll/3rdparty/libtirpc/CMakeLists.txt 
b/dll/3rdparty/libtirpc/CMakeLists.txt
index 499775da03..f6c9f4c113 100644
--- a/dll/3rdparty/libtirpc/CMakeLists.txt
+++ b/dll/3rdparty/libtirpc/CMakeLists.txt
@@ -85,7 +85,8 @@ list(APPEND SOURCE
 src/xdr_rec.c
 src/xdr_reference.c
 src/xdr_sizeof.c
-src/xdr_stdio.c)
+src/xdr_stdio.c
+precomp.h)
 
 add_library(libtirpc SHARED
 ${SOURCE}
@@ -102,4 +103,5 @@ endif()
 set_module_type(libtirpc win32dll)
 add_importlibs(libtirpc user32 advapi32 kernel32_vista ws2_32 msvcrt kernel32 
ntdll)
 add_delay_importlibs(libtirpc secur32)
+add_pch(libtirpc precomp.h SOURCE)
 add_cd_file(TARGET libtirpc DESTINATION reactos/system32 FOR all)
diff --git a/dll/3rdparty/libtirpc/precomp.h b/dll/3rdparty/libtirpc/precomp.h
new file mode 100644
index 00..191703ab77
--- /dev/null
+++ b/dll/3rdparty/libtirpc/precomp.h
@@ -0,0 +1,32 @@
+#ifndef _LIBTIRPC_PRECOMP_H_
+#define _LIBTIRPC_PRECOMP_H_
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#endif /* _LIBTIRPC_PRECOMP_H_ */



[ros-diffs] [reactos] 01/01: [LIBTIRPC] Match rtime() propotype and implementation

2017-11-26 Thread Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1feb8e627efd1515097505a675aa4f2e6d8cf15c

commit 1feb8e627efd1515097505a675aa4f2e6d8cf15c
Author: Pierre Schweitzer 
AuthorDate: Sun Nov 26 14:44:26 2017 +0100

[LIBTIRPC] Match rtime() propotype and implementation
---
 dll/3rdparty/libtirpc/tirpc/rpc/auth_des.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/dll/3rdparty/libtirpc/tirpc/rpc/auth_des.h 
b/dll/3rdparty/libtirpc/tirpc/rpc/auth_des.h
index f3f9f31fef..9aa96cb11e 100644
--- a/dll/3rdparty/libtirpc/tirpc/rpc/auth_des.h
+++ b/dll/3rdparty/libtirpc/tirpc/rpc/auth_des.h
@@ -121,8 +121,12 @@ __END_DECLS
 __BEGIN_DECLS
 extern bool_t  xdr_authdes_cred(XDR *, struct authdes_cred *);
 extern bool_t  xdr_authdes_verf(XDR *, struct authdes_verf *);
+#ifndef __REACTOS__
 extern int rtime(dev_t, struct netbuf *, int, struct timeval *,
struct timeval *);
+#else
+extern int rtime(struct sockaddr_in *, struct timeval *, struct timeval *);
+#endif
 extern voidkgetnetname(char *);
 extern enum auth_stat _svcauth_des(struct svc_req *, struct rpc_msg *);
 __END_DECLS



[ros-diffs] [reactos] 01/01: [SHELLBTRFS] Add a PCH.

2017-11-26 Thread Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b28272c545845084d8233162fb9e22e6fc88c822

commit b28272c545845084d8233162fb9e22e6fc88c822
Author: Amine Khaldi 
AuthorDate: Sun Nov 26 14:16:29 2017 +0100

[SHELLBTRFS] Add a PCH.
---
 dll/shellext/shellbtrfs/CMakeLists.txt | 13 +
 dll/shellext/shellbtrfs/balance.h  |  2 ++
 dll/shellext/shellbtrfs/contextmenu.h  |  2 ++
 dll/shellext/shellbtrfs/devices.h  |  2 ++
 dll/shellext/shellbtrfs/factory.h  |  2 ++
 dll/shellext/shellbtrfs/guid.c | 13 +
 dll/shellext/shellbtrfs/iconoverlay.h  |  2 ++
 dll/shellext/shellbtrfs/precomp.h  | 29 +
 dll/shellext/shellbtrfs/propsheet.h|  2 ++
 dll/shellext/shellbtrfs/recv.h |  2 ++
 dll/shellext/shellbtrfs/scrub.h|  2 ++
 dll/shellext/shellbtrfs/send.h |  2 ++
 dll/shellext/shellbtrfs/shellext.h |  2 ++
 dll/shellext/shellbtrfs/volpropsheet.h |  2 ++
 14 files changed, 73 insertions(+), 4 deletions(-)

diff --git a/dll/shellext/shellbtrfs/CMakeLists.txt 
b/dll/shellext/shellbtrfs/CMakeLists.txt
index fd11cc123c..6802f6b108 100644
--- a/dll/shellext/shellbtrfs/CMakeLists.txt
+++ b/dll/shellext/shellbtrfs/CMakeLists.txt
@@ -3,6 +3,8 @@ set_cpp(WITH_RUNTIME WITH_EXCEPTIONS WITH_STL)
 remove_definitions(-D_WIN32_WINNT=0x502)
 add_definitions(-D_WIN32_WINNT=0x603)
 
+include_directories(${REACTOS_SOURCE_DIR}/drivers/filesystems/btrfs)
+
 spec2def(shellbtrfs.dll shellbtrfs.spec)
 
 list(APPEND SOURCE
@@ -18,16 +20,19 @@ list(APPEND SOURCE
 scrub.cpp
 send.cpp
 volpropsheet.cpp
-${CMAKE_CURRENT_BINARY_DIR}/shellbtrfs.def)
+precomp.h)
 
-include_directories(
-${REACTOS_SOURCE_DIR}/drivers/filesystems/btrfs)
+add_library(shellbtrfs SHARED
+${SOURCE}
+guid.c
+shellbtrfs.rc
+${CMAKE_CURRENT_BINARY_DIR}/shellbtrfs.def)
 
 file(GLOB shellbtrfs_rc_deps *.ico)
 add_rc_deps(shellbtrfs.rc ${shellbtrfs_rc_deps})
 
-add_library(shellbtrfs SHARED ${SOURCE} shellbtrfs.rc)
 set_module_type(shellbtrfs win32dll UNICODE)
 target_link_libraries(shellbtrfs uuid)
 add_importlibs(shellbtrfs advapi32 advapi32_vista ole32 shell32 shlwapi user32 
comctl32 uxtheme setupapi comdlg32 gdi32 msvcrt kernel32_vista kernel32 ntdll)
+add_pch(shellbtrfs precomp.h SOURCE)
 add_cd_file(TARGET shellbtrfs DESTINATION reactos/system32 FOR all)
diff --git a/dll/shellext/shellbtrfs/balance.h 
b/dll/shellext/shellbtrfs/balance.h
index 262f29923b..0c07de4c2c 100644
--- a/dll/shellext/shellbtrfs/balance.h
+++ b/dll/shellext/shellbtrfs/balance.h
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see . */
 
+#pragma once
+
 #include 
 #ifndef __REACTOS__
 #include "../btrfsioctl.h"
diff --git a/dll/shellext/shellbtrfs/contextmenu.h 
b/dll/shellext/shellbtrfs/contextmenu.h
index d9d32ed91c..12779f422b 100644
--- a/dll/shellext/shellbtrfs/contextmenu.h
+++ b/dll/shellext/shellbtrfs/contextmenu.h
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see . */
 
+#pragma once
+
 #include 
 
 extern LONG objs_loaded;
diff --git a/dll/shellext/shellbtrfs/devices.h 
b/dll/shellext/shellbtrfs/devices.h
index 218a244ff3..e6b949abd9 100644
--- a/dll/shellext/shellbtrfs/devices.h
+++ b/dll/shellext/shellbtrfs/devices.h
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see . */
 
+#pragma once
+
 #ifndef __REACTOS__
 #include 
 #include 
diff --git a/dll/shellext/shellbtrfs/factory.h 
b/dll/shellext/shellbtrfs/factory.h
index af8b46bf8e..8575e61f52 100644
--- a/dll/shellext/shellbtrfs/factory.h
+++ b/dll/shellext/shellbtrfs/factory.h
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see . */
 
+#pragma once
+
 extern LONG objs_loaded;
 
 typedef enum {
diff --git a/dll/shellext/shellbtrfs/guid.c b/dll/shellext/shellbtrfs/guid.c
new file mode 100644
index 00..2396fb1c59
--- /dev/null
+++ b/dll/shellext/shellbtrfs/guid.c
@@ -0,0 +1,13 @@
+/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
+
+#define WIN32_NO_STATuS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#include 
+#include 
+#include 
+#define DEVICE_TYPE ULONG
+#include 
+
+/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
diff --git a/dll/shellext/shellbtrfs/iconoverlay.h 
b/dll/shellext/shellbtrfs/iconoverlay.h
index efcc1e7b79..24276ddcb9 100644
--- a/dll/shellext/shellbtrfs/iconoverlay.h
+++ b/dll/shellext/shellbtrfs/iconoverlay.h
@@ -15,6 +15,8 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see . 

[ros-diffs] [reactos] 01/01: [NFS41_NP] Add a PCH.

2017-11-26 Thread Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=58428a6c29c705960d3722c6c4dfd16740e82ec4

commit 58428a6c29c705960d3722c6c4dfd16740e82ec4
Author: Amine Khaldi 
AuthorDate: Sun Nov 26 13:22:37 2017 +0100

[NFS41_NP] Add a PCH.
---
 dll/np/nfs/CMakeLists.txt | 10 --
 dll/np/nfs/precomp.h  |  7 +++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/dll/np/nfs/CMakeLists.txt b/dll/np/nfs/CMakeLists.txt
index 756be2e307..b3d32f3db2 100644
--- a/dll/np/nfs/CMakeLists.txt
+++ b/dll/np/nfs/CMakeLists.txt
@@ -5,13 +5,19 @@ list(APPEND SOURCE
 nfs41_np.c
 nfs41_np.h
 options.c
-options.h)
+options.h
+precomp.h)
 
 include_directories(
 ${REACTOS_SOURCE_DIR}/drivers/filesystems/nfs)
 
-add_library(nfs41_np SHARED ${SOURCE} nfsnp.rc 
${CMAKE_CURRENT_BINARY_DIR}/nfs41_np.def)
+add_library(nfs41_np SHARED
+${SOURCE}
+nfsnp.rc
+${CMAKE_CURRENT_BINARY_DIR}/nfs41_np.def)
+
 set_module_type(nfs41_np win32dll UNICODE)
 target_link_libraries(nfs41_np ${PSEH_LIB})
 add_importlibs(nfs41_np msvcrt kernel32)
+add_pch(nfs41_np precomp.h SOURCE)
 add_cd_file(TARGET nfs41_np DESTINATION reactos/system32 FOR all)
diff --git a/dll/np/nfs/precomp.h b/dll/np/nfs/precomp.h
new file mode 100644
index 00..9350723f13
--- /dev/null
+++ b/dll/np/nfs/precomp.h
@@ -0,0 +1,7 @@
+#ifdef _NFS_PRECOMP_H_
+#define _NFS_PRECOMP_H_
+
+#include 
+#include "options.h"
+
+#endif /* _NFS_PRECOMP_H_ */



[ros-diffs] [reactos] 01/01: [NFSD] Add a PCH.

2017-11-26 Thread Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=af212ce50845f41af25090f236da77d0879c86ee

commit af212ce50845f41af25090f236da77d0879c86ee
Author: Amine Khaldi 
AuthorDate: Sun Nov 26 13:13:39 2017 +0100

[NFSD] Add a PCH.
---
 base/services/nfsd/CMakeLists.txt | 54 ---
 base/services/nfsd/precomp.h  | 35 +
 2 files changed, 63 insertions(+), 26 deletions(-)

diff --git a/base/services/nfsd/CMakeLists.txt 
b/base/services/nfsd/CMakeLists.txt
index ba5ea7624b..91ce1221b6 100644
--- a/base/services/nfsd/CMakeLists.txt
+++ b/base/services/nfsd/CMakeLists.txt
@@ -8,42 +8,43 @@ include_directories(
 ${REACTOS_SOURCE_DIR}/dll/np/nfs)
 
 list(APPEND SOURCE 
-nfs41_daemon.c
+acl.c
+callback_server.c
+callback_xdr.c
 daemon_debug.c
-nfs41_ops.c
+delegation.c
+ea.c
+getattr.c
+idmap.c
+lock.c
+lookup.c
+mount.c
+name_cache.c
+namespace.c
+nfs41_client.c
 nfs41_compound.c
-nfs41_xdr.c
+nfs41_daemon.c
+nfs41_ops.c
+nfs41_rpc.c
 nfs41_server.c
-nfs41_client.c
-nfs41_superblock.c
 nfs41_session.c
-lookup.c
-mount.c
+nfs41_superblock.c
+nfs41_xdr.c
 open.c
-readwrite.c
-lock.c
+pnfs_debug.c
+pnfs_device.c
+pnfs_io.c
+pnfs_layout.c
 readdir.c
-getattr.c
+readwrite.c
+recovery.c
+service.c
 setattr.c
+symlink.c
 upcall.c
-nfs41_rpc.c
 util.c
-pnfs_layout.c
-pnfs_device.c
-pnfs_debug.c
-pnfs_io.c
-name_cache.c
-namespace.c
 volume.c
-callback_server.c
-callback_xdr.c
-service.c
-symlink.c
-idmap.c
-delegation.c
-recovery.c
-acl.c
-ea.c)
+precomp.h)
 
 add_executable(nfsd ${SOURCE} nfsd.rc)
 
@@ -55,6 +56,7 @@ endif()
 
 set_module_type(nfsd win32cui)
 add_importlibs(nfsd advapi32 iphlpapi kernel32_vista libtirpc msvcrt shell32 
ws2_32 wldap32 kernel32 ntdll)
+add_pch(nfsd precomp.h SOURCE)
 add_cd_file(TARGET nfsd DESTINATION reactos/system32 FOR all)
 add_cd_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/netconfig" DESTINATION 
reactos/system32/drivers/etc FOR all)
 add_cd_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/ms-nfs41-idmap.conf" DESTINATION 
reactos/system32/drivers/etc FOR all)
diff --git a/base/services/nfsd/precomp.h b/base/services/nfsd/precomp.h
new file mode 100644
index 00..73aad40295
--- /dev/null
+++ b/base/services/nfsd/precomp.h
@@ -0,0 +1,35 @@
+#ifndef _NFSD_PRECOMP_H_
+#define _NFSD_PRECOMP_H_
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "daemon_debug.h"
+#include "delegation.h"
+#include "from_kernel.h"
+#include "idmap.h"
+#include "nfs41.h"
+#include "nfs41_callback.h"
+#include "nfs41_compound.h"
+#include "nfs41_ops.h"
+#include "name_cache.h"
+#include "nfs41_xdr.h"
+#include "recovery.h"
+#include "tree.h"
+#include "upcall.h"
+#include "util.h"
+
+#include 
+#include 
+#include 
+
+#endif /* _NFSD_PRECOMP_H_ */



[ros-diffs] [reactos] 02/02: [NTOSKRNL] Use ExAllocatePoolWithQuotaTag() when allocating SystemBuffer for the IRP That way, in case the system lacks memory, an exception is thrown and IRP isn't sent t

2017-11-26 Thread Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ecbbe2a338619c9d9f7c52a6e7af24adc5fb174

commit 9ecbbe2a338619c9d9f7c52a6e7af24adc5fb174
Author: Pierre Schweitzer 
AuthorDate: Sun Nov 26 14:01:04 2017 +0100

[NTOSKRNL] Use ExAllocatePoolWithQuotaTag() when allocating SystemBuffer 
for the IRP
That way, in case the system lacks memory, an exception is thrown and IRP 
isn't sent
to the device with NULL SystemBuffer.

CORE-14048
---
 ntoskrnl/io/iomgr/iofunc.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c
index bde78e4f96..19f54e070d 100644
--- a/ntoskrnl/io/iomgr/iofunc.c
+++ b/ntoskrnl/io/iomgr/iofunc.c
@@ -516,9 +516,9 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
 {
 /* Allocate the System Buffer */
 Irp->AssociatedIrp.SystemBuffer =
-ExAllocatePoolWithTag(PoolType,
-  BufferLength,
-  TAG_SYS_BUF);
+ExAllocatePoolWithQuotaTag(PoolType,
+   BufferLength,
+   TAG_SYS_BUF);
 
 /* Check if we got a buffer */
 if (InputBuffer)
@@ -563,9 +563,9 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
 {
 /* Allocate the System Buffer */
 Irp->AssociatedIrp.SystemBuffer =
-ExAllocatePoolWithTag(PoolType,
-  InputBufferLength,
-  TAG_SYS_BUF);
+ExAllocatePoolWithQuotaTag(PoolType,
+   InputBufferLength,
+   TAG_SYS_BUF);
 
 /* Copy into the System Buffer */
 RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer,



[ros-diffs] [reactos] 01/02: [NTOSKRNL] Use cache aligned buffer for devioctrl

2017-11-26 Thread Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d01184b16460b014fe9b19c5a142eb0ed88e6455

commit d01184b16460b014fe9b19c5a142eb0ed88e6455
Author: Pierre Schweitzer 
AuthorDate: Sun Nov 26 13:56:48 2017 +0100

[NTOSKRNL] Use cache aligned buffer for devioctrl
---
 ntoskrnl/io/iomgr/iofunc.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c
index 46fcce201d..bde78e4f96 100644
--- a/ntoskrnl/io/iomgr/iofunc.c
+++ b/ntoskrnl/io/iomgr/iofunc.c
@@ -213,6 +213,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
 ACCESS_MASK DesiredAccess;
 KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
 ULONG BufferLength;
+POOL_TYPE PoolType;
 
 PAGED_CODE();
 
@@ -495,6 +496,8 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
 StackPtr->Parameters.DeviceIoControl.OutputBufferLength =
 OutputBufferLength;
 
+PoolType = IsDevIoCtl ? NonPagedPoolCacheAligned : NonPagedPool;
+
 /* Handle the Methods */
 switch (AccessType)
 {
@@ -513,7 +516,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
 {
 /* Allocate the System Buffer */
 Irp->AssociatedIrp.SystemBuffer =
-ExAllocatePoolWithTag(NonPagedPool,
+ExAllocatePoolWithTag(PoolType,
   BufferLength,
   TAG_SYS_BUF);
 
@@ -560,7 +563,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
 {
 /* Allocate the System Buffer */
 Irp->AssociatedIrp.SystemBuffer =
-ExAllocatePoolWithTag(NonPagedPool,
+ExAllocatePoolWithTag(PoolType,
   InputBufferLength,
   TAG_SYS_BUF);
 



[ros-diffs] [reactos] 01/01: [NTOBJSHEX] Improve the existing PCH and make use of it.

2017-11-26 Thread Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2cbc32e5e466bf89a9c8580d7c4377a37c5ac757

commit 2cbc32e5e466bf89a9c8580d7c4377a37c5ac757
Author: Amine Khaldi 
AuthorDate: Sun Nov 26 13:26:39 2017 +0100

[NTOBJSHEX] Improve the existing PCH and make use of it.
---
 dll/shellext/ntobjshex/CMakeLists.txt  |  9 +++--
 dll/shellext/ntobjshex/ntobjfolder.cpp |  2 ++
 dll/shellext/ntobjshex/precomp.h   | 20 +---
 3 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/dll/shellext/ntobjshex/CMakeLists.txt 
b/dll/shellext/ntobjshex/CMakeLists.txt
index 840a3f469c..9d2c76e217 100644
--- a/dll/shellext/ntobjshex/CMakeLists.txt
+++ b/dll/shellext/ntobjshex/CMakeLists.txt
@@ -17,12 +17,16 @@ spec2def(ntobjshex.dll ntobjshex.spec)
 file(GLOB_RECURSE ntobjshex_rc_deps resources/*.*)
 add_rc_deps(ntobjshex.rc ${ntobjshex_rc_deps})
 
-add_library(ntobjshex SHARED
+list(APPEND SOURCE
 ntobjenum.cpp
 ntobjfolder.cpp
 ntobjshex.cpp
-ntobjshex.rc
 regfolder.cpp
+precomp.h)
+
+add_library(ntobjshex SHARED
+${SOURCE}
+ntobjshex.rc
 ${CMAKE_CURRENT_BINARY_DIR}/ntobjshex.def)
 
 set_module_type(ntobjshex win32dll UNICODE)
@@ -42,4 +46,5 @@ add_importlibs(ntobjshex
 kernel32
 ntdll)
 
+add_pch(ntobjshex precomp.h SOURCE)
 add_cd_file(TARGET ntobjshex DESTINATION reactos/system32 FOR all)
diff --git a/dll/shellext/ntobjshex/ntobjfolder.cpp 
b/dll/shellext/ntobjshex/ntobjfolder.cpp
index 725ed78c6d..24571cad1e 100644
--- a/dll/shellext/ntobjshex/ntobjfolder.cpp
+++ b/dll/shellext/ntobjshex/ntobjfolder.cpp
@@ -8,6 +8,8 @@
 
 #include "precomp.h"
 
+#include 
+
 // {845B0FB2-66E0-416B-8F91-314E23F7C12D}
 const GUID CLSID_NtObjectFolder = { 0x845b0fb2, 0x66e0, 0x416b, { 0x8f, 0x91, 
0x31, 0x4e, 0x23, 0xf7, 0xc1, 0x2d } };
 
diff --git a/dll/shellext/ntobjshex/precomp.h b/dll/shellext/ntobjshex/precomp.h
index f117b3771b..55a055723e 100644
--- a/dll/shellext/ntobjshex/precomp.h
+++ b/dll/shellext/ntobjshex/precomp.h
@@ -1,11 +1,11 @@
-#pragma once
+#ifndef _NTOBJSHEX_PRECOMP_H_
+#define _NTOBJSHEX_PRECOMP_H_
 
-#define WIN32_NO_STATUS
 #include 
 #include 
 
-#define COBJMACROS
 #define WIN32_NO_STATUS
+#define COBJMACROS
 #define _INC_WINDOWS
 #define COM_NO_WINDOWS_H
 #define NTOS_MODE_USER
@@ -13,26 +13,15 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
-#include 
-
 #include 
-#include 
 
 #include "resource.h"
 
@@ -59,7 +48,6 @@ DEFINE_GUID(CLSID_NtObjectFolder,
 
 WINE_DEFAULT_DEBUG_CHANNEL(ntobjshex);
 
-#include 
 #include 
 #include "util.h"
 
@@ -68,3 +56,5 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntobjshex);
 #include "foldercommon.h"
 #include "ntobjfolder.h"
 #include "regfolder.h"
+
+#endif /* _NTOBJSHEX_PRECOMP_H_ */



[ros-diffs] [reactos] 01/01: [GLU32] Add a PCH.

2017-11-26 Thread Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2a3392b97d295909960b4da6c5bf70711b12420f

commit 2a3392b97d295909960b4da6c5bf70711b12420f
Author: Amine Khaldi 
AuthorDate: Sun Nov 26 13:24:50 2017 +0100

[GLU32] Add a PCH.
---
 dll/opengl/glu32/CMakeLists.txt | 14 ---
 dll/opengl/glu32/precomp.h  | 51 +
 2 files changed, 62 insertions(+), 3 deletions(-)

diff --git a/dll/opengl/glu32/CMakeLists.txt b/dll/opengl/glu32/CMakeLists.txt
index bb874f6913..9c8802c4e0 100644
--- a/dll/opengl/glu32/CMakeLists.txt
+++ b/dll/opengl/glu32/CMakeLists.txt
@@ -33,7 +33,9 @@ list(APPEND SOURCE
 src/libtess/render.c
 src/libtess/sweep.c
 src/libtess/tess.c
-src/libtess/tessmono.c
+src/libtess/tessmono.c)
+
+list(APPEND LIBNURBS_SOURCE
 src/libnurbs/interface/bezierEval.cc
 src/libnurbs/interface/bezierPatch.cc
 src/libnurbs/interface/bezierPatchMesh.cc
@@ -95,7 +97,6 @@ list(APPEND SOURCE
 src/libnurbs/nurbtess/monoTriangulation.cc
 src/libnurbs/nurbtess/partitionX.cc
 src/libnurbs/nurbtess/partitionY.cc
-src/libnurbs/nurbtess/polyDBG.cc
 src/libnurbs/nurbtess/polyUtil.cc
 src/libnurbs/nurbtess/primitiveStream.cc
 src/libnurbs/nurbtess/quicksort.cc
@@ -107,9 +108,15 @@ list(APPEND SOURCE
 src/libnurbs/nurbtess/sampleMonoPoly.cc
 src/libnurbs/nurbtess/sampledLine.cc
 src/libnurbs/nurbtess/searchTree.cc
+precomp.h)
+
+add_library(glu32 SHARED
+${LIBNURBS_SOURCE}
+src/libnurbs/nurbtess/polyDBG.cc
+${SOURCE}
+glu32.rc
 ${CMAKE_CURRENT_BINARY_DIR}/glu32.def)
 
-add_library(glu32 SHARED ${SOURCE} glu32.rc)
 set_module_type(glu32 win32dll)
 
 if(NOT MSVC)
@@ -117,4 +124,5 @@ if(NOT MSVC)
 endif()
 
 add_importlibs(glu32 opengl32 gdi32 msvcrt kernel32 ntdll)
+add_pch(glu32 precomp.h LIBNURBS_SOURCE)
 add_cd_file(TARGET glu32 DESTINATION reactos/system32 FOR all)
diff --git a/dll/opengl/glu32/precomp.h b/dll/opengl/glu32/precomp.h
new file mode 100644
index 00..56b8d67a52
--- /dev/null
+++ b/dll/opengl/glu32/precomp.h
@@ -0,0 +1,51 @@
+#ifndef _GLU32_PRECOMP_H_
+#define _GLU32_PRECOMP_H_
+
+#include 
+#include 
+#include 
+#include 
+
+#include "gluos.h"
+#include "glrenderer.h"
+
+#include 
+
+#include "arc.h"
+#include "arcsorter.h"
+#include "backend.h"
+#include "basiccrveval.h"
+#include "basicsurfeval.h"
+#include "bezierarc.h"
+#include "bezierEval.h"
+#include "curve.h"
+#include "curvelist.h"
+#include "displaylist.h"
+#include "flist.h"
+#include "glimports.h"
+#include "mapdesc.h"
+#include "monoTriangulation.h"
+#include "myassert.h"
+#include "mymath.h"
+#include "nurbsconsts.h"
+#include "nurbstess.h"
+#include "partitionX.h"
+#include "patchlist.h"
+#include "polyDBG.h"
+#include "polyUtil.h"
+#include "quicksort.h"
+#include "quilt.h"
+#include "renderhints.h"
+#include "sampleComp.h"
+#include "sampleCompTop.h"
+#include "sampleCompBot.h"
+#include "sampleCompRight.h"
+#include "searchTree.h"
+#include "simplemath.h"
+#include "subdivider.h"
+#include "trimvertex.h"
+#include "trimvertpool.h"
+#include "varray.h"
+#include "zlassert.h"
+
+#endif /* _GLU32_PRECOMP_H_ */



[ros-diffs] [reactos] 01/01: [LIBJPEG] Add a PCH.

2017-11-26 Thread Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d05c658dbded63b192e07d75f94e79b0099bb612

commit d05c658dbded63b192e07d75f94e79b0099bb612
Author: Amine Khaldi 
AuthorDate: Sun Nov 26 13:16:29 2017 +0100

[LIBJPEG] Add a PCH.
---
 dll/3rdparty/libjpeg/CMakeLists.txt | 7 +--
 dll/3rdparty/libjpeg/precomp.h  | 8 
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/dll/3rdparty/libjpeg/CMakeLists.txt 
b/dll/3rdparty/libjpeg/CMakeLists.txt
index 7330953491..41a142dba0 100644
--- a/dll/3rdparty/libjpeg/CMakeLists.txt
+++ b/dll/3rdparty/libjpeg/CMakeLists.txt
@@ -10,7 +10,7 @@ include_directories(
 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/libjpeg
 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
 
-add_library(libjpeg SHARED
+list(APPEND SOURCE
 jaricom.c
 jcapimin.c
 jcapistd.c
@@ -56,8 +56,11 @@ add_library(libjpeg SHARED
 jquant2.c
 jutils.c
 jmemmgr.c
-jmemnobs.c)
+jmemnobs.c
+precomp.h)
 
+add_library(libjpeg SHARED ${SOURCE})
 set_module_type(libjpeg win32dll)
 add_importlibs(libjpeg msvcrt kernel32)
+add_pch(libjpeg precomp.h SOURCE)
 add_cd_file(TARGET libjpeg DESTINATION reactos/system32 FOR all)
diff --git a/dll/3rdparty/libjpeg/precomp.h b/dll/3rdparty/libjpeg/precomp.h
new file mode 100644
index 00..156d2903bf
--- /dev/null
+++ b/dll/3rdparty/libjpeg/precomp.h
@@ -0,0 +1,8 @@
+#ifndef _LIBJPEG_PRECOMP_H_
+#define _LIBJPEG_PRECOMP_H_
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+#endif /* _LIBJPEG_PRECOMP_H_ */