[v3,1/5] Import "glob" and "getcwd" modules from gnulib

Message ID 85ed7bac-f4d7-d348-01d1-acadcbbc56b8@redhat.com
State New, archived
Headers

Commit Message

Pedro Alves Sept. 22, 2017, 11:01 a.m. UTC
  On 09/21/2017 11:59 PM, Sergio Durigan Junior wrote:

> 	* gnulib/import/m4/gnulib-cache.m4: Regenerate

Missing period.

> 	* ser-tcp.c: Undefine "close" before redefining it.


Please add a comment.  Something like:

/* Gnulib defines close too, but gnulib's replacement
   doesn't call closesocket unless we import the
   socketlib module.  */

Otherwise OK.

Thanks,
Pedro Alves
  

Comments

Sergio Durigan Junior Sept. 22, 2017, 5:29 p.m. UTC | #1
On Friday, September 22 2017, Pedro Alves wrote:

> On 09/21/2017 11:59 PM, Sergio Durigan Junior wrote:
>
>> 	* gnulib/import/m4/gnulib-cache.m4: Regenerate
>
> Missing period.

Fixed.

>> 	* ser-tcp.c: Undefine "close" before redefining it.
>
> diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
> index f35991c..c8be37b 100644
> --- a/gdb/ser-tcp.c
> +++ b/gdb/ser-tcp.c
> @@ -42,6 +42,7 @@
>>  #ifndef ETIMEDOUT
>>  #define ETIMEDOUT WSAETIMEDOUT
>>  #endif
>> +#undef close
>>  #define close(fd) closesocket (fd)
>>  #define ioctl ioctlsocket
>>  #else
>
> Please add a comment.  Something like:
>
> /* Gnulib defines close too, but gnulib's replacement
>    doesn't call closesocket unless we import the
>    socketlib module.  */

Added.

> Otherwise OK.

Pushed.

6ec2e0f5bddc69d55e09fe56792edf7a109ff8ae

Thanks,
  

Patch

diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index f35991c..c8be37b 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -42,6 +42,7 @@ 
>  #ifndef ETIMEDOUT
>  #define ETIMEDOUT WSAETIMEDOUT
>  #endif
> +#undef close
>  #define close(fd) closesocket (fd)
>  #define ioctl ioctlsocket
>  #else