*** ./demo/demo.c.ORIG Mon May 2 14:07:10 2011 --- ./demo/demo.c Mon May 2 14:08:39 2011 *************** *** 46,54 **** --- 46,58 ---- #include #include #include + #if defined(_AIX52) #include + #endif #include + #ifndef _AIX #include + #endif #include #include *** ./demo/demo.c.ORIG Mon May 2 15:06:21 2011 --- ./demo/demo.c Mon May 2 15:27:13 2011 *************** *** 53,61 **** --- 53,95 ---- #ifndef _AIX #include #endif + #include #include #include + #ifdef _AIX51 + static char __progname[1024]; + + void verr( int eval, const char *fmt, va_list ap ) + { + int my_errno; + + + my_errno = errno; + (void) fprintf( stderr, "%s: ", __progname ); + + if ( fmt != NULL ) + { + (void) vfprintf( stderr, fmt, ap ); + (void) fprintf( stderr, ": " ); + } + + (void) fprintf( stderr, "%s\n", strerror( my_errno ) ); + + exit( eval ); + } + + + void err( int eval, const char *fmt, ... ) + { + va_list ap; + + + va_start( ap, fmt ); + verr( eval, fmt, ap ); + va_end( ap ); + } + #endif #ifndef PATH_MAX #define PATH_MAX Libisofs_default_path_maX *** ./libisofs/fs_local.c.ORIG Mon May 2 15:39:15 2011 --- ./libisofs/fs_local.c Mon May 2 15:39:30 2011 *************** *** 808,814 **** lfs->get_root = lfs_get_root; lfs->get_by_path = lfs_get_by_path; lfs->get_id = lfs_get_id; ! lfs->open = lfs_fs_open; lfs->close = lfs_fs_close; lfs->free = lfs_fs_free; } --- 808,814 ---- lfs->get_root = lfs_get_root; lfs->get_by_path = lfs_get_by_path; lfs->get_id = lfs_get_id; ! lfs->AIXopen = lfs_fs_open; lfs->close = lfs_fs_close; lfs->free = lfs_fs_free; } *** ./libisofs/libisofs.h.ORIG Mon May 2 15:39:36 2011 --- ./libisofs/libisofs.h Mon May 2 15:41:04 2011 *************** *** 310,316 **** * @return * 1 if success, < 0 on error (has to be a valid libisofs error code) */ ! int (*open)(IsoDataSource *src); /** * Close a given source, freeing all system resources previously grabbed in --- 310,316 ---- * @return * 1 if success, < 0 on error (has to be a valid libisofs error code) */ ! int (*AIXopen)(IsoDataSource *src); /** * Close a given source, freeing all system resources previously grabbed in *************** *** 479,485 **** * * @return 1 on success, < 0 on error (has to be a valid libisofs error code) */ ! int (*open)(IsoFilesystem *fs); /** * Close the filesystem, thus freeing all system resources. You should --- 479,485 ---- * * @return 1 on success, < 0 on error (has to be a valid libisofs error code) */ ! int (*AIXopen)(IsoFilesystem *fs); /** * Close the filesystem, thus freeing all system resources. You should *************** *** 601,607 **** * ISO_FILE_ERROR * ISO_NULL_POINTER */ ! int (*open)(IsoFileSource *src); /** * Close a previuously openned file --- 601,607 ---- * ISO_FILE_ERROR * ISO_NULL_POINTER */ ! int (*AIXopen)(IsoFileSource *src); /** * Close a previuously openned file *************** *** 893,899 **** * 1 on success, 2 file greater than expected, 3 file smaller than * expected, < 0 on error (has to be a valid libisofs error code) */ ! int (*open)(IsoStream *stream); /** * Close the Stream. --- 893,899 ---- * 1 on success, 2 file greater than expected, 3 file smaller than * expected, < 0 on error (has to be a valid libisofs error code) */ ! int (*AIXopen)(IsoStream *stream); /** * Close the Stream. *** ./libisofs/fs_image.c.ORIG Mon May 2 15:41:09 2011 --- ./libisofs/fs_image.c Mon May 2 15:42:09 2011 *************** *** 601,607 **** if (S_ISDIR(data->info.st_mode)) { /* ensure fs is openned */ ! ret = data->fs->open(data->fs); if (ret < 0) { return ret; } --- 601,607 ---- if (S_ISDIR(data->info.st_mode)) { /* ensure fs is openned */ ! ret = data->fs->AIXopen(data->fs); if (ret < 0) { return ret; } *************** *** 624,630 **** return ret; } else if (S_ISREG(data->info.st_mode)) { /* ensure fs is openned */ ! ret = data->fs->open(data->fs); if (ret < 0) { return ret; } --- 624,630 ---- return ret; } else if (S_ISREG(data->info.st_mode)) { /* ensure fs is openned */ ! ret = data->fs->AIXopen(data->fs); if (ret < 0) { return ret; } *************** *** 2004,2010 **** if (data->open_count == 0) { /* we need to actually open the data source */ ! int res = data->src->open(data->src); if (res < 0) { return res; } --- 2004,2010 ---- if (data->open_count == 0) { /* we need to actually open the data source */ ! int res = data->src->AIXopen(data->src); if (res < 0) { return res; } *************** *** 2533,2539 **** ifs->get_root = ifs_get_root; ifs->get_by_path = ifs_get_by_path; ifs->get_id = ifs_get_id; ! ifs->open = ifs_fs_open; ifs->close = ifs_fs_close; ifs->free = ifs_fs_free; --- 2533,2539 ---- ifs->get_root = ifs_get_root; ifs->get_by_path = ifs_get_by_path; ifs->get_id = ifs_get_id; ! ifs->AIXopen = ifs_fs_open; ifs->close = ifs_fs_close; ifs->free = ifs_fs_free; *** ./libisofs/stream.c.ORIG Mon May 2 15:42:29 2011 --- ./libisofs/stream.c Mon May 2 15:43:20 2011 *************** *** 821,827 **** inline int iso_stream_open(IsoStream *stream) { ! return stream->class->open(stream); } inline --- 821,827 ---- inline int iso_stream_open(IsoStream *stream) { ! return stream->class->AIXopen(stream); } inline *** ./libisofs/fsource.c.ORIG Mon May 2 15:45:51 2011 --- ./libisofs/fsource.c Mon May 2 15:46:02 2011 *************** *** 82,88 **** inline int iso_file_source_open(IsoFileSource *src) { ! return src->class->open(src); } inline --- 82,88 ---- inline int iso_file_source_open(IsoFileSource *src) { ! return src->class->AIXopen(src); } inline *** ./libisofs/data_source.c.ORIG Mon May 2 15:44:56 2011 --- ./libisofs/data_source.c Mon May 2 15:45:12 2011 *************** *** 190,196 **** ds->refcount = 1; ds->data = data; ! ds->open = ds_open; ds->close = ds_close; ds->read_block = ds_read_block; ds->free_data = ds_free_data; --- 190,196 ---- ds->refcount = 1; ds->data = data; ! ds->AIXopen = ds_open; ds->close = ds_close; ds->read_block = ds_read_block; ds->free_data = ds_free_data;