0
0
mirror of https://github.com/vim/vim.git synced 2025-11-14 23:04:02 -05:00

patch 9.1.1662: Issues with proto files: missing or inconsistent prototypes.

Problem:  Issues with proto files: missing or inconsistent prototypes.
Solution: Update ifdefs, move typedefs, fix prototype declaration
          (Hirohito Higashi)

This change focuses on fixes and tweaks found while working on #18045 for
the proto/*.pro files.

The following fixes and tweaks have been made:

- Fixed a prototype declaration where the variable name differed from
  the function definition.
- Removed a prototype declaration without a function body.
- Fixed a problem where a prototype declaration was not created for a
  function definition enclosed in a #if directive because it lacked ||
  defined(PROTO).
- Moved typedef struct soundcb_S soundcb_T; from proto/sound.pro to
  vim.h.
- Other small tweaks.

The make proto mechanism remains unchanged.

closes: #18058

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Hirohito Higashi
2025-08-20 22:08:13 +02:00
committed by Christian Brabandt
parent c0a3eda6ba
commit d839a5b3b0
27 changed files with 46 additions and 49 deletions

View File

@@ -147,7 +147,7 @@ Window x11_window = 0;
Display *x11_display = NULL;
#endif
#ifdef FEAT_SOCKETSERVER
#if defined(FEAT_SOCKETSERVER) || defined(PROTO)
# include <sys/socket.h>
# include <sys/un.h>
@@ -1829,7 +1829,7 @@ xopen_message(long elapsed_msec)
# endif
#endif
#if defined(FEAT_X11)
#if defined(FEAT_X11) || defined(PROTO)
/*
* A few functions shared by X11 title and clipboard code.
*/
@@ -1900,7 +1900,7 @@ x_connect_to_server(void)
return TRUE;
}
#if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
#if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) || defined(PROTO)
# if defined(USING_SETJMP)
/*
* An X IO Error handler, used to catch error while opening the display.
@@ -3252,7 +3252,7 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
}
#endif // HAVE_SMACK
#ifdef FEAT_XATTR
#if defined(FEAT_XATTR) || defined(PROTO)
/*
* Copy extended attributes from_file to to_file
*/
@@ -9134,7 +9134,7 @@ mch_create_anon_file(void)
return fd;
}
#ifdef FEAT_SOCKETSERVER
#if defined(FEAT_SOCKETSERVER) || defined(PROTO)
/*
* Initialize socket server called "name" (the socket filename). If "name" is a