Teach sort-headers.py about unknwn.h
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7047026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86035 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tools/sort-headers.py b/tools/sort-headers.py
index 34bfeaeb..e51343c 100755
--- a/tools/sort-headers.py
+++ b/tools/sort-headers.py
@@ -39,10 +39,15 @@
if line.startswith(prefix):
line = line[len(prefix):]
break
- # <windows.h> needs to be before other includes, so return a key
- # that's less than all other keys.
- if line.lstrip().startswith('<windows.h>'):
- return ''
+
+ # The win32 api has all sorts of implicit include order dependencies :-/
+ # Give a few headers special sort keys that make sure they appear before all
+ # other headers.
+ if line.startswith('<windows.h>'): # Must be before e.g. shellapi.h
+ return '0'
+ if line.startswith('<unknwn.h>'): # Must be before e.g. intshcut.h
+ return '1'
+
return line