Fix noreturn for old compilers.
This commit is contained in:
parent
c3d8f9c500
commit
93e5dd87a1
4
FIXES
4
FIXES
@ -25,6 +25,10 @@ THIS SOFTWARE.
|
|||||||
This file lists all bug fixes, changes, etc., made since the AWK book
|
This file lists all bug fixes, changes, etc., made since the AWK book
|
||||||
was sent to the printers in August, 1987.
|
was sent to the printers in August, 1987.
|
||||||
|
|
||||||
|
April 16, 2020:
|
||||||
|
Handle old compilers that don't support C11 (for noreturn).
|
||||||
|
Thanks to Arnold Robbins.
|
||||||
|
|
||||||
April 5, 2020:
|
April 5, 2020:
|
||||||
Use <stdnoreturn.h> and noreturn instead of GCC attributes.
|
Use <stdnoreturn.h> and noreturn instead of GCC attributes.
|
||||||
Thanks to GitHub user awkfan77. Closes PR #77.
|
Thanks to GitHub user awkfan77. Closes PR #77.
|
||||||
|
4
awk.h
4
awk.h
@ -25,7 +25,11 @@ THIS SOFTWARE.
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#if __STDC__ <= 199901L
|
||||||
|
#define noreturn
|
||||||
|
#else
|
||||||
#include <stdnoreturn.h>
|
#include <stdnoreturn.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef double Awkfloat;
|
typedef double Awkfloat;
|
||||||
|
|
||||||
|
2
main.c
2
main.c
@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|||||||
THIS SOFTWARE.
|
THIS SOFTWARE.
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
const char *version = "version 20200405";
|
const char *version = "version 20200416";
|
||||||
|
|
||||||
#define DEBUG
|
#define DEBUG
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user