Changeset 79546
- Timestamp:
- 06/17/11 11:53:16 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Pextlib.c
r79539 r79546 55 55 #include <unistd.h> 56 56 57 /* 58 people use this on non-mac systems 59 #include <mach-o/loader.h> 60 #include <mach-o/fat.h> 61 */ 62 #define MH_MAGIC (0xfeedface) 63 #define MH_MAGIC_64 (0xfeedfacf) 64 #define FAT_MAGIC (0xcafebabe) 57 #ifdef __MACH__ 58 #include <mach-o/loader.h> 59 #include <mach-o/fat.h> 60 #endif 65 61 66 62 #include <tcl.h> … … 474 470 } 475 471 476 int fileIsBinaryCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { 472 #ifdef __MACH__ 473 /** 474 * Tcl function to determine whether a file given by path is binary (in terms of being Mach-O) 475 * Defined on Mac-Systems only, because the necessary headers are only available there. 476 * 477 * Synopsis: fileIsBinary filename 478 */ 479 static int fileIsBinaryCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { 477 480 const char *path; 478 481 FILE *file; … … 562 565 return TCL_OK; 563 566 } 564 567 #endif 565 568 566 569 int Pextlib_Init(Tcl_Interp *interp) … … 596 599 Tcl_CreateObjCommand(interp, "unsetenv", UnsetEnvCmd, NULL, NULL); 597 600 Tcl_CreateObjCommand(interp, "lchown", lchownCmd, NULL, NULL); 601 Tcl_CreateObjCommand(interp, "realpath", RealpathCmd, NULL, NULL); 602 #ifdef __MACH__ 598 603 Tcl_CreateObjCommand(interp, "fileIsBinary", fileIsBinaryCmd, NULL, NULL); 599 Tcl_CreateObjCommand(interp, "realpath", RealpathCmd, NULL, NULL); 604 #endif 600 605 601 606 Tcl_CreateObjCommand(interp, "readline", ReadlineCmd, NULL, NULL);
Note: See TracChangeset
for help on using the changeset viewer.

