Lists: | pgsql-hackers |
---|
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | pgindent bizarreness |
Date: | 2010-04-02 15:25:25 |
Message-ID: | 24100.1270221925@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Why has pgindent decided to screw up all the FD_SET calls in our code?
See for example
http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.188;r2=1.189
regards, tom lane
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: pgindent bizarreness |
Date: | 2010-04-03 02:10:26 |
Message-ID: | 4BB6A392.1000801@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Why has pgindent decided to screw up all the FD_SET calls in our code?
> See for example
> http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.188;r2=1.189
>
>
>
This appears to be due to this on mingw:
/mingw/include/winsock.h:typedef struct fd_set FD_SET;
/mingw/include/winsock2.h:typedef struct fd_set FD_SET;
We have a list of excluded symbols in the typdef finding code, which
currently consists of this list:
'date','interval','timestamp','ANY'
Looks like we should add 'FD_SET' to this list.
I'm actually wondering if the list of excluded symbols should go in
pgindent rather than the typedef finding code. It would be a very simple
change to the pgindent script.
cheers
andrew
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: pgindent bizarreness |
Date: | 2010-04-05 02:05:18 |
Message-ID: | 201004050205.o3525IA02840@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Why has pgindent decided to screw up all the FD_SET calls in our code?
> See for example
> http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.188;r2=1.189
Because the typedef list supplied by Andrew includes FD_SET as a
typedef. :-O See src/tools/pgindent/typedefs.list.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: pgindent bizarreness |
Date: | 2010-04-05 03:14:11 |
Message-ID: | 4BB95583.7080209@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Bruce Momjian wrote:
> Tom Lane wrote:
>
>> Why has pgindent decided to screw up all the FD_SET calls in our code?
>> See for example
>> http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.188;r2=1.189
>>
>
> Because the typedef list supplied by Andrew includes FD_SET as a
> typedef. :-O See src/tools/pgindent/typedefs.list.
>
I've committed a fix to pgindent for this. Do we want to rerun pgindent
for these files?:
src/test/examples/testlibpq2.c
src/interfaces/libpq/fe-misc.c
src/backend/postmaster/syslogger.c
src/backend/postmaster/pgstat.c
src/backend/postmaster/postmaster.c
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/backend/port/win32/socket.c
src/backend/libpq/auth.c
contrib/pgbench/pgbench.c
cheers
andrew
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: pgindent bizarreness |
Date: | 2010-04-05 03:15:18 |
Message-ID: | 1554.1270437318@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> I've committed a fix to pgindent for this. Do we want to rerun pgindent
> for these files?:
I think the plan is to redo pgindent near the end of beta. There's
probably no need to do it right now.
regards, tom lane
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: pgindent bizarreness |
Date: | 2010-04-05 03:19:57 |
Message-ID: | 201004050319.o353JvT13490@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Andrew Dunstan wrote:
>
>
> Bruce Momjian wrote:
> > Tom Lane wrote:
> >
> >> Why has pgindent decided to screw up all the FD_SET calls in our code?
> >> See for example
> >> http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.188;r2=1.189
> >>
> >
> > Because the typedef list supplied by Andrew includes FD_SET as a
> > typedef. :-O See src/tools/pgindent/typedefs.list.
> >
>
> I've committed a fix to pgindent for this. Do we want to rerun pgindent
> for these files?:
>
> src/test/examples/testlibpq2.c
> src/interfaces/libpq/fe-misc.c
> src/backend/postmaster/syslogger.c
> src/backend/postmaster/pgstat.c
> src/backend/postmaster/postmaster.c
> src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
> src/backend/port/win32/socket.c
> src/backend/libpq/auth.c
> contrib/pgbench/pgbench.c
Uh, I rarely run pgindent on individual files like this. If it is
FD_SET you are worried about, I suggest we find all the FD_SET symbols
and just remove the whitespace pgindent added and commit that.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: pgindent bizarreness |
Date: | 2010-04-05 03:26:33 |
Message-ID: | 201004050326.o353QX414294@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > I've committed a fix to pgindent for this. Do we want to rerun pgindent
> > for these files?:
>
> I think the plan is to redo pgindent near the end of beta. There's
> probably no need to do it right now.
Sure, sounds like a plan.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com