diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2026-03-26 12:53:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-26 12:53:53 +0100 |
| commit | 13e14a6bfd9f29cbfeab0c5161d2a994f97532e7 (patch) | |
| tree | 3aa7186fe092e42783dc7e981dc39a74ea61c466 /gl/stat.c | |
| parent | 9d8503f90ef25b2cecd324dc118e441f40233ea8 (diff) | |
| download | monitoring-plugins-13e14a6bfd9f29cbfeab0c5161d2a994f97532e7.tar.gz | |
Update/gnulib 2026 03 (#2247)
* Sync with the 202601-stable Gnulib code (4a3650d887)
* Ignore more deps stuff in gnulib
* Remove autogenerated gnulib files
* Ignore more gnulib generated headers
Diffstat (limited to 'gl/stat.c')
| -rw-r--r-- | gl/stat.c | 16 |
1 files changed, 4 insertions, 12 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Work around platform bugs in stat. | 1 | /* Work around platform bugs in stat. |
| 2 | Copyright (C) 2009-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -42,14 +42,7 @@ orig_stat (const char *filename, struct stat *buf) | |||
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | /* Specification. */ | 44 | /* Specification. */ |
| 45 | #ifdef __osf__ | 45 | #include <sys/stat.h> |
| 46 | /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc | ||
| 47 | eliminates this include because of the preliminary #include <sys/stat.h> | ||
| 48 | above. */ | ||
| 49 | # include "sys/stat.h" | ||
| 50 | #else | ||
| 51 | # include <sys/stat.h> | ||
| 52 | #endif | ||
| 53 | 46 | ||
| 54 | #include "stat-time.h" | 47 | #include "stat-time.h" |
| 55 | 48 | ||
| @@ -119,7 +112,7 @@ rpl_stat (char const *name, struct stat *buf) | |||
| 119 | <https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file> ? */ | 112 | <https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file> ? */ |
| 120 | 113 | ||
| 121 | /* To ease portability. Like in open.c. */ | 114 | /* To ease portability. Like in open.c. */ |
| 122 | if (strcmp (name, "/dev/null") == 0) | 115 | if (streq (name, "/dev/null")) |
| 123 | name = "NUL"; | 116 | name = "NUL"; |
| 124 | 117 | ||
| 125 | /* POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13> | 118 | /* POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13> |
| @@ -294,8 +287,7 @@ rpl_stat (char const *name, struct stat *buf) | |||
| 294 | if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0) | 287 | if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0) |
| 295 | { | 288 | { |
| 296 | const char *last_dot = NULL; | 289 | const char *last_dot = NULL; |
| 297 | const char *p; | 290 | for (const char *p = info.cFileName; *p != '\0'; p++) |
| 298 | for (p = info.cFileName; *p != '\0'; p++) | ||
| 299 | if (*p == '.') | 291 | if (*p == '.') |
| 300 | last_dot = p; | 292 | last_dot = p; |
| 301 | if (last_dot != NULL) | 293 | if (last_dot != NULL) |
