This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Patch for implicit assumption that cyg_bool and int are interchangeable
- From: Eric Doenges <Eric dot Doenges at DynaPel dot com>
- To: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: Mon, 22 Sep 2003 15:32:52 +0200
- Subject: Patch for implicit assumption that cyg_bool and int are interchangeable
I've found (and fixed) two more packages that had functions
returning a cyg_bool declared as returning int in the prototype.
--
--------------------------------------------------------------------
| Eric Doenges | DynaPel Laboratories GmbH |
| Tel: +49 89 962428 23 | Fraunhoferstrasse 9/2 |
| Fax: +49 89 962428 90 | D - 85737 Ismaning, Germany |
--------------------------------------------------------------------
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/fileio/current/ChangeLog,v
retrieving revision 1.32
diff -u -5 -b -r1.32 ChangeLog
--- ChangeLog 13 Jul 2003 13:25:27 -0000 1.32
+++ ChangeLog 22 Sep 2003 13:26:47 -0000
@@ -1,5 +1,12 @@
+2003-09-22 Eric Doenges <Eric.Doenges@DynaPel.com>
+ * src/devfs.cxx: prototype of dev_fo_select now matches
+ implementation
+ * include/fileio.h: changed definition of cyg_fileop_select to
+ return a cyg_bool instead of int to match current implementations
+ * src/misc.cxx: changed cyg_fileio_seltrue() to match prototype.
+
2003-07-11 Andrew Lunn <andrew.lunn@ascom.ch>
* src/socket.cxx (socket): If there are no network stacks configured
return EAFNOSUPPORT when opening a socket.
Index: include/fileio.h
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/fileio/current/include/fileio.h,v
retrieving revision 1.7
diff -u -5 -b -r1.7 fileio.h
--- include/fileio.h 23 May 2002 23:06:06 -0000 1.7
+++ include/fileio.h 22 Sep 2003 13:26:47 -0000
@@ -266,11 +266,11 @@
typedef cyg_fileop_readwrite cyg_fileop_read;
typedef cyg_fileop_readwrite cyg_fileop_write;
typedef int cyg_fileop_lseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
typedef int cyg_fileop_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
CYG_ADDRWORD data);
-typedef int cyg_fileop_select (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info);
+typedef cyg_bool cyg_fileop_select (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info);
typedef int cyg_fileop_fsync (struct CYG_FILE_TAG *fp, int mode );
typedef int cyg_fileop_close (struct CYG_FILE_TAG *fp);
typedef int cyg_fileop_fstat (struct CYG_FILE_TAG *fp, struct stat *buf );
typedef int cyg_fileop_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
typedef int cyg_fileop_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
Index: src/devfs.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/fileio/current/src/devfs.cxx,v
retrieving revision 1.6
diff -u -5 -b -r1.6 devfs.cxx
--- src/devfs.cxx 20 Mar 2003 19:00:43 -0000 1.6
+++ src/devfs.cxx 22 Sep 2003 13:26:47 -0000
@@ -98,11 +98,11 @@
static int dev_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
static int dev_fo_write (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
static int dev_fo_lseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
static int dev_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
CYG_ADDRWORD data);
-static int dev_fo_select (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info);
+static cyg_bool dev_fo_select (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info);
static int dev_fo_fsync (struct CYG_FILE_TAG *fp, int mode );
static int dev_fo_close (struct CYG_FILE_TAG *fp);
static int dev_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf );
static int dev_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
static int dev_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
Index: src/misc.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/fileio/current/src/misc.cxx,v
retrieving revision 1.8
diff -u -5 -b -r1.8 misc.cxx
--- src/misc.cxx 11 Apr 2003 02:06:11 -0000 1.8
+++ src/misc.cxx 22 Sep 2003 13:26:48 -0000
@@ -469,10 +469,10 @@
__externC int cyg_fileio_enosys() { return ENOSYS; }
__externC int cyg_fileio_erofs() { return EROFS; }
__externC int cyg_fileio_enoerr() { return ENOERR; }
__externC int cyg_fileio_enotdir() { return ENOTDIR; }
-__externC int cyg_fileio_seltrue (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info)
+__externC cyg_bool cyg_fileio_seltrue (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info)
{ return 1; }
// -------------------------------------------------------------------------
// EOF misc.cxx
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/httpd/current/ChangeLog,v
retrieving revision 1.7
diff -u -5 -b -r1.7 ChangeLog
--- ChangeLog 14 Jun 2003 18:04:55 -0000 1.7
+++ ChangeLog 22 Sep 2003 13:27:24 -0000
@@ -1,5 +1,9 @@
+2003-09-22 Eric Doenges <Eric.Doenges@DynaPel.com>
+ * include/httpd.h: changed prototype of cyg_httpd_send_html and
+ cyg_httpd_send_data to match implementation.
+
2003-06-09 Nick Garnett <nickg@balti.calivar.com>
* src/httpd.c: Fixed a problem with closing the client socket --
it was being done twice.
Tidied up the formatting a little.
@@ -49,6 +53,5 @@
# Copyright (C) 2002 Nick Garnett
# All Rights Reserved.
#
# Permission is granted to use, copy, modify and redistribute this
# file.
-
Index: include/httpd.h
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/httpd/current/include/httpd.h,v
retrieving revision 1.2
diff -u -5 -b -r1.2 httpd.h
--- include/httpd.h 14 Feb 2003 02:27:35 -0000 1.2
+++ include/httpd.h 22 Sep 2003 13:27:24 -0000
@@ -90,11 +90,11 @@
/* ----------------------------------------------------------------- */
/*
*/
-__externC int cyg_httpd_send_html( FILE *client, char *filename,
+__externC cyg_bool cyg_httpd_send_html( FILE *client, char *filename,
char *request, void *arg );
/* ----------------------------------------------------------------- */
/*
*/
@@ -104,11 +104,11 @@
char *content_type;
cyg_uint32 content_length;
cyg_uint8 *data;
} cyg_httpd_data;
-__externC int cyg_httpd_send_data( FILE *client, char *filename,
+__externC cyg_bool cyg_httpd_send_data( FILE *client, char *filename,
char *request, void *arg );
#define CYG_HTTPD_DATA( __name, __type, __length, __data ) \
cyg_httpd_data __name = { __type, __length, __data }