[comp.sys.ibm.pc.programmer] Opening more files in C

john@DRD.Com (John Horeth) (02/20/91)

georgez@soafy.bhpese.oz.au (George Zarev) wrote:
} 
}         I am currently writing a large program in microsoft C (6.00) and need
} to open more files.My program is spread over 4 separate source code files.The
} program needs to operate with around 26 files open simultaneously.
} 
}         I have redefined     FOPEN_MAX=40          and
}                              SYS_OPEN =40          and
}                              _NFILES  =40.
} 
}         Also in config.sys I have set
}                                              files = 40
} 
}        The redefinitions have been included in each of the source code files
} which compile successfully.The program runs normally save for the fact that it
} won't recognise the new file open limit and still only lets me open the default
} limit of 20.
}        I've spent two days tearing my hair out on this.Can anyone out there giveme some advice to help solve my problem.

I think the problem might lie in the fact that you have probably not recompiled
open.  Even when you do a call to fopen it eventually gets
to open.  I think open keeps track of how many files are open.  My guess you
will have to talk to the people at microsoft before proceeding, since you will
probably have to recompile open and possibly fopen.  And if you are like me
you do not have the source to those.


john@DRD.com             | John M. Horeth, II 
{uunet,rutgers}!drd!john | Horeth Programming Services, Inc. - (918)622-9232
                         | c/o DRD Corporation (918)743-3013