Skip to content
This repository has been archived by the owner on Aug 19, 2018. It is now read-only.

Commit

Permalink
Replaced no longer functional __MonoCS__ flag with custom flag
Browse files Browse the repository at this point in the history
`__MonoCS__` was always considered a hack, and with Mono's conversion to msbuild it's no longer defined.  Intsead of leaving the old semantic, I've instead declared a new flag, `_MONO_CLI_FLAG_`, that says where's it's from and what it means.

The AppVeyor build script likewise declares it, and anyone compiling with Mono should likewise declare it until such time as this Windows-specific code can be excised.
  • Loading branch information
kf6kjg committed May 16, 2018
1 parent edb44fd commit d0d2f4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Expand Up @@ -52,7 +52,7 @@ for:
only:
- image: Ubuntu
build_script:
- msbuild Halcyon.sln
- msbuild /p:DefineConstants="_MONO_CLI_FLAG_" Halcyon.sln

after_build:
- ps: |
Expand Down
4 changes: 2 additions & 2 deletions OpenSim/Framework/Util.cs
Expand Up @@ -53,7 +53,7 @@
using System.Drawing;
using System.Runtime.InteropServices;

#if !__MonoCS__
#if !_MONO_CLI_FLAG_
using System.DirectoryServices.AccountManagement;
#endif

Expand Down Expand Up @@ -186,7 +186,7 @@ public static UInt64 GetLongTickCount()
/// <param name='password'>string</param>
public static bool AuthenticateAsSystemUser(string username, string password)
{
#if __MonoCS__
#if _MONO_CLI_FLAG_
// TODO: find a way to check the user info cross platform. In the mean time better security by NOT allowing remote admin.
return false;
#else
Expand Down

0 comments on commit d0d2f4a

Please sign in to comment.