Michel Boaventura <[email protected]> writes:

> Ben, how do I make a program to use the rename function from the gnulib, and
> not the native one?
> I will test it today and see what happens with hard links.

Instead of doing that, try compiling the following simple
program, which seem to work OK under mingw and wine:

#include <stdio.h>
#include <stdlib.h>

#define WIN32_LEAN_AND_MEAN
#include <windows.h>

int
main(int argc, char *argv[])
{
  if (argc != 3)
    {
      fprintf (stderr, "usage; %s SOURCE DEST\n", argv[0]);
      return EXIT_FAILURE;
    }

  printf ("renaming %s as %s... ", argv[1], argv[2]);
  if (MoveFileEx (argv[1], argv[2], MOVEFILE_REPLACE_EXISTING))
    printf ("success\n");
  else
    printf ("error %d\n", GetLastError ());

  return 0;
}

-- 
"In the PARTIES partition there is a small section called the BEER.
 Prior to turning control over to the PARTIES partition,
 the BIOS must measure the BEER area into PCR[5]."
--TCPA PC Specific Implementation Specification


_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to