Re: [PATCH libdrm] xf86drm: fix compile error for declare i in for loop

2017-05-18 Thread Emil Velikov
On 18 May 2017 at 14:46, Emil Velikov wrote: > On 18 May 2017 at 13:47, Eric Engestrom wrote: > >>> > Yes, I think you should change your build command. It's a shame that >>> > autotools has this bug, but we'd like to avoid changing our codebase to >>> > work around these, and in this case, it wo

Re: [PATCH libdrm] xf86drm: fix compile error for declare i in for loop

2017-05-18 Thread Emil Velikov
On 18 May 2017 at 13:47, Eric Engestrom wrote: >> > Yes, I think you should change your build command. It's a shame that >> > autotools has this bug, but we'd like to avoid changing our codebase to >> > work around these, and in this case, it would mean dropping the C99 >> > requirement and havin

Re: [PATCH libdrm] xf86drm: fix compile error for declare i in for loop

2017-05-18 Thread Eric Engestrom
On Thursday, 2017-05-18 12:10:31 +0100, Emil Velikov wrote: > On 17 May 2017 at 19:16, Eric Engestrom wrote: > > On Wednesday, 2017-05-17 13:58:42 +, Yu, Qiang wrote: > >> Hi Emil, > >> > >> I didn't modify the code. I'm using Ubuntu 14.04 gcc 4.8.4, the configure > >> pass but > >> fail when

Re: [PATCH libdrm] xf86drm: fix compile error for declare i in for loop

2017-05-18 Thread Emil Velikov
On 17 May 2017 at 19:16, Eric Engestrom wrote: > On Wednesday, 2017-05-17 13:58:42 +, Yu, Qiang wrote: >> Hi Emil, >> >> I didn't modify the code. I'm using Ubuntu 14.04 gcc 4.8.4, the configure >> pass but >> fail when compile. >> >> I think my gcc support c99 but needs adding "-std=c99" to

Re: [PATCH libdrm] xf86drm: fix compile error for declare i in for loop

2017-05-17 Thread Eric Engestrom
ke to avoid changing our codebase to work around these, and in this case, it would mean dropping the C99 requirement and having to downgrade the whole codebase to something older. > > Regards, > Qiang > > From: Emil Velikov > Sent: Wednesda

Re: [PATCH libdrm] xf86drm: fix compile error for declare i in for loop

2017-05-17 Thread Chih-Wei Huang
2017-05-18 0:10 GMT+08:00 Emil Velikov : > On 17 May 2017 at 14:58, Yu, Qiang wrote: >> Hi Emil, >> >> I didn't modify the code. I'm using Ubuntu 14.04 gcc 4.8.4, the configure >> pass but >> fail when compile. >> >> I think my gcc support c99 but needs adding "-std=c99" to enable it, and the >>

Re: [PATCH libdrm] xf86drm: fix compile error for declare i in for loop

2017-05-17 Thread Emil Velikov
On 17 May 2017 at 14:58, Yu, Qiang wrote: > Hi Emil, > > I didn't modify the code. I'm using Ubuntu 14.04 gcc 4.8.4, the configure > pass but > fail when compile. > > I think my gcc support c99 but needs adding "-std=c99" to enable it, and the > configure > script add it into CC variable. When j

Re: [PATCH libdrm] xf86drm: fix compile error for declare i in for loop

2017-05-17 Thread Yu, Qiang
OK, but my build script uses "make CC=gcc". If you think current state is OK, I can change my build script for that. Regards, Qiang From: Emil Velikov Sent: Wednesday, May 17, 2017 9:17:53 PM To: Yu, Qiang Cc: ML dri-devel Subject: Re: [PATCH lib

Re: [PATCH libdrm] xf86drm: fix compile error for declare i in for loop

2017-05-17 Thread Emil Velikov
Hi Qiang Yu, On 17 May 2017 at 10:26, Qiang Yu wrote: > error log: > xf86drm.c: In function 'parse_separate_sysfs_files': > xf86drm.c:3104:5: error: 'for' loop initial declarations are only allowed in > C99 mode > for (unsigned i = ignore_revision ? 1 : 0; i < ARRAY_SIZE(attrs); i++) { >

[PATCH libdrm] xf86drm: fix compile error for declare i in for loop

2017-05-17 Thread Qiang Yu
error log: xf86drm.c: In function 'parse_separate_sysfs_files': xf86drm.c:3104:5: error: 'for' loop initial declarations are only allowed in C99 mode for (unsigned i = ignore_revision ? 1 : 0; i < ARRAY_SIZE(attrs); i++) { ^ xf86drm.c:3104:5: note: use option -std=c99 or -std=gnu99 to co