- To: libc-gnats at gnu dot org, gnats-admin at gnu dot org
- Subject: libc/2010: C++ comments in glibc2 (2.1.95) sources [patch included]
- From: Gergely Nagy <8 at free dot bsd dot hu>
- Date: Sat, 13 Jan 2001 12:25:02 -0500
>Number: 2010
>Category: libc
>Synopsis: There are C++ comments in the glibc2 sources
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: libc-gnats
>State: open
>Quarter:
>Keywords:
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Sat Jan 13 12:25:01 -0500 2001
>Cases:
>Originator: Gergely Nagy
>Release: libc-2.2
>Organization:
The MadHouse Project
>Environment:
Host type: i386-pc-linux-gnu
System: Linux iluvatar 2.4.0-prerelease #52 Mon Jan 1 07:07:38 CET 2001 i586 unknown
Architecture: i586
Addons: linuxthreads
Build CC: gcc
Compiler version: 2.95.2 20000220 (Debian GNU/Linux)
Kernel headers: UTS_RELEASE
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio
>Description:
The following files contain C++ comments:
crypt/md5.c, malloc/memusagestat.c, posix/runptests.c,
sysdeps/unix/sysv/linux/powerpc/aix/errnoconv.c,
sysdeps/unix/sysv/linux/powerpc/aix/tcgetattr.c,
sysdeps/unix/sysv/linux/powerpc/aix/tcsetattr.c.
They cause no problem when compiling the glibc2 sources, as that
requires GCC, but when I extract parts of it (I did this with
crypt/md5.c & friends) to include it with my package for systems
that do not have glibc, they may cause problems. I can (and I did)
fix this in my package, but it would be better if the original
source would be fixed too.
>Fix:
Here is the patch I prepared:
diff -urNad glibc-2.1.95.orig/crypt/md5.c glibc-2.1.95/crypt/md5.c
--- glibc-2.1.95.orig/crypt/md5.c Fri Jul 7 19:57:25 2000
+++ glibc-2.1.95/crypt/md5.c Fri Jan 12 14:46:55 2001
@@ -217,7 +217,7 @@
size_t len;
struct md5_ctx *ctx;
{
- //const void aligned_buffer = buffer;
+ /* const void aligned_buffer = buffer; */
/* When we already have some bits in our internal buffer concatenate
both inputs first. */
diff -urNad glibc-2.1.95.orig/malloc/memusagestat.c glibc-2.1.95/malloc/memusagestat.c
--- glibc-2.1.95.orig/malloc/memusagestat.c Tue Jun 20 06:43:21 2000
+++ glibc-2.1.95/malloc/memusagestat.c Fri Jan 12 14:47:42 2001
@@ -451,7 +451,7 @@
last_total = new3;
}
- // assert (entry.heap <= maxsize_heap);
+ /* assert (entry.heap <= maxsize_heap); */
new[0] = (ysize - 20) - ((((unsigned long long int) (ysize - 40))
* entry.heap) / maxsize_heap);
gdImageLine (im_out, 40 + ((xsize - 80) * (cnt - 1)) / total,
@@ -459,7 +459,7 @@
red);
last_heap = new[0];
- // assert (entry.stack <= maxsize_stack);
+ /* assert (entry.stack <= maxsize_stack); */
new[1] = (ysize - 20) - ((((unsigned long long int) (ysize - 40))
* entry.stack) / maxsize_stack);
gdImageLine (im_out, 40 + ((xsize - 80) * (cnt - 1)) / total,
@@ -529,7 +529,7 @@
gdImageLine (im_out, last_xpos, last_heap, xpos, new[0], red);
last_heap = new[0];
- // assert (entry.stack <= maxsize_stack);
+ /* assert (entry.stack <= maxsize_stack); */
new[1] = (ysize - 20) - ((((unsigned long long int) (ysize - 40))
* entry.stack) / maxsize_stack);
gdImageLine (im_out, last_xpos, last_stack, xpos, new[1], green);
diff -urNad glibc-2.1.95.orig/posix/runptests.c glibc-2.1.95/posix/runptests.c
--- glibc-2.1.95.orig/posix/runptests.c Thu Dec 10 18:51:32 1998
+++ glibc-2.1.95/posix/runptests.c Fri Jan 12 14:47:52 2001
@@ -119,6 +119,6 @@
/* We should return here the error status but since some tests are known
to fail this would only cause the libc testsuite to fail. */
- //return errors != 0;
+ /* return errors != 0; */
return 0;
}
diff -urNad glibc-2.1.95.orig/sysdeps/unix/sysv/linux/powerpc/aix/errnoconv.c glibc-2.1.95/sysdeps/unix/sysv/linux/powerpc/aix/errnoconv.c
--- glibc-2.1.95.orig/sysdeps/unix/sysv/linux/powerpc/aix/errnoconv.c Fri May 5 21:37:23 2000
+++ glibc-2.1.95/sysdeps/unix/sysv/linux/powerpc/aix/errnoconv.c Fri Jan 12 14:48:33 2001
@@ -63,13 +63,13 @@
[AIX_EL2HLT] = EL2HLT,
[AIX_EDEADLK] = EDEADLK,
[AIX_ENOTREADY] = ENOTREADY,
- // EWPROTECT: no Linux equivalent
- // EFORMAT: no Linux equivalent
+ /* EWPROTECT: no Linux equivalent */
+ /* EFORMAT: no Linux equivalent */
[AIX_ENOLCK] = ENOLCK,
- // ENOCONNECT: No Linux equivalent
+ /* ENOCONNECT: No Linux equivalent */
[AIX_ESTALE] = ESTALE,
- // EDIST: no Linux equivalent
- [54] = EAGAIN, // EWOULDBLOCK
+ /* EDIST: no Linux equivalent */
+ [54] = EAGAIN, /* EWOULDBLOCK */
[AIX_EINPROGRESS] = EINPROGRESS,
[AIX_EALREADY] = EALREADY,
[AIX_ENOTSOCK] = ENOTSOCK,
@@ -102,7 +102,7 @@
[AIX_EUSERS] = EUSERS,
[AIX_ELOOP] = ELOOP,
[AIX_ENAMETOOLONG] = ENAMETOOLONG,
- [87] = ENOTEMPTY, // ENOTEMPTY
+ [87] = ENOTEMPTY, /* ENOTEMPTY */
[AIX_EDQUOT] = EDQUOT,
[AIX_ECORRUPT] = ECORRUPT,
[AIX_EREMOTE] = EREMOTE,
@@ -111,7 +111,7 @@
[AIX_ESOFT] = ESOFT,
[AIX_ENOATTR] = ENOATTR,
[AIX_ESAD] = ESAD,
- // ENOTRUST: no Linux equivalent
+ /* ENOTRUST: no Linux equivalent */
[AIX_ETOOMANYREFS] = ETOOMANYREFS,
[AIX_EILSEQ] = EILSEQ,
[AIX_ECANCELED] = ECANCELED,
diff -urNad glibc-2.1.95.orig/sysdeps/unix/sysv/linux/powerpc/aix/tcgetattr.c glibc-2.1.95/sysdeps/unix/sysv/linux/powerpc/aix/tcgetattr.c
--- glibc-2.1.95.orig/sysdeps/unix/sysv/linux/powerpc/aix/tcgetattr.c Fri May 5 22:47:18 2000
+++ glibc-2.1.95/sysdeps/unix/sysv/linux/powerpc/aix/tcgetattr.c Fri Jan 12 14:48:58 2001
@@ -39,14 +39,14 @@
linuxtermios_p->c_cc[VERASE] = aixtermios.c_cc[AIX_VERASE];
linuxtermios_p->c_cc[VKILL] = aixtermios.c_cc[AIX_VKILL];
linuxtermios_p->c_cc[VEOF] = aixtermios.c_cc[AIX_VEOF];
- // XXX VMIN has the same value as VEOF !?
+ /* XXX VMIN has the same value as VEOF !? */
linuxtermios_p->c_cc[VEOL] = aixtermios.c_cc[AIX_VEOL];
- // XXX VTIME has the same value as VEOL !?
+ /* XXX VTIME has the same value as VEOL !? */
linuxtermios_p->c_cc[VEOL2] = aixtermios.c_cc[AIX_VEOL2];
linuxtermios_p->c_cc[VSTART] = aixtermios.c_cc[AIX_VSTART];
linuxtermios_p->c_cc[VSTOP] = aixtermios.c_cc[AIX_VSTOP];
linuxtermios_p->c_cc[VSUSP] = aixtermios.c_cc[AIX_VSUSP];
- // XXX No Linux equivalent for VDSUSP !?
+ /* XXX No Linux equivalent for VDSUSP !? */
linuxtermios_p->c_cc[VREPRINT] = aixtermios.c_cc[AIX_VREPRINT];
linuxtermios_p->c_cc[VDISCARD] = aixtermios.c_cc[AIX_VDISCARD];
linuxtermios_p->c_cc[VWERASE] = aixtermios.c_cc[AIX_VWERASE];
@@ -149,7 +149,7 @@
linuxtermios_p->c_lflag |= IEXTEN;
}
else
- // Convert error here or in syscall.
+ /* Convert error here or in syscall. */
;
return result;
diff -urNad glibc-2.1.95.orig/sysdeps/unix/sysv/linux/powerpc/aix/tcsetattr.c glibc-2.1.95/sysdeps/unix/sysv/linux/powerpc/aix/tcsetattr.c
--- glibc-2.1.95.orig/sysdeps/unix/sysv/linux/powerpc/aix/tcsetattr.c Fri May 5 22:41:33 2000
+++ glibc-2.1.95/sysdeps/unix/sysv/linux/powerpc/aix/tcsetattr.c Fri Jan 12 14:49:21 2001
@@ -37,14 +37,14 @@
aixtermios.c_cc[AIX_VERASE] = linuxtermios_p->c_cc[VERASE];
aixtermios.c_cc[AIX_VKILL] = linuxtermios_p->c_cc[VKILL];
aixtermios.c_cc[AIX_VEOF] = linuxtermios_p->c_cc[VEOF];
- // XXX VMIN has the same value as VEOF !?
+ /* XXX VMIN has the same value as VEOF !? */
aixtermios.c_cc[AIX_VEOL] = linuxtermios_p->c_cc[VEOL];
- // XXX VTIME has the same value as VEOL !?
+ /* XXX VTIME has the same value as VEOL !? */
aixtermios.c_cc[AIX_VEOL2] = linuxtermios_p->c_cc[VEOL2];
aixtermios.c_cc[AIX_VSTART] = linuxtermios_p->c_cc[VSTART];
aixtermios.c_cc[AIX_VSTOP] = linuxtermios_p->c_cc[VSTOP];
aixtermios.c_cc[AIX_VSUSP] = linuxtermios_p->c_cc[VSUSP];
- aixtermios.c_cc[AIX_VDSUSP] = 0; // XXX No Linux equivalent !?
+ aixtermios.c_cc[AIX_VDSUSP] = 0; /* XXX No Linux equivalent !? */
aixtermios.c_cc[AIX_VREPRINT] = linuxtermios_p->c_cc[VREPRINT];
aixtermios.c_cc[AIX_VDISCARD] = linuxtermios_p->c_cc[VDISCARD];
aixtermios.c_cc[AIX_VWERASE] = linuxtermios_p->c_cc[VWERASE];
@@ -165,7 +165,7 @@
result = /* XXX syscall */;
- // Convert error here or in syscall.
+ /* Convert error here or in syscall. */
return result;
}