On 2015-08-31 15:51:57 +0900, Michael Paquier wrote:
> if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &AccessToken))
> {
> +#ifndef FRONTEND
> write_stderr("could not open process token: error code %lu\n",
> GetLastError());
> +#else
> + fprintf(stderr, "could not open process token: error code %lu\n",
> + GetLastError());
> +#endif
> exit(1);
> }
I find these kind of ifdefs rather ugly - why not just introduce a
wrapper?
Greetings,
Andres Freund