Fix deprecation warning

* src/nsterm.m (ns_term_init): Use writeToFile or writeToURL as
required.
This commit is contained in:
Alan Third 2018-09-26 22:21:37 +01:00
parent 7946445962
commit 9ad0f1d15c

View file

@ -5193,7 +5193,21 @@ Needs to be here because ns_initialize_display_info () uses AppKit classes.
alpha: 1.0]
forKey: [NSString stringWithUTF8String: name]];
}
[cl writeToFile: nil];
/* FIXME: Report any errors writing the color file below. */
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
if ([cl respondsToSelector:@selector(writeToURL:error:)])
#endif
[cl writeToURL:nil error:nil];
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
else
#endif
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 */
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100 \
|| defined (NS_IMPL_GNUSTEP)
[cl writeToFile: nil];
#endif
}
}