diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 16:27:12 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 16:27:12 +0100 |
| commit | 5be04ec2ceb1df77afbca4fcbf9e92a712612d6f (patch) | |
| tree | 2b2e1c71dffae827c8e45cd4cccc375093d03486 /gl/fopen.c | |
| parent | 6d1d1dac32841d5ca6ee51bb09b30a6c604b17e2 (diff) | |
| download | monitoring-plugins-5be04ec2ceb1df77afbca4fcbf9e92a712612d6f.tar.gz | |
Sync with the latest Gnulib code (d4ec02b3cc)
Diffstat (limited to 'gl/fopen.c')
| -rw-r--r-- | gl/fopen.c | 12 |
1 files changed, 10 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Open a stream to a file. | 1 | /* Open a stream to a file. |
| 2 | Copyright (C) 2007-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2024 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 |
| @@ -33,9 +33,13 @@ orig_fopen (const char *filename, const char *mode) | |||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | /* Specification. */ | 35 | /* Specification. */ |
| 36 | #ifdef __osf__ | ||
| 36 | /* Write "stdio.h" here, not <stdio.h>, otherwise OSF/1 5.1 DTK cc eliminates | 37 | /* Write "stdio.h" here, not <stdio.h>, otherwise OSF/1 5.1 DTK cc eliminates |
| 37 | this include because of the preliminary #include <stdio.h> above. */ | 38 | this include because of the preliminary #include <stdio.h> above. */ |
| 38 | #include "stdio.h" | 39 | # include "stdio.h" |
| 40 | #else | ||
| 41 | # include <stdio.h> | ||
| 42 | #endif | ||
| 39 | 43 | ||
| 40 | #include <errno.h> | 44 | #include <errno.h> |
| 41 | #include <fcntl.h> | 45 | #include <fcntl.h> |
| @@ -225,5 +229,9 @@ rpl_fopen (const char *filename, const char *mode) | |||
| 225 | } | 229 | } |
| 226 | #endif | 230 | #endif |
| 227 | 231 | ||
| 232 | /* open_direction is sometimes used, sometimes unused. | ||
| 233 | Silence gcc's warning about this situation. */ | ||
| 234 | (void) open_direction; | ||
| 235 | |||
| 228 | return orig_fopen (filename, mode); | 236 | return orig_fopen (filename, mode); |
| 229 | } | 237 | } |
