diff options
| author | Dennis Schridde <devurandom@gmx.net> | 2012-10-04 10:51:44 +0200 |
|---|---|---|
| committer | Dennis Schridde <devurandom@gmx.net> | 2012-10-04 10:51:44 +0200 |
| commit | b35607e8a4e8b5c7286d7dc5ab563dcb478e1033 (patch) | |
| tree | 6c7676207467dbc3e2b5570db54d80e57883243f | |
| parent | 944e325e2930a19ed7783816def8cd94508a15f8 (diff) | |
| download | luafilesystem-b35607e8a4e8b5c7286d7dc5ab563dcb478e1033.tar.gz luafilesystem-b35607e8a4e8b5c7286d7dc5ab563dcb478e1033.tar.bz2 luafilesystem-b35607e8a4e8b5c7286d7dc5ab563dcb478e1033.zip | |
Fix warning: C++ style comments are not allowed in ISO C90
| -rw-r--r-- | src/lfs.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -84,9 +84,11 @@ | |||
| 84 | #else | 84 | #else |
| 85 | #define getcwd_error strerror(errno) | 85 | #define getcwd_error strerror(errno) |
| 86 | #ifdef _WIN32 | 86 | #ifdef _WIN32 |
| 87 | #define LFS_MAXPATHLEN MAX_PATH // MAX_PATH seems to be 260. Seems kind of small. Is there a better one? | 87 | /* MAX_PATH seems to be 260. Seems kind of small. Is there a better one? */ |
| 88 | #define LFS_MAXPATHLEN MAX_PATH | ||
| 88 | #else | 89 | #else |
| 89 | #include <sys/param.h> // for MAXPATHLEN | 90 | /* For MAXPATHLEN: */ |
| 91 | #include <sys/param.h> | ||
| 90 | #define LFS_MAXPATHLEN MAXPATHLEN | 92 | #define LFS_MAXPATHLEN MAXPATHLEN |
| 91 | #endif | 93 | #endif |
| 92 | #endif | 94 | #endif |
| @@ -169,7 +171,7 @@ static int change_dir (lua_State *L) { | |||
| 169 | */ | 171 | */ |
| 170 | static int get_dir (lua_State *L) { | 172 | static int get_dir (lua_State *L) { |
| 171 | char *path; | 173 | char *path; |
| 172 | // Passing (NULL, 0) is not guaranteed to work. Use a temp buffer and size instead. | 174 | /* Passing (NULL, 0) is not guaranteed to work. Use a temp buffer and size instead. */ |
| 173 | char buf[LFS_MAXPATHLEN]; | 175 | char buf[LFS_MAXPATHLEN]; |
| 174 | if ((path = getcwd(buf, LFS_MAXPATHLEN)) == NULL) { | 176 | if ((path = getcwd(buf, LFS_MAXPATHLEN)) == NULL) { |
| 175 | lua_pushnil(L); | 177 | lua_pushnil(L); |
