2010-04-28 03:59:00 SSIZE_MAX
Daniele Pagani (ITALY)
Message: 88989
Dear sirs,
I'm using write/read functions in order to read and write to and from file in a filesystem (in ram).
Where is the definition of SSIZE_MAX in Blackfin uClinux 2009R1.1-RC4 for Blackfin BF537?
What could be the best solution for reading/writing aboud 1500bytes (read vs fread)?
Best regards,
Daniele.
TranslateQuoteReplyEditDelete
2010-04-28 04:51:21 Re: SSIZE_MAX
Mike Frysinger (UNITED STATES)
Message: 88990
SSIZE_MAX is defined just like any other standard port -- use limits.h
read() goes directly to the kernel while fread() does buffering in userspace via the C library
QuoteReplyEditDelete
2010-04-28 07:08:37 Re: SSIZE_MAX
Daniele Pagani (ITALY)
Message: 88992
Dear Mike,
I find limits.h, but I don't find SSIZE_MAX; how can I find it?
Thanks.
/************ limits.h ***************/
#ifndef _LINUX_LIMITS_H
#define _LINUX_LIMITS_H
#define NR_OPEN 1024
#define NGROUPS_MAX 65536 /* supplemental group IDs are available */
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
#define LINK_MAX 127 /* # links a file may have */
#define MAX_CANON 255 /* size of the canonical input queue */
#define MAX_INPUT 255 /* size of the type-ahead buffer */
#define NAME_MAX 255 /* # chars in a file name */
#define PATH_MAX 4096 /* # chars in a path name including nul */
#define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */
#define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */
#define XATTR_SIZE_MAX 65536 /* size of an extended attribute value (64k) */
#define XATTR_LIST_MAX 65536 /* size of extended attribute namelist (64k) */
#define RTSIG_MAX 32
#endif
TranslateQuoteReplyEditDelete
2010-04-28 11:58:29 Re: SSIZE_MAX
Mike Frysinger (UNITED STATES)
Message: 88994
i said limits.h, not l inux/limits.h