noted the following passing from the SDK of 2010 to ten 29/9/2013 kit
In dosextens.h the disappearance of dol_Task define and the DLT_DIRECTORY define
Wheras i can live with it & change my source, i wonder why they couldn't be kept
I also note in dos.library the disappearance of DeleteFile() and SetFileDate()
These are more serious changes
Neither of these were previously said to be obsolete or deprecated and dos.doc does not point to alternatives to use.
What is happening?
SetFileDate & DeleteFile gone?
- salass00
- AmigaOS Core Developer
- Posts: 530
- Joined: Sat Jun 18, 2011 3:12 pm
- Location: Finland
- Contact:
Re: SetFileDate & DeleteFile gone?
DeleteFile() and SetFileDate() have been renamed to Delete() and SetDate() as they do not work on just files.
To get legacy code to compile with the latest DOS includes the easiest method is to just add the following line to the code:
In the latest SDK this file containing legacy definitions is no longer included implicitly by the other dos includes and therefore has to be included explicitly if needed.
To get legacy code to compile with the latest DOS includes the easiest method is to just add the following line to the code:
Code: Select all
#include <dos/obsolete.h>
Re: SetFileDate & DeleteFile gone?
@JosDuchIt
Maybe it will help somehow as well, In dopus5 we cover both old and new sdk of dos like this:
Maybe it will help somehow as well, In dopus5 we cover both old and new sdk of dos like this:
Code: Select all
#if defined(__amigaos4__) && defined(SetDate) // in case we on new OS4's DOS-SDK, do some ifdef which allow builds src on all sdk versions.
Delete(..);
SetDate(..);
#else
DeleteFile(..);
SetFileDate(..);
#endif
Re: SetFileDate & DeleteFile gone?
thanks both
Re: SetFileDate & DeleteFile gone?
I came across the disappearance of dol_Task aswell.
May someone be so nice and explain what is was used for and why it has been ditched?
Thanks
May someone be so nice and explain what is was used for and why it has been ditched?
Thanks
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
- colinw
- AmigaOS Core Developer
- Posts: 207
- Joined: Mon Aug 15, 2011 9:20 am
- Location: Brisbane, QLD. Australia.
Re: SetFileDate & DeleteFile gone?
Seriously. ?Raziel wrote: I came across the disappearance of dol_Task aswell.
May someone be so nice and explain what is was used for and why it has been ditched?
Thanks
dol_Task wasn't a task pointer, it is a message port instead, SetFileDate() also sets the date on directories, DeleteFile() will delete
directories and links too, there are many more....
fh_Port wasn't a message port, (who would have guessed), it was a boolean value to indicate whether a stream was interactive or not,
fh_Type wasn't anything to do with a type (surprise !!), it was infact a message port pointer.
Have a good look through the obsolete.h file, it's worth it just for a good laugh.
Re: SetFileDate & DeleteFile gone?
Thank you very much, Colin.colinw wrote:Seriously. ?Raziel wrote: I came across the disappearance of dol_Task aswell.
May someone be so nice and explain what is was used for and why it has been ditched?
Thanks
dol_Task wasn't a task pointer, it is a message port instead, SetFileDate() also sets the date on directories, DeleteFile() will delete
directories and links too, there are many more....
fh_Port wasn't a message port, (who would have guessed), it was a boolean value to indicate whether a stream was interactive or not,
fh_Type wasn't anything to do with a type (surprise !!), it was infact a message port pointer.
Have a good look through the obsolete.h file, it's worth it just for a good laugh.
I can't code myself.
I stumbled over this when doing a port, just wanted to be sure that it's secure to be commented out (and not haunt me afterwards)
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
- colinw
- AmigaOS Core Developer
- Posts: 207
- Joined: Mon Aug 15, 2011 9:20 am
- Location: Brisbane, QLD. Australia.
Re: SetFileDate & DeleteFile gone?
I'd say NO, you can't just comment out bits of code and expect it to stay working.Raziel wrote: Thank you very much, Colin.
I can't code myself.
I stumbled over this when doing a port, just wanted to be sure that it's secure to be commented out (and not haunt me afterwards)
You have two choices, just add; #include <dos/obsolete.h> at the top, Or, change the offending line from; dol_Task to dol_Port.
Either will do, but I certainly wouldn't just remove the code without knowing what it does.