~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_delete.c

Merged vcol stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
 
 
16
 
#include "config.h"
17
 
 
18
 
#include "drizzled/internal/my_sys.h"
19
 
#include "drizzled/error.h"
20
 
 
21
 
namespace drizzled
22
 
{
23
 
namespace internal
24
 
{
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
#include "mysys_priv.h"
 
17
#include "mysys_err.h"
 
18
#include <my_sys.h>
25
19
 
26
20
int my_delete(const char *name, myf MyFlags)
27
21
{
29
23
 
30
24
  if ((err = unlink(name)) == -1)
31
25
  {
32
 
    errno=errno;
 
26
    my_errno=errno;
33
27
    if (MyFlags & (MY_FAE+MY_WME))
34
28
      my_error(EE_DELETE,MYF(ME_BELL+ME_WAITTANG+(MyFlags & ME_NOINPUT)),
35
29
               name,errno);
39
33
    err= -1;
40
34
  return(err);
41
35
} /* my_delete */
42
 
 
43
 
} /* namespace internal */
44
 
} /* namespace drizzled */