r73084 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73083‎ | r73084 | r73085 >
Date:20:01, 15 September 2010
Author:platonides
Status:ok (Comments)
Tags:
Comment:
Removed -std since it seems not all gcc support it. See r71805 CR.
Accept crlf as well as lf as line separator for easier telnet debugging. This doesn't change the response new line, which will still be a bare lf.
Modified paths:
  • /trunk/extensions/PoolCounter/daemon/Makefile (modified) (history)
  • /trunk/extensions/PoolCounter/daemon/locks.c (modified) (history)

Diff [purge]

Index: trunk/extensions/PoolCounter/daemon/locks.c
@@ -44,6 +44,10 @@
4545
4646 char* process_line(struct client_data* cli_data, char* line, int line_len) {
4747 struct locks* l = &cli_data->client_locks;
 48+ if (line_len > 0 && line[line_len-1] == '\r') {
 49+ line_len--;
 50+ line[line_len] = '\0';
 51+ }
4852
4953 if ( !strncmp( line, "ACQ4ME ", 7 ) || !strncmp( line, "ACQ4ANY ", 8 ) ) {
5054 if ( l->state != UNLOCKED ) {
Index: trunk/extensions/PoolCounter/daemon/Makefile
@@ -1,6 +1,6 @@
22 CC=gcc
33 DEFINES=-DENDIAN_BIG=0 -DENDIAN_LITTLE=1 -DHAVE_ACCEPT4=1
4 -CFLAGS=-std=c90 -Wall $(DEFINES)
 4+CFLAGS=-Wall $(DEFINES)
55 OBJS=main.o client_data.o locks.o hash.o
66 LINK=-levent
77 HEADERS=prototypes.h client_data.h

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r71805Make a bunch of incompatible changes to the PoolCounter....platonides20:57, 27 August 2010

Comments

#Comment by Tim Starling (talk | contribs)   02:10, 17 September 2010

They all support -std, it's just that c90 was only added in gcc 4.5.x, as an alias for c89.

#Comment by Platonides (talk | contribs)   14:17, 17 September 2010

I was referring to c90. But removing it completely maybe it also works for some other compiler.

Status & tagging log