summaryrefslogtreecommitdiffstats
path: root/tools/sort-headers.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/sort-headers.py')
-rwxr-xr-xtools/sort-headers.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/sort-headers.py b/tools/sort-headers.py
index b18ac6c..d7633e8 100755
--- a/tools/sort-headers.py
+++ b/tools/sort-headers.py
@@ -34,7 +34,12 @@ def IncludeCompareKey(line):
"""
for prefix in ('#include ', '#import '):
if line.startswith(prefix):
- return line[len(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 ''
return line