aports/testing/9base/gcc14.patch
2024-10-02 06:37:39 +00:00

40 lines
1,021 B
Diff

Remove unused macros in -Wimplicit-function-declaration error with gcc 14.
```
In file included from fns.h:3,
from n1.c:10:
n1.c: In function 'get1ch':
mbwc.h:2:16: error: implicit declaration of function 'p9mbtowc'; did you mean 'mbtowc'? [-Wimplicit-function-declaration]
2 | #define mbtowc p9mbtowc
| ^~~~~~~~
n1.c:752:26: note: in expansion of macro 'mbtowc'
752 | if ((n = mbtowc(&wc, buf, p-buf)) >= 0)
| ^~~~~~
```
--- 9base-6-origin/troff/fns.h
+++ 9base-6/troff/fns.h
@@ -1,7 +1,5 @@
#define getline p9getline
-#include "mbwc.h"
-
/*
* other
*/
--- 9base-6-origin/troff/mbwc.c
+++ 9base-6/troff/mbwc.c
@@ -1,5 +1,4 @@
#include <stdlib.h>
-#include "mbwc.h"
/*
* Use the FSS-UTF transformation proposed by posix.
--- 9base-6-origin/troff/mbwc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#define mblen p9mblen
-#define mbtowc p9mbtowc
-#define mbstowcs p9mbstowcs
-#define wctomb p9wctomb
-#define wcstombs p9wcstombs