Browse Source

* BSD fix

marco 22 years ago
parent
commit
36c34e7353
1 changed files with 10 additions and 2 deletions
  1. 10 2
      packages/extra/opengl/dllfuncs.pp

+ 10 - 2
packages/extra/opengl/dllfuncs.pp

@@ -23,10 +23,15 @@ const
   RTLD_NOW          = $002;
   RTLD_NOW          = $002;
   RTLD_BINDING_MASK = $003;
   RTLD_BINDING_MASK = $003;
 
 
+{$ifdef Linux}
 function dlopen(Name: PChar; Flags: LongInt) : Pointer; cdecl; external 'dl';
 function dlopen(Name: PChar; Flags: LongInt) : Pointer; cdecl; external 'dl';
 function dlsym(Lib: Pointer; Name: PChar) : Pointer; cdecl; external 'dl';
 function dlsym(Lib: Pointer; Name: PChar) : Pointer; cdecl; external 'dl';
 function dlclose(Lib: Pointer): LongInt; cdecl; external 'dl';
 function dlclose(Lib: Pointer): LongInt; cdecl; external 'dl';
-
+{$else}
+function dlopen(Name: PChar; Flags: LongInt) : Pointer; cdecl; external 'c';
+function dlsym(Lib: Pointer; Name: PChar) : Pointer; cdecl; external 'c';
+function dlclose(Lib: Pointer): LongInt; cdecl; external 'c';
+{$endif}
 
 
 function LoadLibrary(Name: PChar): THandle;
 function LoadLibrary(Name: PChar): THandle;
 begin
 begin
@@ -51,7 +56,10 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.1  2002-10-13 13:57:30  sg
+  Revision 1.2  2003-08-25 18:16:38  marco
+   * BSD fix
+
+  Revision 1.1  2002/10/13 13:57:30  sg
   * Finally, the new units are available: Match the C headers more closely;
   * Finally, the new units are available: Match the C headers more closely;
     support for OpenGL extensions, and much more. Based on the Delphi units
     support for OpenGL extensions, and much more. Based on the Delphi units
     by Tom Nuydens of delphi3d.net
     by Tom Nuydens of delphi3d.net