Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 19735)
+++ wp-includes/functions.php	(working copy)
@@ -3430,6 +3430,8 @@
 		$all_headers = $default_headers;
 	}
 
+	$file_data = preg_replace( '/\r(?!:\n)/', "\n", $file_data );	// Line endings can be just \r on Mac
+	
 	foreach ( $all_headers as $field => $regex ) {
 		preg_match( '/^[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field});
 		if ( !empty( ${$field} ) )
