Deleted Added
full compact
37c37
< __FBSDID("$FreeBSD: head/lib/libc/stdio/findfp.c 165903 2007-01-09 00:28:16Z imp $");
---
> __FBSDID("$FreeBSD: head/lib/libc/stdio/findfp.c 178287 2008-04-17 22:17:54Z jhb $");
57,58c57
< {0,0,0,flags,file,{0},0,__sF+file,__sclose,__sread,__sseek,__swrite, \
< {0}, __sFX + file}
---
> {0,0,0,flags,file,{0},0,__sF+file,__sclose,__sread,__sseek,__swrite}
60c59
< /* _ub _extra */
---
>
63d61
< static struct __sFILEX usual_extra[FOPEN_MAX - 3];
66,74c64
< static struct __sFILEX __sFX[3];
<
< /*
< * We can't make this 'static' until 6.0-current due to binary
< * compatibility concerns. This also means we cannot change the
< * sizeof(FILE) until that time either and must continue to use the
< * __sFILEX stuff to add to FILE.
< */
< FILE __sF[3] = {
---
> static FILE __sF[3] = {
80,86d69
< /*
< * The following kludge is done to ensure enough binary compatibility
< * with future versions of libc. Or rather it allows us to work with
< * libraries that have been built with a newer libc that defines these
< * symbols and expects libc to provide them. We only have need to support
< * i386 because it is the only "old" system we have deployed.
< */
112d94
< static struct __sFILEX emptyx;
114d95
< struct __sFILEX *fx;
116,117c97
< g = (struct glue *)malloc(sizeof(*g) + ALIGNBYTES + n * sizeof(FILE) +
< n * sizeof(struct __sFILEX));
---
> g = (struct glue *)malloc(sizeof(*g) + ALIGNBYTES + n * sizeof(FILE));
121d100
< fx = (struct __sFILEX *)&p[n];
125,130c104,105
< while (--n >= 0) {
< *p = empty;
< p->_extra = fx;
< *p->_extra = emptyx;
< p++, fx++;
< }
---
> while (--n >= 0)
> *p++ = empty;
178,179c153,154
< fp->_extra->orientation = 0;
< memset(&fp->_extra->mbstate, 0, sizeof(mbstate_t));
---
> fp->_orientation = 0;
> memset(&fp->_mbstate, 0, sizeof(mbstate_t));
232d206
< int i;
234,244c208,210
< THREAD_LOCK();
< if (__sdidinit == 0) {
< /* Set _extra for the usual suspects. */
< for (i = 0; i < FOPEN_MAX - 3; i++)
< usual[i]._extra = &usual_extra[i];
<
< /* Make sure we clean up on exit. */
< __cleanup = _cleanup; /* conservative */
< __sdidinit = 1;
< }
< THREAD_UNLOCK();
---
> /* Make sure we clean up on exit. */
> __cleanup = _cleanup; /* conservative */
> __sdidinit = 1;