replace legacy preprocessor tests for linux with POSIX compliant ones

This commit is contained in:
Axel Kohlmeyer
2020-05-03 01:04:52 -04:00
parent d5b9948129
commit fa2a6d7c6b
5 changed files with 9 additions and 9 deletions

View File

@ -17,7 +17,7 @@
#include "lammps.h"
#include "error.h"
#if defined(__linux)
#if defined(__linux__)
#include <unistd.h> // for readlink
#endif
@ -95,7 +95,7 @@ static const char *guesspath(char *buf, int len, FILE *fp)
{
memset(buf,0,len);
#if defined(__linux)
#if defined(__linux__)
char procpath[32];
int fd = fileno(fp);
snprintf(procpath,32,"/proc/self/fd/%d",fd);