summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-12-15 14:05:16 -0800
committerRick Pasetto <rick@lindenlab.com>2009-12-15 14:05:16 -0800
commit9cf8c3e654f38745c8a94cbd85609a17f482266a (patch)
tree8cd1586fef29a307b9ab2bbe3711d289efdeb871
parent1f7bf9216869682aa88c9c92b6c15d2d5278902d (diff)
parent77aa787c019615d2fe68d31aa07434301535c992 (diff)
Automated merge with ssh://rick@hg.lindenlab.com/skolb/media/
-rw-r--r--indra/llcharacter/llkeyframemotion.h1
-rw-r--r--indra/llcommon/llapp.h8
-rw-r--r--indra/llcommon/llapr.h8
-rw-r--r--indra/llcommon/llcommon.h1
-rw-r--r--indra/llcommon/llerror.cpp3
-rw-r--r--indra/llcommon/llthread.h1
-rw-r--r--indra/llmessage/lliohttpserver.h1
-rw-r--r--indra/llplugin/llpluginprocessparent.h1
-rwxr-xr-xindra/llvfs/llpidlock.cpp9
-rwxr-xr-xindra/llvfs/llpidlock.h12
-rw-r--r--indra/newview/llagent.cpp2
-rw-r--r--indra/newview/llappviewer.cpp3
-rw-r--r--indra/newview/llappviewer.h1
-rw-r--r--indra/newview/llfilepicker.h5
-rw-r--r--indra/newview/llfloateranimpreview.h1
-rw-r--r--indra/newview/llfloaterauction.cpp2
-rw-r--r--indra/newview/llfloaterbump.cpp6
-rw-r--r--indra/newview/llfloaterpostcard.cpp3
-rw-r--r--indra/newview/llfloaterpostcard.h4
-rw-r--r--indra/newview/llfloaterregioninfo.cpp3
-rw-r--r--indra/newview/llfloaterregioninfo.h4
-rw-r--r--indra/newview/llfloaterreporter.cpp5
-rw-r--r--indra/newview/llfloaterurldisplay.cpp5
-rw-r--r--indra/newview/llfloaterurlentry.cpp2
-rw-r--r--indra/newview/llfloaterworldmap.cpp2
-rw-r--r--indra/newview/llgroupactions.cpp2
-rw-r--r--indra/newview/llimfloater.h3
-rw-r--r--indra/newview/lllandmarkactions.cpp1
-rw-r--r--indra/newview/lllogchat.cpp2
-rw-r--r--indra/newview/llnavigationbar.cpp10
-rw-r--r--indra/newview/llnearbychatbar.cpp2
-rw-r--r--indra/newview/llnotificationhandler.h1
-rw-r--r--indra/newview/llpanellandmarks.cpp1
-rw-r--r--indra/newview/llpanelpicks.cpp1
-rw-r--r--indra/newview/llpanelplace.cpp1
-rw-r--r--indra/newview/llpanelplaceinfo.cpp2
-rw-r--r--indra/newview/llpanelplaceprofile.cpp1
-rw-r--r--indra/newview/llpreviewgesture.h4
-rw-r--r--indra/newview/llpreviewscript.h1
-rw-r--r--indra/newview/llremoteparcelrequest.h1
-rw-r--r--indra/newview/lltexlayer.cpp8
-rw-r--r--indra/newview/lltexlayerparams.cpp5
-rw-r--r--indra/newview/lltexlayerparams.h4
-rw-r--r--indra/newview/lltexturecache.h1
-rw-r--r--indra/newview/lltexturefetch.cpp2
-rw-r--r--indra/newview/lltexturestatsuploader.cpp2
-rw-r--r--indra/newview/lltoastimpanel.cpp1
-rw-r--r--indra/newview/lltoastnotifypanel.cpp1
-rw-r--r--indra/newview/llurldispatcher.cpp1
-rw-r--r--indra/newview/llviewerassetstorage.cpp7
-rw-r--r--indra/newview/llviewergenericmessage.h1
-rw-r--r--indra/newview/llviewerjoint.h1
-rw-r--r--indra/newview/llviewerjointmesh.h1
-rw-r--r--indra/newview/llviewermenu.h1
-rw-r--r--indra/newview/llviewermenufile.cpp9
-rw-r--r--indra/newview/llviewermenufile.h1
-rw-r--r--indra/newview/llviewermessage.cpp6
-rw-r--r--indra/newview/llviewermessage.h3
-rw-r--r--indra/newview/llviewernetwork.cpp5
-rw-r--r--indra/newview/llviewerprecompiledheaders.h104
-rw-r--r--indra/newview/llviewerstats.cpp1
-rw-r--r--indra/newview/llviewertexture.cpp13
-rw-r--r--indra/newview/llviewertexture.h11
-rw-r--r--indra/newview/llviewertexturelist.h1
-rw-r--r--indra/newview/llviewerwindow.cpp3
-rw-r--r--indra/newview/llviewerwindow.h1
-rw-r--r--indra/newview/llvoavatar.cpp1
-rw-r--r--indra/newview/llvovolume.h1
-rw-r--r--indra/newview/llwaterparammanager.cpp3
-rw-r--r--indra/newview/llwldaycycle.cpp6
-rw-r--r--indra/newview/llwlparammanager.cpp5
-rw-r--r--indra/newview/llworldmapmessage.cpp1
-rw-r--r--indra/newview/llxmlrpclistener.cpp5
-rw-r--r--indra/newview/tests/llcapabilitylistener_test.cpp1
74 files changed, 167 insertions, 176 deletions
diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h
index 7e8c84488c..50d9d05046 100644
--- a/indra/llcharacter/llkeyframemotion.h
+++ b/indra/llcharacter/llkeyframemotion.h
@@ -47,7 +47,6 @@
#include "llquaternion.h"
#include "v3dmath.h"
#include "v3math.h"
-#include "llapr.h"
#include "llbvhconsts.h"
class LLKeyframeDataCache;
diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index 1a052ce62d..27a52cdd99 100644
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -34,14 +34,18 @@
#define LL_LLAPP_H
#include <map>
-#include "llapr.h"
#include "llrun.h"
#include "llsd.h"
#include "lloptioninterface.h"
// Forward declarations
+template <typename Type> class LLAtomic32;
+typedef LLAtomic32<U32> LLAtomicU32;
class LLErrorThread;
class LLLiveFile;
+#if LL_LINUX
+typedef struct siginfo siginfo_t;
+#endif
typedef void (*LLAppErrorHandler)();
typedef void (*LLAppChildCallback)(int pid, bool exited, int status);
@@ -202,8 +206,6 @@ public:
#if !LL_WINDOWS
static U32 getSigChildCount();
static void incSigChildCount();
-#else
-#define getpid GetCurrentProcessId
#endif
static int getPid();
diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h
index b08bb617c5..b05a222b33 100644
--- a/indra/llcommon/llapr.h
+++ b/indra/llcommon/llapr.h
@@ -38,6 +38,14 @@
#if LL_LINUX || LL_SOLARIS
#include <sys/param.h> // Need PATH_MAX in APR headers...
#endif
+#if LL_WINDOWS
+ // Limit Windows API to small and manageable set.
+ // If you get undefined symbols, find the appropriate
+ // Windows header file and include that in your .cpp file.
+ #define WIN32_LEAN_AND_MEAN
+ #include <winsock2.h>
+ #include <windows.h>
+#endif
#include <boost/noncopyable.hpp>
diff --git a/indra/llcommon/llcommon.h b/indra/llcommon/llcommon.h
index b36471f9f8..05eef25b21 100644
--- a/indra/llcommon/llcommon.h
+++ b/indra/llcommon/llcommon.h
@@ -33,7 +33,6 @@
#define LL_COMMON_H
// *TODO: remove these?
-#include "llapr.h"
#include "lltimer.h"
#include "llfile.h"
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 77c0c2294a..bd334a6654 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -45,9 +45,6 @@
# include <syslog.h>
# include <unistd.h>
#endif // !LL_WINDOWS
-#if LL_WINDOWS
-# include <windows.h>
-#endif // LL_WINDOWS
#include <vector>
#include "llapp.h"
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index d8aa90de2e..adef1a9192 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -34,6 +34,7 @@
#define LL_LLTHREAD_H
#include "llapp.h"
+#include "llapr.h"
#include "apr_thread_cond.h"
class LLThread;
diff --git a/indra/llmessage/lliohttpserver.h b/indra/llmessage/lliohttpserver.h
index d1c9bdde85..e8e390f296 100644
--- a/indra/llmessage/lliohttpserver.h
+++ b/indra/llmessage/lliohttpserver.h
@@ -34,7 +34,6 @@
#ifndef LL_LLIOHTTPSERVER_H
#define LL_LLIOHTTPSERVER_H
-#include "llapr.h"
#include "llchainio.h"
#include "llhttpnode.h"
diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h
index 6d661a6960..03ce10f86c 100644
--- a/indra/llplugin/llpluginprocessparent.h
+++ b/indra/llplugin/llpluginprocessparent.h
@@ -34,6 +34,7 @@
#ifndef LL_LLPLUGINPROCESSPARENT_H
#define LL_LLPLUGINPROCESSPARENT_H
+#include "llapr.h"
#include "llprocesslauncher.h"
#include "llpluginmessage.h"
#include "llpluginmessagepipe.h"
diff --git a/indra/llvfs/llpidlock.cpp b/indra/llvfs/llpidlock.cpp
index 315baa001d..95e3692e10 100755
--- a/indra/llvfs/llpidlock.cpp
+++ b/indra/llvfs/llpidlock.cpp
@@ -41,6 +41,15 @@
#include "llframetimer.h"
#if LL_WINDOWS //For windows platform.
+
+#include <windows.h>
+
+namespace {
+ inline DWORD getpid() {
+ return GetCurrentProcessId();
+ }
+}
+
bool isProcessAlive(U32 pid)
{
return (bool) GetProcessVersion((DWORD)pid);
diff --git a/indra/llvfs/llpidlock.h b/indra/llvfs/llpidlock.h
index 42aee4dc4f..496e99cf5a 100755
--- a/indra/llvfs/llpidlock.h
+++ b/indra/llvfs/llpidlock.h
@@ -37,17 +37,9 @@
class LLSD;
class LLFrameTimer;
-#if LL_WINDOWS //For windows platform.
-
-#include <windows.h>
-
-#define getpid GetCurrentProcessId
-
-#else //Everyone Else
-
+#if !LL_WINDOWS //For non-windows platforms.
#include <signal.h>
-
-#endif //Everyone else.
+#endif
namespace LLPidLock
{
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 2b582c90f0..628982973c 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -38,7 +38,6 @@
#include "llagentlistener.h"
#include "llagentwearables.h"
#include "llagentui.h"
-
#include "llanimationstates.h"
#include "llbottomtray.h"
#include "llcallingcard.h"
@@ -65,6 +64,7 @@
#include "llsky.h"
#include "llsmoothstep.h"
#include "llstatusbar.h"
+#include "llteleportflags.h"
#include "lltool.h"
#include "lltoolmgr.h"
#include "lltrans.h"
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 90b8cd9572..1ccb691fb3 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -85,11 +85,14 @@
#include "llsecondlifeurls.h"
// Linden library includes
+#include "llimagej2c.h"
#include "llmemory.h"
#include "llprimitive.h"
#include "llurlaction.h"
+#include "llvfile.h"
#include "llvfsthread.h"
#include "llvolumemgr.h"
+#include "llxfermanager.h"
#include "llnotificationmanager.h"
#include "llnotifications.h"
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index c1bfbca868..40e74061b5 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -325,6 +325,7 @@ extern BOOL gUseWireframe;
// VFS globals - gVFS is for general use
// gStaticVFS is read-only and is shipped w/ the viewer
// it has pre-cache data like the UI .TGAs
+class LLVFS;
extern LLVFS *gStaticVFS;
extern LLMemoryInfo gSysMemory;
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index ab2455620f..7ecbc3db60 100644
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -64,11 +64,6 @@ extern "C" {
#if LL_GTK
# include "gtk/gtk.h"
#endif // LL_GTK
-
-// also mostly for Linux, for some X11-specific filepicker usability tweaks
-#if LL_X11
-#include "SDL/SDL_syswm.h"
-#endif
}
class LLFilePicker
diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h
index 09b04f1f42..dd2c0b809a 100644
--- a/indra/newview/llfloateranimpreview.h
+++ b/indra/newview/llfloateranimpreview.h
@@ -33,6 +33,7 @@
#ifndef LL_LLFLOATERANIMPREVIEW_H
#define LL_LLFLOATERANIMPREVIEW_H
+#include "llassettype.h"
#include "llfloaternamedesc.h"
#include "lldynamictexture.h"
#include "llcharacter.h"
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index b63bcccf6b..bbccbb8709 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -35,7 +35,6 @@
#include "llfloaterauction.h"
#include "llfloaterregioninfo.h"
-#include "lldir.h"
#include "llgl.h"
#include "llimagej2c.h"
#include "llimagetga.h"
@@ -43,6 +42,7 @@
#include "llvfile.h"
#include "llvfs.h"
#include "llwindow.h"
+#include "message.h"
#include "llagent.h"
#include "llcombobox.h"
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index 68f06b1e5b..e925796526 100644
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -33,11 +33,11 @@
#include "llviewerprecompiledheaders.h"
-#include "llfloaterbump.h"
+#include "llsd.h"
+#include "mean_collision_data.h"
+#include "llfloaterbump.h"
#include "llscrolllistctrl.h"
-
-#include "llsd.h"
#include "lluictrlfactory.h"
#include "llviewermessage.h"
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
index 572eeb57fe..8da44e2035 100644
--- a/indra/newview/llfloaterpostcard.cpp
+++ b/indra/newview/llfloaterpostcard.cpp
@@ -56,9 +56,8 @@
#include "llstatusbar.h"
#include "llviewerregion.h"
#include "lleconomy.h"
+#include "message.h"
-#include "llgl.h"
-#include "llglheaders.h"
#include "llimagejpeg.h"
#include "llimagej2c.h"
#include "llvfile.h"
diff --git a/indra/newview/llfloaterpostcard.h b/indra/newview/llfloaterpostcard.h
index 49cce53106..0a44b50779 100644
--- a/indra/newview/llfloaterpostcard.h
+++ b/indra/newview/llfloaterpostcard.h
@@ -70,7 +70,7 @@ public:
void sendPostcard();
-protected:
+private:
LLPointer<LLImageJPEG> mJPEGImage;
LLPointer<LLViewerTexture> mViewerImage;
@@ -78,7 +78,7 @@ protected:
LLAssetID mAssetID;
LLVector2 mImageScale;
LLVector3d mPosTakenGlobal;
- boolean mHasFirstMsgFocus;
+ bool mHasFirstMsgFocus;
};
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 8a26078f3d..381f4ed508 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -42,6 +42,8 @@
#include "llglheaders.h"
#include "llregionflags.h"
#include "llstl.h"
+#include "llvfile.h"
+#include "llxfermanager.h"
#include "indra_constants.h"
#include "message.h"
@@ -53,7 +55,6 @@
#include "llcheckboxctrl.h"
#include "llcombobox.h"
#include "llfilepicker.h"
-#include "llfloaterdaycycle.h"
#include "llfloatergodtools.h" // for send_sim_wide_deletes()
#include "llfloatertopobjects.h" // added to fix SL-32336
#include "llfloatergroups.h"
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 704166d106..a21b96bf16 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -35,9 +35,12 @@
#define LL_LLFLOATERREGIONINFO_H
#include <vector>
+#include "llassettype.h"
#include "llfloater.h"
+#include "llhost.h"
#include "llpanel.h"
+class LLDispatcher;
class LLLineEditor;
class LLMessageSystem;
class LLPanelRegionInfo;
@@ -51,6 +54,7 @@ class LLNameListCtrl;
class LLSliderCtrl;
class LLSpinCtrl;
class LLTextBox;
+class LLVFS;
class LLPanelRegionGeneralInfo;
class LLPanelRegionDebugInfo;
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 932e49c79b..9f3dcae8ef 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -40,11 +40,14 @@
// linden library includes
#include "llassetstorage.h"
#include "llfontgl.h"
-#include "llgl.h" // for renderer
+#include "llimagej2c.h"
#include "llinventory.h"
#include "llnotificationsutil.h"
#include "llstring.h"
#include "llsys.h"
+#include "llvfile.h"
+#include "llvfs.h"
+#include "mean_collision_data.h"
#include "message.h"
#include "v3math.h"
diff --git a/indra/newview/llfloaterurldisplay.cpp b/indra/newview/llfloaterurldisplay.cpp
index 3b9321a876..4b67cbb308 100644
--- a/indra/newview/llfloaterurldisplay.cpp
+++ b/indra/newview/llfloaterurldisplay.cpp
@@ -33,13 +33,14 @@
#include "llviewerprecompiledheaders.h"
+#include "llregionhandle.h"
+#include "v3dmath.h"
+
#include "llfloaterurldisplay.h"
#include "llpanelplace.h"
#include "lluictrlfactory.h"
-#include "v3dmath.h"
-
////////////////////////////////////////////////////////////////////////////
// LLFloaterURLDisplay
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index 5e769feea6..91d0f0e370 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -32,6 +32,8 @@
#include "llviewerprecompiledheaders.h"
+#include "llhttpclient.h"
+
#include "llfloaterurlentry.h"
#include "llpanellandmedia.h"
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 7ca491a698..98f9171237 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -74,8 +74,8 @@
#include "llmapimagetype.h"
#include "llweb.h"
#include "llslider.h"
+#include "message.h"
-#include "llglheaders.h"
#include "llwindow.h" // copyTextToClipboard()
//---------------------------------------------------------------------------
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index fdb2b886a6..4c7e71f040 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -35,6 +35,8 @@
#include "llgroupactions.h"
+#include "message.h"
+
#include "llagent.h"
#include "llcommandhandler.h"
#include "llfloaterreg.h"
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index f90bc35c34..ab3e15c6b2 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -33,9 +33,10 @@
#ifndef LL_IMFLOATER_H
#define LL_IMFLOATER_H
-#include "lltransientdockablefloater.h"
+#include "llinstantmessage.h"
#include "lllogchat.h"
#include "lltooldraganddrop.h"
+#include "lltransientdockablefloater.h"
class LLLineEditor;
class LLPanelChatControlPanel;
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index 08d56f8b9f..f25d2ef574 100644
--- a/indra/newview/lllandmarkactions.cpp
+++ b/indra/newview/lllandmarkactions.cpp
@@ -38,6 +38,7 @@
#include "llinventory.h"
#include "lllandmark.h"
#include "llparcel.h"
+#include "llregionhandle.h"
#include "llnotificationsutil.h"
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 33fd3e3bf1..fc9654e9ad 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -39,6 +39,8 @@
#include "lltrans.h"
#include "llviewercontrol.h"
+#include "llinstantmessage.h"
+
#include <boost/algorithm/string/trim.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/regex.hpp>
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 08bc1fac8b..cdab3b2310 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -34,10 +34,12 @@
#include "llnavigationbar.h"
-#include <llfloaterreg.h>
-#include <llfocusmgr.h>
-#include <lliconctrl.h>
-#include <llmenugl.h>
+#include "llregionhandle.h"
+
+#include "llfloaterreg.h"
+#include "llfocusmgr.h"
+#include "lliconctrl.h"
+#include "llmenugl.h"
#include "llagent.h"
#include "llviewerregion.h"
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 8fb4ea4211..8dbaa5ac53 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -32,6 +32,8 @@
#include "llviewerprecompiledheaders.h"
+#include "message.h"
+
#include "llfloaterreg.h"
#include "lltrans.h"
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index 83a8dcd9f0..515c86bae8 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -39,6 +39,7 @@
//#include "llnotificationsutil.h"
#include "llchannelmanager.h"
#include "llchat.h"
+#include "llinstantmessage.h"
#include "llnotificationptr.h"
namespace LLNotificationsUI
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index e56ed00dcb..35cd3edc81 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -37,6 +37,7 @@
#include "llfloaterreg.h"
#include "llsdutil.h"
#include "llsdutil_math.h"
+#include "llregionhandle.h"
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 7d21867efc..498782fb44 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -38,6 +38,7 @@
#include "llagentpicksinfo.h"
#include "llavatarconstants.h"
#include "llcommandhandler.h"
+#include "lldispatcher.h"
#include "llflatlistview.h"
#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp
index 71d763b562..6985b73200 100644
--- a/indra/newview/llpanelplace.cpp
+++ b/indra/newview/llpanelplace.cpp
@@ -40,6 +40,7 @@
#include "llsecondlifeurls.h"
#include "llfloater.h"
#include "llfloaterreg.h"
+#include "llregionhandle.h"
#include "llagent.h"
#include "llviewerwindow.h"
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 6ba3790fe2..b845f38ace 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -39,6 +39,8 @@
#include "llsecondlifeurls.h"
#include "llsdutil_math.h"
+#include "llregionhandle.h"
+#include "message.h"
#include "lliconctrl.h"
#include "lltextbox.h"
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 0c7cc9af38..402d50ba9c 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -35,6 +35,7 @@
#include "llpanelplaceprofile.h"
#include "llparcel.h"
+#include "message.h"
#include "lliconctrl.h"
#include "lllineeditor.h"
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index 9d26539453..19fa1dcc37 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -33,8 +33,9 @@
#ifndef LL_LLPREVIEWGESTURE_H
#define LL_LLPREVIEWGESTURE_H
-#include "llpreview.h"
+#include "llassettype.h"
#include "llmultigesture.h"
+#include "llpreview.h"
class LLMultiGesture;
class LLLineEditor;
@@ -46,6 +47,7 @@ class LLScrollListItem;
class LLButton;
class LLGestureStep;
class LLRadioGroup;
+class LLVFS;
class LLPreviewGesture : public LLPreview
{
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 28a409d3ee..9d194c5557 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -51,6 +51,7 @@ struct LLEntryAndEdCore;
class LLMenuBarGL;
class LLFloaterScriptSearch;
class LLKeywordToken;
+class LLVFS;
class LLViewerInventoryItem;
// Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these.
diff --git a/indra/newview/llremoteparcelrequest.h b/indra/newview/llremoteparcelrequest.h
index 3a16e25ef6..c04f6b1858 100644
--- a/indra/newview/llremoteparcelrequest.h
+++ b/indra/newview/llremoteparcelrequest.h
@@ -38,6 +38,7 @@
#include "llhttpclient.h"
#include "llpanel.h"
+class LLMessageSystem;
class LLRemoteParcelInfoObserver;
class LLRemoteParcelRequestResponder : public LLHTTPClient::Responder
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 8d3dcf8a99..72ef383be9 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -31,8 +31,14 @@
*/
#include "llviewerprecompiledheaders.h"
-#include "llagent.h"
+
#include "lltexlayer.h"
+
+#include "llagent.h"
+#include "llimagej2c.h"
+#include "llimagetga.h"
+#include "llvfile.h"
+#include "llvfs.h"
#include "llviewerstats.h"
#include "llviewerregion.h"
#include "llvoavatar.h"
diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp
index 0c7e61d00e..d55468841d 100644
--- a/indra/newview/lltexlayerparams.cpp
+++ b/indra/newview/lltexlayerparams.cpp
@@ -30,11 +30,14 @@
*/
#include "llviewerprecompiledheaders.h"
+
+#include "lltexlayerparams.h"
+
#include "llagent.h"
+#include "llimagetga.h"
#include "lltexlayer.h"
#include "llvoavatarself.h"
#include "llwearable.h"
-#include "lltexlayerparams.h"
#include "llui.h"
//-----------------------------------------------------------------------------
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index 2b80dbdba4..93d01352d4 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -34,7 +34,11 @@
#include "llviewervisualparam.h"
+class LLImageRaw;
+class LLImageTGA;
class LLTexLayer;
+class LLTexLayerInterface;
+class LLViewerTexture;
class LLVOAvatar;
class LLWearable;
diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h
index bc9c988648..4203cbbc43 100644
--- a/indra/newview/lltexturecache.h
+++ b/indra/newview/lltexturecache.h
@@ -40,6 +40,7 @@
#include "llworkerthread.h"
+class LLImageFormatted;
class LLTextureCacheWorker;
class LLTextureCache : public LLWorkerThread
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index e29c96bec4..85259fdc1e 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -43,8 +43,10 @@
#include "llhttpclient.h"
#include "llhttpstatuscodes.h"
#include "llimage.h"
+#include "llimagej2c.h"
#include "llimageworker.h"
#include "llworkerthread.h"
+#include "message.h"
#include "llagent.h"
#include "lltexturecache.h"
diff --git a/indra/newview/lltexturestatsuploader.cpp b/indra/newview/lltexturestatsuploader.cpp
index e0358e1fca..1df73db9b0 100644
--- a/indra/newview/lltexturestatsuploader.cpp
+++ b/indra/newview/lltexturestatsuploader.cpp
@@ -34,6 +34,8 @@
#include "lltexturestatsuploader.h"
+#include "llhttpclient.h"
+
LLTextureStatsUploader::LLTextureStatsUploader()
{
}
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index ed9e2e8818..b7add03e0e 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -34,6 +34,7 @@
#include "lltoastimpanel.h"
#include "llnotifications.h"
+#include "llinstantmessage.h"
const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6;
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 6b9bff7b9e..766cf83a01 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -38,6 +38,7 @@
#include "llviewercontrol.h"
// library includes
+#include "lldbstrings.h"
#include "llnotifications.h"
#include "lluiconstants.h"
#include "llrect.h"
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index f8c82f8b22..0b6bd4b401 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -41,6 +41,7 @@
#include "llfloaterurldisplay.h"
#include "llfloaterworldmap.h"
#include "llpanellogin.h"
+#include "llregionhandle.h"
#include "llsidetray.h"
#include "llslurl.h"
#include "llstartup.h" // gStartupState
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index a041f3ac98..bb49804aff 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -32,12 +32,13 @@
#include "llviewerprecompiledheaders.h"
-#include "linden_common.h"
-
-#include "llagent.h"
#include "llviewerassetstorage.h"
+
#include "llvfile.h"
#include "llvfs.h"
+#include "message.h"
+
+#include "llagent.h"
LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
LLVFS *vfs, const LLHost &upstream_host)
diff --git a/indra/newview/llviewergenericmessage.h b/indra/newview/llviewergenericmessage.h
index 6e1f0945b8..6b0a2e5d81 100644
--- a/indra/newview/llviewergenericmessage.h
+++ b/indra/newview/llviewergenericmessage.h
@@ -36,6 +36,7 @@
class LLUUID;
class LLDispatcher;
+class LLMessageSystem;
void send_generic_message(const std::string& method,
diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h
index 0e993a2ebe..08c4ec36fd 100644
--- a/indra/newview/llviewerjoint.h
+++ b/indra/newview/llviewerjoint.h
@@ -37,7 +37,6 @@
// Header Files
//-----------------------------------------------------------------------------
#include "lljoint.h"
-#include "llapr.h"
class LLFace;
class LLViewerJointMesh;
diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h
index 543679c44b..d62b0ada85 100644
--- a/indra/newview/llviewerjointmesh.h
+++ b/indra/newview/llviewerjointmesh.h
@@ -37,7 +37,6 @@
#include "llviewertexture.h"
#include "llpolymesh.h"
#include "v4color.h"
-#include "llapr.h"
class LLDrawable;
class LLFace;
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 71be4cb592..d3c34f0de4 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -36,6 +36,7 @@
#include "llmenugl.h"
#include "llsafehandle.h"
+class LLMessageSystem;
class LLSD;
class LLUICtrl;
class LLView;
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index a1c3806b27..48794bbc1a 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -40,6 +40,12 @@
#include "llfloaterreg.h"
#include "llfloaterbuycurrency.h"
#include "llfloatersnapshot.h"
+#include "llimage.h"
+#include "llimagebmp.h"
+#include "llimagepng.h"
+#include "llimagej2c.h"
+#include "llimagejpeg.h"
+#include "llimagetga.h"
#include "llinventorymodel.h" // gInventory
#include "llresourcedata.h"
#include "llfloaterperms.h"
@@ -47,6 +53,8 @@
#include "llviewercontrol.h" // gSavedSettings
#include "llviewertexturelist.h"
#include "lluictrlfactory.h"
+#include "llvfile.h"
+#include "llvfs.h"
#include "llviewerinventory.h"
#include "llviewermenu.h" // gMenuHolder
#include "llviewerregion.h"
@@ -67,6 +75,7 @@
#include "lltransactiontypes.h"
#include "lluuid.h"
#include "llvorbisencode.h"
+#include "message.h"
// system libraries
#include <boost/tokenizer.hpp>
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index da78537a29..1e6d13f1c6 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -34,6 +34,7 @@
#define LLVIEWERMENUFILE_H
#include "llfoldertype.h"
+#include "llassetstorage.h"
#include "llinventorytype.h"
class LLTransactionID;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 31bd264e3a..5286fc0c59 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -38,8 +38,14 @@
#include "lleconomy.h"
#include "llfloaterreg.h"
#include "llfollowcamparams.h"
+#include "llregionhandle.h"
#include "llsdserialize.h"
+#include "llteleportflags.h"
#include "lltransactionflags.h"
+#include "llvfile.h"
+#include "llvfs.h"
+#include "llxfermanager.h"
+#include "mean_collision_data.h"
#include "llagent.h"
#include "llcallingcard.h"
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 1a98828010..8404d6fde0 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -33,10 +33,12 @@
#ifndef LL_LLVIEWERMESSAGE_H
#define LL_LLVIEWERMESSAGE_H
+#include "llassettype.h"
#include "llinstantmessage.h"
#include "llpointer.h"
#include "lltransactiontypes.h"
#include "lluuid.h"
+#include "message.h"
#include "stdenums.h"
//
@@ -47,6 +49,7 @@ class LLInventoryObject;
class LLInventoryItem;
class LLMeanCollisionData;
class LLMessageSystem;
+class LLVFS;
class LLViewerObject;
class LLViewerRegion;
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index 801c46035a..d7b55d7e97 100644
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -34,8 +34,11 @@
#include "llviewerprecompiledheaders.h"
#include "llviewernetwork.h"
-#include "llviewercontrol.h"
+
#include "llevents.h"
+#include "net.h"
+
+#include "llviewercontrol.h"
#include "lllogin.h"
struct LLGridData
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 6a0ad5757f..50f905416c 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -41,17 +41,6 @@
#include "linden_common.h"
-// We may want to take the windows.h include out, but it used to be in
-// linden_common.h, and hence in all the libraries. This is better. JC
-#if LL_WINDOWS
- // Limit Windows API to small and manageable set.
- // If you get undefined symbols, find the appropriate
- // Windows header file and include that in your .cpp file.
- #define WIN32_LEAN_AND_MEAN
- #include <winsock2.h>
- #include <windows.h>
-#endif
-
// Work around stupid Microsoft STL warning
#ifdef LL_WINDOWS
#pragma warning (disable : 4702) // warning C4702: unreachable code
@@ -76,21 +65,14 @@
//#include "llpreprocessor.h"
#include "llallocator.h"
#include "llapp.h"
-#include "llapr.h"
#include "llcriticaldamp.h"
-//#include "lldarray.h"
-//#include "lldarrayptr.h"
#include "lldefs.h"
#include "lldepthstack.h"
-//#include "lldqueueptr.h"
-#include "llendianswizzle.h"
#include "llerror.h"
#include "llfasttimer.h"
#include "llframetimer.h"
#include "llhash.h"
#include "lllocalidhashmap.h"
-#include "llmap.h"
-//#include "llmemory.h"
#include "llnametable.h"
#include "llpointer.h"
#include "llpriqueuemap.h"
@@ -100,7 +82,6 @@
//#include "llsecondlifeurls.h"
#include "llsd.h"
#include "llsingleton.h"
-#include "llstack.h"
#include "llstat.h"
#include "llstl.h"
#include "llstrider.h"
@@ -117,19 +98,7 @@
#include "timing.h"
#include "u64.h"
-// Library includes from llimage
-//#include "llblockdata.h"
-#include "llimage.h"
-#include "llimagebmp.h"
-#include "llimagepng.h"
-#include "llimagej2c.h"
-#include "llimagejpeg.h"
-#include "llimagetga.h"
-#include "llmapimagetype.h"
-
// Library includes from llmath project
-//#include "camera.h"
-//#include "coordframe.h"
#include "llmath.h"
#include "llbboxlocal.h"
#include "llcamera.h"
@@ -157,80 +126,11 @@
////#include "vmath.h"
#include "xform.h"
-// Library includes from llmessage project
-//#include "llassetstorage.h"
-#include "llcachename.h"
-#include "llcircuit.h"
-#include "lldatapacker.h"
-#include "lldbstrings.h"
-#include "lldispatcher.h"
-#include "lleventflags.h"
-#include "llhost.h"
-#include "llinstantmessage.h"
-#include "llinvite.h"
-//#include "llloginflags.h"
-#include "llmail.h"
-#include "llmessagethrottle.h"
-#include "llnamevalue.h"
-#include "llpacketack.h"
-#include "llpacketbuffer.h"
-#include "llpacketring.h"
-#include "llpartdata.h"
-//#include "llqueryflags.h"
-//#include "llregionflags.h"
-#include "llregionhandle.h"
-#include "lltaskname.h"
-#include "llteleportflags.h"
-#include "llthrottle.h"
-#include "lltransfermanager.h"
-#include "lltransfersourceasset.h"
-#include "lltransfersourcefile.h"
-#include "lltransfertargetfile.h"
-#include "lltransfertargetvfile.h"
-#include "lluseroperation.h"
-#include "llvehicleparams.h"
-#include "llxfer.h"
-#include "llxfer_file.h"
-#include "llxfer_mem.h"
-#include "llxfer_vfile.h"
-#include "llxfermanager.h"
-#include "machine.h"
-#include "mean_collision_data.h"
-#include "message.h"
-#include "message_prehash.h"
-#include "net.h"
-//#include "network.h"
-#include "partsyspacket.h"
-#include "patch_code.h"
-#include "patch_dct.h"
-#include "sound_ids.h"
-
-// Builds work with all headers below commented out as of 2009-09-10 JC
-
-// Library includes from llprimitive
-#include "imageids.h"
-#include "legacy_object_types.h"
-#include "llmaterialtable.h"
-//#include "llprimitive.h"
-#include "lltextureanim.h"
-//#include "lltextureentry.h"
-#include "lltreeparams.h"
-//#include "llvolume.h"
-#include "llvolumemgr.h"
-#include "material_codes.h"
-
// Library includes from llvfs
-#include "llassettype.h"
#include "lldir.h"
-//#include "lldir_linux.h"
-//#include "lldir_mac.h"
-//#include "lldir_win32.h"
-#include "llvfile.h"
-#include "llvfs.h"
-// Library includes from llui
-// In skinning-7, llui.h dependencies are changing too often.
-//#include "llui.h"
+// Library includes from llmessage project
+#include "llcachename.h"
// llxuixml
#include "llinitparam.h"
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 939d5e3970..a1a3bc6d6a 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -39,6 +39,7 @@
#include "llfloaterreg.h"
#include "llmemory.h"
#include "lltimer.h"
+#include "llvfile.h"
#include "llappviewer.h"
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index a5a40e9c2c..b45148a186 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -108,6 +108,19 @@ const F64 log_2 = log(2.0);
//----------------------------------------------------------------------------------------------
//namespace: LLViewerTextureAccess
//----------------------------------------------------------------------------------------------
+
+LLLoadedCallbackEntry::LLLoadedCallbackEntry(loaded_callback_func cb,
+ S32 discard_level,
+ BOOL need_imageraw, // Needs image raw for the callback
+ void* userdata )
+ : mCallback(cb),
+ mLastUsedDiscard(MAX_DISCARD_LEVEL+1),
+ mDesiredDiscard(discard_level),
+ mNeedsImageRaw(need_imageraw),
+ mUserData(userdata)
+{
+}
+
LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, BOOL usemipmaps, LLImageGL* gl_image)
{
return new LLViewerMediaTexture(media_id, usemipmaps, gl_image) ;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 141979052d..d6fbd5d570 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -49,12 +49,14 @@
class LLFace;
class LLImageGL ;
+class LLImageRaw;
class LLViewerObject;
class LLViewerTexture;
class LLViewerFetchedTexture ;
class LLViewerMediaTexture ;
class LLTexturePipelineTester ;
+
typedef void (*loaded_callback_func)( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
class LLVFile;
@@ -68,14 +70,7 @@ public:
LLLoadedCallbackEntry(loaded_callback_func cb,
S32 discard_level,
BOOL need_imageraw, // Needs image raw for the callback
- void* userdata )
- : mCallback(cb),
- mLastUsedDiscard(MAX_DISCARD_LEVEL+1),
- mDesiredDiscard(discard_level),
- mNeedsImageRaw(need_imageraw),
- mUserData(userdata)
- {
- }
+ void* userdata );
loaded_callback_func mCallback;
S32 mLastUsedDiscard;
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 028f8441ab..ab55bfd04d 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -53,6 +53,7 @@ const BOOL GL_TEXTURE_NO = FALSE;
const BOOL IMMEDIATE_YES = TRUE;
const BOOL IMMEDIATE_NO = FALSE;
+class LLImageJ2C;
class LLMessageSystem;
class LLTextureView;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 966aeba25c..43eb3071dd 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -32,6 +32,8 @@
#include "llviewerprecompiledheaders.h"
+#include "llviewerwindow.h"
+
#if LL_WINDOWS
#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
#endif
@@ -46,7 +48,6 @@
#include "llpanellogin.h"
#include "llviewerkeyboard.h"
#include "llviewermenu.h"
-#include "llviewerwindow.h"
#include "llviewquery.h"
#include "llxmltree.h"
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 766c66ed0f..b488276a18 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -50,6 +50,7 @@
#include "llmousehandler.h"
#include "llcursortypes.h"
#include "llhandle.h"
+#include "llimage.h"
#include <boost/function.hpp>
#include <boost/signals2.hpp>
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 226d85ec99..954e1d4469 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -45,6 +45,7 @@
#include "llaudioengine.h"
#include "noise.h"
+#include "sound_ids.h"
#include "llagent.h" // Get state values from here
#include "llagentwearables.h"
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 7433404942..a287d34402 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -37,7 +37,6 @@
#include "llviewertexture.h"
#include "llviewermedia.h"
#include "llframetimer.h"
-#include "llapr.h"
#include "m3math.h" // LLMatrix3
#include "m4math.h" // LLMatrix4
#include <map>
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 697fefee3a..8be8f494da 100644
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -51,16 +51,13 @@
#include "llsdserialize.h"
#include "v4math.h"
-#include "llviewerdisplay.h"
#include "llviewercontrol.h"
-#include "llviewerwindow.h"
#include "lldrawpoolwater.h"
#include "llagent.h"
#include "llviewerregion.h"
#include "llwlparammanager.h"
#include "llwaterparamset.h"
-#include "llpostprocess.h"
#include "llfloaterwater.h"
#include "curl/curl.h"
diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp
index fcc43c2b1f..000d50795f 100644
--- a/indra/newview/llwldaycycle.cpp
+++ b/indra/newview/llwldaycycle.cpp
@@ -33,11 +33,13 @@
#include "llviewerprecompiledheaders.h"
#include "llwldaycycle.h"
-#include "llsdserialize.h"
-#include "llwlparammanager.h"
+
#include "llnotificationsutil.h"
+#include "llsdserialize.h"
#include "llxmlnode.h"
+#include "llwlparammanager.h"
+
#include <map>
LLWLDayCycle::LLWLDayCycle() : mDayRate(120)
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index c3a70705cf..7cac564619 100644
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -42,17 +42,12 @@
#include "llspinctrl.h"
#include "llcheckboxctrl.h"
#include "lluictrlfactory.h"
-#include "llviewercamera.h"
#include "llcombobox.h"
#include "lllineeditor.h"
#include "llsdserialize.h"
#include "v4math.h"
-#include "llviewerdisplay.h"
#include "llviewercontrol.h"
-#include "llviewerwindow.h"
-#include "lldrawpoolwater.h"
-#include "llviewerregion.h"
#include "llwlparamset.h"
#include "llpostprocess.h"
diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp
index 6a074d9697..06040a574c 100644
--- a/indra/newview/llworldmapmessage.cpp
+++ b/indra/newview/llworldmapmessage.cpp
@@ -33,6 +33,7 @@
#include "llviewerprecompiledheaders.h"
#include "llworldmapmessage.h"
+#include "message.h"
#include "llworldmap.h"
#include "llagent.h"
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index af8cb6b9fb..15417614af 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -21,13 +21,14 @@
// external library headers
#include <boost/scoped_ptr.hpp>
#include <boost/range.hpp> // boost::begin(), boost::end()
+#include <xmlrpc-epi/xmlrpc.h>
+#include "curl/curl.h"
+
// other Linden headers
#include "llerror.h"
#include "stringize.h"
#include "llxmlrpctransaction.h"
-#include <xmlrpc-epi/xmlrpc.h>
-
#if LL_WINDOWS
#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
#endif
diff --git a/indra/newview/tests/llcapabilitylistener_test.cpp b/indra/newview/tests/llcapabilitylistener_test.cpp
index 4759c7dc91..ca7d02fc68 100644
--- a/indra/newview/tests/llcapabilitylistener_test.cpp
+++ b/indra/newview/tests/llcapabilitylistener_test.cpp
@@ -50,6 +50,7 @@
#include "tests/networkio.h"
#include "tests/commtest.h"
#include "tests/wrapllerrs.h"
+#include "message.h"
#include "stringize.h"
#if defined(LL_WINDOWS)